@nuxt/devtools-nightly 2.0.0-beta.7-28980749.c20c724 → 2.1.0-28994893.66d2743

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 (104) hide show
  1. package/dist/chunks/module-main.mjs +3 -2
  2. package/dist/client/200.html +23 -23
  3. package/dist/client/404.html +23 -23
  4. package/dist/client/_nuxt/__blank-ld6vcstp.js +1 -0
  5. package/dist/client/_nuxt/{analyze-build-hl3z5moi.js → analyze-build-bbw1j0bw.js} +1 -1
  6. package/dist/client/_nuxt/{assets-hg8y65bo.js → assets-bi7gxmg8.js} +1 -1
  7. package/dist/client/_nuxt/builds/latest.json +1 -1
  8. package/dist/client/_nuxt/builds/meta/e0e21221-5c8e-43a8-8f88-1af9f45bb798.json +1 -0
  9. package/dist/client/_nuxt/{client-kpmlv67d.js → client-edufhzwa.js} +1 -1
  10. package/dist/client/_nuxt/{code-diff.vue-dw4253xo.js → code-diff.vue-g3avq04d.js} +1 -1
  11. package/dist/client/_nuxt/{code-snippets.vue-h63l3ga8.js → code-snippets.vue-pb1tfwrq.js} +1 -1
  12. package/dist/client/_nuxt/{components-g4671hrj.js → components-jj59wik2.js} +1 -1
  13. package/dist/client/_nuxt/{composable-item.vue-awv2fe0i.js → composable-item.vue-mk5d6ui8.js} +1 -1
  14. package/dist/client/_nuxt/{custom-_name_-lehsfv4z.js → custom-_name_-dhzxcwaa.js} +1 -1
  15. package/dist/client/_nuxt/{data-schema-button.vue-cvp49yv0.js → data-schema-button.vue-ln7d6h5v.js} +1 -1
  16. package/dist/client/_nuxt/data-schema-drawer-jso1cuzu.js +2 -0
  17. package/dist/client/_nuxt/{default-n5abea1i.js → default-e26uk9yr.js} +1 -1
  18. package/dist/client/_nuxt/{duration-display.vue-dzttyi5n.js → duration-display.vue-gu7el5x3.js} +1 -1
  19. package/dist/client/_nuxt/{entry.css-mj1nvcy6.css → entry.css-jfo9gib8.css} +1 -1
  20. package/dist/client/_nuxt/{error-404-k1azvkry.js → error-404-fr7rmvj2.js} +1 -1
  21. package/dist/client/_nuxt/error-404.css-fsdpg4tp.css +1 -0
  22. package/dist/client/_nuxt/{error-500-fl4i136a.js → error-500-jkjkadzh.js} +1 -1
  23. package/dist/client/_nuxt/error-500.css-bernuda7.css +1 -0
  24. package/dist/client/_nuxt/{error-epn2rlwx.js → error-b4db6oh7.js} +1 -1
  25. package/dist/client/_nuxt/{filepath-item.vue-ocz0upxz.js → filepath-item.vue-g22bjf3y.js} +1 -1
  26. package/dist/client/_nuxt/full-l2nep87m.js +1 -0
  27. package/dist/client/_nuxt/{help-fab.vue-jti43xum.js → help-fab.vue-g6r95f4a.js} +1 -1
  28. package/dist/client/_nuxt/{hooks-fm2xz72g.js → hooks-f19zeth2.js} +1 -1
  29. package/dist/client/_nuxt/{imports-jajy765b.js → imports-cmpiiypv.js} +1 -1
  30. package/dist/client/_nuxt/{index-8ojfxtmp.js → index-o5ob665o.js} +1 -1
  31. package/dist/client/_nuxt/launch-page.vue-nu5zj08b.js +1 -0
  32. package/dist/client/_nuxt/modules-da941xpo.js +1 -0
  33. package/dist/client/_nuxt/nbadge-frtnezb1.js +1 -0
  34. package/dist/client/_nuxt/{ncheckbox.vue-o34fufk3.js → ncheckbox.vue-ig2h3zb6.js} +1 -1
  35. package/dist/client/_nuxt/{ncode-block.vue-dt6krs6h.js → ncode-block.vue-msaaoy71.js} +1 -1
  36. package/dist/client/_nuxt/{ndrawer.vue-den3x6bs.js → ndrawer.vue-k29v8tvh.js} +1 -1
  37. package/dist/client/_nuxt/ndropdown.vue-e8lbf8tw.js +1 -0
  38. package/dist/client/_nuxt/{nicon-title.vue-hzhi6u0u.js → nicon-title.vue-j1ceohu1.js} +1 -1
  39. package/dist/client/_nuxt/{nlink.vue-geo1m3b0.js → nlink.vue-g66yr6dr.js} +1 -1
  40. package/dist/client/_nuxt/{nmarkdown.vue-jpbjhala.js → nmarkdown.vue-oxfi26vk.js} +1 -1
  41. package/dist/client/_nuxt/{nnavbar.vue-e4gbvuiu.js → nnavbar.vue-ni09o3gk.js} +1 -1
  42. package/dist/client/_nuxt/none-gde59ngk.js +1 -0
  43. package/dist/client/_nuxt/{nsection-block-j74ks6nb.js → nsection-block-d3wydn3r.js} +1 -1
  44. package/dist/client/_nuxt/{nselect-tabs.vue-omvwf3ky.js → nselect-tabs.vue-df8z3fh5.js} +1 -1
  45. package/dist/client/_nuxt/{nselect.vue-mcse0obw.js → nselect.vue-oz295hvu.js} +1 -1
  46. package/dist/client/_nuxt/{nswitch.vue-iu20lc9i.js → nswitch.vue-l8xqfho0.js} +1 -1
  47. package/dist/client/_nuxt/nsxgpy6n.js +17 -0
  48. package/dist/client/_nuxt/{open-graph-fgxh745s.js → open-graph-nmk7o6qa.js} +1 -1
  49. package/dist/client/_nuxt/overview-i50bin0e.js +1 -0
  50. package/dist/client/_nuxt/{pages-i073875q.js → pages-keqq3uu3.js} +1 -1
  51. package/dist/client/_nuxt/{payload-lpa4xzf7.js → payload-bcazh2dd.js} +1 -1
  52. package/dist/client/_nuxt/pinia-ljqe092p.js +1 -0
  53. package/dist/client/_nuxt/{plugins-mrm4erax.js → plugins-dp3odh07.js} +1 -1
  54. package/dist/client/_nuxt/render-tree-my7wf4ar.js +1 -0
  55. package/dist/client/_nuxt/{runtime-configs-jgrd3nvs.js → runtime-configs-htj9sk5u.js} +1 -1
  56. package/dist/client/_nuxt/{server-discovery-nz1q58ac.js → server-discovery-o4v1gv64.js} +1 -1
  57. package/dist/client/_nuxt/{server-route-inputs.vue-k7nz89da.js → server-route-inputs.vue-eoisa322.js} +1 -1
  58. package/dist/client/_nuxt/{server-routes-dgw2yb8s.js → server-routes-m3zy6o3n.js} +2 -2
  59. package/dist/client/_nuxt/{server-tasks-ohziocip.js → server-tasks-e6qb7ohx.js} +1 -1
  60. package/dist/client/_nuxt/{settings-mdfl1baf.js → settings-ocsdlkok.js} +1 -1
  61. package/dist/client/_nuxt/{stacktrace-list.vue-ju2yzl1a.js → stacktrace-list.vue-fnbs7811.js} +1 -1
  62. package/dist/client/_nuxt/{state-components-hu0vwgq9.js → state-components-ir9sclpw.js} +1 -1
  63. package/dist/client/_nuxt/state-editor.vue-o2zmurug.js +1 -0
  64. package/dist/client/_nuxt/{state-modules-ou3w6py8.js → state-modules-iferti41.js} +1 -1
  65. package/dist/client/_nuxt/{storage-fg7uqyfv.js → storage-lc8pnxkn.js} +1 -1
  66. package/dist/client/_nuxt/{terminals-km35rk4z.js → terminals-ngo4bh3b.js} +1 -1
  67. package/dist/client/_nuxt/{timeline-ji41jouc.js → timeline-b5t9f6n1.js} +1 -1
  68. package/dist/client/_nuxt/{unocss-runtime-cb61k1ql.js → unocss-runtime-gc1hqonm.js} +1 -1
  69. package/dist/client/_nuxt/vendor/json-editor-vue-npezbdce.js +3818 -0
  70. package/dist/client/_nuxt/vendor/{quicktype-core-lnbp3n5r.js → quicktype-core-i8ym98gu.js} +1 -1
  71. package/dist/client/_nuxt/vendor/{shiki-ja073547.js → shiki-ian6uf3s.js} +26 -26
  72. package/dist/client/_nuxt/vendor/{unocss-mstcul8h.js → unocss-hjqyvvq7.js} +2 -2
  73. package/dist/client/_nuxt/{virtual-files-pdvx204m.js → virtual-files-j3rhkqmq.js} +1 -1
  74. package/dist/client/_nuxt/vue-devtools-lrln5ymm.js +2 -0
  75. package/dist/client/_nuxt/{vue-virtual-scroller.esm-ryb7s73q.js → vue-virtual-scroller.esm-guzt9iin.js} +1 -1
  76. package/dist/client/index.html +23 -23
  77. package/dist/module.d.mts +1 -1
  78. package/dist/module.d.ts +1 -1
  79. package/dist/module.json +1 -1
  80. package/dist/runtime/plugins/view/Main.vue +1 -1
  81. package/dist/runtime/plugins/view/client.js +8 -5
  82. package/dist/shared/{devtools-nightly.2a48a9e5.d.mts → devtools-nightly.2e078e30.d.mts} +4 -0
  83. package/dist/shared/{devtools-nightly.2a48a9e5.d.ts → devtools-nightly.2e078e30.d.ts} +4 -0
  84. package/dist/types.d.mts +1 -1
  85. package/dist/types.d.ts +1 -1
  86. package/package.json +27 -27
  87. package/dist/client/_nuxt/__blank-lg13rweu.js +0 -1
  88. package/dist/client/_nuxt/builds/meta/0c7d4b11-3960-472e-aa5e-814f5fa473f1.json +0 -1
  89. package/dist/client/_nuxt/data-schema-drawer-gj6u0k3q.js +0 -2
  90. package/dist/client/_nuxt/error-404.css-fwe7gpvk.css +0 -1
  91. package/dist/client/_nuxt/error-500.css-djemplc9.css +0 -1
  92. package/dist/client/_nuxt/full-cofqwlaq.js +0 -1
  93. package/dist/client/_nuxt/index-mkx27gf0.js +0 -2
  94. package/dist/client/_nuxt/launch-page.vue-fip61omh.js +0 -1
  95. package/dist/client/_nuxt/lbm7brd5.js +0 -17
  96. package/dist/client/_nuxt/modules-ozt4x0g5.js +0 -1
  97. package/dist/client/_nuxt/nbadge-lm8ruxdz.js +0 -1
  98. package/dist/client/_nuxt/ndropdown.vue-h1rzwvol.js +0 -1
  99. package/dist/client/_nuxt/none-hq61ikv8.js +0 -1
  100. package/dist/client/_nuxt/overview-cqqn59w9.js +0 -1
  101. package/dist/client/_nuxt/pinia-icj8n3eh.js +0 -1
  102. package/dist/client/_nuxt/render-tree-c8m9uiit.js +0 -1
  103. package/dist/client/_nuxt/state-editor.vue-fey2xg3o.js +0 -1
  104. package/dist/client/_nuxt/vendor/json-editor-vue-kcahofzr.js +0 -3818
