@nuxt/devtools 0.4.4 → 0.4.6

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 (184) hide show
  1. package/dist/chunks/module-main.mjs +1 -1
  2. package/dist/client/200.html +2 -2
  3. package/dist/client/404.html +2 -2
  4. package/dist/client/__inspecting/index.html +2 -2
  5. package/dist/client/_nuxt/Badge.21478015.js +1 -0
  6. package/dist/client/_nuxt/CodeSnippets.vue.cf956c68.js +1 -0
  7. package/dist/client/_nuxt/DrawerRight.vue.7d712780.js +1 -0
  8. package/dist/client/_nuxt/DurationDisplay.vue.d28a01f2.js +1 -0
  9. package/dist/client/_nuxt/FilepathItem.vue.1374ae6e.js +1 -0
  10. package/dist/client/_nuxt/HelpFab.f179afc3.css +1 -0
  11. package/dist/client/_nuxt/HelpFab.vue.8e13a60e.js +1 -0
  12. package/dist/client/_nuxt/LaunchPage.vue.e8117060.js +1 -0
  13. package/dist/client/_nuxt/NCheckbox.vue.002c643b.js +1 -0
  14. package/dist/client/_nuxt/NCodeBlock.cf3ce05b.css +1 -0
  15. package/dist/client/_nuxt/NCodeBlock.vue.8fd682f9.js +2 -0
  16. package/dist/client/_nuxt/NIconButton.vue.61149d03.js +1 -0
  17. package/dist/client/_nuxt/NIconTitle.vue.636dd062.js +1 -0
  18. package/dist/client/_nuxt/NLink.vue.5e75761d.js +1 -0
  19. package/dist/client/_nuxt/NMarkdown.vue.8cf88cf5.js +1 -0
  20. package/dist/client/_nuxt/NPanelGrids.c52bd29c.js +1 -0
  21. package/dist/client/_nuxt/NSectionBlock.77e830ae.js +1 -0
  22. package/dist/client/_nuxt/NSectionBlock.83ecb54a.css +1 -0
  23. package/dist/client/_nuxt/NSelect.vue.90e01b18.js +1 -0
  24. package/dist/client/_nuxt/NSwitch.vue.1b0e3364.js +1 -0
  25. package/dist/client/_nuxt/NTextInput.vue.f5b2276f.js +1 -0
  26. package/dist/client/_nuxt/Navbar.vue.e1117ac7.js +1 -0
  27. package/dist/client/_nuxt/NpmVersionCheck.vue.80a75d57.js +1 -0
  28. package/dist/client/_nuxt/NuxtLogo.d17ca3c5.js +1 -0
  29. package/dist/client/_nuxt/{PanelLeftRight.vue.a115e8d3.js → PanelLeftRight.vue.8adf1a04.js} +1 -1
  30. package/dist/client/_nuxt/StateEditor.vue.b3ad6a2d.js +1 -0
  31. package/dist/client/_nuxt/__inspecting.f21fc4ff.js +1 -0
  32. package/dist/client/_nuxt/assets.97af363e.js +16 -0
  33. package/dist/client/_nuxt/client.44af506c.js +1 -0
  34. package/dist/client/_nuxt/components.0339ba8e.js +99 -0
  35. package/dist/client/_nuxt/{constants.126da185.js → constants.d7bcda3c.js} +1 -1
  36. package/dist/client/_nuxt/custom-_name_.aba84e7f.js +1 -0
  37. package/dist/client/_nuxt/default.d59c7459.js +1 -0
  38. package/dist/client/_nuxt/editor.4c6382c7.js +1 -0
  39. package/dist/client/_nuxt/entry.079c020d.css +1 -0
  40. package/dist/client/_nuxt/entry.2a062301.js +19 -0
  41. package/dist/client/_nuxt/error-404.ce21871f.js +1 -0
  42. package/dist/client/_nuxt/error-500.d6e09b3d.js +1 -0
  43. package/dist/client/_nuxt/{error-component.b49d59e8.js → error-component.bf406d2b.js} +2 -2
  44. package/dist/client/_nuxt/full.e43d885f.js +1 -0
  45. package/dist/client/_nuxt/fuse.esm.88e2763d.js +1 -0
  46. package/dist/client/_nuxt/hooks.073b884c.js +1 -0
  47. package/dist/client/_nuxt/imports.ba566562.js +1 -0
  48. package/dist/client/_nuxt/index.113a4cc6.js +1 -0
  49. package/dist/client/_nuxt/index.3e121f4a.js +17 -0
  50. package/dist/client/_nuxt/json-editor-vue.c66387bd.js +137 -0
  51. package/dist/client/_nuxt/middleware.a8c2264e.js +1 -0
  52. package/dist/client/_nuxt/modules.b147b11c.js +1 -0
  53. package/dist/client/_nuxt/none.dd2b9c08.js +1 -0
  54. package/dist/client/_nuxt/open-graph.cac96c16.js +1 -0
  55. package/dist/client/_nuxt/overview.848f0d2c.js +1 -0
  56. package/dist/client/_nuxt/pages.58612073.js +1 -0
  57. package/dist/client/_nuxt/payload.351fcd36.js +1 -0
  58. package/dist/client/_nuxt/plugins.14197f41.js +1 -0
  59. package/dist/client/_nuxt/runtime-configs.2908e02a.js +1 -0
  60. package/dist/client/_nuxt/server-routes.bf183192.js +9 -0
  61. package/dist/client/_nuxt/settings.59b94bec.js +1 -0
  62. package/dist/client/_nuxt/storage.76e0a760.js +1 -0
  63. package/dist/client/_nuxt/terminals.339eac8e.js +9 -0
  64. package/dist/client/_nuxt/terminals.d1dcf297.css +32 -0
  65. package/dist/client/_nuxt/{unocss-runtime.bf627221.js → unocss-runtime.6bcc481a.js} +2 -2
  66. package/dist/client/_nuxt/virtual-files.0b362e16.js +1 -0
  67. package/dist/client/index.html +2 -2
  68. package/dist/client/modules/assets/index.html +2 -2
  69. package/dist/client/modules/components/index.html +2 -2
  70. package/dist/client/modules/hooks/index.html +2 -2
  71. package/dist/client/modules/imports/index.html +2 -2
  72. package/dist/client/modules/middleware/index.html +2 -2
  73. package/dist/client/modules/modules/index.html +2 -2
  74. package/dist/client/modules/open-graph/index.html +7 -0
  75. package/dist/client/modules/overview/index.html +2 -2
  76. package/dist/client/modules/pages/index.html +2 -2
  77. package/dist/client/modules/payload/index.html +2 -2
  78. package/dist/client/modules/plugins/index.html +2 -2
  79. package/dist/client/modules/runtime-configs/index.html +2 -2
  80. package/dist/client/modules/server-routes/index.html +2 -2
  81. package/dist/client/modules/storage/index.html +2 -2
  82. package/dist/client/modules/terminals/index.html +2 -2
  83. package/dist/client/modules/virtual-files/index.html +2 -2
  84. package/dist/client/settings/index.html +2 -2
  85. package/dist/module.json +1 -1
  86. package/dist/runtime/plugins/devtools.client.mjs +1 -1
  87. package/dist/types.d.ts +14 -1
  88. package/package.json +29 -26
  89. package/dist/client/_nuxt/Badge.0c2ba14d.js +0 -1
  90. package/dist/client/_nuxt/CodeSnippets.vue.246adc67.js +0 -1
  91. package/dist/client/_nuxt/ContentDoc.16c5984a.js +0 -1
  92. package/dist/client/_nuxt/ContentList.89c59146.js +0 -1
  93. package/dist/client/_nuxt/ContentNavigation.8a10a134.js +0 -1
  94. package/dist/client/_nuxt/ContentQuery.117fabd3.js +0 -1
  95. package/dist/client/_nuxt/ContentRenderer.914f3a38.js +0 -1
  96. package/dist/client/_nuxt/ContentRendererMarkdown.fd0df501.js +0 -1
  97. package/dist/client/_nuxt/ContentSlot.1f87440b.js +0 -1
  98. package/dist/client/_nuxt/DocumentDrivenEmpty.3cbfc9a3.js +0 -1
  99. package/dist/client/_nuxt/DocumentDrivenNotFound.744ab959.js +0 -1
  100. package/dist/client/_nuxt/DrawerRight.vue.0cd41196.js +0 -1
  101. package/dist/client/_nuxt/DurationDisplay.vue.0d861fe1.js +0 -1
  102. package/dist/client/_nuxt/FilepathItem.vue.64e00c09.js +0 -1
  103. package/dist/client/_nuxt/HelpFab.vue.8f58b14e.js +0 -1
  104. package/dist/client/_nuxt/HelpImportsDirs.d13cb77d.js +0 -1
  105. package/dist/client/_nuxt/HelpImportsModules.0357ca53.js +0 -1
  106. package/dist/client/_nuxt/HelpTip.5b4ceadc.js +0 -1
  107. package/dist/client/_nuxt/HelpTip.vue.ea6b0f55.js +0 -1
  108. package/dist/client/_nuxt/HelpTipPerformance.6ea06c19.js +0 -1
  109. package/dist/client/_nuxt/LaunchPage.vue.453bd3ae.js +0 -1
  110. package/dist/client/_nuxt/Markdown.242967cb.js +0 -1
  111. package/dist/client/_nuxt/NCheckbox.vue.93b3bec2.js +0 -1
  112. package/dist/client/_nuxt/NCodeBlock.vue.da19eaf4.js +0 -2
  113. package/dist/client/_nuxt/NIconButton.vue.b4278b36.js +0 -1
  114. package/dist/client/_nuxt/NIconTitle.vue.321882c6.js +0 -1
  115. package/dist/client/_nuxt/NMarkdown.vue.f4e94eed.js +0 -1
  116. package/dist/client/_nuxt/NPanelGrids.a0c996c3.js +0 -1
  117. package/dist/client/_nuxt/NSectionBlock.53fae3a6.js +0 -1
  118. package/dist/client/_nuxt/NSelect.vue.67595372.js +0 -1
  119. package/dist/client/_nuxt/NSwitch.vue.8577379b.js +0 -1
  120. package/dist/client/_nuxt/NTextInput.vue.c65cc1e4.js +0 -1
  121. package/dist/client/_nuxt/NpmVersionCheck.vue.2810bb88.js +0 -1
  122. package/dist/client/_nuxt/NuxtLogo.a6b7ebcc.js +0 -1
  123. package/dist/client/_nuxt/ProseA.a471b674.js +0 -1
  124. package/dist/client/_nuxt/ProseBlockquote.aa4b332f.js +0 -1
  125. package/dist/client/_nuxt/ProseCode.090fc27a.js +0 -1
  126. package/dist/client/_nuxt/ProseCodeInline.9997b45e.js +0 -1
  127. package/dist/client/_nuxt/ProseEm.c33573e1.js +0 -1
  128. package/dist/client/_nuxt/ProseH1.5a84caee.js +0 -1
  129. package/dist/client/_nuxt/ProseH2.e16731e2.js +0 -1
  130. package/dist/client/_nuxt/ProseH3.7fd4f252.js +0 -1
  131. package/dist/client/_nuxt/ProseH4.727675aa.js +0 -1
  132. package/dist/client/_nuxt/ProseH5.61f1037b.js +0 -1
  133. package/dist/client/_nuxt/ProseH6.6c1be9fd.js +0 -1
  134. package/dist/client/_nuxt/ProseHr.f82e71cd.js +0 -1
  135. package/dist/client/_nuxt/ProseImg.2f67758f.js +0 -1
  136. package/dist/client/_nuxt/ProseLi.8dff4df1.js +0 -1
  137. package/dist/client/_nuxt/ProseOl.4b9af098.js +0 -1
  138. package/dist/client/_nuxt/ProseP.03062ef9.js +0 -1
  139. package/dist/client/_nuxt/ProseStrong.e20e175b.js +0 -1
  140. package/dist/client/_nuxt/ProseTable.a819c70b.js +0 -1
  141. package/dist/client/_nuxt/ProseTbody.e0143690.js +0 -1
  142. package/dist/client/_nuxt/ProseTd.da17cdf5.js +0 -1
  143. package/dist/client/_nuxt/ProseTh.f1f2176c.js +0 -1
  144. package/dist/client/_nuxt/ProseThead.d8777ee6.js +0 -1
  145. package/dist/client/_nuxt/ProseTr.db9c20a2.js +0 -1
  146. package/dist/client/_nuxt/ProseUl.613e2640.js +0 -1
  147. package/dist/client/_nuxt/StateEditor.vue.d274c06c.js +0 -1
  148. package/dist/client/_nuxt/__inspecting.cb51497e.js +0 -1
  149. package/dist/client/_nuxt/_commonjsHelpers.87174ba5.js +0 -1
  150. package/dist/client/_nuxt/assets.5336bd04.js +0 -16
  151. package/dist/client/_nuxt/client-db.a04e1eda.js +0 -1
  152. package/dist/client/_nuxt/components.a77abd82.js +0 -1
  153. package/dist/client/_nuxt/custom-_name_.d515746e.js +0 -1
  154. package/dist/client/_nuxt/default.9728844a.js +0 -1
  155. package/dist/client/_nuxt/editor.e9c81b63.js +0 -1
  156. package/dist/client/_nuxt/entry.c396e258.css +0 -32
  157. package/dist/client/_nuxt/entry.cefe3147.js +0 -261
  158. package/dist/client/_nuxt/error-404.8472f8a8.js +0 -1
  159. package/dist/client/_nuxt/error-500.d5f3c7ae.js +0 -1
  160. package/dist/client/_nuxt/full.a88c8cad.js +0 -1
  161. package/dist/client/_nuxt/fuse.esm.dae60b17.js +0 -1
  162. package/dist/client/_nuxt/hooks.6fc67d6d.js +0 -1
  163. package/dist/client/_nuxt/imports.3b7c1f0c.js +0 -1
  164. package/dist/client/_nuxt/index.687801a0.js +0 -1
  165. package/dist/client/_nuxt/index.840dc95c.js +0 -17
  166. package/dist/client/_nuxt/index.a6ef77ff.js +0 -1
  167. package/dist/client/_nuxt/middleware.901ba296.js +0 -1
  168. package/dist/client/_nuxt/modules.0557ab86.js +0 -1
  169. package/dist/client/_nuxt/none.48e51402.js +0 -1
  170. package/dist/client/_nuxt/overview.a8b663e6.js +0 -1
  171. package/dist/client/_nuxt/pages.0b2af782.js +0 -1
  172. package/dist/client/_nuxt/payload.043a33c6.js +0 -1
  173. package/dist/client/_nuxt/plugins.0227817e.js +0 -1
  174. package/dist/client/_nuxt/preview.485816aa.js +0 -1
  175. package/dist/client/_nuxt/query.851664d2.js +0 -1
  176. package/dist/client/_nuxt/runtime-configs.06de9352.js +0 -1
  177. package/dist/client/_nuxt/server-routes.5d9da777.js +0 -9
  178. package/dist/client/_nuxt/settings.d459c303.js +0 -1
  179. package/dist/client/_nuxt/storage.8085fbb3.js +0 -1
  180. package/dist/client/_nuxt/terminals.163374b6.js +0 -1
  181. package/dist/client/_nuxt/terminals.4329aeb9.css +0 -1
  182. package/dist/client/_nuxt/utils.e5367885.js +0 -1
  183. package/dist/client/_nuxt/virtual-files.2262e9f9.js +0 -1
  184. package/dist/client/api/_content/cache.1682819066298.json +0 -1
