@unocss/inspector 0.21.2 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{_id_.74833207.js → _id_.eb51903f.js} +1 -1
- package/dist/client/assets/index.472209e6.js +3 -0
- package/dist/client/assets/{index.182958e3.css → index.57880b2a.css} +1 -1
- package/dist/client/assets/{repl.422f708d.js → repl.537579bc.js} +1 -1
- package/dist/client/assets/{vendor.a3035bf8.js → vendor.4d112a3c.js} +21 -21
- package/dist/client/index.html +3 -3
- package/package.json +1 -1
- package/dist/client/assets/index.5663f67e.js +0 -3
package/dist/client/index.html
CHANGED
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
9
9
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
10
10
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@100;200;400&family=Fira+Code&display=swap" rel="stylesheet" />
|
|
11
|
-
<script type="module" crossorigin src="/__unocss/assets/index.
|
|
12
|
-
<link rel="modulepreload" href="/__unocss/assets/vendor.
|
|
13
|
-
<link rel="stylesheet" href="/__unocss/assets/index.
|
|
11
|
+
<script type="module" crossorigin src="/__unocss/assets/index.472209e6.js"></script>
|
|
12
|
+
<link rel="modulepreload" href="/__unocss/assets/vendor.4d112a3c.js">
|
|
13
|
+
<link rel="stylesheet" href="/__unocss/assets/index.57880b2a.css">
|
|
14
14
|
</head>
|
|
15
15
|
<body>
|
|
16
16
|
<div id="app"></div>
|
package/package.json
CHANGED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
var he=Object.defineProperty,me=Object.defineProperties;var fe=Object.getOwnPropertyDescriptors;var X=Object.getOwnPropertySymbols;var ve=Object.prototype.hasOwnProperty,ge=Object.prototype.propertyIsEnumerable;var Y=(e,o,t)=>o in e?he(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t,F=(e,o)=>{for(var t in o||(o={}))ve.call(o,t)&&Y(e,t,o[t]);if(X)for(var t of X(o))ge.call(o,t)&&Y(e,t,o[t]);return e},ee=(e,o)=>me(e,fe(o));import{C as ye,w as te,d as y,r as V,u as xe,o as $e,a as d,c as _,b as r,e as be,f as oe,g as w,h as b,i as a,j as ke,F as I,t as p,k as E,l as we,m as Ee,n as h,p as $,q as f,s as Re,v as R,x as L,y as je,z as j,A as ne,B as Se,D as Ce,E as M,G as Oe,H as Fe,I as Ve}from"./vendor.a3035bf8.js";const Ie=function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const c of i.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&n(c)}).observe(document,{childList:!0,subtree:!0});function t(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerpolicy&&(i.referrerPolicy=s.referrerpolicy),s.crossorigin==="use-credentials"?i.credentials="include":s.crossorigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(s){if(s.ep)return;s.ep=!0;const i=t(s);fetch(s.href,i)}};Ie();const Le="modulepreload",se={},Me="/__unocss/",P=function(o,t){return!t||t.length===0?o():Promise.all(t.map(n=>{if(n=`${Me}${n}`,n in se)return;se[n]=!0;const s=n.endsWith(".css"),i=s?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${n}"]${i}`))return;const c=document.createElement("link");if(c.rel=s?"stylesheet":Le,s||(c.as="script",c.crossOrigin=""),c.href=n,document.head.appendChild(c),s)return new Promise((l,v)=>{c.addEventListener("load",l),c.addEventListener("error",v)})})).then(()=>o())};function re(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const Pe=/^\[(.+?)~?="(.*)"\]$/,Te=/(?!\d|-{2}|-\d)[a-zA-Z0-9\u00A0-\uFFFF-_:%-?]/;function Ae(e){return e.match(Pe)}function Qt(e=""){return Te.test(e)}function ze(e,o){const t=[],n=[],s=new Set;Array.from(o).forEach(c=>{const l=Ae(c);l?l[2]?n.push(l):s.add(l[1]):s.add(c)});let i=0;return e.split(/[\s"';<>]/g).forEach(c=>{const l=i+c.length;s.has(c)&&t.push([i,l,c]),i=l+1}),n.forEach(([,c,l])=>{const v=new RegExp(`${re(c)}=(['"])[^\\1]*?${re(l)}[^\\1]*?\\1`,"g");Array.from(e.matchAll(v)).forEach(x=>{const g=x.index+x[0].indexOf(l),m=g+l.length;t.push([g,m,`[${c}="${l}"]`])})}),t}function De(e,o,t={}){const n=ye.fromTextArea(e.value,F({theme:"vars"},t));let s=!1;return n.on("change",()=>{if(s){s=!1;return}o.value=n.getValue()}),te(o,i=>{if(i!==n.getValue()){s=!0;const c=n.listSelections();n.replaceRange(i,n.posFromIndex(0),n.posFromIndex(1/0)),n.setSelections(c)}},{immediate:!0}),n}const Ne={relative:"","font-mono":"","text-sm":""},Be=y({props:{modelValue:null,mode:null,readOnly:{type:Boolean},matched:null},setup(e,{emit:o}){const t=e,n={html:"htmlmixed",vue:"htmlmixed",svelte:"htmlmixed",js:"javascript",jsx:"jsx",mjs:"javascript",cjs:"javascript",ts:"typescript",tsx:"jsx",mts:"typescript"},s=V(),i=xe(t,"modelValue",o,{passive:!0});return $e(async()=>{const c=De(s,i,ee(F({},t),{mode:n[t.mode||""]||t.mode}));c.setSize("100%","100%"),setTimeout(()=>c.refresh(),100);const l=[];function v(m,k){l.push(c.markText(c.posFromIndex(m),c.posFromIndex(k),{className:"highlighted"}))}function x(){l.forEach(m=>m.clear()),ze(t.modelValue,Array.from(t.matched||[])).forEach(m=>v(m[0],m[1]))}let g=0;te(()=>[t.modelValue,t.matched],async()=>{clearTimeout(g),t.matched&&(g=setTimeout(x,100))},{immediate:!0})}),(c,l)=>(d(),_("div",Ne,[r("textarea",{ref_key:"el",ref:s},null,512)]))}});var ce=(e,o)=>{const t=e.__vccOpts||e;for(const[n,s]of o)t[n]=s;return t};const He={},Ue={"bg-gray4:10":"","p-5":"",b:"b main",text:"sm gray5 dark:gray3"};function We(e,o){return d(),_("div",Ue,[be(e.$slots,"default")])}var qe=ce(He,[["render",We]]);const Ke="/@vite/client",ie=oe(),le=oe(),Ge=ie.on,ae=le.on;P(()=>import(Ke),[]).then(e=>{const o=e.createHotContext("/");o.on("vite:beforeUpdate",t=>{t.updates.forEach(n=>{ie.trigger(n)})}),o.on("unocss:config-changed",()=>{le.trigger()})}).catch(e=>{console.error("failed to connect to client vite server, you might need to do manual refresh to see the updates"),console.error(e)});const S="/__unocss_api",de=w(S).json(),T=w(`${S}/overview`,{immediate:!1}).json(),u=de.data,C=T.data;ae(()=>{de.execute(),T.execute()});function Xt(e){const o=w(b(()=>`${S}/module?id=${encodeURIComponent(a(e))}`),{refetch:!0}).json();return ae(()=>o.execute()),Ge(t=>{var n;(t.path===a(e)||t.path===a(e).slice(((n=u.value)==null?void 0:n.root.length)||0))&&setTimeout(()=>{o.execute()},50)}),o}function Yt(e){const o=ke(e,500);return w(b(()=>`${S}/repl?token=${encodeURIComponent(o.value)}`),{refetch:!0}).json()}const O=b(()=>{if(!u.value)return{workspace:{children:{},items:[]},root:{children:{},items:[]}};const e=u.value.modules.map(n=>({full:n,path:n})),o=e.filter(n=>n.full.startsWith(u.value.root)),t=e.filter(n=>!n.full.startsWith(u.value.root));return o.forEach(n=>n.path=n.path.slice(u.value.root.length+1)),{workspace:ue(o,"Project Root"),root:ue(t,"Disk Root")}});function ue(e,o){const t={name:o,children:{},items:[]};function n(s,i,c=t){if(i.length<=1){c.items.push(s);return}const l=i.shift();c.children[l]||(c.children[l]={name:l,children:{},items:[]}),n(s,i,c.children[l])}return e.forEach(s=>{const i=s.path.split(/\//g).filter(Boolean);n(s,i)}),t}const Ze={key:0,"ws-wrap":""},Je=r("span",{op80:""},".",-1),Qe={key:1},Xe=y({props:{id:null},setup(e){return(o,t)=>e.id&&a(u)?(d(),_("span",Ze,[e.id.startsWith(a(u).root)?(d(),_(I,{key:0},[Je,r("span",null,p(e.id.slice(a(u).root.length)),1)],64)):(d(),_("span",Qe,p(e.id),1))])):E("",!0)}}),Ye=(e,o)=>{const t=V(null);return we(e,()=>{var s;const n=(s=Ee(e))==null?void 0:s.clientHeight;t.value=n?`--${o}: calc(100vh - ${n}px - 2px);`:null}),t},et={"h-full":""},tt={p:"x4 y2",grid:"~ cols-4 gap-4"},ot=r("div",{op80:""}," Presets ",-1),nt={op50:"","ws-pre":""},st={overflow:"auto"},rt=r("div",{op80:""}," Rules ",-1),ct=r("span",{op50:""},"dynamic",-1),it=r("br",null,null,-1),lt=r("span",{op50:""},"static",-1),at=r("div",{op80:""}," Variants ",-1),dt=r("div",{op80:""}," Shortcuts ",-1),ut={key:0},_t=r("div",{op80:""}," Config File ",-1),pt=r("div",{op80:""}," Version ",-1),ht={op50:"","ws-pre":""},mt={b:"t main",p:"x4 y2",grid:"~ cols-4 gap-4"},ft=r("div",{op80:""}," Included Files ",-1),vt=r("div",{op80:""}," CSS Size ",-1),gt=r("span",{op50:""},"gzipped",-1),yt=r("div",{op80:""}," Matched Rules ",-1),xt=r("div",{op80:""}," Layers ",-1),$t={op50:"","ws-pre":""},bt=y({setup(e){const o=V(null),t=Ye(o,"overview-scrolls");return T.execute(),(n,s)=>{var v;const i=Xe,c=qe,l=Be;return d(),_("div",et,[h(c,{ref_key:"status",ref:o,p0:""},{default:$(()=>{var x,g,m,k,A,z,D,N,B,H,U,W,q,K,G,Z,J,Q;return[r("div",tt,[r("div",null,[ot,r("div",nt,p((m=(g=(x=a(u))==null?void 0:x.config)==null?void 0:g.presets)==null?void 0:m.map(pe=>pe.name).join(`
|
|
2
|
-
`)),1)]),r("div",st,[rt,f(" "+p((z=(A=(k=a(u))==null?void 0:k.config)==null?void 0:A.rulesDynamic)==null?void 0:z.filter(Boolean).length)+" ",1),ct,it,f(" "+p(Object.keys(((N=(D=a(u))==null?void 0:D.config)==null?void 0:N.rulesStaticMap)||{}).length)+" ",1),lt]),r("div",null,[at,f(" "+p((U=(H=(B=a(u))==null?void 0:B.config)==null?void 0:H.variants)==null?void 0:U.length),1)]),r("div",null,[dt,f(" "+p((W=a(u))==null?void 0:W.config.shortcuts.length),1)]),((q=a(u))==null?void 0:q.configPath)?(d(),_("div",ut,[_t,h(i,{id:a(u).configPath},null,8,["id"])])):E("",!0),r("div",null,[pt,r("div",ht,p((K=a(u))==null?void 0:K.version),1)])]),r("div",mt,[r("div",null,[ft,f(" "+p((G=a(u))==null?void 0:G.modules.length),1)]),r("div",null,[vt,f(" "+p(((((Z=a(C))==null?void 0:Z.gzipSize)||0)/1024).toFixed(2))+" KiB ",1),gt]),r("div",null,[yt,f(" "+p((J=a(C))==null?void 0:J.matched.length),1)]),r("div",null,[xt,r("div",$t,p((Q=a(C))==null?void 0:Q.layers.join(`
|
|
3
|
-
`)),1)])])]}),_:1},512),h(l,{"model-value":((v=a(C))==null?void 0:v.css)||"/* empty */","read-only":!0,mode:"css",class:"scrolls overview-scrolls",style:Re(a(t))},null,8,["model-value","style"])])}}}),kt={};function wt(e,o){const t=bt;return d(),R(t)}var Et=ce(kt,[["render",wt]]);const Rt=[{name:"index",path:"/",component:Et,props:!0},{name:"repl",path:"/repl",component:()=>P(()=>import("./repl.422f708d.js"),["assets/repl.422f708d.js","assets/repl.6afeb916.css","assets/vendor.a3035bf8.js"]),props:!0},{name:"module-id",path:"/module/:id",component:()=>P(()=>import("./_id_.74833207.js"),["assets/_id_.74833207.js","assets/_id_.0fdca14c.css","assets/vendor.a3035bf8.js"]),props:!0}],jt=y({props:{id:null},setup(e){const o=e,t=b(()=>o.id.split(/\./g).pop()),n=b(()=>{switch(t.value){case"vue":return"i-logos-vue";default:return"i-carbon-document-blank"}});return(s,i)=>(d(),_("div",{class:L(a(n))},null,2))}}),St={open:""},Ct={"cursor-default":"","select-none":"","text-sm":"",truncate:"",p:"y1"},Ot={"ml-1":""},Ft=y({props:{node:null,icon:{default:"i-carbon-folder"}},setup(e){const o=je();return(t,n)=>{const s=j("ModuleTreeNode",!0),i=jt,c=j("RouterLink");return d(),_("details",St,[r("summary",Ct,[r("div",{class:L(e.icon)},null,2),f(" "+p(e.node.name),1)]),(d(!0),_(I,null,ne(Object.entries(e.node.children),l=>(d(),R(s,{key:l[0],ml2:"",node:l[1]},null,8,["node"]))),128)),(d(!0),_(I,null,ne(e.node.items,l=>(d(),_("div",{key:l.full,ml4:"",truncate:""},[h(c,{block:"","text-sm":"",p:"x2 y1",rounded:"",to:`/module/${encodeURIComponent(l.full)}`,class:L({"bg-gray/10":l.full===a(o).params.id})},{default:$(()=>[h(i,{id:l.path},null,8,["id"]),r("span",Ot,p(l.path.split("/").pop()),1)]),_:2},1032,["to","class"])]))),128))])}}});var Vt="/__unocss/icon.svg";const It={p:"x4 y3",b:"b main",flex:"","children:my-auto":""},Lt=r("div",{flex:"","flex-auto":"","children:my-auto":"","ws-nowrap":""},[r("img",{src:Vt,filter:"","dark:invert":"","inline-block":"",h:"1.3em",m:"r-1.5"}),r("div",{"of-hidden":""},[f(" Inspector "),r("sup",{"text-teal5":"","bg-teal5:10":"",p:"x1.5 y0.5",rounded:"",italic:""},"beta")])],-1),Mt=y({setup(e){const o=Se(),t=Ce(o);return(n,s)=>(d(),_("nav",It,[Lt,r("button",{"text-lg":"","i-carbon-sun":"","dark:i-carbon-moon":"",onClick:s[0]||(s[0]=i=>a(t)())})]))}}),Pt={"h-full":""},Tt={b:"r main","of-hidden":""},At={pt:"4",flex:"~ col gap-3"},zt=r("div",{"i-carbon-dashboard":""},null,-1),Dt=r("span",null," Overview ",-1),Nt=r("div",{"i-carbon-terminal":""},null,-1),Bt=r("span",null," REPL ",-1),Ht=r("div",{b:"b main"},null,-1),Ut={b:"r main",class:"scrolls scrolls-sidebar"},Wt=y({setup(e){return(o,t)=>{const n=Mt,s=j("RouterLink"),i=Ft;return d(),_("div",Pt,[r("div",Tt,[h(n),r("div",At,[h(s,{block:"",to:"/","text-sm":"",m:"l-3.7"},{default:$(()=>[zt,Dt]),_:1}),h(s,{block:"",to:"/repl","text-sm":"",m:"l-3.7"},{default:$(()=>[Nt,Bt]),_:1}),Ht])]),r("div",Ut,[Object.keys(a(O).workspace.children).length?(d(),R(i,{key:0,node:a(O).workspace,p:"l3 t4",icon:"i-carbon-portfolio"},null,8,["node"])):E("",!0),Object.keys(a(O).root.children).length?(d(),R(i,{key:1,node:a(O).root,p:"l3 t4",icon:"i-carbon-vmdk-disk"},null,8,["node"])):E("",!0)])])}}}),qt={"h-screen":"","w-screen":"",overflow:"hidden"},Kt={"h-full":"","of-hidden":""},Gt=y({setup(e){return(o,t)=>{const n=Wt,s=j("RouterView");return d(),_("div",qt,[h(a(M.exports.Splitpanes),null,{default:$(()=>[h(a(M.exports.Pane),{size:"20","push-other-panes":!1},{default:$(()=>[h(n)]),_:1}),h(a(M.exports.Pane),{size:"80"},{default:$(()=>[r("div",Kt,[h(s)])]),_:1})]),_:1})])}}}),_e=Oe(Gt);_e.use(Fe({history:Ve(),routes:Rt}));_e.mount("#app");export{qe as _,Be as a,ce as b,Ae as c,Xt as d,Xe as e,Yt as f,Qt as i,Ye as u};
|