@@ -1 +0,0 @@
1
- import{_ as R}from"./filepath-item.vue-ocz0upxz.js";import{L as Y,e as S,H,V as G,s as K,r as q,m as V,x as ee,a9 as W,aa as X,_ as O,O as te,K as oe,A as ne,B as se,v as le}from"./lbm7brd5.js";import{_ as ae,u as Z,a as ie}from"./state-modules-ou3w6py8.js";import{_ as re}from"./duration-display.vue-dzttyi5n.js";import{p as P,q as C,U as o,P as $,a2 as i,X as e,Y as A,a9 as x,a8 as k,W as m,u as j,a0 as L,Z as g,a3 as s,F as B,ae as D,ak as ue,f as T,M as E}from"./vendor/json-editor-vue-kcahofzr.js";import{_ as de}from"./nsection-block-j74ks6nb.js";import{_ as pe}from"./nicon-title.vue-hzhi6u0u.js";import{_ as J}from"./ndropdown.vue-h1rzwvol.js";import{_ as me}from"./nnavbar.vue-e4gbvuiu.js";import{_ as ce}from"./nbadge-lm8ruxdz.js";import{s as _e}from"./vue-virtual-scroller.esm-ryb7s73q.js";import{_ as fe}from"./ncode-block.vue-dt6krs6h.js";import{_ as ve}from"./nlink.vue-geo1m3b0.js";import{_ as ge}from"./code-diff.vue-dw4253xo.js";import{_ as xe}from"./help-fab.vue-jti43xum.js";import"./vendor/unocss-mstcul8h.js";import"./vendor/shiki-ja073547.js";import"./ncheckbox.vue-o34fufk3.js";import"./client-kpmlv67d.js";const be={flex:"~ col gap2","flex-auto":"","of-hidden":"",px1:""},ke={"gap-1t":"",flex:"","items-center":"","text-ellipsis":"","ws-nowrap":"","text-lg":""},he={key:2},ye={key:1,flex:"~ gap-2",title:"Documentation"},$e={key:2,flex:"~ gap-2"},we={key:0,flex:"~ gap-4 items-center"},Ce={flex:"~ gap-2 items-center",op50:""},Me={flex:"~ gap-2 items-center",op50:""},Ie={key:1},Ne={flex:"~ col","items-end":""},Be={key:0,"h-20":"","w-20":"",flex:"","flex-none":"",rounded:"","bg-gray:3":"",p4:""},je=["src","alt"],Pe={key:1,flex:"~",mt2:"","flex-auto":"","items-end":"","justify-end":""},De=["src"],Ae={flex:"","justify-end":""},Te="https://api.nuxtjs.org/api/ipx/s_80,f_webp/gh/nuxt/modules/main/icons/",Le="https://api.nuxtjs.org/api/ipx/s_44,f_webp/gh_avatar/",Oe="https://github.com/",ze="https://www.npmjs.com/package/",U=P({__name:"ModuleItemBase",props:{mod:{},info:{},compact:{type:Boolean},maintainers:{type:Boolean,default:!0}},setup(N){const _=N,a=C(()=>({..._.mod?.meta,..._.mod,..._.info})),b=Y();return(r,t)=>{const n=S,u=H,w=re,y=G;return o(),$(y,{p4:"",flex:"~ gap2"},{default:i(()=>[e("div",be,[A(r.$slots,"main",{},()=>[e("div",ke,[r.mod.isPackageModule?(o(),$(n,{key:0,to:ze+(a.value.npm||a.value.name),target:"_blank",hover:"underline text-primary"},{default:i(()=>[x(k(a.value.name),1)]),_:1},8,["to"])):r.mod.entryPath?(o(),m("button",{key:1,role:"button",hover:"underline text-primary",onClick:t[0]||(t[0]=d=>j(b)(r.mod.entryPath))},k(a.value.name),1)):(o(),m("span",he,k(a.value.name),1)),A(r.$slots,"badge")]),a.value.description?(o(),m("div",{key:0,class:L(r.compact?"ws-nowrap of-hidden truncate":"line-clamp-2"),"mt--1":"","text-sm":"",op50:""},k(a.value.description),3)):g("",!0),t[3]||(t[3]=e("div",{"flex-auto":""},null,-1)),a.value.website?(o(),m("div",ye,[t[1]||(t[1]=e("span",{"i-carbon-link":"","text-lg":"",op50:""},null,-1)),s(n,{to:a.value.website,target:"_blank","of-hidden":"",truncate:"","ws-nowrap":"","text-sm":"",op50:"",hover:"op100 underline text-primary"},{default:i(()=>[x(k(a.value.website.replace(/^https?:\/\//,"")),1)]),_:1},8,["to"])])):g("",!0),a.value.github?(o(),m("div",$e,[t[2]||(t[2]=e("span",{"i-carbon-logo-github":"","text-lg":"",op50:""},null,-1)),s(n,{to:a.value.github,target:"_blank","of-hidden":"",truncate:"","ws-nowrap":"","text-sm":"",op50:"",hover:"op100 underline text-primary"},{default:i(()=>[x(k(a.value.github.replace(/^https?:\/\/github.com\//,"")),1)]),_:1},8,["to"])])):g("",!0)]),A(r.$slots,"items"),a.value.stats?(o(),m("div",we,[e("div",Ce,[s(u,{icon:"carbon-star","text-lg":""}),e("span",null,k(a.value.stats.stars),1)]),e("div",Me,[s(u,{icon:"carbon-download","text-lg":""}),e("span",null,k(a.value.stats.downloads),1)])])):g("",!0),r.mod.timings?.setup?(o(),m("div",Ie,[s(w,{title:"Module Setup Time",flex:"~ items-center",duration:r.mod.timings.setup*1e3,factor:.5},{before:i(()=>[s(u,{icon:"carbon-time",mr2:"","text-lg":"",op50:""})]),_:1},8,["duration"])])):g("",!0)]),e("div",Ne,[a.value.icon||r.mod.isPackageModule?(o(),m("div",Be,[a.value.icon?(o(),m("img",{key:0,src:Te+a.value.icon,alt:r.mod.name,ma:""},null,8,je)):g("",!0),t[4]||(t[4]=e("div",{"i-carbon-cube":"",ma:"","text-4xl":"",op30:""},null,-1))])):g("",!0),a.value.maintainers?.length&&r.maintainers?(o(),m("div",Pe,[(o(!0),m(B,null,D(a.value.maintainers,d=>(o(),$(n,{key:d.name,target:"_blank",to:Oe+d.github,title:d.name},{default:i(()=>[e("img",{src:Le+d.github,"h-6":"","w-6":"","rounded-full":""},null,8,De)]),_:2},1032,["to","title"]))),128))])):g("",!0),r.$slots.actions?(o(),m(B,{key:2},[t[5]||(t[5]=e("div",{"flex-auto":""},null,-1)),e("div",Ae,[A(r.$slots,"actions")])],64)):g("",!0)])]),_:3})}}}),Se={key:0,flex:"~ gap-2",title:"Open on filesystem"},Ue={key:1,"mx--2":""},Fe=["onClick"],qe={key:2,"mx--2":""},Ve=["onClick"],Ee={op50:""},Ye={"text-green":""},He={key:3,flex:"~ gap-2","items-center":"",title:"NPM"},Ge={"text-sm":"",op50:""},Ke=P({__name:"ModuleItem",props:{mod:{}},setup(N){const _=N,a=C(()=>_.mod.info),b=C(()=>({..._.mod?.meta,..._.mod,...a.value})),r=K();return(t,n)=>{const u=R,w=S,y=ae,d=U;return o(),$(d,{mod:t.mod,info:a.value},{items:i(()=>[t.mod.entryPath?(o(),m("div",Se,[n[0]||(n[0]=e("span",{"i-carbon-folder-move-to":"","text-lg":"",op50:""},null,-1)),s(u,{filepath:t.mod.entryPath,"text-sm":"",op50:"",hover:"text-primary op100"},null,8,["filepath"])])):g("",!0),b.value.npm?(o(),$(y,{key:b.value.npm,"package-name":b.value.npm,options:{dev:!0}},{default:i(({info:c,update:p,state:l,id:f,restart:h})=>[l==="running"?(o(),$(w,{key:0,flex:"~ gap-2","animate-pulse":"","items-center":"",to:f?"/modules/terminals":void 0,onClick:M=>f?r.value=f:void 0},{default:i(()=>n[1]||(n[1]=[e("span",{"i-carbon-circle-dash":"","animate-spin":"","text-lg":"",op50:""},null,-1),e("code",{"text-sm":"",op50:""},"Upgrading...",-1)])),_:2},1032,["to","onClick"])):l==="updated"?(o(),m("div",Ue,[e("button",{flex:"~ gap-2",hover:"bg-primary/20","items-center":"",rounded:"","bg-primary:10":"",px2:"","text-sm":"","text-primary":"",onClick:h},n[2]||(n[2]=[e("span",{"i-carbon-intent-request-active":"","text-lg":"","text-primary":""},null,-1),e("code",{"text-xs":""},"Update installed, click to restart",-1)]),8,Fe)])):c?.needsUpdate?(o(),m("div",qe,[e("button",{flex:"~ gap-2",title:"Click to upgrade","items-center":"",rounded:"",px2:"","text-sm":"",hover:"bg-active",onClick:M=>p()},[n[3]||(n[3]=e("span",{"i-carbon-intent-request-upgrade":"","text-lg":"",op50:""},null,-1)),e("code",Ee,"v"+k(c.current),1),n[4]||(n[4]=e("div",{"i-carbon-arrow-right":"",op50:""},null,-1)),e("code",Ye,"v"+k(c.latest),1)],8,Ve)])):c?.latest?(o(),m("div",He,[n[5]||(n[5]=e("span",{"i-carbon-cube":"","text-lg":"",op50:""},null,-1)),e("code",Ge,"v"+k(c.current),1)])):g("",!0)]),_:1},8,["package-name"])):g("",!0)]),_:1},8,["mod","info"])}}}),We=P({__name:"ModuleItemInstall",props:{item:{}},emits:["start"],setup(N,{emit:_}){const a=N,b=_,r=Z(),t=C(()=>r.value.find(d=>d.name===a.item.npm)),n=C(()=>t.value&&t.value.isPackageModule),u=C(()=>t.value&&t.value.isPackageModule&&t.value.isUninstallable);async function w(d,c){const p=c==="install"?q.installNuxtModule:q.uninstallNuxtModule,l=await p(await V(),d.npm,!0);ee(`modules:${c}`,{moduleName:d.npm}),l.commands&&await W.start(d,l,c)&&(X.value.push({name:d.npm,info:d,processId:l.processId}),b("start"),await p(await V(),d.npm,!1))}const y={};return(d,c)=>{const p=ce,l=O,f=J,h=U;return o(),$(h,{mod:y,role:n.value?"":"button",info:d.item,mb2:"","h-full":"",class:L(n.value?"border-dashed op75":"hover:bg-active!"),compact:!0,onClick:c[1]||(c[1]=M=>n.value?null:w(d.item,"install"))},ue({_:2},[n.value?{name:"badge",fn:i(()=>[s(p,{n:"green",textContent:"Installed"}),u.value?(o(),$(f,{key:0,n:"sm green"},{trigger:i(({click:M})=>[s(l,{icon:"carbon-overflow-menu-vertical",border:!1,onClick:v=>M()},null,8,["onClick"])]),default:i(()=>[s(l,{icon:"carbon-trash-can",n:"red",onClick:c[0]||(c[0]=M=>w(d.item,"uninstall"))},{default:i(()=>c[2]||(c[2]=[x(" Uninstall ")])),_:1})]),_:1})):g("",!0)]),key:"0"}:void 0]),1032,["role","info","class"])}}}),Xe={"h-full":"",flex:"~ col gap-4"},Ze={flex:"~ items-center"},Je={flex:"~ col","w-30":"","of-auto":""},Qe={flex:"~ justify-between","w-full":"","text-xs":"",capitalize:"",op75:""},Re={"flex-auto":"","of-auto":"",flex:"~ col gap-2",pl6:"",pr4:""},et=P({__name:"ModuleInstallList",emits:["close"],setup(N,{emit:_}){const a=_,b=ie(),r=["downloads","stars","updated","created"],t=T(!1),n=T(r[0]),u={downloads:(p,l)=>p.stats.downloads-l.stats.downloads,stars:(p,l)=>p.stats.stars-l.stats.stars,created:(p,l)=>p.stats.createdAt-l.stats.createdAt,updated:(p,l)=>p.stats.publishedAt-l.stats.publishedAt},w=C(()=>b.value?.toSorted((p,l)=>u[n.value](p,l)*(t.value?1:-1))),y=T(""),d=C(()=>new te(b.value||[],{keys:["name","description","npm","category"],sortFn:(p,l)=>{const f=b.value?.[p.idx],h=b.value?.[l.idx];return f&&h?u[n.value](f,h)*(t.value?1:-1):p.score-l.score},threshold:.2})),c=C(()=>y.value?d.value.search(y.value).map(p=>p.item):w.value);return(p,l)=>{const f=pe,h=O,M=H,v=J,F=me,Q=We;return o(),m("div",Xe,[s(f,{mx6:"",mt6:"","text-xl":"",op75:"",icon:"i-carbon-intent-request-create",text:"Install Module"}),s(F,{search:y.value,"onUpdate:search":l[1]||(l[1]=I=>y.value=I),"no-padding":"","px-6":"","pb-5":"","pt-2":""},{actions:i(()=>[s(v,{direction:"end",n:"sm primary"},{trigger:i(({click:I})=>[e("div",Ze,[s(h,{icon:t.value?"tabler:sort-ascending":"tabler:sort-descending","h-full":"","rounded-r-none":"",onClick:l[0]||(l[0]=z=>t.value=!t.value)},null,8,["icon"]),s(h,{flex:"~ justify-between","min-w-30":"","border-l-0":"","rounded-l-none":"","px-2":"",capitalize:"",hover:"border-l-1",onClick:z=>I()},{default:i(()=>[x(k(n.value)+" ",1),s(M,{icon:"carbon:chevron-down"})]),_:2},1032,["onClick"])])]),default:i(()=>[e("div",Je,[(o(),m(B,null,D(r,I=>s(h,{key:I,border:!1,p2:"",hover:"n-checkbox-hover text-green",onClick:z=>n.value=I},{default:i(()=>[e("span",Qe,[x(k(I)+" ",1),n.value===I?(o(),$(M,{key:0,icon:"carbon:checkmark"})):g("",!0)])]),_:2},1032,["onClick"])),64))])]),_:1})]),_:1},8,["search"]),e("div",Re,[s(j(_e),{class:"scroller",items:c.value,"item-size":200,"key-field":"name"},{default:i(({item:I})=>[s(Q,{item:I,onStart:l[2]||(l[2]=z=>a("close"))},null,8,["item"])]),_:1},8,["items"])])])}}}),tt={flex:"~ col gap-2","w-150":"",p4:"",border:"t base"},ot={capitalize:""},nt={op50:""},st={flex:"~ gap-3",mt2:"","justify-end":""},lt=P({__name:"ModuleActionDialog",setup(N){const _=oe(),a=Y(),b={};return(r,t)=>{const n=U,u=fe,w=ve,y=ge,d=ne,c=O,p=se;return o(),$(j(W),null,{default:i(({resolve:l,args:f})=>[s(p,{"model-value":!0,onClose:h=>l(!1)},{default:i(()=>[s(n,{mod:b,info:f[0],border:"none","w-150":"","n-panel-grids":""},null,8,["info"]),e("div",tt,[e("h2",{"text-xl":"",class:L(f[2]==="install"?"text-primary":"text-red")},[e("span",ot,k(f[2]),1),t[1]||(t[1]=x()),e("code",null,k(f[0].name),1),t[2]||(t[2]=x("? "))],2),t[7]||(t[7]=e("p",{op50:""}," The following command will be executed in your terminal: ",-1)),s(u,{code:f[1].commands.join(" "),lang:"bash",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),e("p",nt,[t[3]||(t[3]=x(" Then your ")),s(w,{role:"button",n:"primary",underline:"",onClick:t[0]||(t[0]=h=>j(a)(j(_)?._nuxtConfigFile)),textContent:"Nuxt config"}),t[4]||(t[4]=x(" will be updated as: "))]),s(y,{from:f[1].configOriginal,to:f[1].configGenerated,"max-h-80":"","of-auto":"",py2:"",border:"~ base rounded",lang:"ts"},null,8,["from","to"]),t[8]||(t[8]=e("p",null,[e("span",{op50:""},"After that, Nuxt will "),e("span",{"text-orange":""},"restart automatically"),x(". ")],-1)),e("div",st,[s(d,{n:"sm amber","flex-auto":"",icon:"i-carbon-data-backup"},{default:i(()=>t[5]||(t[5]=[x(" Please make sure to backup your project first. ")])),_:1}),s(c,{onClick:h=>l(!1)},{default:i(()=>t[6]||(t[6]=[x(" Cancel ")])),_:2},1032,["onClick"]),s(c,{n:"solid",capitalize:"",class:L(f[2]==="install"?"n-primary":"n-red"),onClick:h=>l(!0)},{default:i(()=>[x(k(f[2]),1)]),_:2},1032,["class","onClick"])])])]),_:2},1032,["onClose"])]),_:1})}}}),at={class:"markdown-body"},it={__name:"modules",setup(N,{expose:_}){return _({frontmatter:{}}),(b,r)=>(o(),m("div",at,r[0]||(r[0]=[e("h1",null,"Modules",-1),e("p",null,[x("Nuxt provides a module system to extend the framework core and simplify integrations. You don’t need to develop everything from scratch or maintain boilerplate if there is already a Nuxt module for it. Adding Nuxt modules is possible using "),e("code",null,"nuxt.config"),x(".")],-1),e("p",null,[x("You can explore the list of modules on "),e("a",{href:"https://nuxt.com/modules",target:"_blank",rel:"noopener"},"nuxt.com/modules"),x(" or install them directly inside the DevTools.")],-1),e("p",null,[e("a",{href:"https://nuxt.com/docs/guide/concepts/modules",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1)])))}},rt={"h-full":"","w-full":"","of-auto":""},ut={relative:"","h-20":"","w-20":"",flex:"","flex-none":"",rounded:"","bg-gray:3":"",p3:""},dt=["src","alt"],pt={"text-lg":"","group-hover":"text-primary",transition:"",flex:"~ gap-2 items-center"},mt={op75:""},ct={key:0,border:"l base",pos:"fixed bottom-0 right-0 top-0","z-200":"","w-150":"","bg-base":""},_t="https://api.nuxtjs.org/api/ipx/s_80,f_webp/gh/nuxt/modules/main/icons/",Tt=P({__name:"modules",setup(N){const _=T(!1),a=Z(),b=K(),r=C(()=>a.value.filter(n=>n.isPackageModule)),t=C(()=>a.value.filter(n=>!n.isPackageModule));return le(()=>[{id:"action:modules:install",title:"Install a new module",icon:"i-carbon-intent-request-create ",action:()=>{_.value=!0}}]),(n,u)=>{const w=Ke,y=G,d=S,c=de,p=O,l=et,f=lt,h=it,M=xe;return o(),m(B,null,[e("div",rt,[s(c,{icon:"carbon-3d-mpr-toggle",text:"Installed Modules","container-class":"grid grid-cols-minmax-400px gap3 px4",padding:!1,description:`Total modules: ${r.value.length}`},{default:i(()=>[(o(!0),m(B,null,D(r.value,v=>(o(),$(w,{key:v.name,mod:v},null,8,["mod"]))),128)),(o(!0),m(B,null,D("processInstallingModules"in n?n.processInstallingModules:j(X),v=>(o(),$(d,{key:v.processId,block:"","min-h-30":"",to:"/modules/terminals",onClick:F=>b.value=v.processId},{default:i(()=>[s(y,{border:"1.5 dashed","h-full":"","animate-pulse":"",p4:"",transition:"",hover:"border-primary",flex:"~ col gap-1 items-center justify-center",role:"button",class:"group"},{default:i(()=>[e("div",ut,[e("img",{src:_t+v.info.icon,alt:v.info.name,ma:""},null,8,dt),u[4]||(u[4]=e("div",{"i-carbon-cube":"",ma:"","text-4xl":"",op30:""},null,-1))]),e("div",pt,[u[5]||(u[5]=e("div",{"i-carbon-circle-dash":"","animate-spin":"","text-xl":"",op75:""},null,-1)),e("span",mt,"Installing "+k(v.name)+"...",1)])]),_:2},1024)]),_:2},1032,["onClick"]))),128)),s(y,{border:"1.5 dashed","min-h-30":"",p4:"",transition:"",hover:"border-primary",flex:"~ col gap-2 items-center justify-center",role:"button",class:"group",onClick:u[0]||(u[0]=v=>_.value=!0)},{default:i(()=>u[6]||(u[6]=[e("div",{"i-carbon-intent-request-create":"","text-4xl":"",op40:"","group-hover":"op75 text-primary",transition:""},null,-1),e("div",{"text-lg":"",op40:"","group-hover":"op75 text-primary",transition:""}," Install New Module ",-1)])),_:1})]),_:1},8,["description"]),t.value.length?(o(),$(c,{key:0,icon:"carbon-3d-mpr-toggle",text:"User Modules","container-class":"grid grid-cols-minmax-400px gap3 px4",padding:!1,description:`Total modules: ${t.value.length}`},{default:i(()=>[(o(!0),m(B,null,D(t.value,v=>(o(),m(B,{key:v.meta?.name||v.entryPath},[v.meta?.name||v.entryPath?(o(),$(w,{key:0,mod:v},null,8,["mod"])):g("",!0)],64))),128))]),_:1},8,["description"])):g("",!0),s(E,{name:"fade-in"},{default:i(()=>[_.value?(o(),m("div",{key:0,class:"fixed bottom-0 left-0 right-0 top-0 z-100","bg-black:20":"","backdrop-blur-2":"",onClick:u[1]||(u[1]=v=>_.value=!1)})):g("",!0)]),_:1}),s(E,{name:"slide-in"},{default:i(()=>[_.value?(o(),m("div",ct,[s(p,{icon:"carbon-close",pos:"absolute top-3 right-3 z-10","rounded-full":"","text-xl":"",border:!1,onClick:u[2]||(u[2]=v=>_.value=!1)}),s(l,{onClose:u[3]||(u[3]=v=>_.value=!1)})])):g("",!0)]),_:1}),s(f)]),s(M,null,{default:i(()=>[s(h)]),_:1})],64)}}});export{Tt as default};
@@ -1 +0,0 @@
1
- import{b as o}from"./lbm7brd5.js";import{U as n,W as s,Y as t}from"./vendor/json-editor-vue-kcahofzr.js";const r={},c={class:"n-badge"};function _(e,a){return n(),s("span",c,[t(e.$slots,"default")])}const m=o(r,[["render",_]]);export{m as _};
@@ -1 +0,0 @@
1
- import{C as d,ab as p,_ as u}from"./lbm7brd5.js";import{p as m,f as c,U as f,W as b,Y as n,a3 as v,a2 as _,a9 as k,u as a,X as C,a0 as V}from"./vendor/json-editor-vue-kcahofzr.js";const y=m({__name:"NDropdown",props:{modelValue:{type:Boolean},direction:{default:"start"}},setup(r,{emit:l}){const e=d(r,"modelValue",l,{passive:!0}),t=c();return p(t,()=>{e.value=!1}),(s,o)=>{const i=u;return f(),b("div",{ref_key:"el",ref:t,class:"relative"},[n(s.$slots,"trigger",{enabled:a(e),click:()=>e.value=!a(e)},()=>[v(i,{onClick:o[0]||(o[0]=g=>e.value=!a(e))},{default:_(()=>o[1]||(o[1]=[k(" Dropdown ")])),_:1})]),C("div",{class:V(["absolute z-10 border n-border-base rounded shadow n-transition n-bg-base",[a(e)?"op-100":"op0 pointer-events-none -translate-y-1",s.direction==="end"?"right-0":"left-0"]])},[n(s.$slots,"default")],2)],512)}}});export{y as _};
@@ -1 +0,0 @@
1
- import{b as o}from"./lbm7brd5.js";import{U as t,W as r,Y as n}from"./vendor/json-editor-vue-kcahofzr.js";import"./vendor/unocss-mstcul8h.js";import"./vendor/shiki-ja073547.js";const s={},c={relative:"","w-full":""};function a(e,l){return t(),r("div",c,[n(e.$slots,"default")])}const d=o(s,[["render",a]]);export{d as default};
@@ -1 +0,0 @@
1
- import{f as M,K as P,a7 as z,an as O,ao as $,p as E,h as F,ap as g,aq as k,ar as K,a2 as q,i as G,m as H,j as U,e as W,A as X,_ as Z}from"./lbm7brd5.js";import{u as J,_ as Q}from"./state-modules-ou3w6py8.js";import{u as Y}from"./state-components-hu0vwgq9.js";import{p as h,q as A,P as v,a2 as n,U as s,u as o,W as p,X as e,a3 as i,a8 as a,Z as u,F as f,a9 as l}from"./vendor/json-editor-vue-kcahofzr.js";import"./vendor/unocss-mstcul8h.js";import"./vendor/shiki-ja073547.js";import"./nbadge-lm8ruxdz.js";import"./ncode-block.vue-dt6krs6h.js";import"./client-kpmlv67d.js";import"./ncheckbox.vue-o34fufk3.js";const c="2.0.0-beta.7-28980749.c20c724",tt={key:0},et={key:1,flex:"~ col gap2",ma:"","h-full":"","max-w-300":"","w-full":"",p5:"",px5:"","md:px20":""},ot={flex:"~ col","mt-5":"","items-center":"","md:mt-20":""},nt={op40:""},st={flex:"~ gap2 wrap"},lt={key:5,"pointer-events-none":"","min-w-40":"",p4:"","theme-card-lime":"",flex:"~ auto gap-6"},it={grid:"~ cols-[auto_auto] gap-x-5 items-center"},ut={"text-right":""},rt={"text-right":""},at={"text-right":""},dt={"text-right":""},pt={flex:"~ col gap2"},mt={flex:"~ gap-6 wrap","mt-5":"","items-center":"","justify-center":""},xt={flex:"col gap-2",mxa:"",hidden:"","w-100":"","text-sm":"",op50:"","md:flex":""},vt={flex:"~ gap-1","items-center":""},ft={flex:"~ gap-1","items-center":""},jt=h({__name:"overview",setup(gt){const b=M(),m=P(),D=Y(),y=z(),j=J(),B=O(),w=$(),I=E();function V(){G.value=!0,I.push("/")}const S=A(()=>b.value?.nuxt.vueApp.version),r=A(()=>b.value?.metrics.loading());function L(){H()}return(_,t)=>{const R=U,x=W,C=Q,N=X,d=Z,T=F;return s(),v(T,{"h-screen":"","w-full":"",flex:""},{default:n(()=>[o(m)?(s(),p("div",et,[t[40]||(t[40]=e("div",{"flex-auto":""},null,-1)),e("div",ot,[i(x,{flex:"~","mt--10":"","items-center":"","justify-center":"",to:"https://devtools.nuxt.com/",target:"_blank"},{default:n(()=>[i(R,{"h-10":""})]),_:1}),e("button",{mb6:"",mt3:"","text-center":"","text-sm":"",flex:"~ gap-1 wrap",onClick:V},[t[0]||(t[0]=e("span",{op40:""}," Nuxt DevTools ",-1)),e("code",nt,"v"+a(o(c)),1),i(C,{"package-name":"@nuxt/devtools",options:{dev:!0},"show-version":!1})])]),e("div",st,[i(x,{to:"https://nuxt.com",target:"_blank",p4:"","theme-card-green":"",flex:"~ col auto"},{default:n(()=>[t[1]||(t[1]=e("div",{"logos-nuxt-icon":"","text-3xl":""},null,-1)),i(C,{"package-name":"nuxt",options:{dev:!0}})]),_:1}),S.value?(s(),v(x,{key:0,to:"https://vuejs.org",target:"_blank",p4:"","theme-card-green":"",flex:"~ col auto"},{default:n(()=>[t[2]||(t[2]=e("div",{"logos-vue":"","text-3xl":""},null,-1)),e("code",null,"v"+a(S.value),1)]),_:1})):u("",!0),o(m)?(s(),p(f,{key:1},[o(m)&&o(m).pages&&o(b)?(s(),v(x,{key:0,"min-w-40":"",p4:"","theme-card-lime":"",flex:"~ col auto",to:"/modules/pages"},{default:n(()=>[t[3]||(t[3]=e("div",{"carbon-tree-view-alt":"","text-3xl":""},null,-1)),e("div",null,a(o(g)(o(B).length,"page")),1)]),_:1})):u("",!0),o(m)?(s(),v(x,{key:1,"min-w-40":"",p4:"","theme-card-lime":"",flex:"~ col auto",to:"/modules/components"},{default:n(()=>[t[4]||(t[4]=e("div",{"i-carbon-assembly-cluster":"","text-3xl":""},null,-1)),e("div",null,a(o(g)(o(D).length,"component")),1)]),_:1})):u("",!0),o(m)&&o(y)?(s(),v(x,{key:2,"min-w-40":"",p4:"","theme-card-yellow":"",flex:"~ col auto",to:"/modules/imports"},{default:n(()=>[t[5]||(t[5]=e("div",{"carbon-function":"","text-3xl":""},null,-1)),e("div",null,a(o(g)(o(y).imports.length,"import")),1)]),_:1})):u("",!0),o(m)?(s(),v(x,{key:3,"min-w-40":"",p4:"","theme-card-purple":"",flex:"~ col auto",to:"/modules/modules"},{default:n(()=>[t[6]||(t[6]=e("div",{"carbon-3d-mpr-toggle":"","text-3xl":""},null,-1)),e("div",null,a(o(g)(o(j).length,"module")),1)]),_:1})):u("",!0),o(m)?(s(),v(x,{key:4,"min-w-40":"",p4:"","theme-card-teal":"",flex:"~ col auto",to:"/modules/plugins"},{default:n(()=>[t[7]||(t[7]=e("div",{"carbon-plug":"","text-3xl":""},null,-1)),e("div",null,a(o(g)(o(m).plugins.length,"plugin")),1)]),_:1})):u("",!0),r.value?(s(),p("div",lt,[t[12]||(t[12]=e("div",{"i-carbon-time-plot":"","flex-none":"","text-3xl":""},null,-1)),e("div",it,[r.value.ssrStart?(s(),p(f,{key:0},[t[8]||(t[8]=e("div",{"text-sm":""}," SSR to full load ",-1)),e("div",ut,a(o(k)(r.value.appLoad-r.value.ssrStart)),1)],64)):u("",!0),t[10]||(t[10]=e("div",{"text-sm":""}," Page load ",-1)),e("div",rt,a(o(k)(r.value.appLoad-r.value.appInit)),1),t[11]||(t[11]=e("div",{"text-sm":""}," Navigation ",-1)),e("div",at,a(o(k)(r.value.pageEnd-r.value.pageStart)),1),r.value.hmrStart?(s(),p(f,{key:1},[t[9]||(t[9]=e("div",{"text-sm":""}," HMR ",-1)),e("div",dt,a(o(k)(r.value.hmrEnd-r.value.hmrStart)),1)],64)):u("",!0)])])):u("",!0)],64)):u("",!0)]),e("div",pt,[o(K)?(s(),v(N,{key:0,n:"yellow5",icon:"carbon-unlink","justify-center":""},{default:n(()=>t[13]||(t[13]=[l(" Not connected to the client app, showing server-side data only. Use the embedded mode for full features. ")])),_:1})):u("",!0),e("button",{title:"Authorize",onClick:L},[("isDevAuthed"in _?_.isDevAuthed:o(q))?u("",!0):(s(),v(N,{key:0,n:"orange5",icon:"i-carbon-locked","justify-center":""},{default:n(()=>t[14]||(t[14]=[l(" Access from an untrusted browser, some features are limited. Click to authorize now. ")])),_:1}))])]),e("div",mt,[t[16]||(t[16]=e("a",{href:"https://github.com/nuxt/devtools",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-blue",transition:""},[e("div",{"i-carbon-star":""}),l(" Star on GitHub ")],-1)),t[17]||(t[17]=e("a",{href:"https://github.com/nuxt/devtools/discussions/29",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-yellow",transition:""},[e("div",{"i-carbon-data-enrichment":""}),l(" Ideas & Suggestions ")],-1)),t[18]||(t[18]=e("a",{href:"https://github.com/nuxt/devtools/discussions/31",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-lime",transition:""},[e("div",{"i-carbon-plan":""}),l(" Project Roadmap ")],-1)),t[19]||(t[19]=e("a",{href:"https://github.com/nuxt/devtools/issues",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-rose",transition:""},[e("div",{"i-carbon-debug":""}),l(" Bug Reports ")],-1)),i(x,{to:"/settings",flex:"~ gap1","inline-block":"","items-center":"",op50:"","hover:op80":""},{default:n(()=>t[15]||(t[15]=[e("div",{"i-carbon-settings-adjust":""},null,-1),l(" Settings ")])),_:1})]),t[41]||(t[41]=e("div",{"flex-auto":""},null,-1)),e("div",xt,[e("div",vt,[o(w)?(s(),p(f,{key:0},[i(d,{n:"xs",class:"px2"},{default:n(()=>t[20]||(t[20]=[l(" ⌘ Cmd ")])),_:1}),t[22]||(t[22]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>t[21]||(t[21]=[l(" K ")])),_:1})],64)):(s(),p(f,{key:1},[i(d,{n:"xs",class:"px2"},{default:n(()=>t[23]||(t[23]=[l(" Ctrl ")])),_:1}),t[25]||(t[25]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>t[24]||(t[24]=[l(" K ")])),_:1})],64)),t[26]||(t[26]=e("div",{"flex-auto":""},null,-1)),t[27]||(t[27]=l(" Open Command Palette "))]),e("div",ft,[o(w)?(s(),p(f,{key:0},[i(d,{n:"xs",class:"px2"},{default:n(()=>t[28]||(t[28]=[l(" ⇧ Shift ")])),_:1}),t[31]||(t[31]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>t[29]||(t[29]=[l(" ⌥ Option ")])),_:1}),t[32]||(t[32]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>t[30]||(t[30]=[l(" D ")])),_:1})],64)):(s(),p(f,{key:1},[i(d,{n:"xs",class:"px2"},{default:n(()=>t[33]||(t[33]=[l(" Shift ")])),_:1}),t[36]||(t[36]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>t[34]||(t[34]=[l(" Alt ")])),_:1}),t[37]||(t[37]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>t[35]||(t[35]=[l(" D ")])),_:1})],64)),t[38]||(t[38]=e("div",{"flex-auto":""},null,-1)),t[39]||(t[39]=e("div",null,"Toggle DevTools",-1))])])])):(s(),p("div",tt," Loading... "))]),_:1})}}});export{jt as default};
@@ -1 +0,0 @@
1
- import{az as r,aA as c}from"./lbm7brd5.js";import{v as p}from"./index-mkx27gf0.js";import{p as i,W as m,u as o,P as n,a2 as _,U as t,a9 as l}from"./vendor/json-editor-vue-kcahofzr.js";import"./vendor/unocss-mstcul8h.js";import"./vendor/shiki-ja073547.js";import"./vue-virtual-scroller.esm-ryb7s73q.js";const u={class:"h-full w-full"},h=i({__name:"pinia",setup(f){const{connected:a}=r();return(d,e)=>{const s=c;return t(),m("div",u,[o(a)?(t(),n(o(p),{key:0})):(t(),n(s,{key:1},{default:_(()=>e[0]||(e[0]=[l(" Connecting.... ")])),_:1}))])}}});export{h as default};
@@ -1 +0,0 @@
1
- import{az as m,f as d,L as c,aA as f}from"./lbm7brd5.js";import{p as _}from"./index-mkx27gf0.js";import{p as v,W as C,u as n,P as a,a2 as E,U as o,a9 as I}from"./vendor/json-editor-vue-kcahofzr.js";import"./vendor/unocss-mstcul8h.js";import"./vendor/shiki-ja073547.js";import"./vue-virtual-scroller.esm-ryb7s73q.js";const k={class:"h-full w-full"},N=v({__name:"render-tree",setup(x){const{connected:p}=m(),t=d(),l=c();function s(r){r?t.value.devtools.open():t.value.devtools.close()}return(r,e)=>{const i=f;return o(),C("div",k,[n(p)?(o(),a(n(_),{key:0,onOnInspectComponentStart:e[0]||(e[0]=u=>s(!1)),onOnInspectComponentEnd:e[1]||(e[1]=u=>s(!0)),onOpenInEditor:n(l)},null,8,["onOpenInEditor"])):(o(),a(i,{key:1},{default:E(()=>e[2]||(e[2]=[I(" Connecting.... ")])),_:1}))])}}});export{N as default};
@@ -1 +0,0 @@
1
- import{C,R as N,_ as O}from"./lbm7brd5.js";import{_ as R}from"./data-schema-button.vue-cvp49yv0.js";import{p as $,m as g,z as j,j as z,ag as D,U as l,W as c,X as m,a0 as d,u as o,a8 as b,Z as p,Y as M,a5 as P,a6 as E,F as k,ab as J,a3 as A,P as h,a4 as F,ax as U,n as x}from"./vendor/json-editor-vue-kcahofzr.js";const T=["open"],W={flex:"~ gap2","select-none":"","items-center":"",px4:""},X={key:0,class:"bg-red:10 px5 py3 text-red"},H=$({__name:"StateEditor",props:{name:{},open:{type:Boolean},revision:{},state:{},readonly:{type:Boolean}},emits:["update:open"],setup(_,{emit:V}){const t=_,s=C(t,"open",V,{passive:!0}),B=N(),i=g(),u=g();function f(){u.value=void 0;try{t.state?i.value=JSON.parse(JSON.stringify(t.state||{})):(typeof t.state=="number"||typeof t.state!="string")&&(i.value=t.state)}catch(e){console.error(e),u.value=e}}j(()=>{f(),z(()=>[t.revision,t.state],e=>{typeof e!="number"&&typeof e!="string"?v(e,t.state):i.value=t.state},{deep:!0})});function v(e,r){const n=e[1];for(const a in n)Array.isArray(n[a])?r[a]=n[a].slice():typeof n[a]=="object"&&n[a]!==null?v(n[a],r[a]):r[a]=n[a]}async function S(){f(),await x()}return(e,r)=>{const n=O,a=R,w=D("tooltip");return l(),c("div",{class:"state-editor-details",open:e.name?o(s):!0},[m("div",W,[e.name?(l(),c("button",{key:0,flex:"~","cursor-pointer":"","items-center":"",class:d(o(s)?"":"op50"),onClick:r[0]||(r[0]=y=>s.value=!o(s))},[m("div",{"i-carbon-chevron-right":"",transition:"",class:d(o(s)?"rotate-90 op0":"")},null,2),m("code",{px3:"",py1:"","font-mono":"",class:d(o(s)?"bg-[#8881] rounded-t":"rounded hover:bg-active")},b(e.name),3)],2)):p("",!0),M(e.$slots,"actions",P(E({isOpen:o(s),name:e.name,state:e.state}))),o(s)?(l(),c(k,{key:1},[J(A(n,{title:"Refresh View",icon:"carbon-renew",border:!1,onClick:S},null,512),[[w,"Refresh View",void 0,{bottom:!0}]]),i.value&&!u.value?(l(),h(a,{key:0,getter:()=>({name:e.name,input:JSON.stringify(i.value)})},null,8,["getter"])):p("",!0)],64)):p("",!0)]),o(s)||!e.name?(l(),c(k,{key:0},[u.value?(l(),c("div",X," Error: "+b(u.value),1)):(l(),h(o(U),F({key:1,modelValue:i.value,"onUpdate:modelValue":r[1]||(r[1]=y=>i.value=y)},e.$attrs,{class:["json-editor-vue",[o(B)==="dark"?"jse-theme-dark":"",(e.name,"")]],"main-menu-bar":!1,"navigation-bar":!1,"status-bar":!1,"read-only":t.readonly,indentation:2,"tab-size":2}),null,16,["modelValue","class","read-only"]))],64)):p("",!0)],8,T)}}});export{H as _};