@@ -1 +0,0 @@
1
- import{z as h,a0 as g,a1 as d,a2 as _,D as p,_ as $}from"./entry.cefe3147.js";import{w as f,s as P}from"./utils.e5367885.js";import{u as E}from"./preview.485816aa.js";const l=(r,e)=>e.split(".").reduce((t,s)=>t&&t[s],r),y=(r,e)=>Object.keys(r).filter(e).reduce((t,s)=>Object.assign(t,{[s]:r[s]}),{}),L=r=>e=>Array.isArray(e)?e.map(t=>r(t)):r(e),w=r=>{const e=[],t=[];for(const s of r)["$","_"].includes(s)?e.push(s):t.push(s);return{prefixes:e,properties:t}},R=(r=[])=>e=>{if(r.length===0||!e)return e;const{prefixes:t,properties:s}=w(r);return y(e,n=>!s.includes(n)&&!t.includes(n[0]))},q=(r=[])=>e=>{if(r.length===0||!e)return e;const{prefixes:t,properties:s}=w(r);return y(e,n=>s.includes(n)||t.includes(n[0]))},D=(r,e)=>{const t=new Intl.Collator(e.$locale,{numeric:e.$numeric,caseFirst:e.$caseFirst,sensitivity:e.$sensitivity}),s=Object.keys(e).filter(n=>!n.startsWith("$"));for(const n of s)r=r.sort((o,i)=>{const c=[l(o,n),l(i,n)].map(u=>{if(u!==null)return u instanceof Date?u.toISOString():u});return e[n]===-1&&c.reverse(),t.compare(c[0],c[1])});return r},j=(r,e="Expected an array")=>{if(!Array.isArray(r))throw new TypeError(e)},a=r=>Array.isArray(r)?r:r?[r]:[],S=["sort","where","only","without"],x=(r,e)=>{const t={...e};for(const o of S)t[o]&&(t[o]=a(t[o]));const s=(o,i=c=>c)=>(...c)=>(t[o]=i(...c),n),n={params:()=>({...t,...t.where?{where:[...a(t.where)]}:{},...t.sort?{sort:[...a(t.sort)]}:{}}),only:s("only",a),without:s("without",a),where:s("where",o=>[...a(t.where),...a(o)]),sort:s("sort",o=>[...a(t.sort),...a(o)]),limit:s("limit",o=>parseInt(String(o),10)),skip:s("skip",o=>parseInt(String(o),10)),find:()=>r(n),findOne:()=>(t.first=!0,r(n)),findSurround:(o,i)=>(t.surround={query:o,...i},r(n)),locale:o=>n.where({_locale:o})};return n};function m(r){return JSON.stringify(r,k)}function k(r,e){return e instanceof RegExp?`--REGEX ${e.toString()}`:e}const A=r=>{let e=m(r);return e=typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e),e=e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,""),(e.match(/.{1,100}/g)||[]).join("/")},C=()=>async r=>{const{content:e}=h().public,t=r.params(),s=e.experimental.stripQueryParameters?f(`/query/${`${p(t)}.${e.integrity}`}/${A(t)}.json`):f(`/query/${p(t)}.${e.integrity}.json`);if(P())return(await $(()=>import("./client-db.a04e1eda.js"),["./client-db.a04e1eda.js","./entry.cefe3147.js","./entry.c396e258.css","./index.a6ef77ff.js","./_commonjsHelpers.87174ba5.js","./preview.485816aa.js","./utils.e5367885.js"],import.meta.url).then(i=>i.useContentDatabase())).fetch(r);const n=await $fetch(s,{method:"GET",responseType:"json",params:e.experimental.stripQueryParameters?void 0:{_params:m(t),previewToken:E().getPreviewToken()}});if(typeof n=="string"&&n.startsWith("<!DOCTYPE html>"))throw new Error("Not found");return n};function B(r,...e){const{content:t}=h().public,s=x(C(),typeof r!="string"?r:{});let n;typeof r=="string"&&(n=g(d(r,...e)));const o=s.params;return s.params=()=>{const i=o();return n&&(i.where=i.where||[],i.first&&(i.where||[]).length===0?i.where.push({_path:_(n)}):i.where.push({_path:new RegExp(`^${n.replace(/[-[\]{}()*+.,^$\s/]/g,"\\$&")}`)})),i.sort?.length||(i.sort=[{_file:1,$numeric:!0}]),t.locales.length&&(i.where?.find(u=>u._locale)?._locale||(i.where=i.where||[],i.where.push({_locale:t.defaultLocale}))),i},s}export{j as a,a as b,L as c,q as d,A as e,x as f,l as g,m as j,B as q,D as s,R as w};
@@ -1 +0,0 @@
1
- import{_ as f}from"./StateEditor.vue.d274c06c.js";import{_ as d}from"./NSectionBlock.53fae3a6.js";import{_ as g}from"./HelpFab.vue.8f58b14e.js";import{a as C,a3 as v,L as x,h as r,o as c,e as p,u as o,l as e,w as s,f as h,F as b}from"./entry.cefe3147.js";import"./NIconButton.vue.b4278b36.js";import"./NIconTitle.vue.321882c6.js";import"./ContentRenderer.914f3a38.js";import"./ContentRendererMarkdown.fd0df501.js";import"./index.a6ef77ff.js";import"./preview.485816aa.js";import"./query.851664d2.js";import"./utils.e5367885.js";const y={key:0},H=C({__name:"runtime-configs",setup(k){const n=v(),l=x(),m=r(()=>n.value?.nuxt.payload),u=r(()=>{const t={...l.value?.runtimeConfig};return delete t.public,delete t.app,t});return(t,B)=>{const a=f,i=d,_=g;return c(),p(b,null,[o(n)?(c(),p("div",y,[e(i,{icon:"carbon-settings-services",text:"App Config",padding:!1},{default:s(()=>[e(a,{state:o(n).appConfig},null,8,["state"])]),_:1}),e(i,{icon:"carbon-settings",text:"Public Runtime Config",padding:!1},{default:s(()=>[e(a,{state:o(m).config?.public},null,8,["state"])]),_:1}),e(i,{icon:"i-carbon-code-signing-service",text:"Private Runtime Config",open:!1,padding:!1,description:"These values are not exposed to the client. Readonly in the DevTools."},{default:s(()=>[e(a,{state:o(u),readonly:""},null,8,["state"])]),_:1})])):h("",!0),e(_,{path:"/runtime-configs"})],64)}}});export{H as default};
@@ -1,9 +0,0 @@
1
- import{F as ce,_ as ie}from"./fuse.esm.dae60b17.js";import{_ as Y}from"./Badge.0c2ba14d.js";import{a as Z,L as de,aE as pe,h as p,V as k,o as a,e as m,m as c,c as x,w as l,N as h,t as y,u as e,O as b,b2 as G,F as j,r as A,af as ee,l as s,f as $,a6 as me,q as fe,b3 as _e,v as ve,b4 as he,b5 as ye,I as ge,aJ as xe}from"./entry.cefe3147.js";import{_ as be}from"./NSelect.vue.67595372.js";import{_ as Ce}from"./NTextInput.vue.c65cc1e4.js";import{_ as ke}from"./CodeSnippets.vue.246adc67.js";import{_ as te}from"./NPanelGrids.a0c996c3.js";import{_ as $e}from"./NCodeBlock.vue.da19eaf4.js";import{u as Re}from"./editor.e9c81b63.js";import{C as X}from"./constants.126da185.js";import{_ as Te}from"./PanelLeftRight.vue.a115e8d3.js";const qe={"h-full":"","w-full":"",flex:"~ col"},je={flex:"~ col gap-2","flex-none":"",p4:"","navbar-glass":""},Ve={flex:"~ gap2"},Se={flex:"~ gap2","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},we=c("div",{"flex-auto":""},null,-1),Ne={key:0,border:"b base","items-center":"",px4:"",py2:"",grid:"~ cols-[max-content_1fr] gap-2"},Ee={"text-right":"","font-mono":""},Ue={key:1,relative:""},Pe={key:2,px4:"",py2:"",flex:"~ col gap-2",border:"b base"},Oe={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},Be=c("div",null,"Response",-1),Le={key:1,"text-xs":"",op50:""},Me=c("div",{"flex-auto":""},null,-1),De=c("div",{op50:""}," Request finished in ",-1),Fe=Z({__name:"ServerRouteDetails",props:{route:{type:Object,required:!0}},setup(P){const O=P,R=de(),u=pe({contentType:"text/plain",data:"",statusCode:200,error:void 0}),T=p(()=>u.contentType.includes("application/json")?"json":u.contentType.includes("text/html")?"html":u.contentType.includes("text/css")?"css":u.contentType.includes("text/javascript")?"javascript":u.contentType.includes("text/xml")||u.contentType.includes("application/xml")?"xml":"text"),q=p(()=>T.value==="json"?JSON.stringify(u.data,null,2):u.data),w=k(0),C=k(!1),N=k(!1),I=Re(),B=p(()=>O.route.route?.split(/((?:\*\*)?:[\w_]+)/g)),V=p(()=>B.value?.filter(n=>n.startsWith(":")||n.startsWith("**:"))||[]),g=k(O.route.method||"GET"),E=k({}),U=k([{key:"",value:""}]),S=k([{key:"",value:""}]),f=k([{key:"Content-Type",value:"application/json"}]),J=p(()=>S.value.filter(({key:n})=>n).length),z=p(()=>f.value.filter(({key:n})=>n).length),W=p(()=>{const n={};for(let t=0;t<U.value.length;t++){const{key:o,value:i}=U.value[t];n[o]=i}return Object.keys(n)[0]?n:null}),ne=p(()=>{let n=R.value?.devServer.url||"http://localhost";n.charAt(n.length-1)==="/"&&(n=n.slice(0,-1));const t=R.value?.devServer.port||3e3;return n.includes(`:${t}`)?n:`${n}:${t}`}),L=p(()=>{let n=new URLSearchParams(Object.fromEntries(S.value.filter(({key:i})=>i).map(({key:i,value:_})=>[i,_]))).toString();n&&(n=`?${n}`);const t=(B.value?.map(i=>(i.startsWith(":")||i.startsWith("**:"))&&E.value[i]||i).join("")||"")+n;let o=R.value?.app.baseURL||"";return(o==="./"||o===".")&&(o=""),o.endsWith("/")&&(o=o.slice(0,-1)),o+t}),oe=p(()=>ne.value+L.value);async function K(){N.value=!0,C.value=!0,Object.assign(u,{lang:"text",contentType:"",data:"",content:"",error:void 0});const n=Date.now();try{u.data=await $fetch(oe.value,{method:g.value.toUpperCase(),headers:Object.fromEntries(f.value.filter(({key:t,value:o})=>t&&o).map(({key:t,value:o})=>[t,o])),query:Object.fromEntries(S.value.filter(({key:t,value:o})=>t&&o).map(({key:t,value:o})=>[t,o])),body:W.value,onResponse({response:t}){u.contentType=(t.headers.get("content-type")||"").toString().toLowerCase().trim(),u.statusCode=t.status},onResponseError(t){u.error=t.response._data,u.data=t.response._data}})}catch{}C.value=!1,w.value=Date.now()-n}const Q=p(()=>{const n=[],t=[],o=f.value.filter(({key:_,value:v})=>_&&v&&!(_==="Content-Type"&&v==="application/json")).map(({key:_,value:v})=>` '${_}': '${v}'`).join(`,
2
- `);g.value.toUpperCase()!=="GET"&&t.push(`method: '${g.value.toUpperCase()}'`),o&&t.push(`headers: {
3
- ${o}
4
- }`),W.value&&t.push(`body: ${JSON.stringify(W.value,null,2)}`);const i=t.length?`, {
5
- ${t.join(`,
6
- `).split(`
7
- `).map(_=>` ${_}`).join(`
8
- `)}
9
- }`:"";return n.push({name:"useFetch",lang:"javascript",docs:X.nuxt.useFetch,code:`const { data, pending, error, refresh } = useFetch('${L.value}'${i})`}),n.push({name:"$fetch",lang:"javascript",docs:X.nuxt.$fetch,code:`await $fetch('${L.value}'${i})`}),n}),d=k(V.value.length?"params":"query"),M=p(()=>{if(d.value==="query")return S.value;if(d.value==="body")return U.value;if(d.value==="headers")return f.value}),se=["GET","POST","PUT","PATCH","DELETE","HEAD"];return(n,t)=>{const o=me,i=be,_=Ce,v=fe,ae=ke,re=te,le=_e,H=Y,ue=$e;return a(),m("div",qe,[c("div",je,[c("div",Ve,[P.route.method?(a(),x(o,{key:0,class:b(("getRequestMethodClass"in n?n.getRequestMethodClass:e(G))(e(g))),"pointer-events-none":"",tabindex:"-1"},{default:l(()=>[h(y(e(g).toUpperCase()),1)]),_:1},8,["class"])):(a(),x(i,{key:1,modelValue:e(g),"onUpdate:modelValue":t[0]||(t[0]=r=>ee(g)?g.value=r:null),class:b(("getRequestMethodClass"in n?n.getRequestMethodClass:e(G))(e(g)))},{default:l(()=>[(a(),m(j,null,A(se,r=>c("option",{key:r,class:b(("getRequestMethodClass"in n?n.getRequestMethodClass:e(G))(r))},y(r.toUpperCase()),3)),64))]),_:1},8,["modelValue","class"])),s(_,{"model-value":e(L),disabled:"","flex-auto":"","font-mono":"",p:"x5 y2",n:"primary xs"},null,8,["model-value"]),s(o,{n:"primary solid",onClick:K},{default:l(()=>[s(v,{icon:"carbon:send"})]),_:1})])]),c("div",Se,[e(V).length?(a(),x(o,{key:0,class:b(e(d)==="params"?"text-primary n-primary":"border-transparent! shadow-none!"),onClick:t[1]||(t[1]=r=>d.value="params")},{default:l(()=>[s(v,{icon:"i-carbon-text-selection"}),h(" Params ("+y(e(V).length)+") ",1)]),_:1},8,["class"])):$("",!0),s(o,{class:b(e(d)==="query"?"text-primary n-primary":"border-transparent! shadow-none!"),onClick:t[2]||(t[2]=r=>d.value="query")},{default:l(()=>[s(v,{icon:"i-carbon-help"}),h(" Query "+y(e(J)?`(${e(J)})`:""),1)]),_:1},8,["class"]),e(g)!=="GET"?(a(),x(o,{key:1,class:b(e(d)==="body"?"text-primary n-primary":"border-transparent! shadow-none!"),onClick:t[3]||(t[3]=r=>d.value="body")},{default:l(()=>[s(v,{icon:"i-carbon-document"}),h(" Body ")]),_:1},8,["class"])):$("",!0),s(o,{class:b(e(d)==="headers"?"text-primary n-primary":"border-transparent! shadow-none!"),onClick:t[4]||(t[4]=r=>d.value="headers")},{default:l(()=>[s(v,{icon:"i-carbon-html-reference"}),h(" Headers "+y(e(z)?`(${e(z)})`:""),1)]),_:1},8,["class"]),s(o,{class:b(e(d)==="snippet"?"text-primary n-primary":"border-transparent! shadow-none!"),onClick:t[5]||(t[5]=r=>d.value="snippet")},{default:l(()=>[s(v,{icon:"carbon:code"}),h(" Snippets ")]),_:1},8,["class"]),we,s(o,{icon:"carbon-launch",onClick:t[6]||(t[6]=r=>e(I)(P.route.filepath))},{default:l(()=>[h(" Open in Editor ")]),_:1})]),e(d)==="params"?(a(),m("div",Ne,[(a(!0),m(j,null,A(e(V),r=>(a(),m(j,{key:r},[c("div",Ee,y(r),1),s(_,{modelValue:e(E)[r],"onUpdate:modelValue":D=>e(E)[r]=D,placeholder:r,"flex-1":""},null,8,["modelValue","onUpdate:modelValue","placeholder"])],64))),128))])):$("",!0),e(d)==="snippet"?(a(),m("div",Ue,[e(Q).length?(a(),x(ae,{key:0,border:"b base","code-snippets":e(Q)},null,8,["code-snippets"])):$("",!0)])):e(M)?(a(),m("div",Pe,[(a(!0),m(j,null,A(e(M),(r,D)=>(a(),m("div",{key:D,flex:"~ gap-2","justify-around":""},[s(_,{modelValue:r.key,"onUpdate:modelValue":F=>r.key=F,placeholder:"Key","flex-1":"","font-mono":"",n:"sm"},null,8,["modelValue","onUpdate:modelValue"]),s(_,{modelValue:r.value,"onUpdate:modelValue":F=>r.value=F,placeholder:"Value","flex-1":"","font-mono":"",n:"sm"},null,8,["modelValue","onUpdate:modelValue"]),s(o,{n:"red",onClick:F=>e(M).splice(D,1)},{default:l(()=>[s(v,{icon:"carbon:delete"})]),_:2},1032,["onClick"])]))),128)),c("div",null,[s(o,{icon:"carbon-add",n:"sm primary",my1:"","px-3":"",onClick:t[7]||(t[7]=r=>e(M).push({key:"",value:""}))},{default:l(()=>[h(" Add ")]),_:1})])])):$("",!0),e(N)?e(C)?(a(),x(le,{key:4,"z-10":"","flex-auto":"","backdrop-blur":""},{default:l(()=>[h(" Fetching... ")]),_:1})):(a(),m(j,{key:5},[c("div",Oe,[Be,e(u).error?(a(),x(H,{key:0,"bg-red-400:10":"","text-red-400":""},{default:l(()=>[h(" Error ")]),_:1})):$("",!0),s(H,{class:b({"bg-orange-400:10 text-orange-400":e(u).error,"bg-green-400:10 text-green-400":!e(u).error})},{default:l(()=>[h(y(e(u).statusCode),1)]),_:1},8,["class"]),e(u).contentType?(a(),m("code",Le,y(e(u).contentType),1)):$("",!0),Me,De,s(H,{"bg-green-400:10":"","text-green-400":""},{default:l(()=>[h(y(e(w))+" ms ",1)]),_:1})]),s(ue,{"flex-auto":"","overflow-auto":"","py-2":"",code:e(q),lang:e(T)},null,8,["code","lang"])],64)):(a(),x(re,{key:3},{default:l(()=>[s(o,{n:"primary",onClick:K},{default:l(()=>[s(v,{icon:"carbon:send"}),h(" Send request ")]),_:1})]),_:1}))])}}}),Ge={flex:"~ gap1","text-sm":"",op50:""},Ae={key:0},Ie={"w-12":"","flex-none":"","text-right":""},We={"font-mono":"","text-sm":""},He=c("div",{"x-divider":""},null,-1),Je=c("span",{op75:""},"Select a route to start",-1),at=Z({__name:"server-routes",setup(P){const O=ve(),R=he(),u=p(()=>new ce(R.value||[],{keys:["method","route"],shouldSort:!0})),T=p(()=>R.value?.find(C=>C.path===O.query?.path)),q=k(""),w=p(()=>R.value?q.value?u.value.search(q.value).map(C=>C.item):R.value:[]);return(C,N)=>{const I=ie,B=Y,V=ge,g=Fe,E=xe,U=te,S=Te;return a(),x(S,null,{left:l(()=>[s(I,{search:e(q),"onUpdate:search":N[0]||(N[0]=f=>ee(q)?q.value=f:null),pb2:""},{default:l(()=>[c("div",Ge,[e(q)?(a(),m("span",Ae,y(e(w).length)+" matched · ",1)):$("",!0),c("span",null,y(e(R)?.length)+" routes in total",1)])]),_:1},8,["search"]),(a(!0),m(j,null,A(e(w),f=>(a(),m(j,{key:f.id},[s(V,{flex:"~ gap-2","items-center":"","hover-bg-active":"",px2:"",py1:"",class:b([{"bg-active":e(T)?.path===f.path}]),to:{query:{path:f.path}}},{default:l(()=>[c("div",Ie,[s(B,{class:b(("getRequestMethodClass"in C?C.getRequestMethodClass:e(G))(f.method||"*")),title:"updates available",textContent:y((f.method||"*").toUpperCase())},null,8,["class","textContent"])]),c("span",We,y(f.route),1)]),_:2},1032,["class","to"]),He],64))),128))]),right:l(()=>[(a(),x(ye,{max:10},[e(T)?(a(),x(g,{key:e(T).path,route:e(T)},null,8,["route"])):$("",!0)],1024)),e(T)?$("",!0):(a(),x(U,{key:0},{default:l(()=>[s(E,{px6:"",py2:""},{default:l(()=>[Je]),_:1})]),_:1}))]),_:1})}}});export{at as default};
@@ -1 +0,0 @@
1
- import{_ as F}from"./NIconTitle.vue.321882c6.js";import{_ as O}from"./NSwitch.vue.8577379b.js";import{a as j,bc as I,o as i,e as u,l as a,m as e,F as m,r as V,u as s,w as n,af as f,az as L,bd as E,O as T,t as g,c as H,f as A,N as K,aK as R,a6 as q}from"./entry.cefe3147.js";import{_ as G}from"./NSelect.vue.67595372.js";import{_ as J}from"./NCheckbox.vue.93b3bec2.js";const M={px6:"",py6:""},P={grid:"~ md:cols-2 gap-x-10 gap-y-3","max-w-300":""},Q={flex:"~ col gap-1",py3:""},W=e("h3",{mb1:"","text-lg":""}," Tabs ",-1),X={flex:"~ gap-2","flex-auto":"","items-center":"","justify-start":""},Y={capitalize:"",op75:""},Z={flex:"~ col gap-1",border:"~ base rounded",py3:"",pl4:"",pr2:""},ee={py3:"",flex:"~ col gap-1",border:"b base"},oe=e("h3",{mb1:"","text-lg":""}," Appearance ",-1),te=e("div",{"carbon-sun":"","dark:carbon-moon":"","translate-y--1px":""},null,-1),le={py3:"",flex:"~ col gap-1",border:"b base"},ae=e("h3",{mb1:"","text-lg":""}," UI Scale ",-1),se=["value"],ne={py3:"",flex:"~ col gap-1"},ie=e("h3",{mb1:"","text-lg":""}," Features ",-1),de=e("span",null,"Close DevTools when clicking outside",-1),ue=e("span",null,"Show experimental features",-1),re=e("span",null,"Show help buttons",-1),ve=j({__name:"settings",setup(ce){const{interactionCloseOnOutsideClick:v,showExperimentalFeatures:x,showHelpButtons:h,scale:y,hiddenTabs:r,hiddenTabCategories:c}=L(),C=[["Tiny",12/15],["Small",14/15],["Normal",1],["Large",16/15],["Huge",18/15]],N=I(!1);function w(d,t){t?r.value=r.value.filter(p=>p!==d):r.value.push(d)}function S(d,t){t?c.value=c.value.filter(p=>p!==d):c.value.push(d)}return(d,t)=>{const p=F,k=O,U=R,$=q,B=E,D=G,b=J;return i(),u("div",M,[a(p,{class:"mb-5 text-xl op75",icon:"i-carbon-settings-adjust",text:"DevTools Settings"}),e("div",P,[e("div",Q,[W,(i(!0),u(m,null,V(s(N),([o,_])=>(i(),u(m,{key:o},[_.length?(i(),u("div",{key:0,flex:"~ col gap-1","mx--1":"",class:T(s(c).includes(o)?"op50 grayscale":""),"pt-2":""},[a(k,{flex:"~ row-reverse",px2:"",py1:"","n-lime":"","model-value":!s(c).includes(o),"onUpdate:modelValue":l=>S(o,l)},{default:n(()=>[e("div",X,[e("span",Y,g(o),1)])]),_:2},1032,["model-value","onUpdate:modelValue"]),e("div",Z,[(i(!0),u(m,null,V(_,l=>(i(),H(k,{key:l.name,flex:"~ row-reverse",py1:"","n-primary":"","model-value":!s(r).includes(l.name),"onUpdate:modelValue":z=>w(l.name,z)},{default:n(()=>[e("div",{flex:"~ gap-2","flex-auto":"","items-center":"","justify-start":"",class:T(s(r).includes(l.name)?"op25":"")},[a(U,{"text-xl":"",icon:l.icon,title:l.title},null,8,["icon","title"]),e("span",null,g(l.title),1)],2)]),_:2},1032,["model-value","onUpdate:modelValue"]))),128))])],2)):A("",!0)],64))),128))]),e("div",null,[e("div",ee,[oe,e("div",null,[a(B,null,{default:n(({toggle:o,isDark:_})=>[a($,{n:"primary",onClick:l=>o()},{default:n(()=>[te,K(" "+g(_.value?"Dark":"Light"),1)]),_:2},1032,["onClick"])]),_:1})])]),e("div",le,[ae,a(D,{modelValue:s(y),"onUpdate:modelValue":t[0]||(t[0]=o=>f(y)?y.value=o:null),n:"primary"},{default:n(()=>[(i(),u(m,null,V(C,o=>e("option",{key:o[0],value:o[1]},g(o[0]),9,se)),64))]),_:1},8,["modelValue"])]),e("div",ne,[ie,a(b,{modelValue:s(v),"onUpdate:modelValue":t[1]||(t[1]=o=>f(v)?v.value=o:null),"n-primary":""},{default:n(()=>[de]),_:1},8,["modelValue"]),a(b,{modelValue:s(x),"onUpdate:modelValue":t[2]||(t[2]=o=>f(x)?x.value=o:null),"n-primary":""},{default:n(()=>[ue]),_:1},8,["modelValue"]),a(b,{modelValue:s(h),"onUpdate:modelValue":t[3]||(t[3]=o=>f(h)?h.value=o:null),"n-primary":""},{default:n(()=>[re]),_:1},8,["modelValue"])])])])])}}});export{ve as default};
@@ -1 +0,0 @@
1
- import{_ as re}from"./NIconButton.vue.b4278b36.js";import{_ as le}from"./NSelect.vue.67595372.js";import{_ as ue}from"./NTextInput.vue.c65cc1e4.js";import{a as z,o as r,c as m,w as l,p as ie,ao as G,P as de,u as t,I as W,aO as ce,R as pe,V as I,h as j,v as P,aM as E,aG as me,s as _e,ar as fe,a4 as ye,S as _,H as F,m as u,l as c,e as p,r as q,t as g,F as x,af as L,N as d,O,aD as U,f as T,b1 as ve,ah as ge,b8 as he,aW as ke,q as be,a6 as xe,aJ as we}from"./entry.cefe3147.js";import{_ as Ce}from"./NPanelGrids.a0c996c3.js";import{_ as Ke}from"./PanelLeftRight.vue.a115e8d3.js";import{_ as Ne}from"./FilepathItem.vue.64e00c09.js";import"./editor.e9c81b63.js";const Ve=z({__name:"NLink",props:{to:null,href:null,target:null},setup(w){return(i,v)=>(r(),m(de(w.href||w.target?"a":t(W)),G(i.$props,{class:"n-link hover:n-link-hover n-transition n-link-base"}),{default:l(()=>[ie(i.$slots,"default")]),_:3},16))}}),$e={class:"h-[48px] flex items-center justify-between gap1 px-3"},Se={class:"w-full text-sm"},Ie=["value"],je=u("div",{"x-divider":""},null,-1),qe={key:0,"h-full":"","of-hidden":"",flex:"~ col"},Le={border:"b base",class:"h-[49px] flex flex-none items-center justify-between px-4 text-sm"},Ue={class:"flex items-center gap-4"},De={key:1},Me=["onKeyup"],Be=u("br",null,null,-1),Re={key:0,op50:""},Ae={key:1},Pe=u("code",null,"nitro.storage",-1),Ee=u("br",null,null,-1),Fe={"font-bold":""},Oe=u("br",null,null,-1),Te={"text-sm":""},ze=u("br",null,null,-1),tt=z({__name:"storage",async setup(w){let i,v;const H=ce(),h=pe(),k=I(""),y=I(""),a=j({get(){return P().query?.storage},set(n){h.replace({query:{storage:n}})}}),e=I(),b=j(()=>P().query?.key),{data:C}=([i,v]=E(()=>F("storageMounts",()=>_.getStorageMounts())),i=await i,v(),i),{data:K,refresh:D}=([i,v]=E(async()=>F("storageKeys",async()=>a.value?await _.getStorageKeys(a.value):[])),i=await i,v(),i),J=H.hook("storage:key:update",async(n,s)=>{if(!(!a.value||n.split(":")[0]!==a.value)&&(await D(),b.value===n)){if(s==="remove")return h.replace({query:{storage:a.value}});await V(b.value)}});me(J),_e(a,D),fe(async()=>{if(!b.value){e.value=null;return}V(b.value)}),ye("keydown",n=>{n.key==="s"&&(n.ctrlKey||n.metaKey)&&($(),n.preventDefault())});function N(n){return n.replace(`${a.value}:`,"")}const Q=j(()=>K.value?K.value.filter(n=>n.includes(k.value)):[]);async function V(n){const s=await _.getStorageItem(n);e.value={key:n,updatedKey:N(n),editingKey:!1,content:s,updatedContent:s}}async function X(){if(!y.value||!a.value)return;const n=`${a.value}:${y.value}`;K.value?.includes(n)||await _.setStorageItem(n,""),h.replace({query:{storage:a.value,key:n}}),y.value=""}async function $(){e.value&&(await _.setStorageItem(e.value.key,e.value.updatedContent),await V(e.value.key))}async function Y(){!e.value||!a.value||(await _.removeStorageItem(e.value.key),e.value=null)}async function Z(){if(!e.value||!a.value)return;const n=`${a.value}:${e.value.updatedKey}`;await _.setStorageItem(n,e.value.updatedContent),await _.removeStorageItem(e.value.key),h.replace({query:{storage:a.value,key:n}})}return(n,s)=>{const ee=re,te=le,S=ue,ne=W,oe=be,M=xe,B=Ve,R=we,A=Ce,ae=Ke,se=Ne;return t(a)?(r(),m(ae,{key:0,"storage-key":"tab-storage"},{left:l(()=>[u("div",$e,[c(ee,{icon:"carbon-chevron-left","ml--1":"",onClick:s[0]||(s[0]=o=>a.value="")}),u("div",Se,[c(te,{modelValue:t(a),"onUpdate:modelValue":s[1]||(s[1]=o=>L(a)?a.value=o:null),n:"primary",icon:"carbon-data-base"},{default:l(()=>[(r(!0),p(x,null,q(t(C),(o,f)=>(r(),p("option",{key:f,value:f},g(f),9,Ie))),128))]),_:1},8,["modelValue"])])]),c(S,{modelValue:t(k),"onUpdate:modelValue":s[2]||(s[2]=o=>L(k)?k.value=o:null),icon:"carbon-search",placeholder:"Search...",n:"primary sm",border:"y x-none base! rounded-0",class:"w-full py2 ring-0!"},null,8,["modelValue"]),(r(!0),p(x,null,q(t(Q),o=>(r(),p(x,{key:o},[c(ne,{block:"",truncate:"",px2:"",py1:"","font-mono":"","text-sm":"",to:{query:{key:o,storage:t(a)}},class:O(o===t(e)?.key?"text-primary n-bg-active":"text-secondary hover:n-bg-hover")},{default:l(()=>[d(g(N(o)),1)]),_:2},1032,["to","class"]),je],64))),128)),c(S,{modelValue:t(y),"onUpdate:modelValue":s[3]||(s[3]=o=>L(y)?y.value=o:null),icon:"carbon-add",placeholder:"key",n:"sm",border:"t-none x-none base! rounded-0",class:"w-full py2 font-mono ring-0!",onKeyup:U(X,["enter"])},null,8,["modelValue","onKeyup"])]),right:l(()=>[t(e)?.key?(r(),p("div",qe,[u("div",Le,[u("div",Ue,[t(e).editingKey?(r(),m(S,{key:0,modelValue:t(e).updatedKey,"onUpdate:modelValue":s[4]||(s[4]=o=>t(e).updatedKey=o),onKeyup:U(Z,["enter"])},null,8,["modelValue","onKeyup"])):(r(),p("code",De,[d(g(N(t(e).key))+" ",1),c(oe,{icon:"carbon-edit",class:"cursor-pointer op50 hover:op100",onClick:s[5]||(s[5]=o=>t(e).editingKey=!0)})])),t(e).editingKey?T("",!0):(r(),m(M,{key:2,n:"green xs",disabled:t(e).content===t(e).updatedContent,class:O({"border-green":t(e).content!==t(e).updatedContent}),onClick:$},{default:l(()=>[d(" Save ")]),_:1},8,["disabled","class"]))]),u("div",null,[c(M,{n:"red xs",onClick:Y},{default:l(()=>[d(" Delete ")]),_:1})])]),typeof t(e).content=="object"?(r(),m(t(ve),G({key:0,modelValue:t(e).updatedContent,"onUpdate:modelValue":s[6]||(s[6]=o=>t(e).updatedContent=o),class:[[n.$colorMode.value==="dark"?"jse-theme-dark":"light"],"json-editor-vue h-full of-auto text-sm outline-none"]},n.$attrs,{mode:"text","navigation-bar":!1,indentation:2,"tab-size":2}),null,16,["modelValue","class"])):ge((r(),p("textarea",{key:1,"onUpdate:modelValue":s[7]||(s[7]=o=>t(e).updatedContent=o),placeholder:"Item value...",class:"h-full of-auto p-4 font-mono text-sm outline-none",onKeyup:U(ke($,["ctrl"]),["enter"])},null,40,Me)),[[he,t(e).updatedContent]])])):(r(),m(A,{key:1},{default:l(()=>[c(R,{px6:"",py4:""},{default:l(()=>[d(" Select one key to start."),Be,d("Learn more about "),c(B,{href:"https://nitro.unjs.io/guide/introduction/storage",n:"orange",target:"_blank"},{default:l(()=>[d(" Nitro storage ")]),_:1})]),_:1})]),_:1}))]),_:1})):(r(),m(A,{key:1},{default:l(()=>[Object.keys(t(C)).length?(r(),p("p",Re," Select one storage to start: ")):(r(),p("p",Ae,[d(" No custom storage defined in "),Pe,d("."),Ee,d(" Learn more about "),c(B,{href:"https://nitro.unjs.io/guide/storage",n:"orange",target:"_blank"},{default:l(()=>[d(" Nitro storage ")]),_:1})])),(r(!0),p(x,null,q(t(C),(o,f)=>(r(),m(R,{key:f,"min-w-80":"","cursor-pointer":"","p-4":"","text-left":"",hover:"border-green",onClick:Ge=>a.value=f},{default:l(()=>[u("span",Fe,g(f),1),Oe,u("span",Te,g(o.driver)+" driver",1),ze,o.base?(r(),m(se,{key:0,"text-xs":"",filepath:o.base},null,8,["filepath"])):T("",!0)]),_:2},1032,["onClick"]))),128))]),_:1}))}}});export{tt as default};
@@ -1 +0,0 @@
1
- import{a as T,V as y,aO as $,ax as A,b9 as R,ba as V,a4 as B,S as f,o,e as _,m as c,l as E,u as e,c as m,f as x,t as k,F as g,bb as I,v as q,R as F,h as L,ar as M,r as z,N as w,w as D,O as h,aW as O,q as S,I as U}from"./entry.cefe3147.js";import{_ as C}from"./NIconButton.vue.b4278b36.js";const j={border:"t base",flex:"~ gap-2","items-center":"",p2:""},W={"text-sm":"",op50:""},G=T({__name:"TerminalView",props:{id:null},setup(p){const a=p,d=y(),v=$(),n=y();let s;A(async()=>{s=new R.Terminal({convertEol:!0,cols:80,screenReaderMode:!0});const t=new V.FitAddon;s.loadAddon(t),s.open(d.value),t.fit(),B(window,"resize",()=>{t.fit()}),n.value=await f.getTerminalDetail(a.id),n.value?.buffer&&s.write(n.value.buffer),v.hook("devtools:terminal:data",({id:i,data:l})=>{i===a.id&&s.write(l)})});function u(){f.runTerminalAction(a.id,"clear"),s?.clear()}return(t,i)=>{const l=C;return o(),_(g,null,[c("div",{ref_key:"container",ref:d,"h-full":"","w-full":"","of-auto":"","bg-black":""},null,512),c("div",j,[E(l,{title:"Clear",icon:"i-carbon-clean",onClick:i[0]||(i[0]=b=>u())}),e(n)?.restartable?(o(),m(l,{key:0,title:"Restart",icon:"carbon-renew",onClick:i[1]||(i[1]=b=>("rpc"in t?t.rpc:e(f)).runTerminalAction(p.id,"restart"))})):x("",!0),e(n)?.terminatable?(o(),m(l,{key:1,title:"Terminate",icon:"carbon-delete",onClick:i[2]||(i[2]=b=>("rpc"in t?t.rpc:e(f)).runTerminalAction(p.id,"terminate"))})):x("",!0),c("span",W,k(e(n)?.description),1)])],64)}}}),H={key:0,"h-full":"","w-full":"","of-hidden":"",grid:"~ rows-[max-content_1fr_max-content]"},J={flex:"~",border:"b base","flex-1":"","items-center":"","navbar-glass":""},K={key:1,p10:""},P={key:1,"h-full":"",flex:"","items-center":"","justify-center":""},Q=c("em",{op50:""},"No terminal attached",-1),X=[Q],ne=T({__name:"terminals",setup(p){const a=I(),d=q(),v=F(),n=L(()=>{const u=d.query.id;return a.value?.find(t=>t.id===u)});function s(u){f.runTerminalAction(u,"remove"),v.replace("/modules/terminals")}return M(()=>{!d.query.id&&a.value?.length&&v.replace(`/modules/terminals?id=${encodeURIComponent(a.value[0].id)}`)}),(u,t)=>{const i=S,l=C,b=U,N=G;return e(a)?.length?(o(),_("div",H,[c("div",J,[(o(!0),_(g,null,z(e(a),r=>(o(),m(b,{key:r.id,border:"r base",flex:"~ gap-2","items-center":"",px3:"",py2:"",class:h(r.id===e(n)?.id?"bg-active":""),to:`/modules/terminals?id=${encodeURIComponent(r.id)}`},{default:D(()=>[r.icon?(o(),m(i,{key:0,icon:r.icon},null,8,["icon"])):x("",!0),c("span",{class:h(r.id===e(n)?.id?"":"op50")},k(r.name)+k(r.isTerminated?" (terminated)":""),3),r.isTerminated?(o(),m(l,{key:1,icon:"carbon-close","mx--2":"",onClick:O(Y=>s(r.id),["stop"])},null,8,["onClick"])):x("",!0)]),_:2},1032,["class","to"]))),128))]),e(n)?(o(),m(N,{id:e(n).id,key:e(n).id},null,8,["id"])):(o(),_("div",K,[w(" Terminal "),c("code",null,k(e(d).query.id),1),w(" not found ")]))])):(o(),_("div",P,X))}}});export{ne as default};
@@ -1 +0,0 @@
1
- .xterm{padding-left:1rem;padding-right:1rem}
@@ -1 +0,0 @@
1
- import{K as o,z as a}from"./entry.cefe3147.js";import{u as p}from"./preview.485816aa.js";const y=["p","h1","h2","h3","h4","h5","h6","li"];function i(r,t){return r.type===t||typeof r.type=="object"&&r.type.tag===t||r.tag===t}function c(r){return i(r,"text")||typeof r.children=="string"}function l(r){return Array.isArray(r.children)||typeof r.children=="string"?r.children:typeof r.children?.default=="function"?r.children.default():[]}function u(r){if(!r)return"";if(Array.isArray(r))return r.map(u).join("");if(c(r))return r.children||r.value;const t=l(r);return Array.isArray(t)?t.map(u).join(""):""}function s(r,t=["p"]){if(Array.isArray(r))return r.flatMap(n=>s(n,t));let e=r;return t.some(n=>n==="*"||i(r,n))&&(e=l(r)||r,!Array.isArray(e)&&y.some(n=>i(r,n))&&(e=[e])),e}function f(r,t=["p"]){return r=Array.isArray(r)?r:[r],t.length?r.flatMap(e=>f(s(e,[t[0]]),t.slice(1))).filter(e=>!(c(e)&&u(e).trim()==="")):r}const w=r=>o(r,a().public.content.api.baseURL),A=()=>({unwrap:s,flatUnwrap:f}),b=()=>{throw console.warn("useContent is only accessible when you are using `documentDriven` mode."),console.warn("Learn more by visiting: https://content.nuxtjs.org/guide/writing/document-driven"),new Error("useContent is only accessible when you are using `documentDriven` mode.")},C=()=>{const{experimental:r}=a().public.content;return r.clientDB?!0:p().isEnabled()};export{A as a,C as s,b as u,w};
@@ -1 +0,0 @@
1
- import{F as D,_ as R}from"./fuse.esm.dae60b17.js";import{a as V,V as v,Q as w,h as u,v as I,ar as S,o as l,e as _,l as s,w as c,F as p,u as a,af as L,r as P,O as U,N as j,t as h,m,c as E,I as W,aJ as q}from"./entry.cefe3147.js";import{_ as z}from"./NCodeBlock.vue.da19eaf4.js";import{_ as G}from"./NPanelGrids.a0c996c3.js";import{_ as H}from"./PanelLeftRight.vue.a115e8d3.js";import{_ as J}from"./HelpFab.vue.8f58b14e.js";import"./NTextInput.vue.c65cc1e4.js";import"./ContentRenderer.914f3a38.js";import"./ContentRendererMarkdown.fd0df501.js";import"./index.a6ef77ff.js";import"./preview.485816aa.js";import"./NIconButton.vue.b4278b36.js";import"./query.851664d2.js";import"./utils.e5367885.js";const O=m("div",{"x-divider":""},null,-1),Q={key:0,"h-full":"","of-hidden":"",flex:"~ col"},T={border:"b base","flex-none":"",px4:"",py2:"","text-sm":"",op75:""},A=m("span",{op75:""},"Select a file to start",-1),ue=V({__name:"virtual-files",setup(K){const r=v(""),o=w(),d=u(()=>I().query?.id),i=v();S(()=>{if(!d.value)return;const e=`/_vfs.json/${encodeURIComponent(d.value)}`;fetch(e).then(t=>t.json()).then(t=>i.value=t.current)});function x(e){if(o.value?.rootDir)return e.startsWith(o.value?.rootDir)?e.slice(o.value.rootDir.length):e}const f=u(()=>o.value?o.value.entries.filter(e=>!e.id.startsWith(`${o.value?.rootDir||""}/.nuxt/`)).sort((e,t)=>e.id.localeCompare(t.id)):[]),y=u(()=>new D(f.value,{keys:["id","path"]})),g=u(()=>r.value?y.value.search(r.value).map(e=>e.item):f.value);return(e,t)=>{const k=R,b=W,N=z,C=q,F=G,$=H,B=J;return l(),_(p,null,[s($,{class:"virtual-files","storage-key":"tab-virtual-files"},{left:c(()=>[s(k,{search:a(r),"onUpdate:search":t[0]||(t[0]=n=>L(r)?r.value=n:null),"no-padding":"",p3:""},null,8,["search"]),(l(!0),_(p,null,P(a(g),n=>(l(),_(p,{key:n.id},[s(b,{block:"","select-none":"",truncate:"",px2:"",py1:"","font-mono":"","text-sm":"",to:`/modules/virtual-files?id=${encodeURIComponent(n.id)}`,class:U(n.id===a(i)?.id?"text-primary n-bg-active":"text-secondary hover:n-bg-hover")},{default:c(()=>[j(h(x(n.id)),1)]),_:2},1032,["to","class"]),O],64))),128))]),right:c(()=>[a(i)?.content?(l(),_("div",Q,[m("div",T,[m("code",null,h(a(i).id),1)]),s(N,{"h-full":"","of-auto":"","text-sm":"",code:a(i).content,lang:"typescript"},null,8,["code"])])):(l(),E(F,{key:1},{default:c(()=>[s(C,{px6:"",py2:""},{default:c(()=>[A]),_:1})]),_:1}))]),_:1}),s(B,{path:"/virtual-files"})],64)}}});export{ue as default};
@@ -1 +0,0 @@
1
- {"generatedAt":1682819079106,"generateTime":43,"contents":[{"_path":"/components","_dir":"","_draft":false,"_partial":false,"_locale":"","_empty":false,"title":"Components","description":"Vue components under the components/ directory are automatically registered and can be used in your templates without importing them.","body":{"type":"root","children":[{"type":"element","tag":"h1","props":{"id":"components"},"children":[{"type":"text","value":"Components"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Vue components under the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"components/"}]},{"type":"text","value":" directory are automatically registered and can be used in your templates without importing them."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://nuxt.com/docs/guide/directory-structure/components","rel":["nofollow"]},"children":[{"type":"text","value":"Learn more on the documentation"}]}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:components.md","_source":"content","_file":"components.md","_extension":"md"},{"_path":"/hooks","_dir":"","_draft":false,"_partial":false,"_locale":"","_empty":false,"title":"Hooks","description":"Hooks are an advanced API mainly for module authors or advanced use cases. The hooking system to expand almost every aspect of Nuxt. It's powered by unjs/hookable.","body":{"type":"root","children":[{"type":"element","tag":"h1","props":{"id":"hooks"},"children":[{"type":"text","value":"Hooks"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Hooks are an advanced API mainly for module authors or advanced use cases. The hooking system to expand almost every aspect of Nuxt. It's powered by "},{"type":"element","tag":"a","props":{"href":"https://github.com/unjs/hookable","rel":["nofollow"]},"children":[{"type":"text","value":"unjs/hookable"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://nuxt.com/docs/guide/going-further/hooks","rel":["nofollow"]},"children":[{"type":"text","value":"Learn more about hooks"}]},{"type":"text","value":"."}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:hooks.md","_source":"content","_file":"hooks.md","_extension":"md"},{"_path":"/imports","_dir":"","_draft":false,"_partial":false,"_locale":"","_empty":false,"title":"Auto imports","description":"Nuxt auto-imports helper functions, composables and Vue APIs to use across your application without explicitly importing them. Based on the directory structure, every Nuxt application can also use auto-imports for its own components, composables and plugins. Components, composables or plugins can use these functions.","body":{"type":"root","children":[{"type":"element","tag":"h1","props":{"id":"auto-imports"},"children":[{"type":"text","value":"Auto imports"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Nuxt auto-imports helper functions, composables and Vue APIs to use across your application without explicitly importing them. Based on the directory structure, every Nuxt application can also use auto-imports for its own components, composables and plugins. Components, composables or plugins can use these functions."}]},{"type":"element","tag":"hr","props":{},"children":[]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"According to your config, exports of files under the following folders will be registed as auto-imports entry:"}]},{"type":"element","tag":"help-imports-dirs","props":{},"children":[]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Meanwhile, modules could also provide auto-imports for their own components. You have auto-imports from the following modules as well:"}]},{"type":"element","tag":"help-imports-modules","props":{},"children":[]},{"type":"element","tag":"hr","props":{},"children":[]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://nuxt.com/docs/guide/concepts/auto-imports","rel":["nofollow"]},"children":[{"type":"text","value":"Learn more on the documentation"}]}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:imports.md","_source":"content","_file":"imports.md","_extension":"md"},{"_path":"/modules","_dir":"","_draft":false,"_partial":false,"_locale":"","_empty":false,"title":"Modules","description":"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 nuxt.config.","body":{"type":"root","children":[{"type":"element","tag":"h1","props":{"id":"modules"},"children":[{"type":"text","value":"Modules"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"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 "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"nuxt.config"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://nuxt.com/docs/guide/concepts/modules","rel":["nofollow"]},"children":[{"type":"text","value":"Learn more on the documentation"}]}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:modules.md","_source":"content","_file":"modules.md","_extension":"md"},{"_path":"/pages","_dir":"","_draft":false,"_partial":false,"_locale":"","_empty":false,"title":"Pages","description":"One core feature of Nuxt is the file system router. Every Vue file inside the pages/ directory creates a corresponding URL (or route) that displays the contents of the file. By using dynamic imports for each page, Nuxt leverages code-splitting to ship the minimum amount of JavaScript for the requested route.","body":{"type":"root","children":[{"type":"element","tag":"h1","props":{"id":"pages"},"children":[{"type":"text","value":"Pages"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"One core feature of Nuxt is the file system router. Every Vue file inside the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"pages/"}]},{"type":"text","value":" directory creates a corresponding URL (or route) that displays the contents of the file. By using dynamic imports for each page, Nuxt leverages code-splitting to ship the minimum amount of JavaScript for the requested route."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://nuxt.com/docs/getting-started/routing","rel":["nofollow"]},"children":[{"type":"text","value":"Learn more on the documentation"}]}]},{"type":"element","tag":"hr","props":{},"children":[]},{"type":"element","tag":"h1","props":{"id":"middlewares"},"children":[{"type":"text","value":"Middlewares"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Nuxt provides a customizable route middleware framework you can use throughout your application, ideal for extracting code that you want to run before navigating to a particular route."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://nuxt.com/docs/guide/directory-structure/middleware","rel":["nofollow"]},"children":[{"type":"text","value":"Learn more on the documentation"}]}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:pages.md","_source":"content","_file":"pages.md","_extension":"md"},{"_path":"/payload","_dir":"","_draft":false,"_partial":false,"_locale":"","_empty":false,"title":"State & Async Data","description":"// TODO","body":{"type":"root","children":[{"type":"element","tag":"h1","props":{"id":"state-async-data"},"children":[{"type":"text","value":"State & Async Data"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"// TODO"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:payload.md","_source":"content","_file":"payload.md","_extension":"md"},{"_path":"/plugins","_dir":"","_draft":false,"_partial":false,"_locale":"","_empty":false,"title":"Plugins","description":"Nuxt plugins allows you to extend the functionality of Nuxt runtime and the Vue instance. You can add plugins to the plugins/ directory and they will be automatically imported and registered.","body":{"type":"root","children":[{"type":"element","tag":"h1","props":{"id":"plugins"},"children":[{"type":"text","value":"Plugins"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Nuxt plugins allows you to extend the functionality of Nuxt runtime and the Vue instance. You can add plugins to the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"plugins/"}]},{"type":"text","value":" directory and they will be automatically imported and registered."}]},{"type":"element","tag":"help-tip-performance","props":{},"children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Plugins runs before your application at runtime, the time each plugin cost will directly affect your application's initial loading time."}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://nuxt.com/docs/guide/directory-structure/plugins","rel":["nofollow"]},"children":[{"type":"text","value":"Learn more on the documentation"}]}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:plugins.md","_source":"content","_file":"plugins.md","_extension":"md"},{"_path":"/runtime-configs","_dir":"","_draft":false,"_partial":false,"_locale":"","_empty":false,"title":"Runtime Configs","description":"// TODO:","body":{"type":"root","children":[{"type":"element","tag":"h1","props":{"id":"runtime-configs"},"children":[{"type":"text","value":"Runtime Configs"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"// TODO:"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:runtime-configs.md","_source":"content","_file":"runtime-configs.md","_extension":"md"},{"_path":"/virtual-files","_dir":"","_draft":false,"_partial":false,"_locale":"","_empty":false,"title":"Virtual Files","description":"Virtual files are generated on the fly to support the conventions of the framework, and to provide a better developer experience.","body":{"type":"root","children":[{"type":"element","tag":"h1","props":{"id":"virtual-files"},"children":[{"type":"text","value":"Virtual Files"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Virtual files are generated on the fly to support the conventions of the framework, and to provide a better developer experience."}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:virtual-files.md","_source":"content","_file":"virtual-files.md","_extension":"md"}],"navigation":[{"title":"Components","_path":"/components"},{"title":"Hooks","_path":"/hooks"},{"title":"Auto imports","_path":"/imports"},{"title":"Modules","_path":"/modules"},{"title":"Pages","_path":"/pages"},{"title":"State & Async Data","_path":"/payload"},{"title":"Plugins","_path":"/plugins"},{"title":"Runtime Configs","_path":"/runtime-configs"},{"title":"Virtual Files","_path":"/virtual-files"}]}