@nuxt/devtools 0.1.5 → 0.2.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.
Files changed (113) hide show
  1. package/README.md +2 -0
  2. package/dist/chunks/module-main.mjs +687 -672
  3. package/dist/chunks/vscode.mjs +35 -30
  4. package/dist/cli.mjs +21 -60
  5. package/dist/client/200.html +2 -2
  6. package/dist/client/404.html +2 -2
  7. package/dist/client/__inspecting/index.html +2 -2
  8. package/dist/client/_nuxt/{Badge.ec9e349b.js → Badge.4e9c300b.js} +1 -1
  9. package/dist/client/_nuxt/{FilepathItem.vue.29183a21.js → FilepathItem.vue.b36b22b8.js} +1 -1
  10. package/dist/client/_nuxt/LaunchPage.vue.c9d8bfbe.js +1 -0
  11. package/dist/client/_nuxt/NButton.a7fda268.css +1 -0
  12. package/dist/client/_nuxt/{NButton.vue.09cc4471.js → NButton.vue.b50294f1.js} +2 -2
  13. package/dist/client/_nuxt/NCheckbox.vue.69c13749.js +1 -0
  14. package/dist/client/_nuxt/NIcon.vue.656cdb1e.js +1 -0
  15. package/dist/client/_nuxt/NTextInput.vue.928c9e2a.js +1 -0
  16. package/dist/client/_nuxt/{NuxtLogo.9f2db884.js → NuxtLogo.f9908c64.js} +1 -1
  17. package/dist/client/_nuxt/SectionBlock.48da9d80.css +1 -0
  18. package/dist/client/_nuxt/SectionBlock.914c7802.js +1 -0
  19. package/dist/client/_nuxt/StateEditor.ce27b0a9.css +1 -0
  20. package/dist/client/_nuxt/StateEditor.vue.24b581fe.js +1 -0
  21. package/dist/client/_nuxt/{StateEditor.vue.ab9d7157.js → StateEditor.vue.99c457ec.js} +81 -79
  22. package/dist/client/_nuxt/{TabIcon.vue.6890c56a.js → TabIcon.vue.c3d4f8eb.js} +1 -1
  23. package/dist/client/_nuxt/__inspecting.f0beaf14.js +1 -0
  24. package/dist/client/_nuxt/{asyncData.c8345f31.js → asyncData.d4a4cc23.js} +1 -1
  25. package/dist/client/_nuxt/components.2f7ee4ee.js +1 -0
  26. package/dist/client/_nuxt/composables.a4d79ae5.js +1 -0
  27. package/dist/client/_nuxt/{context.d25709fd.js → context.f290c514.js} +1 -1
  28. package/dist/client/_nuxt/custom-_name_.6fcfe01b.js +1 -0
  29. package/dist/client/_nuxt/default.7c4cf2ae.js +1 -0
  30. package/dist/client/_nuxt/editor.cdd0d584.js +1 -0
  31. package/dist/client/_nuxt/entry.3f184dda.js +5 -0
  32. package/dist/client/_nuxt/entry.aace963d.css +1 -0
  33. package/dist/client/_nuxt/error-404.2618a69f.css +1 -0
  34. package/dist/client/_nuxt/error-404.42d6fea6.js +1 -0
  35. package/dist/client/_nuxt/error-500.12a2683b.css +1 -0
  36. package/dist/client/_nuxt/error-500.c25057d1.js +1 -0
  37. package/dist/client/_nuxt/{error-component.ae83d235.js → error-component.f5255ea4.js} +2 -2
  38. package/dist/client/_nuxt/hooks.f2f7f7c0.js +1 -0
  39. package/dist/client/_nuxt/imports.c6403530.js +1 -0
  40. package/dist/client/_nuxt/{index.fe0907d3.js → index.cb924a24.js} +1 -1
  41. package/dist/client/_nuxt/layouts.c6fb5d9f.js +1 -0
  42. package/dist/client/_nuxt/{middleware.5410fce5.js → middleware.986c1dcb.js} +1 -1
  43. package/dist/client/_nuxt/modules.67212f2b.js +1 -0
  44. package/dist/client/_nuxt/{none.76eeebc3.js → none.64c3c69e.js} +1 -1
  45. package/dist/client/_nuxt/{nuxt-link.3aeeed3f.js → nuxt-link.7c2ecc54.js} +1 -1
  46. package/dist/client/_nuxt/overview.39e81b24.js +1 -0
  47. package/dist/client/_nuxt/pages.28f6050f.js +1 -0
  48. package/dist/client/_nuxt/payload.482e4157.js +1 -0
  49. package/dist/client/_nuxt/plugins.dc220904.js +1 -0
  50. package/dist/client/_nuxt/{runtime-configs.7cc77728.js → runtime-configs.a7793337.js} +1 -1
  51. package/dist/client/_nuxt/{server-routes.ffdf17b0.js → server-routes.7dbce087.js} +1 -1
  52. package/dist/client/_nuxt/state.99106176.js +1 -0
  53. package/dist/client/_nuxt/unocss-runtime.bcfb14a2.js +2 -0
  54. package/dist/client/_nuxt/{virtual-files.a26c8c69.js → virtual-files.1c188f74.js} +1 -1
  55. package/dist/client/index.html +2 -2
  56. package/dist/client/modules/components/index.html +2 -2
  57. package/dist/client/modules/hooks/index.html +2 -2
  58. package/dist/client/modules/imports/index.html +2 -2
  59. package/dist/client/modules/layouts/index.html +2 -2
  60. package/dist/client/modules/middleware/index.html +2 -2
  61. package/dist/client/modules/modules/index.html +2 -2
  62. package/dist/client/modules/overview/index.html +2 -2
  63. package/dist/client/modules/pages/index.html +2 -2
  64. package/dist/client/modules/payload/index.html +2 -2
  65. package/dist/client/modules/plugins/index.html +2 -2
  66. package/dist/client/modules/runtime-configs/index.html +2 -2
  67. package/dist/client/modules/server-routes/index.html +2 -2
  68. package/dist/client/modules/virtual-files/index.html +2 -2
  69. package/dist/iframe-client.d.ts +1 -1
  70. package/dist/module.d.ts +3 -1
  71. package/dist/module.json +1 -1
  72. package/dist/module.mjs +3 -30
  73. package/dist/runtime/plugins/devtools.client.mjs +1 -1
  74. package/dist/runtime/plugins/view/Frame.vue +22 -5
  75. package/dist/runtime/plugins/view/state.d.ts +2 -1
  76. package/dist/runtime/plugins/view/state.mjs +1 -0
  77. package/dist/runtime/plugins/view/utils.d.ts +1 -1
  78. package/dist/runtime/plugins/view/utils.mjs +9 -7
  79. package/dist/shared/{devtools.28239661.mjs → devtools.894440bf.mjs} +1 -1
  80. package/dist/shared/devtools.edb7b427.mjs +35 -0
  81. package/dist/types.d.ts +3 -2
  82. package/package.json +34 -37
  83. package/dist/client/_nuxt/LaunchPage.vue.f4239533.js +0 -1
  84. package/dist/client/_nuxt/NButton.db724adb.css +0 -1
  85. package/dist/client/_nuxt/NIcon.vue.701f4547.js +0 -1
  86. package/dist/client/_nuxt/NTextInput.vue.276e32b3.js +0 -1
  87. package/dist/client/_nuxt/SectionBlock.082cb101.css +0 -1
  88. package/dist/client/_nuxt/SectionBlock.8ff5d737.js +0 -1
  89. package/dist/client/_nuxt/Settings.vue.b55fa306.js +0 -1
  90. package/dist/client/_nuxt/StateEditor.989cce56.css +0 -1
  91. package/dist/client/_nuxt/StateEditor.vue.d668b11c.js +0 -1
  92. package/dist/client/_nuxt/__inspecting.12d34e8c.js +0 -1
  93. package/dist/client/_nuxt/components.08e98322.js +0 -1
  94. package/dist/client/_nuxt/composables.8c342cc5.js +0 -1
  95. package/dist/client/_nuxt/custom-_name_.89baf527.js +0 -1
  96. package/dist/client/_nuxt/default.975e4e70.js +0 -1
  97. package/dist/client/_nuxt/editor.f74d7351.js +0 -1
  98. package/dist/client/_nuxt/entry.d28dd037.js +0 -5
  99. package/dist/client/_nuxt/entry.e7b3d8fd.css +0 -1
  100. package/dist/client/_nuxt/error-404.1469f10f.css +0 -1
  101. package/dist/client/_nuxt/error-404.bdee7391.js +0 -1
  102. package/dist/client/_nuxt/error-500.92b94fae.css +0 -1
  103. package/dist/client/_nuxt/error-500.c5180cef.js +0 -1
  104. package/dist/client/_nuxt/hooks.8f89faa2.js +0 -1
  105. package/dist/client/_nuxt/imports.f7970750.js +0 -1
  106. package/dist/client/_nuxt/layouts.d5a3dabe.js +0 -1
  107. package/dist/client/_nuxt/modules.6fc7bd71.js +0 -1
  108. package/dist/client/_nuxt/overview.e7e9880f.js +0 -1
  109. package/dist/client/_nuxt/pages.40900507.js +0 -1
  110. package/dist/client/_nuxt/payload.36dbfdde.js +0 -1
  111. package/dist/client/_nuxt/plugins.8195b406.js +0 -1
  112. package/dist/client/_nuxt/state.a5c5a841.js +0 -1
  113. package/dist/client/_nuxt/unocss-runtime.1fec3315.js +0 -2
