@vitejs/devtools 0.0.0-alpha.9 → 0.1.1
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/DockIcon-BtMEW4VE.js +97 -0
- package/dist/DockStandalone-CZAqITKs.js +81 -0
- package/dist/LogItem-BTrEubKY.js +205 -0
- package/dist/ToastOverlay-DO3Kl_rY.js +1055 -0
- package/dist/ViewBuiltinLogs-BL373XPJ.js +428 -0
- package/dist/ViewBuiltinTerminals-DdpE1Ftb.js +10409 -0
- package/dist/ViewJsonRender-coidkW9b.js +6835 -0
- package/dist/cli-commands-BRswBnHn.js +180 -0
- package/dist/cli-commands.js +3 -5
- package/dist/cli.js +3 -6
- package/dist/client/inject.js +171 -18
- package/dist/client/standalone/assets/DockStandalone-DDaYjGO1.js +1 -0
- package/dist/client/standalone/assets/LogItem-CKbVrExA.js +1 -0
- package/dist/client/standalone/assets/ViewBuiltinLogs-9oWDdl1G.js +1 -0
- package/dist/client/standalone/assets/ViewBuiltinTerminals-CpexS-ib.js +36 -0
- package/dist/client/standalone/assets/ViewJsonRender-CKPzRgqQ.js +43 -0
- package/dist/client/standalone/assets/dist-JpCJ4ieR.js +1 -0
- package/dist/client/standalone/assets/iconify-C-CPDXMf.js +2 -0
- package/dist/client/standalone/assets/index-3wlMt-60.js +3 -0
- package/dist/client/standalone/assets/index-6F2y1lxr.css +1 -0
- package/dist/client/standalone/assets/runtime-core.esm-bundler-oO31W4LZ.js +1 -0
- package/dist/client/standalone/index.html +7 -3
- package/dist/client/webcomponents.d.ts +21657 -31
- package/dist/client/webcomponents.js +307 -455
- package/dist/config.d.ts +25 -0
- package/dist/config.js +14 -0
- package/dist/dirs.js +7 -3
- package/dist/dist-Cgqg5_oP.js +1113 -0
- package/dist/iconify-YyqAMHKf.js +1625 -0
- package/dist/index.d.ts +256 -13
- package/dist/index.js +2 -4
- package/dist/plugins-Cvy_lJ0L.js +2135 -0
- package/dist/popup-ffZHGm5D.js +358 -0
- package/dist/utils-Csuu5uNf.js +10 -0
- package/dist/{dist-2aLfy0Lc.js → vue.runtime.esm-bundler-D2MZbyFr.js} +1948 -1734
- package/package.json +53 -21
- package/dist/cli-commands-CWESTkWI.js +0 -97
- package/dist/client/standalone/assets/index-CXKamp9k.js +0 -7
- package/dist/client/standalone/assets/index-DULlvzQC.css +0 -1
- package/dist/dirs-DcSK9l9L.js +0 -9
- package/dist/index-C-9eMTqf.d.ts +0 -142
- package/dist/plugins-5VE4Mfdt.js +0 -1365
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{D as e,I as t,L as n,S as r,T as i,W as a,X as o,a as s,c,f as l,gt as u,h as d,ht as f,l as p,mt as m,n as h,o as g,p as _,s as v}from"./runtime-core.esm-bundler-oO31W4LZ.js";import{a as y,h as ee,i as b,n as x,o as te,p as ne,r as S,s as re,t as ie}from"./LogItem-CKbVrExA.js";import{r as ae}from"./dist-JpCJ4ieR.js";var C={class:`text-xs op40`},w={class:`flex flex-wrap items-center gap-0.5`},T=[`onClick`],E=d({__name:`FilterToggles`,props:{label:{},items:{},active:{},styles:{},hashColor:{type:Function}},emits:[`toggle`],setup(t){return(n,r)=>(i(),p(h,null,[g(`span`,C,u(t.label),1),g(`div`,w,[(i(!0),p(h,null,e(t.items,e=>(i(),p(`button`,{key:e,class:m([`px-1.5 py-0.5 rounded text-xs flex items-center gap-0.5 hover:bg-active transition`,[t.active.size===0||t.active.has(e)?t.styles?.[e]?.color||``:`op30`]]),style:f(!t.styles?.[e]?.color&&t.hashColor?{color:t.active.size===0||t.active.has(e)?t.hashColor(e,1):void 0,backgroundColor:t.active.size===0||t.active.has(e)?t.hashColor(e,.1):void 0}:void 0),onClick:t=>n.$emit(`toggle`,e)},[t.styles?.[e]?.icon?(i(),p(`div`,{key:0,class:m([t.styles[e].icon,`w-3.5 h-3.5`])},null,2)):c(``,!0),g(`span`,null,u(t.styles?.[e]?.label||e),1)],14,T))),128))])],64))}}),oe={class:`w-full h-full grid grid-rows-[max-content_1fr]`},se={class:`border-base border-b p3 flex flex-col gap-2`},ce={class:`flex items-center gap-1`},le=[`title`],ue={key:0,class:`text-xs op40`},de={key:2,class:`border-l border-base h-4 mx-0.5`},fe={class:`flex flex-wrap items-center gap-1`},pe={class:`h-full of-y-auto`},me={key:0,class:`flex items-center justify-center h-full op50 text-sm`},he=[`onClick`],ge=[`onClick`],_e={key:0,class:`h-full of-y-auto border-l border-base p-4`},D={class:`flex items-start gap-2 mb-3`},O={class:`flex-1`},k={class:`font-medium text-lg`},A={class:`flex flex-wrap items-center gap-2 mb-3 text-xs`},j={class:`capitalize`},M={key:1,class:`flex items-center gap-1 text-amber`},N=[`title`],P={key:2,class:`flex items-center gap-0.5 op40`},F={key:0,class:`text-sm op80 mb-3 whitespace-pre-wrap`},I={key:1,class:`flex flex-wrap gap-1 mb-3`},ve={key:3,class:`text-sm mb-3 bg-gray/5 rounded p-2`},ye={key:0,class:`font-mono text-xs`},be={key:1,class:`text-xs op70 mt-1`},xe={key:2,class:`text-xs op50 mt-1 font-mono`},Se={key:4,class:`mb-3`},Ce={class:`text-xs bg-gray/5 rounded p-2 of-x-auto whitespace-pre-wrap font-mono`},we={key:5,class:`flex flex-wrap gap-3 mb-3 text-xs op50`},Te={key:0,class:`flex items-center gap-1`},L={key:1,class:`flex items-center gap-1`},Ee={class:`flex flex-col gap-1 mb-3 text-xs op40 font-mono border-t border-base pt-3`},R=d({__name:`ViewBuiltinLogs`,props:{context:{}},setup(d){let f=d;function C(e){return new Date(e).toLocaleTimeString()}let w=re(f.context),T=Object.keys(y),R=Object.keys(S),De={newest:`Newest first`,oldest:`Oldest first`,level:`By severity`},Oe={newest:`i-ph:sort-descending-duotone`,oldest:`i-ph:sort-ascending-duotone`,level:`i-ph:warning-diamond-duotone`},z=a(``),B=a(null),V=a(new Set),H=a(new Set),U=a(new Set),W=a(new Set),G=a(`newest`),K=[`newest`,`oldest`,`level`];function ke(){G.value=K[(K.indexOf(G.value)+1)%K.length]}let q={error:0,warn:1,info:2,success:3,debug:4};function Ae(e){let t=V.value;t.has(e)?t.delete(e):t.add(e)}function je(e){let t=H.value;t.has(e)?t.delete(e):t.add(e)}function Me(e){let t=U.value;t.has(e)?t.delete(e):t.add(e)}function Ne(e){let t=W.value;t.has(e)?t.delete(e):t.add(e)}let J=s(()=>V.value.size>0||H.value.size>0||U.value.size>0||W.value.size>0||z.value.length>0);function Pe(){V.value.clear(),H.value.clear(),U.value.clear(),W.value.clear(),z.value=``}let Y=s(()=>{let e=new Set;for(let t of w.entries)if(t.labels)for(let n of t.labels)e.add(n);return Array.from(e).sort()}),X=s(()=>{let e=new Set;for(let t of w.entries)t.category&&e.add(t.category);return Array.from(e).sort()}),Z=s(()=>{let e=w.entries;if(V.value.size>0&&(e=e.filter(e=>V.value.has(e.level))),H.value.size>0&&(e=e.filter(e=>e.labels?.some(e=>H.value.has(e)))),U.value.size>0&&(e=e.filter(e=>U.value.has(e.from))),W.value.size>0&&(e=e.filter(e=>e.category&&W.value.has(e.category))),z.value){let t=z.value.toLowerCase();e=e.filter(e=>e.message.toLowerCase().includes(t)||e.description?.toLowerCase().includes(t)||e.from?.toLowerCase().includes(t)||e.category?.toLowerCase().includes(t)||e.labels?.some(e=>e.toLowerCase().includes(t)))}return G.value===`oldest`?[...e]:G.value===`level`?e.toSorted((e,t)=>q[e.level]-q[t.level]):e.toReversed()}),Q=s(()=>B.value?w.entries.find(e=>e.id===B.value)??null:null),Fe=ae(s(()=>Q.value?.timestamp??Date.now()));async function Ie(e){if(!e.filePosition)return;let{file:t,line:n,column:r}=e.filePosition,i=t;n&&(i+=`:${n}`),r&&(i+=`:${r}`),await f.context.rpc.call(`vite:core:open-in-editor`,i)}async function Le(){await f.context.rpc.call(`devtoolskit:internal:logs:clear`),B.value=null}async function $(e){await f.context.rpc.call(`devtoolskit:internal:logs:remove`,e),B.value===e&&(B.value=null)}async function Re(){let e=Z.value.map(e=>e.id);for(let t of e)await f.context.rpc.call(`devtoolskit:internal:logs:remove`,t);B.value=null}return r(()=>{te()}),(r,a)=>(i(),p(`div`,oe,[g(`div`,se,[g(`div`,ce,[n(g(`input`,{"onUpdate:modelValue":a[0]||=e=>z.value=e,type:`text`,placeholder:`Search logs...`,class:`bg-transparent border border-base rounded px-2 py-0.5 text-xs w-48 outline-none focus:border-purple`},null,512),[[ne,z.value]]),g(`button`,{class:`flex items-center gap-0.5 op50 hover:op100 p-1 rounded hover:bg-active transition`,title:De[G.value],onClick:ke},[g(`div`,{class:m([Oe[G.value],`w-4 h-4`])},null,2)],8,le),a[7]||=g(`div`,{class:`flex-1`},null,-1),Z.value.length===o(w).entries.length?c(``,!0):(i(),p(`span`,ue,u(Z.value.length)+`/`+u(o(w).entries.length),1)),J.value?(i(),p(`button`,{key:1,class:`text-xs op50 hover:op100 px-1.5 py-0.5 hover:bg-active rounded transition flex items-center gap-0.5`,title:`Reset all filters`,onClick:Pe},[...a[4]||=[g(`div`,{class:`i-ph:funnel-x-duotone w-3.5 h-3.5`},null,-1),l(` Reset Filters `,-1)]])):c(``,!0),J.value?(i(),p(`div`,de)):c(``,!0),J.value&&Z.value.length>0?(i(),p(`button`,{key:3,class:`text-xs op50 hover:op100 px-1.5 py-0.5 hover:bg-active rounded transition flex items-center gap-0.5`,title:`Dismiss all matching the current filter`,onClick:Re},[...a[5]||=[g(`div`,{class:`i-ph:trash-duotone w-3.5 h-3.5`},null,-1),l(` Dismiss filtered `,-1)]])):c(``,!0),!J.value&&o(w).entries.length>0?(i(),p(`button`,{key:4,class:`text-xs op50 hover:op100 px-1.5 py-0.5 hover:bg-active rounded transition flex items-center gap-0.5`,title:`Dismiss all logs`,onClick:Le},[...a[6]||=[g(`div`,{class:`i-ph:trash-duotone w-3.5 h-3.5`},null,-1),l(` Dismiss all `,-1)]])):c(``,!0)]),g(`div`,fe,[_(E,{label:`Level`,items:o(T),active:V.value,styles:o(y),onToggle:Ae},null,8,[`items`,`active`,`styles`]),a[10]||=g(`div`,{class:`border-l border-base h-4 mx-0.5`},null,-1),_(E,{label:`From`,items:o(R),active:U.value,styles:o(S),onToggle:Me},null,8,[`items`,`active`,`styles`,`onToggle`]),X.value.length>0?(i(),p(h,{key:0},[a[8]||=g(`div`,{class:`border-l border-base h-4 mx-1`},null,-1),_(E,{label:`Category`,items:X.value,active:W.value,"hash-color":o(b),onToggle:Ne},null,8,[`items`,`active`,`hash-color`])],64)):c(``,!0),Y.value.length>0?(i(),p(h,{key:1},[a[9]||=g(`div`,{class:`border-l border-base h-4 mx-1`},null,-1),_(E,{label:`Labels`,items:Y.value,active:H.value,"hash-color":o(b),onToggle:je},null,8,[`items`,`active`,`hash-color`])],64)):c(``,!0)])]),g(`div`,{class:m([`h-full of-hidden`,Q.value?`grid grid-cols-[1fr_1fr]`:``])},[g(`div`,pe,[Z.value.length===0?(i(),p(`div`,me,` No logs `)):c(``,!0),(i(!0),p(h,null,e(Z.value,e=>(i(),p(`div`,{key:e.id,class:m([`w-full text-left border-b border-base hover:bg-active transition border-l-2 text-sm group cursor-pointer`,[B.value===e.id?`bg-active`:``]]),onClick:t=>B.value=B.value===e.id?null:e.id},[_(ie,{entry:e,class:`px-3 py-2.5`},{actions:t(()=>[g(`button`,{class:`op0 group-hover:op50 hover:op100! p-0.5 rounded hover:bg-active flex-none`,title:`Dismiss`,onClick:ee(t=>$(e.id),[`stop`])},[...a[11]||=[g(`div`,{class:`i-ph-trash-duotone w-3 h-3`},null,-1)]],8,ge)]),_:2},1032,[`entry`])],10,he))),128))]),Q.value?(i(),p(`div`,_e,[g(`div`,D,[g(`div`,O,[g(`div`,k,u(Q.value.message),1)]),g(`button`,{class:`op50 hover:op100 p-1`,title:`Dismiss`,onClick:a[1]||=e=>$(Q.value.id)},[...a[12]||=[g(`div`,{class:`i-ph-trash-duotone w-4 h-4`},null,-1)]]),g(`button`,{class:`op50 hover:op100 p-1`,title:`Close detail`,onClick:a[2]||=e=>B.value=null},[...a[13]||=[g(`div`,{class:`i-ph-x w-4 h-4`},null,-1)]])]),g(`div`,A,[g(`span`,{class:m([`flex items-center gap-1`,o(y)[Q.value.level].color])},[g(`div`,{class:m([o(y)[Q.value.level].icon,`w-3.5 h-3.5`])},null,2),g(`span`,j,u(Q.value.level),1)],2),o(S)[Q.value.from]?(i(),p(`span`,{key:0,class:m([`flex items-center gap-1`,o(S)[Q.value.from].color])},[g(`div`,{class:m([o(S)[Q.value.from].icon,`w-3.5 h-3.5`])},null,2),l(` `+u(o(S)[Q.value.from].label),1)],2)):c(``,!0),Q.value.status===`loading`?(i(),p(`span`,M,[...a[14]||=[g(`div`,{class:`w-3 h-3 border-1.5 border-current border-t-transparent rounded-full animate-spin`},null,-1),l(` Loading `,-1)]])):c(``,!0),g(`span`,{class:`op40`,title:C(Q.value.timestamp)},u(o(Fe)),9,N),Q.value.notify?(i(),p(`span`,P,[...a[15]||=[g(`div`,{class:`i-ph:bell-duotone w-3.5 h-3.5`},null,-1),l(` notify `,-1)]])):c(``,!0)]),Q.value.description?(i(),p(`div`,F,u(Q.value.description),1)):c(``,!0),Q.value.category||Q.value.labels&&Q.value.labels.length?(i(),p(`div`,I,[Q.value.category?(i(),v(x,{key:0,label:Q.value.category},null,8,[`label`])):c(``,!0),(i(!0),p(h,null,e(Q.value.labels,e=>(i(),v(x,{key:e,label:e},null,8,[`label`]))),128))])):c(``,!0),Q.value.filePosition?(i(),p(`button`,{key:2,class:`flex items-center gap-1.5 text-sm text-blue hover:underline mb-3`,onClick:a[3]||=e=>Ie(Q.value)},[a[16]||=g(`div`,{class:`i-ph:file-code-duotone w-4 h-4`},null,-1),g(`span`,null,[l(u(Q.value.filePosition.file),1),Q.value.filePosition.line?(i(),p(h,{key:0},[l(`:`+u(Q.value.filePosition.line),1)],64)):c(``,!0),Q.value.filePosition.column?(i(),p(h,{key:1},[l(`:`+u(Q.value.filePosition.column),1)],64)):c(``,!0)])])):c(``,!0),Q.value.elementPosition?(i(),p(`div`,ve,[a[17]||=g(`div`,{class:`op50 text-xs mb-1`},` Element `,-1),Q.value.elementPosition.selector?(i(),p(`div`,ye,u(Q.value.elementPosition.selector),1)):c(``,!0),Q.value.elementPosition.description?(i(),p(`div`,be,u(Q.value.elementPosition.description),1)):c(``,!0),Q.value.elementPosition.boundingBox?(i(),p(`div`,xe,u(Q.value.elementPosition.boundingBox.x)+`, `+u(Q.value.elementPosition.boundingBox.y)+` (`+u(Q.value.elementPosition.boundingBox.width)+` × `+u(Q.value.elementPosition.boundingBox.height)+`) `,1)):c(``,!0)])):c(``,!0),Q.value.stacktrace?(i(),p(`div`,Se,[a[18]||=g(`div`,{class:`op50 text-xs mb-1`},` Stack Trace `,-1),g(`pre`,Ce,u(Q.value.stacktrace),1)])):c(``,!0),Q.value.autoDismiss||Q.value.autoDelete?(i(),p(`div`,we,[Q.value.autoDismiss?(i(),p(`span`,Te,[a[19]||=g(`div`,{class:`i-ph:bell-slash-duotone w-3.5 h-3.5`},null,-1),l(` Auto-dismiss: `+u(Q.value.autoDismiss/1e3)+`s `,1)])):c(``,!0),Q.value.autoDelete?(i(),p(`span`,L,[a[20]||=g(`div`,{class:`i-ph:timer-duotone w-3.5 h-3.5`},null,-1),l(` Auto-delete: `+u(Q.value.autoDelete/1e3)+`s `,1)])):c(``,!0)])):c(``,!0),g(`div`,Ee,[g(`span`,null,`ID: `+u(Q.value.id),1),g(`span`,null,u(C(Q.value.timestamp))+` (`+u(new Date(Q.value.timestamp).toLocaleDateString())+`)`,1)])])):c(``,!0)],2)]))}});export{R as default};
|