@@ -1 +0,0 @@
1
- import{_ as q}from"./NTextInput.vue.276e32b3.js";import{_ as z}from"./NIcon.vue.701f4547.js";import{a as T,k as P,o as s,e as g,f as h,j as L,t as K,u as o,c as v,l as $,r as A,m as H,p as J,v as O,q as F,s as Q,h as x,x as I,y as W,z as X,w as C,F as V,A as E,B as M,b as Y,C as Z}from"./entry.d28dd037.js";import{_ as G}from"./FilepathItem.vue.29183a21.js";import{N as ee,_ as oe}from"./NButton.vue.09cc4471.js";import{u as te}from"./composables.8c342cc5.js";import{u as ne,a as se,b as le,i as ae,g as ie,c as re}from"./state.a5c5a841.js";import{_ as ce}from"./Badge.ec9e349b.js";import{u as ue}from"./editor.f74d7351.js";import{_ as pe,a as de}from"./SectionBlock.8ff5d737.js";import{F as me}from"./fuse.esm.88e2763d.js";import"./nuxt-link.3aeeed3f.js";/* empty css */import"./StateEditor.vue.ab9d7157.js";import"./asyncData.c8345f31.js";import"./_plugin-vue_export-helper.c27b6911.js";import"./context.d25709fd.js";const fe=/\d/,he=["-","_","/","."];function _e(n=""){if(!fe.test(n))return n.toUpperCase()===n}function be(n,r){const y=r??he,e=[];if(!n||typeof n!="string")return e;let t="",a,p;for(const c of n){const m=y.includes(c);if(m===!0){e.push(t),t="",a=void 0;continue}const l=_e(c);if(p===!1){if(a===!1&&l===!0){e.push(t),t=c,a=l;continue}if(a===!0&&l===!1&&t.length>1){const u=t[t.length-1];e.push(t.slice(0,Math.max(0,t.length-1))),t=u+c,a=l;continue}}t+=c,a=l,p=m}return e.push(t),e}function ve(n){return n?n[0].toUpperCase()+n.slice(1):""}function ge(n){return n?(Array.isArray(n)?n:be(n)).map(r=>ve(r)).join(""):""}const ye={rounded:"",px2:"",py1:"",hover:"bg-gray/10",class:"group",flex:"~ gap2","w-full":"","items-center":""},ke={"font-mono":"","text-sm":""},xe=h("span",{op20:"",mr1:""},"<",-1),$e=h("span",{op20:"",ml1:""},"/>",-1),we=T({__name:"ComponentItem",props:{component:null},setup(n){const r=n,y=P(()=>r.component.pascalName||ge(r.component.name||r.component.__name||r.component.kebabName||"")),e=P(()=>r.component.filePath||r.component.file||r.component.__file||""),t=ue();return(a,p)=>{const c=ce,m=G;return s(),g("div",ye,[h("button",{"hover:text-primary":"",onClick:p[0]||(p[0]=l=>o(t)(`<${o(y)}></${o(y)}>`))},[h("code",ke,[xe,L(K(o(y)),1),$e])]),n.component.global?(s(),v(c,{key:0,"bg-green-400:10":"","text-green-400":"",title:"Registered at runtime as a global component",textContent:"runtime"})):$("",!0),A(a.$slots,"default"),o(e)?(s(),v(m,{key:1,filepath:o(e),"text-sm":"",op25:"","group-hover:op75":""},null,8,["filepath"])):$("",!0)])}}}),Ce=["checked","disabled"],Ve=["disabled"],Ne={class:"n-transition n-checkbox-box n-checked:n-checkbox-box-checked peer-active:n-active-base peer-focus-visible:n-focus-base"},Se=T({__name:"NCheckbox",props:{modelValue:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},setup(n,{emit:r}){const e=H(n,"modelValue",r,{passive:!0});return(t,a)=>{const p=z;return s(),g("label",{class:"n-checkbox inline-flex items-center select-none hover:n-checkbox-hover n-disabled:n-disabled",checked:o(e)||null,disabled:n.disabled||null},[J(h("input",{"onUpdate:modelValue":a[0]||(a[0]=c=>F(e)?e.value=c:null),type:"checkbox",class:"absolute op0 peer",disabled:n.disabled,onKeypress:a[1]||(a[1]=Q(c=>e.value=!o(e),["enter"]))},null,40,Ve),[[O,o(e)]]),h("span",Ne,[x(p,{class:"n-transition n-checkbox-icon transform scale-0 op0 n-checked:op100 n-checked:scale-100"})]),h("span",null,[A(t.$slots,"default")])],8,Ce)}}}),Pe={border:"b base",flex:"~ gap4",py1:"","items-center":"",px4:"","h-10":"","flex-none":""},Be=h("span",{op75:""},"Show pages",-1),Me=h("span",{op75:""},"Show layouts",-1),Fe=h("span",{op75:""},"Show node_modules",-1),Te=h("div",{"i-carbon-close":""},null,-1),Ue={"w-full":"",relative:"",style:{height:"calc(100vh - 115px)"}},Ie={key:0,border:"~ base",flex:"~ col gap-1","text-sm":"",rounded:"",absolute:"","right-4":"","top-4":"","bg-base":"",shadow:"",p2:"","items-end":""},Re=T({__name:"ComponentsGraph",props:{components:null},setup(n){const r=n,y=I(),e=te(),t=I(),a=ne(),p=se(),c=le(),{componentsGraphShowNodeModules:m,componentsGraphShowPages:l,componentsGraphShowLayouts:u}=E,d=I(),U=P(()=>{const w=c.value||[];if(d.value){let f=function(_){!_||i.has(_)||(i.add(_),_.deps.forEach(k=>{f(w.find(b=>b.id===k))}))};const i=new Set;return w.find(_=>_.id===t.value?.id),f(d.value),Array.from(i)}return w}),N=P(()=>{const w=U.value.map(i=>{const _=r.components.find(B=>B.filePath===i.id),k=a.value?.find(B=>B.file===i.id),b=p.value?.find(B=>B.file===i.id),j=i.id.replace(/\?.*$/,"").replace(/\#.*$/,""),S=i.id.includes("/node_modules/")?"lib":_?"user":b?"layout":k?"page":"unknown";if(!m.value&&S==="lib"||!l.value&&S==="page"||!u.value&&S==="layout")return null;const D=S==="layout"?"hexagon":S==="page"?"square":"dot";return{id:i.id,label:j.split("/").splice(-1)[0].replace(/\.\w+$/,""),group:S,shape:D,size:15+Math.min(i.deps.length/2,8),font:{color:e.value==="dark"?"white":"black"},color:d.value?.id===i.id?"#82c742":void 0,extra:{id:i.id,component:_,page:k,layout:b,relationship:i}}}).filter(i=>!!i),f=U.value.flatMap(i=>i.deps.map(_=>({from:i.id,to:_,arrows:{to:{enabled:!0,scaleFactor:.8}}})));return{nodes:w,edges:f}});W(()=>{const w={nodes:{shape:"dot",size:16},physics:{repulsion:{centralGravity:.7,springLength:100,springConstant:.01},maxVelocity:146,solver:"forceAtlas2Based",timestep:.35,stabilization:{enabled:!0,iterations:200}},groups:{user:{color:"#42b883"},unknown:{color:"#b86542"},lib:{color:"#b4b842"},page:{color:"#42b2b8"},layout:{color:"#4256b8"}}},f=new ee(y.value,N.value,w);f.on("click",i=>{const _=i.nodes?.[0],k=N.value.nodes?.find(b=>b.id===_)?.extra;k&&(t.value=k)}),X(N,()=>{f.setData(N.value)})});function R(){d.value=t.value?.relationship,t.value=void 0}return(w,f)=>{const i=Se,_=G,k=oe;return s(),g(V,null,[h("div",Pe,[x(i,{modelValue:o(l),"onUpdate:modelValue":f[0]||(f[0]=b=>F(l)?l.value=b:null),n:"primary sm"},{default:C(()=>[Be]),_:1},8,["modelValue"]),x(i,{modelValue:o(u),"onUpdate:modelValue":f[1]||(f[1]=b=>F(u)?u.value=b:null),n:"primary sm"},{default:C(()=>[Me]),_:1},8,["modelValue"]),x(i,{modelValue:o(m),"onUpdate:modelValue":f[2]||(f[2]=b=>F(m)?m.value=b:null),n:"primary sm"},{default:C(()=>[Fe]),_:1},8,["modelValue"]),o(d)?(s(),g("button",{key:0,flex:"~ gap-1","items-center":"",py1:"","bg-gray:20":"",pl3:"",pr2:"","rounded-full":"","text-xs":"",op50:"","hover:op100":"",onClick:f[3]||(f[3]=b=>d.value=void 0)},[L(" Clear filter "),Te])):$("",!0)]),h("div",Ue,[h("div",{ref_key:"container",ref:y,"w-full":"","h-full":""},null,512),o(t)?(s(),g("div",Ie,[x(_,{filepath:o(t).id},null,8,["filepath"]),x(k,{n:"primary solid",onClick:f[4]||(f[4]=b=>R())},{default:C(()=>[L(" Filter to this component ")]),_:1})])):$("",!0)])],64)}}}),Le={pl4:""},ze=T({__name:"ComponentsList",props:{components:null,search:null},setup(n){const r=n,y=P(()=>new me(r.components,{keys:["pascalName","filePath","kebabName"]})),e=P(()=>{const t=[],a=new Map,p=[],c=[],m={user:0,lib:0,builtin:0,runtime:0};return(r.search?y.value.search(r.search).map(u=>u.item):r.components).forEach(u=>{if(u.global){c.push(u),m.runtime++;return}if(u.filePath&&ae(u.filePath)){const d=ie(u.filePath);if(!d)return;d==="nuxt"?(p.push(u),m.builtin++):(a.has(d)||a.set(d,[]),a.get(d).push(u),m.lib++)}else t.push(u),m.user++}),{count:m,user:t,builtin:p,lib:a,runtime:c}});return(t,a)=>{const p=we,c=pe,m=de;return s(),g(V,null,[o(e).user.length?(s(),v(c,{key:0,icon:"carbon-nominal",text:"User components",description:`Total components: ${o(e).count.user}`},{default:C(()=>[(s(!0),g(V,null,M(o(e).user,l=>(s(),v(p,{key:l.filePath,"ml--5":"",component:l},null,8,["component"]))),128))]),_:1},8,["description"])):$("",!0),o(e).runtime.length?(s(),v(c,{key:1,icon:"carbon-load-balancer-global",text:"Runtime components",description:`Total components: ${o(e).count.runtime}`},{default:C(()=>[(s(!0),g(V,null,M(o(e).runtime,l=>(s(),v(p,{key:l.filePath,"ml--5":"",component:l},null,8,["component"]))),128))]),_:1},8,["description"])):$("",!0),o(e).builtin.length?(s(),v(c,{key:2,icon:"simple-icons-nuxtdotjs",text:"Built-in components",description:`Total components: ${o(e).count.builtin}`},{default:C(()=>[(s(!0),g(V,null,M(o(e).builtin,l=>(s(),v(p,{key:l.filePath,"ml--5":"",component:l},null,8,["component"]))),128))]),_:1},8,["description"])):$("",!0),o(e).lib.size?(s(),v(c,{key:3,icon:"carbon-3d-mpr-toggle",text:"Components from libraries",description:`${o(e).count.lib} components from ${o(e).lib.size} packages`},{default:C(()=>[(s(!0),g(V,null,M(o(e).lib.entries(),([l,u])=>(s(),g("div",{key:l},[x(m,{text:`${l} (${u.length})`,op50:"",py1:""},null,8,["text"]),h("div",Le,[(s(!0),g(V,null,M(u,d=>(s(),v(p,{key:d.filePath,component:d},null,8,["component"]))),128))])]))),128))]),_:1},8,["description"])):$("",!0)],64)}}}),Ae={"h-full":"","of-auto":""},Ee={p4:"",flex:"~ gap4","flex-1":"",border:"b base","navbar-glass":""},so=T({__name:"components",setup(n){const r=Y(),y=Z(),e=re(),t=I(""),{componentsView:a}=E;function p(){r.value?.inspector?.instance&&(r.value.inspector.enable(),y.push("/__inspecting"))}function c(){a.value=a.value==="list"?"graph":"list"}return(m,l)=>{const u=q,d=z,U=Re,N=ze;return s(),g("div",Ae,[h("div",Ee,[x(u,{modelValue:o(t),"onUpdate:modelValue":l[0]||(l[0]=R=>F(t)?t.value=R:null),placeholder:"Search...",icon:"carbon-search",p:"x5 y2",n:"primary","flex-auto":"","bg-base":"","border-base":""},null,8,["modelValue"]),h("button",{title:"Toggle view",onClick:c},[o(a)==="graph"?(s(),v(d,{key:0,icon:"i-carbon-network-4"})):(s(),v(d,{key:1,icon:"i-carbon-list"}))]),o(r)?.inspector?.instance?(s(),g("button",{key:0,title:"Inspect Vue components",onClick:p},[x(d,{icon:"i-carbon-select-window"})])):$("",!0)]),o(a)==="graph"?(s(),v(U,{key:0,components:o(e)},null,8,["components"])):(s(),v(N,{key:1,search:o(t),components:o(e)},null,8,["search","components"]))])}}});export{so as default};
@@ -1 +0,0 @@
1
- import{a7 as o}from"./entry.d28dd037.js";const r=()=>o("color-mode").value;export{r as u};
@@ -1 +0,0 @@
1
- import{a as k,b as x,x as b,k as y,D as C,E,y as T,G as M,H as v,I as $,J as g,e as _,o as s,K as B,u as n,c as f,L,t as j}from"./entry.d28dd037.js";import{u as D}from"./composables.8c342cc5.js";import{_ as I}from"./LaunchPage.vue.f4239533.js";import{d as W}from"./state.a5c5a841.js";import"./TabIcon.vue.6890c56a.js";import"./NIcon.vue.701f4547.js";import"./NButton.vue.09cc4471.js";import"./nuxt-link.3aeeed3f.js";/* empty css */import"./StateEditor.vue.ab9d7157.js";import"./asyncData.c8345f31.js";const d=new Map,O=k({__name:"IframeView",props:{tab:null},setup(h){const l=h,m=x(),r=D(),t=b(),o=y(()=>l.tab.name),e=b(),i=C(E(t));T(()=>{const a=l.tab.view,p=a.persistent!==!1;if(d.get(o.value)&&p)e.value=d.get(o.value),e.value.style.visibility="visible";else{e.value=document.createElement("iframe"),p&&d.set(o.value,e.value),e.value.src=a.src;try{e.value.style.opacity="0.01",e.value.onload=()=>{u(),c(),e.value.style.opacity="1"}}catch{e.value.style.opacity="1"}document.body.appendChild(e.value),M(w)}setTimeout(c,100)}),v(w),v(c),v(u),$(()=>{e.value&&(e.value.style.visibility="hidden")});function c(){if(!(!e.value||!e.value.contentWindow))try{const a=e.value.contentWindow.document.querySelector("html");a?.classList.toggle("dark",r.value==="dark"),a?.classList.toggle("light",r.value==="dark")}catch{}}function u(){if(!(!e.value||!e.value.contentWindow))try{e.value.contentWindow.__NUXT_DEVTOOLS__={host:m.value,devtools:{rpc:g}}}catch{}}function w(){e.value&&Object.assign(e.value.style,{position:"fixed",left:`${i.left}px`,top:`${i.top}px`,width:`${i.width}px`,height:`${i.height}px`,outline:"none"})}return(a,p)=>(s(),_("div",{ref_key:"anchor",ref:t,"w-full":"","h-full":""},null,512))}}),S={key:0,flex:"~ col","h-full":"","items-center":"","justify-center":""},U={key:4,flex:"~ col","h-full":"","items-center":"","justify-center":""},F=k({__name:"custom-[name]",setup(h){const l=B(),m=y(()=>l.params.name),r=W(),t=y(()=>r.all.value.find(o=>o.name===m.value));return(o,e)=>{const i=O,c=I;return n(t)?n(t).view.type==="iframe"?(s(),f(i,{key:1,tab:n(t)},null,8,["tab"])):n(t).view.type==="vnode"?(s(),f(L(n(t).view.vnode),{key:2})):n(t).view.type==="launch"?(s(),f(c,{key:3,icon:n(t).view.icon||n(t).icon,title:n(t).view.title||n(t).title,description:n(t).view.description,actions:n(t).view.actions,onAction:e[0]||(e[0]=u=>("rpc"in o?o.rpc:n(g)).customTabAction(n(t).name,u))},null,8,["icon","title","description","actions"])):(s(),_("div",U," Unknown tab type "+j(n(t).view),1)):(s(),_("div",S," Tab not found "))}}});export{F as default};
@@ -1 +0,0 @@
1
- import{p as S}from"./context.d25709fd.js";import{a as b,x as g,y as V,e as c,a0 as B,o as n,c as h,w as p,r as k,k as y,a1 as j,n as z,g as L,b as $,u as s,h as m,f as u,t as T,L as M,l as f,O as I,M as x,F as v,B as w,Q as N,N as O,j as W}from"./entry.d28dd037.js";import{_ as E}from"./NuxtLogo.9f2db884.js";import{_ as F}from"./Settings.vue.b55fa306.js";import{_ as P}from"./_plugin-vue_export-helper.c27b6911.js";import{u as q}from"./composables.8c342cc5.js";import{_ as A}from"./TabIcon.vue.6890c56a.js";import{_ as Q}from"./nuxt-link.3aeeed3f.js";import{d as R}from"./state.a5c5a841.js";import"./NButton.vue.09cc4471.js";import"./NIcon.vue.701f4547.js";/* empty css */import"./StateEditor.vue.ab9d7157.js";import"./asyncData.c8345f31.js";const Y=b({name:"ClientOnly",inheritAttrs:!1,props:["fallback","placeholder","placeholderTag","fallbackTag"],setup(o,{slots:e,attrs:t}){const l=g(!1);return V(()=>{l.value=!0}),a=>{if(l.value)return e.default?.();const r=e.fallback||e.placeholder;if(r)return r();const i=a.fallback||a.placeholder||"",_=a.fallbackTag||a.placeholderTag||"span";return c(_,t,i)}}}),G={name:B,props:{placeholder:String,tag:{type:String,default:"span"}}};function H(o,e,t,l,a,r){const i=Y;return n(),h(i,{placeholder:t.placeholder,"placeholder-tag":t.tag},{default:p(()=>[k(o.$slots,"default")]),_:3},8,["placeholder","placeholder-tag"])}const J=P(G,[["render",H]]),K=b({__name:"NDarkToggle",setup(o){const e=q(),t=y({get(){return e.value==="dark"},set(){e.preference=t.value?"light":"dark"}}),l=j(t),a={mode:e,isDark:t,toggle:l};return(r,i)=>{const _=J;return n(),h(_,{tag:"span"},{default:p(()=>[k(r.$slots,"default",z(L(a)))]),_:3})}}}),U={hidden:"","lg:block":"","flex-auto":"",pl2:""},X={key:0,hidden:"","lg:block":""},Z=b({__name:"DrawerItem",props:{tab:null},setup(o){const e=o,t=$(),l=y(()=>!(e.tab.requireClient&&!t.value));return(a,r)=>{const i=A,_=Q;return s(l)?(n(),h(_,{key:0,to:"path"in o.tab?o.tab.path:`/modules/custom-${o.tab.name}`,flex:"~",p2:"","items-center":"","justify-center":"","text-true-gray":"",border:"base",lg:"border-b px3 py1.5 justify-start",hover:"bg-gray/5","select-none":"","exact-active-class":"!text-primary"},{default:p(()=>[m(i,{"text-lg":"","lg:text-base":"",icon:o.tab.icon,title:o.tab.title},null,8,["icon","title"]),u("div",U,T(o.tab.title),1),"extraTabVNode"in o.tab&&o.tab.extraTabVNode?(n(),c("div",X,[(n(),h(M(o.tab.extraTabVNode)))])):f("",!0)]),_:1},8,["to"])):f("",!0)}}}),ee={border:"r base",flex:"~ col","h-full":""},te={flex:"~ gap1",pl3:"",pr2:"","items-center":"",py2:"",border:"b base"},ne=u("div",{hidden:"","lg:block":"","flex-auto":""},null,-1),oe=["onClick"],ae=u("div",{"text-xs":"",p1:"","lg:p2":"","text-hex-888":"","text-center":"",uppercase:"","tracking-widest":"",border:"b base"},[u("span",{hidden:"","lg:inline":""},"Modules")],-1),se=u("div",{"flex-auto":""},null,-1),le={key:0,px4:"",hidden:"","theme-banner-yellow":"","justify-center":"","lg:flex":"",gap3:""},re=b({__name:"Drawer",setup(o){const e=$(),t=R();return(l,a)=>{const r=E,i=F,_=I("VDropdown"),D=K,C=Z;return n(),c("div",ee,[u("div",te,[m(_,{placement:"left-start",distance:20},{popper:p(()=>[m(i)]),default:p(()=>[m(r,{"h-8":"",hidden:"","lg:block":"",class:x(s(e)?"":"saturate-0"),title:s(e)?"Nuxt DevTools":"DevTools Client not connected, try open it in iframe mode"},null,8,["class","title"])]),_:1}),ne,m(D,null,{default:p(({toggle:d})=>[u("button",{"text-sm":"",op50:"","hover:op100":"","carbon-sun":"","dark:carbon-moon":"",class:"hidden! lg:block!",onClick:fe=>d()},null,8,oe)]),_:1}),s(e)?(n(),c("button",{key:0,op50:"","hover:op100":"","carbon-close":"","text-xl":"",ma:"",onClick:a[0]||(a[0]=d=>s(e).closeDevTools())})):f("",!0)]),(n(!0),c(v,null,w(s(t).builtin.value,d=>(n(),h(C,{key:d.name,tab:d},null,8,["tab"]))),128)),s(t).custom.value.length?(n(),c(v,{key:0},[ae,(n(!0),c(v,null,w(s(t).custom.value,d=>(n(),h(C,{key:d.name,tab:d},null,8,["tab"]))),128)),se,("showConnectionWarning"in l?l.showConnectionWarning:s(N))?(n(),c("div",le," Server data only ")):f("",!0)],64)):f("",!0)])}}}),ce=b({__name:"Notification",setup(o){const e=g(!1),t=g(),l=g();return S((a,r,i=1500)=>{l.value=a,t.value=r,e.value=!0,setTimeout(()=>{e.value=!1},i)}),(a,r)=>(n(),c("div",{"text-center":"",fixed:"","top-0":"","left-0":"","right-0":"","z-50":"",class:x(s(e)?"":"pointer-events-none overflow-hidden")},[u("div",{border:"~ base",flex:"~ inline gap2",rounded:"","bg-base":"","text-primary":"","items-center":"","px-4":"","py-1":"","inline-block":"","m-3":"","transition-all":"","duration-300":"",style:O(s(e)?{}:{transform:"translateY(-300%)"}),class:x(s(e)?"shadow":"shadow-none")},[s(t)?(n(),c("div",{key:0,class:x(s(t))},null,2)):f("",!0),u("div",null,T(s(l)),1)],6)],2))}}),ie={"of-hidden":"","bg-base":"","h-screen":"","font-sans":""},ue={key:0,"h-full":"","w-full":"",flex:""},de=u("div",{ma:"","text-lg":"",flex:"~ col","items-center":"","animate-pulse":""},[u("div",{"i-carbon-circle-dash":"","animate-spin":"","text-4xl":"",op50:""}),W(" Connecting... ")],-1),_e=[de],me={key:1,grid:"~ cols-[45px_1fr] lg:cols-[200px_1fr]","h-full":"","of-hidden":""},pe={"h-full":"","of-auto":""},Ve=b({__name:"default",setup(o){const e=$(),t=y(()=>!e.value&&!N.value);return(l,a)=>{const r=ce,i=re;return n(),c("div",ie,[m(r),s(t)?(n(),c("div",ue,_e)):(n(),c("div",me,[m(i,{"of-auto":""}),u("div",pe,[k(l.$slots,"default")])]))])}}});export{Ve as default};
@@ -1 +0,0 @@
1
- import{J as a,W as n}from"./entry.d28dd037.js";import{u as r}from"./context.d25709fd.js";async function s(o){await a.openInEditor(o)}function e(){const o=n(),i=r();return t=>{o.copy(t),i("Copied to clipboard","carbon-checkmark")}}export{s as o,e as u};