@nuxt/devtools 1.3.4 → 1.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/module-main.mjs +2 -2
- package/dist/chunks/vscode.mjs +1 -1
- package/dist/client/200.html +16 -16
- package/dist/client/404.html +16 -16
- package/dist/client/_nuxt/{BFm6EJTU.js → 5icOpXn4.js} +1 -1
- package/dist/client/_nuxt/{CGj_8s-I.js → 95vJRnOC.js} +1 -1
- package/dist/client/_nuxt/{BulALiVC.js → B6pqls1-.js} +1 -1
- package/dist/client/_nuxt/{Bj_XrxMu.js → BBwATVWa.js} +1 -1
- package/dist/client/_nuxt/{DZHRk8T6.js → BFU18nbo.js} +1 -1
- package/dist/client/_nuxt/{aYYjZ8bg.js → BHFh0d3M.js} +1 -1
- package/dist/client/_nuxt/{CHQ52sTw.js → BOCztcZa.js} +1 -1
- package/dist/client/_nuxt/{DotVwsdv.js → BSxPYwaX.js} +1 -1
- package/dist/client/_nuxt/{oNeXSGv8.js → BZttYiGX.js} +1 -1
- package/dist/client/_nuxt/{D-4ohUPA.js → BaHHWTDW.js} +1 -1
- package/dist/client/_nuxt/{D3VgjIse.js → BcY_kb8Z.js} +1 -1
- package/dist/client/_nuxt/{Da5JKEgm.js → Bdw4ogYl.js} +1 -1
- package/dist/client/_nuxt/{LSJkDbxe.js → Bm7GelXr.js} +1 -1
- package/dist/client/_nuxt/{u_lBCHfa.js → BqFTXkdX.js} +1 -1
- package/dist/client/_nuxt/{BcsunUHc.js → BuHEGYFm.js} +1 -1
- package/dist/client/_nuxt/{Cn5ttfU_.js → BwZNBl_i.js} +1 -1
- package/dist/client/_nuxt/{C8ESOK3J.js → BzZi0kk8.js} +1 -1
- package/dist/client/_nuxt/{BdeOTENY.js → C84bMERG.js} +1 -1
- package/dist/client/_nuxt/{BmiNF6l-.js → CB2p7gUj.js} +1 -1
- package/dist/client/_nuxt/{DL0CET1h.js → CKyeeumc.js} +1 -1
- package/dist/client/_nuxt/{JMRChio8.js → CNMcdA5y.js} +1 -1
- package/dist/client/_nuxt/{98R48OH2.js → CR9D18UE.js} +1 -1
- package/dist/client/_nuxt/{B-sCWvv9.js → CUz7aF6D.js} +1 -1
- package/dist/client/_nuxt/{BYuD4knm.js → CVTYawdK.js} +1 -1
- package/dist/client/_nuxt/{BoP7AKy2.js → C_00-WxQ.js} +1 -1
- package/dist/client/_nuxt/{BKjxjBjR.js → C_UmrX8j.js} +1 -1
- package/dist/client/_nuxt/{C54vwF0J.js → Cesx2JqR.js} +1 -1
- package/dist/client/_nuxt/{B894X8py.js → ChEasZVw.js} +1 -1
- package/dist/client/_nuxt/{D6rOzE__.js → CxRAjt7E.js} +1 -1
- package/dist/client/_nuxt/{p_veFBpZ.js → CzSsbgVT.js} +1 -1
- package/dist/client/_nuxt/{mjGmx9GM.js → D49UL1Mz.js} +1 -1
- package/dist/client/_nuxt/{D5WHU7S-.js → D5uuYwbV.js} +1 -1
- package/dist/client/_nuxt/{B8ZbBSrc.js → DA_gWIKG.js} +1 -1
- package/dist/client/_nuxt/{CUJNw4nr.js → DGbyHtVw.js} +1 -1
- package/dist/client/_nuxt/{D9GqCGb7.js → DL_Umk9C.js} +1 -1
- package/dist/client/_nuxt/{BFLTkFCL.js → DMQf3nI6.js} +1 -1
- package/dist/client/_nuxt/{CrghN-Ad.js → DMihCQJ_.js} +1 -1
- package/dist/client/_nuxt/{DhzPY0Bk.js → DP008-Ly.js} +1 -1
- package/dist/client/_nuxt/{CIgTPfXa.js → DP4rCJej.js} +1 -1
- package/dist/client/_nuxt/{QZOV8EJp.js → DYgqHVwa.js} +1 -1
- package/dist/client/_nuxt/{DNTHL55G.js → De1Y8lB-.js} +1 -1
- package/dist/client/_nuxt/{CO6YgqHh.js → Dh5Afz2J.js} +1 -1
- package/dist/client/_nuxt/{BKePb5M9.js → DpejoWnk.js} +1 -1
- package/dist/client/_nuxt/{DT7g2OtK.js → Drfq5M3J.js} +1 -1
- package/dist/client/_nuxt/{CeyWeT92.js → DvA7Ywdy.js} +1 -1
- package/dist/client/_nuxt/{CpJRPiL9.js → DvifPl4v.js} +1 -1
- package/dist/client/_nuxt/{6wcy4DsH.js → ElxmrMfl.js} +1 -1
- package/dist/client/_nuxt/{CUytAwsx.js → Kxk8Hc64.js} +1 -1
- package/dist/client/_nuxt/{CDfEhAL9.js → LlSIX508.js} +1 -1
- package/dist/client/_nuxt/{z73YSsxO.js → PF6U826s.js} +1 -1
- package/dist/client/_nuxt/{D7I2o642.js → TuJR20B4.js} +1 -1
- package/dist/client/_nuxt/{DT3-Im-G.js → ZyHoMeHZ.js} +1 -1
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/0148a850-ea4d-465f-8f41-a17235e36e50.json +1 -0
- package/dist/client/_nuxt/{CyeATGho.js → dVuo_hLp.js} +1 -1
- package/dist/client/_nuxt/{BZs3jgFa.js → eoRoFZz1.js} +1 -1
- package/dist/client/_nuxt/{CBZOn9Tq.js → fMHX_-wi.js} +1 -1
- package/dist/client/_nuxt/{DBLkZRmC.js → giz0tI1M.js} +1 -1
- package/dist/client/_nuxt/{8SMg7xCe.js → ifvc2XRc.js} +1 -1
- package/dist/client/_nuxt/{B29KOOGn.js → l1tWIxUc.js} +1 -1
- package/dist/client/_nuxt/{Cao9Hf6d.js → mckm0NQH.js} +1 -1
- package/dist/client/_nuxt/{CYSOmuwz.js → oC4jMXG3.js} +1 -1
- package/dist/client/_nuxt/{Ba3iaRF0.js → pATA0c1v.js} +1 -1
- package/dist/client/_nuxt/{DNH9VLI7.js → vTxNztlt.js} +4 -4
- package/dist/client/index.html +16 -16
- package/dist/module.json +2 -2
- package/dist/runtime/function-metrics-helpers.d.ts +1 -1
- package/dist/runtime/{function-metrics-helpers.js → function-metrics-helpers.mjs} +1 -1
- package/dist/runtime/plugins/{devtools.client.js → devtools.client.mjs} +1 -1
- package/dist/runtime/plugins/view/client.d.ts +1 -1
- package/dist/runtime/plugins/view/{client.js → client.mjs} +2 -2
- package/dist/runtime/plugins/view/state.d.ts +1 -1
- package/dist/runtime/plugins/view/{state.js → state.mjs} +1 -1
- package/dist/runtime/settings.d.ts +1 -1
- package/dist/runtime/shared/hooks.d.ts +1 -1
- package/dist/runtime/use-nuxt-devtools.d.ts +1 -1
- package/package.json +7 -7
- package/dist/client/_nuxt/builds/meta/705c4cfa-d5c7-43a4-9f41-3c069a80d514.json +0 -1
- /package/dist/runtime/nitro/{inline.js → inline.mjs} +0 -0
- /package/dist/runtime/plugins/{devtools.server.js → devtools.server.mjs} +0 -0
- /package/dist/runtime/plugins/view/{utils.js → utils.mjs} +0 -0
- /package/dist/runtime/{settings.js → settings.mjs} +0 -0
- /package/dist/runtime/shared/{hooks.js → hooks.mjs} +0 -0
- /package/dist/runtime/{use-nuxt-devtools.js → use-nuxt-devtools.mjs} +0 -0
- /package/dist/runtime/vue-devtools/{overlay.js → overlay.mjs} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as p,a0 as m,o,m as l,aa as n,h as f,p as t,I as b,c4 as h,f as v,k,t as y,l as V,G as d,a6 as B}from"./
|
|
1
|
+
import{d as p,a0 as m,o,m as l,aa as n,h as f,p as t,I as b,c4 as h,f as v,k,t as y,l as V,G as d,a6 as B}from"./vTxNztlt.js";const g=["disabled"],w={key:0,value:"",disabled:"",hidden:""},C=p({__name:"NSelect",props:{modelValue:{default:void 0},placeholder:{default:""},icon:{default:""},disabled:{type:Boolean,default:!1}},setup(i,{emit:r}){const s=m(i,"modelValue",r,{passive:!0});return(e,a)=>{const c=B;return o(),l("div",{class:d(["n-select flex flex items-center border rounded px-2 py-1 focus-within:n-focus-base focus-within:border-context n-bg-base",e.disabled?"border-gray:10":"n-border-base"])},[n(e.$slots,"icon",{},()=>[e.icon?(o(),f(c,{key:0,icon:e.icon,class:"mr-0.4em text-1.1em op50"},null,8,["icon"])):t("",!0)]),b(k("select",{"onUpdate:modelValue":a[0]||(a[0]=u=>V(s)?s.value=u:null),disabled:e.disabled,class:d(["w-full flex-auto n-bg-base !outline-none",e.disabled?"appearance-none":""])},[e.placeholder?(o(),l("option",w,y(e.placeholder),1)):t("",!0),n(e.$slots,"default")],10,g),[[h,v(s)]])],2)}}});export{C as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as u,ac as f,ab as c,a as k,bg as v,o as t,h as y,j as B,m as s,F as l,v as d,t as n,f as a,k as C,p as b,G as g,ax as N}from"./
|
|
1
|
+
import{d as u,ac as f,ab as c,a as k,bg as v,o as t,h as y,j as B,m as s,F as l,v as d,t as n,f as a,k as C,p as b,G as g,ax as N}from"./vTxNztlt.js";const w={key:0,op50:""},F=u({__name:"FilepathItem",props:{filepath:{},lineBreak:{type:Boolean},subpath:{type:Boolean},override:{}},setup(m){const r=m,h=f(),p=c(),o=k(()=>r.filepath&&p.value?v(r.filepath,p.value.rootDir):{path:r.filepath||""});return(e,i)=>(t(),y(N(e.filepath?"button":"span"),{class:g([e.filepath?"hover:underline":"",e.lineBreak?"":"ws-nowrap of-hidden truncate"]),"font-mono":"",title:e.override||e.filepath,onClick:i[0]||(i[0]=D=>e.filepath&&a(h)(e.filepath))},{default:B(()=>[e.override?(t(),s(l,{key:0},[d(n(e.override),1)],64)):a(o).moduleName?(t(),s(l,{key:1},[C("span",null,n(a(o).moduleName),1),e.subpath?(t(),s("span",w,n(a(o).path.slice(a(o).moduleName.length)),1)):b("",!0)],64)):(t(),s(l,{key:2},[d(n(a(o).path),1)],64))]),_:1},8,["class","title"]))}});export{F as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as k}from"./
|
|
1
|
+
import{_ as k}from"./BaHHWTDW.js";import{d as v,o as e,m as c,F as x,n as C,h as f,j as a,aa as N,aw as B,k as $,al as w,a as F,a2 as O,f as r,i as o,p as u,v as V,I as j,_ as E}from"./vTxNztlt.js";import{_ as P}from"./TuJR20B4.js";import{_ as R}from"./DP4rCJej.js";import"./C_00-WxQ.js";import"./DL_Umk9C.js";import"./CVTYawdK.js";const A={key:0,flex:"~ col gap-1"},G={key:1,mt2:"",px4:"",italic:"",op35:""},H=v({__name:"StateGroup",props:{state:{},prefix:{default:""}},setup(m){return(t,n)=>{const i=k;return e(),c("div",null,[t.state&&Object.keys(t.state).length>0?(e(),c("div",A,[(e(!0),c(x,null,C(t.state,(l,s)=>(e(),f(i,{key:s,state:l,name:s.startsWith(t.prefix)?s.slice(t.prefix.length):s},{actions:a(_=>[N(t.$slots,"actions",B({ref_for:!0},_))]),_:2},1032,["state","name"]))),128))])):(e(),c("div",G," No data "))])}}}),K={class:"markdown-body"},T=$("h1",null,"State & Async Data",-1),I=$("p",null,"// TODO",-1),L=[T,I],W={__name:"payload",setup(m,{expose:t}){return t({frontmatter:{}}),(i,l)=>(e(),c("div",K,L))}},q={key:0},tt=v({__name:"payload",setup(m){const t=w(),n=F(()=>t.value?.nuxt.payload);async function i(l){await t.value?.nuxt.hooks.callHookParallel("app:data:refresh",l)}return(l,s)=>{const _=H,d=P,h=E,b=k,S=W,g=R,D=O("tooltip");return e(),c(x,null,[r(t)?(e(),c("div",q,[o(d,{icon:"carbon-data-set",text:"State",description:"Keyed state from `useState`",padding:!1},{default:a(()=>[o(_,{state:r(n).state,prefix:"$s"},null,8,["state"])]),_:1}),o(d,{icon:"carbon-data-blob",text:"Data",description:"Keyed state from `useAsyncData`",padding:!1},{actions:a(()=>[o(h,{n:"xs primary","self-start":"",icon:"i-carbon-recycle",onClick:s[0]||(s[0]=y=>i())},{default:a(()=>[V(" Re-fetch all data ")]),_:1})]),default:a(()=>[o(_,{state:r(n).data},{actions:a(({isOpen:y,name:p})=>[y&&p?j((e(),f(h,{key:0,title:`Re-fetch '${p}'`,icon:"carbon-recycle",border:!1,onClick:z=>i([p])},null,8,["title","onClick"])),[[D,`Re-fetch '${p}'`,void 0,{bottom:!0}]]):u("",!0)]),_:1},8,["state"])]),_:1}),r(n).functions&&Object.keys(r(n).functions).length?(e(),f(d,{key:0,icon:"carbon-function",text:"Functions",description:"State for functions"},{default:a(()=>[o(b,{"ml--6":"",state:r(n).functions},null,8,["state"])]),_:1})):u("",!0)])):u("",!0),o(g,null,{default:a(()=>[o(S)]),_:1})],64)}}});export{tt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as o,m as t,aa as s,o as a}from"./
|
|
1
|
+
import{q as o,m as t,aa as s,o as a}from"./vTxNztlt.js";const r={},c={"h-full":"","of-auto":""};function n(e,l){return a(),t("div",c,[s(e.$slots,"default")])}const _=o(r,[["render",n]]);export{_ as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as S}from"./
|
|
1
|
+
import{_ as S}from"./ElxmrMfl.js";import{d as N,r as $,a as g,o as d,m,k as t,v as c,G as p,f as n,F as y,n as T,t as _,a9 as F,aJ as B,i as h,aK as V,al as D,h as H,j as w,p as C}from"./vTxNztlt.js";import{_ as P}from"./TuJR20B4.js";import{_ as j}from"./DP4rCJej.js";import"./CVTYawdK.js";const E={"w-full":""},O={border:"b base"},L={"select-none":"","ws-nowrap":"",p1:"","text-right":"","font-bold":""},z={colspan:"2",p1:"",pl5:"","text-left":"","font-bold":""},A={"ws-nowrap":"",p1:"","text-center":"","font-bold":""},Y={"ws-nowrap":"",p1:"","text-center":"","font-bold":""},G={"ws-nowrap":"",p1:"","text-right":"","font-bold":""},J={"w-0":"","ws-nowrap":"","text-center":"","text-sm":"",op25:""},K={"text-sm":""},R={"ws-nowrap":""},U={"text-sm":""},q={"w-0":"","text-center":"","text-sm":""},M={"w-0":"","text-center":"","text-sm":""},Q={"w-0":"","text-right":"","text-sm":""},W=N({__name:"HooksTable",props:{hooks:{}},setup(k){const l=k,a=$("duration"),s=$("asc"),x={duration:(e,o)=>(o.duration??Number.POSITIVE_INFINITY)-(e.duration??Number.POSITIVE_INFINITY),name:(e,o)=>e.name.localeCompare(o.name),listener:(e,o)=>o.listeners-e.listeners,start:(e,o)=>o.start-e.start,executions:(e,o)=>o.executions.length-e.executions.length},v=g(()=>l.hooks.map(e=>e.start).sort((e,o)=>e-o)),b=g(()=>{const e=x[a.value],o=[...l.hooks].sort(e);return s.value==="desc"&&o.reverse(),o});function u(e){const o=e.split(":");return o.length===1?"":`${o[0]}:`}function f(e){const o=e.split(":");return o.length===1?e:o.slice(1).join(":")}function i(e){a.value===e?s.value=s.value==="asc"?"desc":"asc":a.value=e}return(e,o)=>{const I=S;return d(),m("table",E,[t("thead",O,[t("tr",null,[t("th",L,[t("button",{onClick:o[0]||(o[0]=r=>i("start"))},[c(" Order "),t("div",{"ml--1":"","text-xs":"",class:p([n(a)==="start"?"op50":"op0",n(s)==="asc"?"carbon-arrow-down":"carbon-arrow-up"])},null,2)])]),t("th",z,[t("button",{onClick:o[1]||(o[1]=r=>i("name"))},[c(" Hook name "),t("div",{"ml--1":"","text-xs":"",class:p([n(a)==="name"?"op50":"op0",n(s)==="asc"?"carbon-arrow-down":"carbon-arrow-up"])},null,2)])]),t("th",A,[t("button",{onClick:o[2]||(o[2]=r=>i("listener"))},[c(" Listeners "),t("div",{"ml--1":"","text-xs":"",class:p([n(a)==="listener"?"op50":"op0",n(s)==="asc"?"carbon-arrow-down":"carbon-arrow-up"])},null,2)])]),t("th",Y,[t("button",{onClick:o[3]||(o[3]=r=>i("executions"))},[c(" Executions "),t("div",{"ml--1":"","text-xs":"",class:p([n(a)==="executions"?"op50":"op0",n(s)==="asc"?"carbon-arrow-down":"carbon-arrow-up"])},null,2)])]),t("th",G,[t("button",{onClick:o[4]||(o[4]=r=>i("duration"))},[c(" Duration "),t("div",{"ml--1":"","text-xs":"",class:p([n(a)==="duration"?"op50":"op0",n(s)==="asc"?"carbon-arrow-down":"carbon-arrow-up"])},null,2)])])])]),t("tbody",null,[(d(!0),m(y,null,T(n(b),r=>(d(),m("tr",{key:r.name,border:"b dashed transparent hover:base"},[t("td",J,_(n(v).indexOf(r.start)),1),t("td",{"w-0":"","ws-nowrap":"","text-right":"",style:F({color:("getHashColorFromString"in e?e.getHashColorFromString:n(B))(u(r.name))})},[t("code",K,_(u(r.name)),1)],4),t("td",R,[t("code",U,_(f(r.name)),1)]),t("td",q,_(r.listeners),1),t("td",M,_(r.executions.length+1),1),t("td",Q,[h(I,{duration:r.duration},null,8,["duration"])])]))),128))])])}}}),X={class:"markdown-body"},Z=t("h1",null,"Hooks",-1),tt=t("p",null,[c("Hooks are an advanced API which can be used for module development or other advanced use cases. The hooking API can be used to expand almost every aspect of Nuxt. Under the hood it is powered by "),t("a",{href:"https://github.com/unjs/hookable",target:"_blank",rel:"noopener"},"unjs/hookable"),c(".")],-1),ot=t("p",null,[t("a",{href:"https://nuxt.com/docs/guide/going-further/hooks",target:"_blank",rel:"noopener"},"Learn more about hooks"),c(".")],-1),et=[Z,tt,ot],nt={__name:"hooks",setup(k,{expose:l}){return l({frontmatter:{}}),(s,x)=>(d(),m("div",X,et))}},it=N({__name:"hooks",setup(k){const l=V(),a=D(),s=g(()=>a.value?.metrics.clientHooks());return(x,v)=>{const b=W,u=P,f=nt,i=j;return d(),m(y,null,[t("div",null,[n(s)?.length?(d(),H(u,{key:0,icon:"carbon-ibm-cloud-direct-link-1-dedicated-hosting",text:"Client Hooks",description:`Total hooks: ${n(s).length}`,padding:"pl4 pr6"},{default:w(()=>[h(b,{hooks:n(s)},null,8,["hooks"])]),_:1},8,["description"])):C("",!0),n(l)?.length?(d(),H(u,{key:1,icon:"carbon-ibm-cloud-direct-link-2-dedicated",text:"Server Hooks",description:`Total hooks: ${n(l)?.length}`,padding:"pl4 pr6"},{default:w(()=>[h(b,{hooks:n(l)},null,8,["hooks"])]),_:1},8,["description"])):C("",!0)]),h(i,null,{default:w(()=>[h(f)]),_:1})],64)}}});export{it as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as B,a as w,aJ as W,o as n,m as r,k as t,a9 as T,f as l,t as k,ad as O,F as f,n as E,h as y,r as C,w as Y,aA as q,a1 as j,bV as U,p as x,i as m,G as z,q as Z,an as K,e as X,as as P,j as v,aw as Q,v as F,_ as G,aL as ee,al as se,b1 as te,bW as ne,ab as oe,N as ae,ac as le,A as ie,L as R,a5 as re,Z as ce}from"./DNH9VLI7.js";import{_ as M}from"./6wcy4DsH.js";import{_ as H}from"./CGj_8s-I.js";import{_ as pe}from"./DNTHL55G.js";import{e as de}from"./D9GqCGb7.js";import{_ as ue}from"./BmiNF6l-.js";import{_ as me}from"./DL0CET1h.js";import{_ as ke}from"./BZs3jgFa.js";import{_ as he}from"./CO6YgqHh.js";import{_ as _e}from"./BFLTkFCL.js";import{_ as fe}from"./CIgTPfXa.js";import"./BFm6EJTU.js";import"./DBLkZRmC.js";import"./LSJkDbxe.js";import"./BcJws1i5.js";import"./8SMg7xCe.js";const ye=B({__name:"TimelineItemFunction",props:{item:{}},setup(_){const p=_,c=w(()=>W(p.item.name,50,60,"_op_")),e=w(()=>c.value.replace(/_op_/,"1")),a=w(()=>W(p.item.name,50,40)),i=w(()=>c.value.replace(/_op_/,"0.2"));return(o,d)=>(n(),r("button",{class:"group",style:T({color:l(e),borderLeft:`2px solid ${l(e)}`}),relative:"","text-sm":"",transition:"","hover:z-1000":"","bg-base":""},[t("div",{style:T({backgroundColor:l(i)}),absolute:"","bottom-0":"","left--1px":"","top-0":"","w-full":"","text-sm":"","transition-all":"","duration-300":""},null,4),t("div",{style:T({color:l(a),"--c":l(e)}),border:"r-2 t-2 y-2 transparent","min-w-max":"",px1:"","text-left":"","group-hover":"border-$c"},k(o.item.name),5)],4))}}),ve={relative:"","h-full":""},be={absolute:"","left-2":"","top-2.3em":"","text-xs":"",op50:""},ge=B({__name:"TimelineSegment",props:{segment:{}},emits:["select"],setup(_,{emit:p}){const c=_,e=p,a=O(()=>c.segment.start,{updateInterval:1e3,showSecond:!0,controls:!1,messages:{justNow:"",past:i=>i,future:i=>i,invalid:"-",second:i=>i?`${i}s`:"",minute:i=>`${i}m`,hour:i=>`${i}h`,week:i=>`${i}w`,day:i=>`${i}d`,month:i=>`${i}mo`,year:i=>`${i}y`}});return(i,o)=>{const d=ye;return n(),r("div",ve,[t("button",{absolute:"","left-0":"","right-0":"","top-0":"","bg-green:5":"",px2:"",py1:"","text-left":"","text-xs":"","text-green6":"","font-mono":"",onClick:o[0]||(o[0]=s=>i.segment.route?e("select",i.segment.route):void 0)},k(i.segment.route?.event.to),1),t("div",be,k(l(a))+" ago ",1),t("div",null,[(n(!0),r(f,null,E(i.segment.functions,(s,u)=>(n(),y(d,{key:u,item:s.event,style:T({position:"absolute",minWidth:`${s.relativeWidth*100}%`,maxWidth:`${s.relativeWidth*100}%`,top:`${4+s.layer*1.6}em`,left:`${s.relativeStart*100}%`}),onClick:h=>e("select",s)},null,8,["item","style","onClick"]))),128))])])}}}),xe=3e3,$e=50;function Ae(_){const p=[];let c={start:0,end:0,events:[],functions:[],duration:0};for(const e of _){const a=e.end||e.start;(e.start-c.end>xe||e.type==="route")&&(c={start:e.start,end:a,events:[],functions:[],duration:0},p.push(c)),c.events.push(e),c.end=a+$e}return p.forEach((e,a)=>{const i=e.end-e.start,o=[];e.duration=i,e.previousGap=a>0?e.start-p[a-1].end:0,e.events.forEach(d=>{const s=d.end||d.start;let u=0;d.type!=="route"&&(u=o.findIndex($=>$<=d.start),u===-1?(u=o.length,o.push(s+1e3)):o[u]=s+1e3);const h={event:d,segment:e,relativeStart:(d.start-e.start)/i,relativeWidth:(s-d.start)/i,layer:u};d.type==="function"?e.functions.push(h):e.route=h})}),p}const De={relative:""},Ce={key:0,border:"x base","h-full":"","flex-inline":"","bg-true-gray-1":"",py15:"","text-xs":"","write-vertical-left":"",op50:"","dark:bg-true-gray-9":""},Be=B({__name:"TimelineTable",props:{data:{}},emits:["select"],setup(_,{emit:p}){const c=_,e=p,a=C(),i=C(),o=C(),d=C(),s=C(!0),u=C(1.5),h=w(()=>Ae(c.data.events)),$=w(()=>(c.data.events.length,a.value?.scrollWidth||window.innerWidth));function A(){d.value&&(d.value.style.width=`${$.value}px`)}function S(){s.value&&a.value&&(a.value.scrollTo({left:a.value.scrollWidth-a.value.clientWidth,behavior:"smooth"}),o.value.scrollTo({left:a.value.scrollWidth-a.value.clientWidth,behavior:"smooth"}))}return Y(()=>c.data.events.length,async()=>{await q(),A(),S()},{flush:"post"}),j(a,"scroll",()=>{o.value.scrollLeft!==a.value.scrollLeft&&(A(),o.value.scrollLeft=a.value.scrollLeft,s.value=a.value.scrollLeft>=a.value.scrollWidth-a.value.clientWidth)}),j(o,"scroll",()=>{o.value.scrollLeft!==a.value.scrollLeft&&(A(),a.value.scrollLeft=o.value.scrollLeft)}),j(a,"wheel",b=>{b.altKey?(u.value=U(u.value+b.deltaY/200,.5,3),A()):a.value.scrollLeft+=b.deltaY}),(b,L)=>{const D=M,V=ge;return n(),r(f,null,[t("div",De,[t("div",{ref_key:"minimap",ref:i,border:"t b base",relative:"","h-50px":"","ws-nowrap":"","border-base":""},[(n(!0),r(f,null,E(l(h),(g,N)=>(n(),r("div",{key:N,relative:"","h-full":"","flex-inline":"",style:T({width:`${Math.max(100,g.duration/10)/l($)*100}%`})},[(n(!0),r(f,null,E(g.functions,(I,J)=>(n(),r("div",{key:J,"h-3px":"",rounded:"",style:T({width:`max(${I.relativeWidth*100}%, 10px)`,position:"absolute",top:`${I.layer*4}px`,left:`${I.relativeStart*100}%`,backgroundColor:("getHashColorFromString"in b?b.getHashColorFromString:l(W))(I.event.name,50,60)})},null,4))),128)),g.route?(n(),r("div",{key:0,absolute:"","top-0":"","h-full":"","w-px":"","border-l":"","border-green6":"",op10:"",style:T({left:`${g.route.relativeStart*100}%`})},null,4)):x("",!0)],4))),128))],512),t("div",{ref_key:"minimapScroller",ref:o,class:"timeline-scroller",absolute:"","inset-0":"","h-full":"","w-full":"","of-x-scroll":""},[t("div",{ref_key:"minimapScrollerInner",ref:d,"h-1px":""},null,512)],512)]),t("div",{ref_key:"scroller",ref:a,relative:"","h-full":"","w-full":"","of-x-scroll":"","of-y-hidden":"","ws-nowrap":"","n-panel-grids":""},[(n(!0),r(f,null,E(l(h),(g,N)=>(n(),r(f,{key:N},[g.previousGap&&g.previousGap>=200?(n(),r("div",Ce,[m(D,{op50:"",duration:g.previousGap,color:!1},null,8,["duration"])])):x("",!0),m(V,{"flex-inline":"","of-x-hidden":"","hover:of-x-visible":"","bg-base":"",class:z(N===l(h).length-1?"border-r border-base":""),segment:g,style:T({width:`${Math.max(50,g.duration/10)*l(u)}px`}),onSelect:L[0]||(L[0]=I=>e("select",I))},null,8,["class","segment","style"])],64))),128))],512)],64)}}}),we=Z(Be,[["__scopeId","data-v-27e8fb2d"]]),Te={border:"t base",flex:"~ col","h-full":"","of-y-auto":"","text-sm":""},Se=["onClick"],Ne=t("div",{"i-carbon-function":"",op50:""},null,-1),Fe={flex:"~","ml--1":"","font-mono":""},Ee=t("div",{op30:""}," ( ",-1),Le={key:0,mr2:"",op30:""},Ie={op75:""},Ve=t("div",{op30:""}," ) ",-1),We=t("div",{"mr-1":"","h-7":"","w-7":"",flex:"","rounded-lg":"","bg-primary:5":"",p1:"","text-green6":""},[t("div",{"i-carbon-direction-rotary-right":"",ma:"","text-lg":""})],-1),Me={flex:"~ col items-start"},je={"text-xs":"","font-mono":"",op30:""},Oe={"text-green":"","font-bold":"","font-mono":""},ze=t("div",{"flex-auto":""},null,-1),Ge=t("div",{"min-h-100":""},null,-1),Re=B({__name:"TimelineList",props:{data:{}},emits:["select"],setup(_,{emit:p}){const c=p;return(e,a)=>{const i=M;return n(),r("div",Te,[(n(!0),r(f,null,E(e.data.events,(o,d)=>(n(),r("button",{key:d,border:"b base",px3:"",py2:"",flex:"~ items-center gap-2",hover:"bg-active",onClick:s=>c("select",o)},[o.type==="function"?(n(),r(f,{key:0},[Ne,t("div",{"font-mono":"",style:T({color:o.type==="function"?("getHashColorFromString"in e?e.getHashColorFromString:l(W))(o.name,50,60):""})},k(o.name),5),t("div",Fe,[Ee,(n(!0),r(f,null,E(o.args,(s,u)=>(n(),r(f,{key:u},[u?(n(),r("div",Le," , ")):x("",!0),t("div",Ie,k(s===null?"null":s===void 0?"undefined":typeof s=="function"?"[function]":Array.isArray(s)?"[Array]":typeof s=="object"?"[object]":JSON.stringify(s)),1)],64))),128)),Ve])],64)):(n(),r(f,{key:1},[We,t("div",Me,[t("div",je,k(o.from),1),t("div",Oe,k(o.to),1)])],64)),ze,o.end?(n(),y(i,{key:2,duration:o.end-o.start,color:o.type==="function"},null,8,["duration","color"])):x("",!0)],8,Se))),128)),Ge])}}}),Pe={key:0,"text-blue":""},He={key:1,"text-purple":""},Je={key:2,"text-green":""},Ye={key:3,"text-gray":""},qe={key:4,"text-gray":""},Ue={key:5,"text-gray":""},Ze={key:0,"bg-red:10":"",px2:"",py1:"","text-red":""},Ke={key:1},Xe={p2:"","text-sm":"",border:"t base"},Qe=B({__name:"TimelineArgumentView",props:{value:{}},setup(_){const p=_,c=C(),e=C();function a(){try{c.value=JSON.parse(JSON.stringify(p.value))}catch(s){console.error(s),e.value=s}}const i=B({emits:["setup"],setup(s,{emit:u}){return u("setup"),()=>null}}),o=K(),d=X();return(s,u)=>{const h=G,$=P("VMenu");return typeof s.value=="string"?(n(),r("div",Pe,k(JSON.stringify(s.value)),1)):typeof s.value=="number"?(n(),r("div",He,k(s.value),1)):typeof s.value=="boolean"?(n(),r("div",Je,k(s.value),1)):typeof s.value>"u"?(n(),r("div",Ye," undefined ")):typeof s.value=="function"?(n(),r("div",qe," [Function"+k(s.value.name?`: ${s.value.name}`:"")+"] ",1)):s.value===null?(n(),r("div",Ue," null ")):(n(),y($,{key:6,placement:"top"},{popper:v(()=>[m(l(i),{onSetup:a}),l(e)?(n(),r("div",Ze," Failed to display object: "+k(l(e)),1)):l(c)?(n(),r("div",Ke,[m(l(de),Q({"model-value":l(c)},s.$attrs,{class:["json-editor-vue",[l(o)==="dark"?"jse-theme-dark":""]],"main-menu-bar":!1,"navigation-bar":!1,"status-bar":!1,"read-only":!0,indentation:2,"tab-size":2}),null,16,["model-value","class"]),t("div",Xe,[m(h,{title:"Copy to clipboard",icon:"carbon-copy",onClick:u[0]||(u[0]=A=>l(d)(JSON.stringify(l(c),null,2),"timeline-argument"))},{default:v(()=>[F(" Copy ")]),_:1})])])):x("",!0)]),default:v(()=>[t("span",{"rounded-sm":"",px1:"","py0.5":"","text-sm":"",class:z([Array.isArray(s.value)?"text-amber bg-amber:10":"text-orange bg-orange:10"])},k(Array.isArray(s.value)?`[Array(${s.value.length})]`:"[Object]"),3)]),_:1}))}}}),es={key:0,"p-4":"",flex:"~ col gap-2","text-base":""},ss={"mx--1":""},ts={flex:"~ gap-1","font-mono":""},ns={key:1},os=t("span",{ml1:"",op30:""},"(",-1),as={key:0,op30:""},ls=t("span",{op30:""},")",-1),is={flex:"~ gap-1","text-sm":""},rs=t("span",{mx1:"",op50:""},"·",-1),cs={class:"text-sm text-gray-400"},ps=B({__name:"TimelineDetailsFunction",props:{record:{}},setup(_){const p=_,c=O(()=>p.record.start,{showSecond:!0}),e=ee(),a=w(()=>e.value?.metadata),i=w(()=>e.value?.imports.find(o=>o.as===p.record.name));return(o,d)=>{const s=H,u=pe,h=Qe,$=M,A=ue;return o.record?(n(),r("div",es,[t("div",ss,[m(s,{n:"yellow",textContent:"Function call"})]),t("div",ts,[l(i)?(n(),y(u,{key:0,item:l(i),metadata:l(a),counter:!1,classes:"px2 py1","mx--2":""},null,8,["item","metadata"])):(n(),r("span",ns,k(o.record.name),1)),os,(n(!0),r(f,null,E(o.record.args,(S,b)=>(n(),r(f,{key:b},[b?(n(),r("span",as,", ")):x("",!0),m(h,{value:S},null,8,["value"])],64))),128)),ls]),t("div",is,[o.record.end?(n(),y($,{key:0,duration:o.record.end-o.record.start},null,8,["duration"])):x("",!0),rs,t("div",cs,k(l(c)),1)]),o.record.stacktrace?(n(),y(A,{key:0,stacktrace:o.record.stacktrace,class:"text-xs text-gray-400"},null,8,["stacktrace"])):x("",!0)])):x("",!0)}}}),ds={key:0,"p-4":"",flex:"~ col gap-2"},us={"mx--1":""},ms={flex:"~ gap-1 items-center","font-mono":""},ks={op50:""},hs=t("span",{"i-carbon-arrow-right":"",op50:""},null,-1),_s={flex:"~ gap-1","text-sm":""},fs=t("span",{mx1:"",op50:""},"·",-1),ys={class:"text-sm text-gray-400"},vs=B({__name:"TimelineDetailsRoute",props:{record:{}},setup(_){const p=_,c=O(()=>p.record.start,{showSecond:!0});return(e,a)=>{const i=H,o=M;return e.record?(n(),r("div",ds,[t("div",us,[m(i,{n:"green",textContent:"Route Change"})]),t("div",ms,[t("span",ks,k(e.record.from),1),hs,t("span",null,k(e.record.to),1)]),t("div",_s,[e.record.end?(n(),y(o,{key:0,duration:e.record.end-e.record.start},null,8,["duration"])):x("",!0),fs,t("div",ys,k(l(c)),1)])])):x("",!0)}}}),bs={key:0,"h-screen":"","of-hidden":""},gs={"h-screen":"","w-full":"",flex:"","flex-col":""},xs={"h-10":"",flex:"~ gap-2 items-center justify-end",p2:"",px3:""},$s={"text-sm":""},As=t("div",{"flex-auto":""},null,-1),Ds={"min-h-50":"",px3:"",py2:""},Cs=B({__name:"TimelineView",setup(_){const p=se(),c=C("table"),e=C(),a=w(()=>p.value?.metrics.clientTimeline());function i(){a.value&&(a.value.events=[])}function o(){c.value=c.value==="table"?"list":"table"}return(d,s)=>{const u=P("VTooltip"),h=G,$=we,A=Re,S=ps,b=vs,L=me;return l(a)?(n(),r("div",bs,[t("div",gs,[t("div",xs,[m(u,{flex:""},{popper:v(()=>[t("div",$s,k(l(a).options.enabled?"Recording...":"Paused"),1)]),default:v(()=>[t("div",{"text-lg":"",class:z(l(a).options.enabled?"i-carbon-radio-button-checked text-primary animate-pulse":"i-carbon-pause-outline op30")},null,2)]),_:1}),l(a).options.enabled?(n(),y(h,{key:1,size:"small",ml1:"","text-sm":"",n:"orange",icon:"i-carbon-stop",onClick:s[1]||(s[1]=D=>l(a).options.enabled=!1)},{default:v(()=>[F(" Stop Tracking ")]),_:1})):(n(),y(h,{key:0,size:"small",ml1:"","text-sm":"",n:"primary",icon:"i-carbon-play",onClick:s[0]||(s[0]=D=>l(a).options.enabled=!0)},{default:v(()=>[F(" Start Tracking ")]),_:1})),As,m(h,{icon:l(c)==="table"?"i-carbon-roadmap":"i-carbon-list",class:"ml-2",title:"Toggle View",border:!1,onClick:o},null,8,["icon"]),m(h,{icon:"i-carbon-trash-can","hover-text-red":"",class:"ml-2",border:!1,onClick:i})]),l(c)==="table"?(n(),y($,{key:0,data:{...l(a)},onSelect:s[2]||(s[2]=D=>e.value=D.event)},null,8,["data"])):(n(),y(A,{key:1,data:{...l(a)},onSelect:s[3]||(s[3]=D=>e.value=D)},null,8,["data"]))]),m(L,{"model-value":!!l(e),"auto-close":"",transition:"bottom",left:"#nuxt-devtools-side-nav",onClose:s[4]||(s[4]=D=>e.value=void 0)},{default:v(()=>[t("div",Ds,[l(e)?.type==="function"?(n(),y(S,{key:0,record:l(e)},null,8,["record"])):l(e)?.type==="route"?(n(),y(b,{key:1,record:l(e)},null,8,["record"])):x("",!0)])]),_:1},8,["model-value"])])):x("",!0)}}}),Bs={class:"markdown-body"},ws=t("h1",null,"Timeline",-1),Ts=t("p",null,[t("blockquote",{"text-orange":"","bg-orange:10":"",py1:""}," This is an experimental feature ")],-1),Ss=te(`<p>Timeline tracks your route navigations and functions calls in your Nuxt application. It can be used to debug performance issues and to understand how your application works.</p><h2>Function calls</h2><p>Nuxt DevTools tracks function calls by wrapping them in the build time. It works for functions referenced by auto-imports, or explicit imports through <code>import {} from '#imports'</code>.</p><pre class="shiki shiki-themes vitesse-light vitesse-dark" style="background-color:#ffffff;--shiki-dark-bg:#121212;color:#393a34;--shiki-dark:#dbd7caee;" tabindex="0"><code><span class="line"><span style="color:#999999;--shiki-dark:#666666;"><</span><span style="color:#1E754F;--shiki-dark:#4D9375;">script</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> setup</span><span style="color:#999999;--shiki-dark:#666666;">></span></span>
|
|
1
|
+
import{d as B,a as w,aJ as W,o as n,m as r,k as t,a9 as T,f as l,t as k,ad as O,F as f,n as E,h as y,r as C,w as Y,aA as q,a1 as j,bV as U,p as x,i as m,G as z,q as Z,an as K,e as X,as as P,j as v,aw as Q,v as F,_ as G,aL as ee,al as se,b1 as te,bW as ne,ab as oe,N as ae,ac as le,A as ie,L as R,a5 as re,Z as ce}from"./vTxNztlt.js";import{_ as M}from"./ElxmrMfl.js";import{_ as H}from"./95vJRnOC.js";import{_ as pe}from"./De1Y8lB-.js";import{e as de}from"./DL_Umk9C.js";import{_ as ue}from"./CB2p7gUj.js";import{_ as me}from"./CKyeeumc.js";import{_ as ke}from"./eoRoFZz1.js";import{_ as he}from"./Dh5Afz2J.js";import{_ as _e}from"./DMQf3nI6.js";import{_ as fe}from"./DP4rCJej.js";import"./5icOpXn4.js";import"./giz0tI1M.js";import"./Bm7GelXr.js";import"./BcJws1i5.js";import"./ifvc2XRc.js";const ye=B({__name:"TimelineItemFunction",props:{item:{}},setup(_){const p=_,c=w(()=>W(p.item.name,50,60,"_op_")),e=w(()=>c.value.replace(/_op_/,"1")),a=w(()=>W(p.item.name,50,40)),i=w(()=>c.value.replace(/_op_/,"0.2"));return(o,d)=>(n(),r("button",{class:"group",style:T({color:l(e),borderLeft:`2px solid ${l(e)}`}),relative:"","text-sm":"",transition:"","hover:z-1000":"","bg-base":""},[t("div",{style:T({backgroundColor:l(i)}),absolute:"","bottom-0":"","left--1px":"","top-0":"","w-full":"","text-sm":"","transition-all":"","duration-300":""},null,4),t("div",{style:T({color:l(a),"--c":l(e)}),border:"r-2 t-2 y-2 transparent","min-w-max":"",px1:"","text-left":"","group-hover":"border-$c"},k(o.item.name),5)],4))}}),ve={relative:"","h-full":""},be={absolute:"","left-2":"","top-2.3em":"","text-xs":"",op50:""},ge=B({__name:"TimelineSegment",props:{segment:{}},emits:["select"],setup(_,{emit:p}){const c=_,e=p,a=O(()=>c.segment.start,{updateInterval:1e3,showSecond:!0,controls:!1,messages:{justNow:"",past:i=>i,future:i=>i,invalid:"-",second:i=>i?`${i}s`:"",minute:i=>`${i}m`,hour:i=>`${i}h`,week:i=>`${i}w`,day:i=>`${i}d`,month:i=>`${i}mo`,year:i=>`${i}y`}});return(i,o)=>{const d=ye;return n(),r("div",ve,[t("button",{absolute:"","left-0":"","right-0":"","top-0":"","bg-green:5":"",px2:"",py1:"","text-left":"","text-xs":"","text-green6":"","font-mono":"",onClick:o[0]||(o[0]=s=>i.segment.route?e("select",i.segment.route):void 0)},k(i.segment.route?.event.to),1),t("div",be,k(l(a))+" ago ",1),t("div",null,[(n(!0),r(f,null,E(i.segment.functions,(s,u)=>(n(),y(d,{key:u,item:s.event,style:T({position:"absolute",minWidth:`${s.relativeWidth*100}%`,maxWidth:`${s.relativeWidth*100}%`,top:`${4+s.layer*1.6}em`,left:`${s.relativeStart*100}%`}),onClick:h=>e("select",s)},null,8,["item","style","onClick"]))),128))])])}}}),xe=3e3,$e=50;function Ae(_){const p=[];let c={start:0,end:0,events:[],functions:[],duration:0};for(const e of _){const a=e.end||e.start;(e.start-c.end>xe||e.type==="route")&&(c={start:e.start,end:a,events:[],functions:[],duration:0},p.push(c)),c.events.push(e),c.end=a+$e}return p.forEach((e,a)=>{const i=e.end-e.start,o=[];e.duration=i,e.previousGap=a>0?e.start-p[a-1].end:0,e.events.forEach(d=>{const s=d.end||d.start;let u=0;d.type!=="route"&&(u=o.findIndex($=>$<=d.start),u===-1?(u=o.length,o.push(s+1e3)):o[u]=s+1e3);const h={event:d,segment:e,relativeStart:(d.start-e.start)/i,relativeWidth:(s-d.start)/i,layer:u};d.type==="function"?e.functions.push(h):e.route=h})}),p}const De={relative:""},Ce={key:0,border:"x base","h-full":"","flex-inline":"","bg-true-gray-1":"",py15:"","text-xs":"","write-vertical-left":"",op50:"","dark:bg-true-gray-9":""},Be=B({__name:"TimelineTable",props:{data:{}},emits:["select"],setup(_,{emit:p}){const c=_,e=p,a=C(),i=C(),o=C(),d=C(),s=C(!0),u=C(1.5),h=w(()=>Ae(c.data.events)),$=w(()=>(c.data.events.length,a.value?.scrollWidth||window.innerWidth));function A(){d.value&&(d.value.style.width=`${$.value}px`)}function S(){s.value&&a.value&&(a.value.scrollTo({left:a.value.scrollWidth-a.value.clientWidth,behavior:"smooth"}),o.value.scrollTo({left:a.value.scrollWidth-a.value.clientWidth,behavior:"smooth"}))}return Y(()=>c.data.events.length,async()=>{await q(),A(),S()},{flush:"post"}),j(a,"scroll",()=>{o.value.scrollLeft!==a.value.scrollLeft&&(A(),o.value.scrollLeft=a.value.scrollLeft,s.value=a.value.scrollLeft>=a.value.scrollWidth-a.value.clientWidth)}),j(o,"scroll",()=>{o.value.scrollLeft!==a.value.scrollLeft&&(A(),a.value.scrollLeft=o.value.scrollLeft)}),j(a,"wheel",b=>{b.altKey?(u.value=U(u.value+b.deltaY/200,.5,3),A()):a.value.scrollLeft+=b.deltaY}),(b,L)=>{const D=M,V=ge;return n(),r(f,null,[t("div",De,[t("div",{ref_key:"minimap",ref:i,border:"t b base",relative:"","h-50px":"","ws-nowrap":"","border-base":""},[(n(!0),r(f,null,E(l(h),(g,N)=>(n(),r("div",{key:N,relative:"","h-full":"","flex-inline":"",style:T({width:`${Math.max(100,g.duration/10)/l($)*100}%`})},[(n(!0),r(f,null,E(g.functions,(I,J)=>(n(),r("div",{key:J,"h-3px":"",rounded:"",style:T({width:`max(${I.relativeWidth*100}%, 10px)`,position:"absolute",top:`${I.layer*4}px`,left:`${I.relativeStart*100}%`,backgroundColor:("getHashColorFromString"in b?b.getHashColorFromString:l(W))(I.event.name,50,60)})},null,4))),128)),g.route?(n(),r("div",{key:0,absolute:"","top-0":"","h-full":"","w-px":"","border-l":"","border-green6":"",op10:"",style:T({left:`${g.route.relativeStart*100}%`})},null,4)):x("",!0)],4))),128))],512),t("div",{ref_key:"minimapScroller",ref:o,class:"timeline-scroller",absolute:"","inset-0":"","h-full":"","w-full":"","of-x-scroll":""},[t("div",{ref_key:"minimapScrollerInner",ref:d,"h-1px":""},null,512)],512)]),t("div",{ref_key:"scroller",ref:a,relative:"","h-full":"","w-full":"","of-x-scroll":"","of-y-hidden":"","ws-nowrap":"","n-panel-grids":""},[(n(!0),r(f,null,E(l(h),(g,N)=>(n(),r(f,{key:N},[g.previousGap&&g.previousGap>=200?(n(),r("div",Ce,[m(D,{op50:"",duration:g.previousGap,color:!1},null,8,["duration"])])):x("",!0),m(V,{"flex-inline":"","of-x-hidden":"","hover:of-x-visible":"","bg-base":"",class:z(N===l(h).length-1?"border-r border-base":""),segment:g,style:T({width:`${Math.max(50,g.duration/10)*l(u)}px`}),onSelect:L[0]||(L[0]=I=>e("select",I))},null,8,["class","segment","style"])],64))),128))],512)],64)}}}),we=Z(Be,[["__scopeId","data-v-27e8fb2d"]]),Te={border:"t base",flex:"~ col","h-full":"","of-y-auto":"","text-sm":""},Se=["onClick"],Ne=t("div",{"i-carbon-function":"",op50:""},null,-1),Fe={flex:"~","ml--1":"","font-mono":""},Ee=t("div",{op30:""}," ( ",-1),Le={key:0,mr2:"",op30:""},Ie={op75:""},Ve=t("div",{op30:""}," ) ",-1),We=t("div",{"mr-1":"","h-7":"","w-7":"",flex:"","rounded-lg":"","bg-primary:5":"",p1:"","text-green6":""},[t("div",{"i-carbon-direction-rotary-right":"",ma:"","text-lg":""})],-1),Me={flex:"~ col items-start"},je={"text-xs":"","font-mono":"",op30:""},Oe={"text-green":"","font-bold":"","font-mono":""},ze=t("div",{"flex-auto":""},null,-1),Ge=t("div",{"min-h-100":""},null,-1),Re=B({__name:"TimelineList",props:{data:{}},emits:["select"],setup(_,{emit:p}){const c=p;return(e,a)=>{const i=M;return n(),r("div",Te,[(n(!0),r(f,null,E(e.data.events,(o,d)=>(n(),r("button",{key:d,border:"b base",px3:"",py2:"",flex:"~ items-center gap-2",hover:"bg-active",onClick:s=>c("select",o)},[o.type==="function"?(n(),r(f,{key:0},[Ne,t("div",{"font-mono":"",style:T({color:o.type==="function"?("getHashColorFromString"in e?e.getHashColorFromString:l(W))(o.name,50,60):""})},k(o.name),5),t("div",Fe,[Ee,(n(!0),r(f,null,E(o.args,(s,u)=>(n(),r(f,{key:u},[u?(n(),r("div",Le," , ")):x("",!0),t("div",Ie,k(s===null?"null":s===void 0?"undefined":typeof s=="function"?"[function]":Array.isArray(s)?"[Array]":typeof s=="object"?"[object]":JSON.stringify(s)),1)],64))),128)),Ve])],64)):(n(),r(f,{key:1},[We,t("div",Me,[t("div",je,k(o.from),1),t("div",Oe,k(o.to),1)])],64)),ze,o.end?(n(),y(i,{key:2,duration:o.end-o.start,color:o.type==="function"},null,8,["duration","color"])):x("",!0)],8,Se))),128)),Ge])}}}),Pe={key:0,"text-blue":""},He={key:1,"text-purple":""},Je={key:2,"text-green":""},Ye={key:3,"text-gray":""},qe={key:4,"text-gray":""},Ue={key:5,"text-gray":""},Ze={key:0,"bg-red:10":"",px2:"",py1:"","text-red":""},Ke={key:1},Xe={p2:"","text-sm":"",border:"t base"},Qe=B({__name:"TimelineArgumentView",props:{value:{}},setup(_){const p=_,c=C(),e=C();function a(){try{c.value=JSON.parse(JSON.stringify(p.value))}catch(s){console.error(s),e.value=s}}const i=B({emits:["setup"],setup(s,{emit:u}){return u("setup"),()=>null}}),o=K(),d=X();return(s,u)=>{const h=G,$=P("VMenu");return typeof s.value=="string"?(n(),r("div",Pe,k(JSON.stringify(s.value)),1)):typeof s.value=="number"?(n(),r("div",He,k(s.value),1)):typeof s.value=="boolean"?(n(),r("div",Je,k(s.value),1)):typeof s.value>"u"?(n(),r("div",Ye," undefined ")):typeof s.value=="function"?(n(),r("div",qe," [Function"+k(s.value.name?`: ${s.value.name}`:"")+"] ",1)):s.value===null?(n(),r("div",Ue," null ")):(n(),y($,{key:6,placement:"top"},{popper:v(()=>[m(l(i),{onSetup:a}),l(e)?(n(),r("div",Ze," Failed to display object: "+k(l(e)),1)):l(c)?(n(),r("div",Ke,[m(l(de),Q({"model-value":l(c)},s.$attrs,{class:["json-editor-vue",[l(o)==="dark"?"jse-theme-dark":""]],"main-menu-bar":!1,"navigation-bar":!1,"status-bar":!1,"read-only":!0,indentation:2,"tab-size":2}),null,16,["model-value","class"]),t("div",Xe,[m(h,{title:"Copy to clipboard",icon:"carbon-copy",onClick:u[0]||(u[0]=A=>l(d)(JSON.stringify(l(c),null,2),"timeline-argument"))},{default:v(()=>[F(" Copy ")]),_:1})])])):x("",!0)]),default:v(()=>[t("span",{"rounded-sm":"",px1:"","py0.5":"","text-sm":"",class:z([Array.isArray(s.value)?"text-amber bg-amber:10":"text-orange bg-orange:10"])},k(Array.isArray(s.value)?`[Array(${s.value.length})]`:"[Object]"),3)]),_:1}))}}}),es={key:0,"p-4":"",flex:"~ col gap-2","text-base":""},ss={"mx--1":""},ts={flex:"~ gap-1","font-mono":""},ns={key:1},os=t("span",{ml1:"",op30:""},"(",-1),as={key:0,op30:""},ls=t("span",{op30:""},")",-1),is={flex:"~ gap-1","text-sm":""},rs=t("span",{mx1:"",op50:""},"·",-1),cs={class:"text-sm text-gray-400"},ps=B({__name:"TimelineDetailsFunction",props:{record:{}},setup(_){const p=_,c=O(()=>p.record.start,{showSecond:!0}),e=ee(),a=w(()=>e.value?.metadata),i=w(()=>e.value?.imports.find(o=>o.as===p.record.name));return(o,d)=>{const s=H,u=pe,h=Qe,$=M,A=ue;return o.record?(n(),r("div",es,[t("div",ss,[m(s,{n:"yellow",textContent:"Function call"})]),t("div",ts,[l(i)?(n(),y(u,{key:0,item:l(i),metadata:l(a),counter:!1,classes:"px2 py1","mx--2":""},null,8,["item","metadata"])):(n(),r("span",ns,k(o.record.name),1)),os,(n(!0),r(f,null,E(o.record.args,(S,b)=>(n(),r(f,{key:b},[b?(n(),r("span",as,", ")):x("",!0),m(h,{value:S},null,8,["value"])],64))),128)),ls]),t("div",is,[o.record.end?(n(),y($,{key:0,duration:o.record.end-o.record.start},null,8,["duration"])):x("",!0),rs,t("div",cs,k(l(c)),1)]),o.record.stacktrace?(n(),y(A,{key:0,stacktrace:o.record.stacktrace,class:"text-xs text-gray-400"},null,8,["stacktrace"])):x("",!0)])):x("",!0)}}}),ds={key:0,"p-4":"",flex:"~ col gap-2"},us={"mx--1":""},ms={flex:"~ gap-1 items-center","font-mono":""},ks={op50:""},hs=t("span",{"i-carbon-arrow-right":"",op50:""},null,-1),_s={flex:"~ gap-1","text-sm":""},fs=t("span",{mx1:"",op50:""},"·",-1),ys={class:"text-sm text-gray-400"},vs=B({__name:"TimelineDetailsRoute",props:{record:{}},setup(_){const p=_,c=O(()=>p.record.start,{showSecond:!0});return(e,a)=>{const i=H,o=M;return e.record?(n(),r("div",ds,[t("div",us,[m(i,{n:"green",textContent:"Route Change"})]),t("div",ms,[t("span",ks,k(e.record.from),1),hs,t("span",null,k(e.record.to),1)]),t("div",_s,[e.record.end?(n(),y(o,{key:0,duration:e.record.end-e.record.start},null,8,["duration"])):x("",!0),fs,t("div",ys,k(l(c)),1)])])):x("",!0)}}}),bs={key:0,"h-screen":"","of-hidden":""},gs={"h-screen":"","w-full":"",flex:"","flex-col":""},xs={"h-10":"",flex:"~ gap-2 items-center justify-end",p2:"",px3:""},$s={"text-sm":""},As=t("div",{"flex-auto":""},null,-1),Ds={"min-h-50":"",px3:"",py2:""},Cs=B({__name:"TimelineView",setup(_){const p=se(),c=C("table"),e=C(),a=w(()=>p.value?.metrics.clientTimeline());function i(){a.value&&(a.value.events=[])}function o(){c.value=c.value==="table"?"list":"table"}return(d,s)=>{const u=P("VTooltip"),h=G,$=we,A=Re,S=ps,b=vs,L=me;return l(a)?(n(),r("div",bs,[t("div",gs,[t("div",xs,[m(u,{flex:""},{popper:v(()=>[t("div",$s,k(l(a).options.enabled?"Recording...":"Paused"),1)]),default:v(()=>[t("div",{"text-lg":"",class:z(l(a).options.enabled?"i-carbon-radio-button-checked text-primary animate-pulse":"i-carbon-pause-outline op30")},null,2)]),_:1}),l(a).options.enabled?(n(),y(h,{key:1,size:"small",ml1:"","text-sm":"",n:"orange",icon:"i-carbon-stop",onClick:s[1]||(s[1]=D=>l(a).options.enabled=!1)},{default:v(()=>[F(" Stop Tracking ")]),_:1})):(n(),y(h,{key:0,size:"small",ml1:"","text-sm":"",n:"primary",icon:"i-carbon-play",onClick:s[0]||(s[0]=D=>l(a).options.enabled=!0)},{default:v(()=>[F(" Start Tracking ")]),_:1})),As,m(h,{icon:l(c)==="table"?"i-carbon-roadmap":"i-carbon-list",class:"ml-2",title:"Toggle View",border:!1,onClick:o},null,8,["icon"]),m(h,{icon:"i-carbon-trash-can","hover-text-red":"",class:"ml-2",border:!1,onClick:i})]),l(c)==="table"?(n(),y($,{key:0,data:{...l(a)},onSelect:s[2]||(s[2]=D=>e.value=D.event)},null,8,["data"])):(n(),y(A,{key:1,data:{...l(a)},onSelect:s[3]||(s[3]=D=>e.value=D)},null,8,["data"]))]),m(L,{"model-value":!!l(e),"auto-close":"",transition:"bottom",left:"#nuxt-devtools-side-nav",onClose:s[4]||(s[4]=D=>e.value=void 0)},{default:v(()=>[t("div",Ds,[l(e)?.type==="function"?(n(),y(S,{key:0,record:l(e)},null,8,["record"])):l(e)?.type==="route"?(n(),y(b,{key:1,record:l(e)},null,8,["record"])):x("",!0)])]),_:1},8,["model-value"])])):x("",!0)}}}),Bs={class:"markdown-body"},ws=t("h1",null,"Timeline",-1),Ts=t("p",null,[t("blockquote",{"text-orange":"","bg-orange:10":"",py1:""}," This is an experimental feature ")],-1),Ss=te(`<p>Timeline tracks your route navigations and functions calls in your Nuxt application. It can be used to debug performance issues and to understand how your application works.</p><h2>Function calls</h2><p>Nuxt DevTools tracks function calls by wrapping them in the build time. It works for functions referenced by auto-imports, or explicit imports through <code>import {} from '#imports'</code>.</p><pre class="shiki shiki-themes vitesse-light vitesse-dark" style="background-color:#ffffff;--shiki-dark-bg:#121212;color:#393a34;--shiki-dark:#dbd7caee;" tabindex="0"><code><span class="line"><span style="color:#999999;--shiki-dark:#666666;"><</span><span style="color:#1E754F;--shiki-dark:#4D9375;">script</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> setup</span><span style="color:#999999;--shiki-dark:#666666;">></span></span>
|
|
2
2
|
<span class="line"><span style="color:#1E754F;--shiki-dark:#4D9375;">import</span><span style="color:#999999;--shiki-dark:#666666;"> {</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> useMouse</span><span style="color:#999999;--shiki-dark:#666666;"> }</span><span style="color:#1E754F;--shiki-dark:#4D9375;"> from</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;"> '</span><span style="color:#B56959;--shiki-dark:#C98A7D;">@vueuse/core</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;">'</span></span>
|
|
3
3
|
<span class="line"><span style="color:#1E754F;--shiki-dark:#4D9375;">import</span><span style="color:#999999;--shiki-dark:#666666;"> {</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> useNuxtApp</span><span style="color:#999999;--shiki-dark:#666666;"> }</span><span style="color:#1E754F;--shiki-dark:#4D9375;"> from</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;"> '</span><span style="color:#B56959;--shiki-dark:#C98A7D;">#imports</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;">'</span></span>
|
|
4
4
|
<span class="line"></span>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as P,a as I,r as V,o,m as s,k as e,F as _,n as j,G as S,f as t,t as p,p as b,H as U,i as u,j as r,v as f,I as A,J as D,K as X,L as F,M as E,_ as G,N as q,O as ee,P as ne,Q as te,R as oe,S as le,U as ie,V as se,W as C,h as z,l as R,X as ae,Y as re,Z as ue,A as de}from"./
|
|
1
|
+
import{d as P,a as I,r as V,o,m as s,k as e,F as _,n as j,G as S,f as t,t as p,p as b,H as U,i as u,j as r,v as f,I as A,J as D,K as X,L as F,M as E,_ as G,N as q,O as ee,P as ne,Q as te,R as oe,S as le,U as ie,V as se,W as C,h as z,l as R,X as ae,Y as re,Z as ue,A as de}from"./vTxNztlt.js";import{_ as ce}from"./Bm7GelXr.js";import{_ as me}from"./ifvc2XRc.js";import{_ as _e}from"./DvifPl4v.js";import{_ as pe}from"./DP4rCJej.js";import"./giz0tI1M.js";const fe={"h-full":"",grid:"~ rows-[max-content_1fr]"},ve={flex:"~ wrap","w-full":""},he=["onClick"],ye=e("div",{border:"b base","flex-auto":""},null,-1),be={key:0,flex:"~ col gap-4 items-center justify-center",p4:""},$e=e("div",{"flex-auto":""},null,-1),ge={grid:"~ cols-[30px_1fr] gap-x-2 gap-y-3 items-center justify-center","w-100":""},xe=e("div",{"i-carbon-commit":"","text-xl":""},null,-1),we=e("div",{"text-sm":"",op50:""}," Name ",-1),ze=e("div",{"i-carbon-time":"","text-xl":""},null,-1),Be=e("div",{"text-sm":"",op50:""}," Build duration ",-1),Ce=e("div",{"i-carbon-cics-program":"","text-xl":""},null,-1),ke=e("div",{"text-sm":"",op50:""}," Client bundle size ",-1),Ne=e("div",{"i-carbon-bare-metal-server":"","text-xl":""},null,-1),Te=e("div",{"text-sm":"",op50:""}," Nitro bundle size ",-1),Ae=e("div",{"i-carbon-edge-node":"","text-xl":""},null,-1),De=e("div",{"text-sm":"",op50:""}," Built ",-1),Ie=e("div",{"i-carbon:folder-parent":"","text-xl":""},null,-1),Ve=e("div",{"text-sm":"",op50:""}," Report Path ",-1),Se=e("div",{"flex-auto":""},null,-1),Fe=P({__name:"BuildAnalyzeDetails",props:{current:{},prev:{}},setup(k){const v=k,g=`${X().app.baseURL}/__nuxt_devtools__/analyze/`.replace(/\/+/g,"/"),x=I(()=>{const n=[{name:"Overview",id:"overview"}];return v.current.features.bundleClient&&n.push({name:"Client Bundle",id:"bundle-client"}),v.current.features.bundleNitro&&n.push({name:"Nitro Bundle",id:"bundle-nitro"}),v.current.features.viteInspect&&n.push({name:"Vite Inspect",id:"vite-inspect"}),n}),i=V(x.value[0]);function h(n){return n<1024?`${n}B`:n<1024*1024?`${(n/1024).toFixed(1)}KB`:n<1024*1024*1024?`${(n/1024/1024).toFixed(1)}MB`:`${(n/1024/1024/1024).toFixed(1)}GB`}function d(n){return`${((n.endTime-n.startTime)/1e3).toFixed(1)}s`}async function N(n){return F.clearAnalyzeBuilds(await E(),[n])}return(n,c)=>{const B=ce,T=G;return o(),s("div",fe,[e("div",ve,[(o(!0),s(_,null,j(t(x),(l,m)=>(o(),s("button",{key:m,px4:"",py2:"",border:"r base",hover:"bg-active",class:S(l.id===t(i).id?"":"border-b"),onClick:w=>i.value=l},[e("div",{class:S(l.id===t(i).id?"":"op30")},p(l.name),3)],10,he))),128)),ye]),t(i).id==="overview"?(o(),s("div",be,[$e,e("div",ge,[xe,e("div",null,[we,e("div",null,p(n.current.name),1)]),ze,e("div",null,[Be,e("div",null,p(d(n.current)),1)]),n.current.size?.clientBundle?(o(),s(_,{key:0},[Ce,e("div",null,[ke,e("div",null,p(h(n.current.size.clientBundle)),1)])],64)):b("",!0),n.current.size.nitroBundle?(o(),s(_,{key:1},[Ne,e("div",null,[Te,e("div",null,p(h(n.current.size.nitroBundle)),1)])],64)):b("",!0),Ae,e("div",null,[De,e("div",null,p(t(U)(new Date(n.current.endTime))),1)]),Ie,e("div",null,[Ve,u(B,{filepath:n.current.analyzeDir},null,8,["filepath"])])]),Se,u(T,{n:"rose",icon:"carbon-delete",onClick:c[0]||(c[0]=l=>N(n.current.name))},{default:r(()=>[f(" Delete this report ")]),_:1})])):b("",!0),c._lazyshow1||t(i).id==="bundle-client"?(c._lazyshow1=!0,o(),s(_,null,[A(e("iframe",{src:`${t(g)}${n.current.slug}/client.html`,"h-full":"","w-full":""},null,8,["src"]),[[D,t(i).id==="bundle-client"]])],64)):b("v-show-if",!0),c._lazyshow2||t(i).id==="bundle-nitro"?(c._lazyshow2=!0,o(),s(_,null,[A(e("iframe",{src:`${t(g)}${n.current.slug}/nitro.html`,"h-full":"","w-full":""},null,8,["src"]),[[D,t(i).id==="bundle-nitro"]])],64)):b("v-show-if",!0),c._lazyshow3||t(i).id==="vite-inspect"?(c._lazyshow3=!0,o(),s(_,null,[A(e("iframe",{src:`${t(g)}${n.current.slug}/.vite-inspect/`,"h-full":"","w-full":""},null,8,["src"]),[[D,t(i).id==="vite-inspect"]])],64)):b("v-show-if",!0)])}}}),Re={class:"markdown-body"},Pe=e("h1",null,"Build Analyze",-1),je=e("p",null,[f("DevTools provides a build analyze tool to help you understand the size of your app in production. Whenever you start a new build, it runs the command "),e("code",null,"nuxt build --analyze"),f(" and present the output data directly in DevTools for easy browsing and comparing.")],-1),Ue=[Pe,je],Ee={__name:"analyze-build",setup(k,{expose:v}){return v({frontmatter:{}}),(g,x)=>(o(),s("div",Re,Ue))}},Ge={flex:"~ col"},Le=["onClick"],Oe={flex:"~ gap-1 items-center wrap","w-full":"","text-sm":"",op60:""},He=e("div",{"i-carbon-time":""},null,-1),Ke=e("div",{"flex-auto":""},null,-1),Me=e("div",{"x-divider":""},null,-1),We={flex:"~ items-center justify-center wrap",p4:""},Ye={flex:"~ col gap-1","w-250":"",p4:""},Ze=e("h3",{class:"text-lg font-medium leading-6",mb2:""}," Start analyze build? ",-1),Je=e("p",{op50:""}," Enter the name of the build: ",-1),Qe=e("div",{my3:"","x-divider":""},null,-1),Xe=e("p",{op50:""}," The following command will be executed in your terminal: ",-1),qe={flex:"~ gap-3",mt2:"","justify-end":""},an=P({__name:"analyze-build",setup(k){const v=q(),$=ee(),g=ne(),x=te("analyze-build:slug",""),i=I(()=>$.value?.builds.find(l=>l.slug===x.value)??$.value?.builds[0]),h=V(!1),d=V(""),N=I(()=>$.value?.builds.some(l=>l.name===d.value.trim()));async function n(){d.value=await F.generateAnalyzeBuildName(),await v.start()&&(se("analyze-build:start"),C.value={name:d.value,processId:await F.startAnalyzeBuild(await E(),d.value)},h.value&&B())}const c=oe();function B(){C.value?.processId&&(c.value=C.value.processId,g.push("/modules/terminals"))}function T(l){return`${((l.endTime-l.startTime)/1e3).toFixed(1)}s`}return le(()=>[{id:"action:analyze-build: start",title:"Start a new analyze build",icon:"i-carbon-edge-node",action:n}]),(l,m)=>{const w=G,L=Fe,O=de,H=ie,K=ae,M=re,W=me,Y=_e,Z=ue,J=Ee,Q=pe;return o(),s(_,null,[u(H,{"left-size":30},{left:r(()=>[e("div",Ge,[(o(!0),s(_,null,j(t($)?.builds,a=>(o(),s(_,{key:a.slug},[e("button",{flex:"~ col gap1","hover:bg-active":"",p3:"",class:S(a.slug===t(i)?.slug?"text-primary bg-active":""),onClick:y=>x.value=a.slug},[e("code",null,p(a.name),1),e("div",Oe,[He,e("span",null,p(T(a)),1),Ke,e("span",null,p(t(U)(new Date(a.endTime))),1)])],10,Le),Me],64))),128)),e("div",We,[("processAnalyzeBuildInfo"in l?l.processAnalyzeBuildInfo:t(C))?(o(),z(w,{key:1,n:"primary",icon:"carbon-circle-dash animate-spin",onClick:m[1]||(m[1]=a=>B())},{default:r(()=>[f(" Building... ")]),_:1})):(o(),z(w,{key:0,n:"primary",icon:"carbon-edge-node",onClick:m[0]||(m[0]=a=>n())},{default:r(()=>[f(" Start a new build ")]),_:1}))])])]),right:r(()=>[t(i)?(o(),z(L,{key:0,current:t(i)},null,8,["current"])):(o(),z(O,{key:1}))]),_:1}),u(t(v),null,{default:r(({resolve:a})=>[u(Z,{"model-value":!0,onClose:y=>a(!1)},{default:r(()=>[e("div",Ye,[Ze,Je,u(K,{modelValue:t(d),"onUpdate:modelValue":m[2]||(m[2]=y=>R(d)?d.value=y:null),placeholder:"Build name"},null,8,["modelValue"]),t(N)?(o(),z(M,{key:0,"n-orange":""},{default:r(()=>[f(" A build with the same name already exists, continue would overrides the previous build result. ")]),_:1})):b("",!0),Qe,Xe,u(W,{code:`npx nuxi analyze --no-serve --name=${t(d)}`,lang:"bash",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),u(Y,{modelValue:t(h),"onUpdate:modelValue":m[3]||(m[3]=y=>R(h)?h.value=y:null),mt2:"",n:"primary"},{default:r(()=>[f(" Navigate to terminal ")]),_:1},8,["modelValue"]),e("div",qe,[u(w,{onClick:y=>a(!1)},{default:r(()=>[f(" Cancel ")]),_:2},1032,["onClick"]),u(w,{n:"solid primary",onClick:y=>a(!0)},{default:r(()=>[f(" Start ")]),_:2},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1}),u(Q,null,{default:r(()=>[u(J)]),_:1})],64)}}});export{an as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as p}from"./
|
|
1
|
+
import{_ as p}from"./Bm7GelXr.js";import{d as m,ab as _,m as r,F as s,n as f,o as n,k as o,t as h,h as d,p as k}from"./vTxNztlt.js";const g={mt2:"",grid:"~ cols-[max-content_1fr] gap-x-4","font-mono":""},x={"text-right":""},N={"ws-nowrap":""},y=m({__name:"StacktraceList",props:{stacktrace:{}},setup($){const i=_();function c(a){try{let t=new URL(a).pathname;return t.startsWith("/_nuxt/")&&(t=t.slice(6)),t.startsWith("/@id/virtual:nuxt:")?`#build/${t.split("/.nuxt/")[1]}`.replace(/\.m?js$/,""):t.includes("/@fs/")?`/${t.split("/@fs/")[1]}`:(i.value?.rootDir||"")+t}catch{return a}}return(a,t)=>{const l=p;return n(),r("div",g,[(n(!0),r(s,null,f(a.stacktrace,(e,u)=>(n(),r(s,{key:u},[o("div",x,h(e.functionName||"(anonymous)"),1),o("div",N,[e.fileName?(n(),d(l,{key:0,filepath:`${c(e.fileName)}:${e.lineNumber}:${e.columnNumber}`,subpath:""},null,8,["filepath"])):k("",!0)])],64))),128))])}}});export{y as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as b,r as h,bZ as n,aW as g,h as y,j as v,aw as l,aV as k,o as i,m as B,i as C,k as $,aa as w,f as o,p as V,_ as N}from"./
|
|
1
|
+
import{d as b,r as h,bZ as n,aW as g,h as y,j as v,aw as l,aV as k,o as i,m as B,i as C,k as $,aa as w,f as o,p as V,_ as N}from"./vTxNztlt.js";const _=["border"],x={relative:"","h-full":"","w-full":"","of-auto":""},E=b({__name:"NDrawer",props:{modelValue:{type:Boolean},top:{},left:{},autoClose:{type:Boolean},transition:{default:"right"}},emits:["close"],setup(m,{emit:f}){const e=m,c=f,a=h(),{height:d}=n(()=>e.top,void 0,{box:"border-box"}),s=typeof e.left=="string"&&e.left.startsWith("#")?document.querySelector(e.left)?.getBoundingClientRect().width:n(()=>e.left,void 0,{box:"border-box"}).width;g(a,()=>{e.modelValue&&e.autoClose&&c("close")},{ignore:["a","button","summary",'[role="dialog"]']});const u={right:{"enter-from-class":"transform translate-x-1/1","leave-to-class":"transform translate-x-1/1"},top:{"enter-from-class":"transform translate-y--1/1","leave-to-class":"transform translate-y--1/1"},bottom:{"enter-from-class":"transform translate-y-1/1","leave-to-class":"transform translate-y-1/1"}};return(t,r)=>{const p=N;return i(),y(k,l(u[t.transition],{"enter-active-class":"duration-200 ease-in","enter-to-class":"opacity-100","leave-active-class":"duration-200 ease-out","leave-from-class":"opacity-100"}),{default:v(()=>[t.modelValue?(i(),B("div",l({key:0,ref_key:"el",ref:a,border:`${t.transition==="right"?"l":t.transition==="bottom"?"t":"b"} base`,flex:"~ col gap-1",class:{"right-0":t.transition==="right"||t.transition==="bottom"},absolute:"","bottom-0":"","z-10":"","z-20":"","of-auto":"","text-sm":"","n-glass-effect":"",style:{top:t.transition==="bottom"?"auto":`${o(d)}px`,left:t.transition==="right"&&!o(s)?"auto":`${o(s)}px`}},t.$attrs),[C(p,{absolute:"","right-2":"","top-2":"","z-20":"","text-xl":"",icon:"carbon-close",border:!1,onClick:r[0]||(r[0]=z=>t.$emit("close"))}),$("div",x,[w(t.$slots,"default")])],16,_)):V("",!0)]),_:3},16)}}});export{E as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as I}from"./
|
|
1
|
+
import{_ as I}from"./DvifPl4v.js";import{d as O,a0 as R,a as N,w as T,o as s,m as t,F as f,n as k,aa as b,f as r,h as p,p as y,G as v,i as m,j as V,k as S,t as A,v as C,X as E,a6 as L,_ as z}from"./vTxNztlt.js";import{_ as G}from"./Bdw4ogYl.js";const K={p4:"",flex:"~ col gap-4"},M={key:1,ml2:"",flex:""},X=["value"],q={key:0,flex:"","gap-4":""},H=S("div",{"flex-auto":""},null,-1),Y=O({__name:"ServerRouteInputs",props:{modelValue:{},keys:{default:()=>[]},default:{default:()=>({})},disabled:{type:Boolean,default:!1}},setup(U,{emit:w}){const g=U,u=R(g,"modelValue",w,{passive:!0}),$=N(()=>[...g.keys,"active","key","value","type"]),B=N(()=>{const a={};for(const e of $.value)a[e]=g.default[e]||"";return a}),j=["string","number","boolean","file","date","time","datetime-local"];function D(a,e){const d=e.target;if(d.files&&d.files[0]){const i=d.files[0],c=new FileReader;c.readAsDataURL(i),c.onload=()=>{u.value[a].value=c.result}}}return T(()=>u,a=>{a.value.forEach(e=>{if(e.type==="number"&&typeof e.value!="number"){const d=Number.parseFloat(e.value);e.value=Number.isNaN(d)?0:d}else e.type==="boolean"&&typeof e.value!="boolean"?e.value=!0:e.type==="file"&&typeof e.value!="object"?e.value="":e.type==="date"&&typeof e.value=="string"&&!e.value.match(/^\d{4}-\d{2}-\d{2}$/)?e.value=new Date().toISOString().slice(0,10):e.type==="time"&&typeof e.value=="string"&&!e.value.match(/^\d{2}:\d{2}$/)?e.value=new Date().toISOString().slice(11,16):e.type==="datetime-local"&&typeof e.value=="string"&&!e.value.match(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/)?e.value=new Date().toISOString().slice(0,16):e.type==="string"&&(e.value=e.value.toString())})},{deep:!0,immediate:!0,flush:"sync"}),(a,e)=>{const d=I,i=E,c=G,F=L,_=z;return s(),t("div",K,[(s(!0),t(f,null,k(r(u),(l,h)=>(s(),t("div",{key:h,flex:"~ gap-2","justify-around":""},[b(a.$slots,"input",{item:l}),(s(!0),t(f,null,k(r($),n=>(s(),t(f,{key:n},[l.type!==null&&n==="active"?(s(),p(d,{key:0,modelValue:l[n],"onUpdate:modelValue":o=>l[n]=o,n:"sm primary",disabled:a.disabled},null,8,["modelValue","onUpdate:modelValue","disabled"])):y("",!0),l.type!==null&&n==="key"?(s(),p(i,{key:1,modelValue:l[n],"onUpdate:modelValue":o=>l[n]=o,placeholder:n,"flex-1":"","font-mono":"",n:"sm primary",disabled:a.disabled,class:v(a.disabled?"op50":"")},null,8,["modelValue","onUpdate:modelValue","placeholder","disabled","class"])):n==="value"?(s(),t(f,{key:2},[l.type==="file"?(s(),p(i,{key:0,type:"file",disabled:a.disabled,class:v(a.disabled?"op75":""),onChange:o=>D(h,o)},null,8,["disabled","class","onChange"])):l.type==="boolean"?(s(),t("div",M,[m(d,{modelValue:l.value,"onUpdate:modelValue":o=>l.value=o,placeholder:"Value",n:"green lg",disabled:a.disabled},null,8,["modelValue","onUpdate:modelValue","disabled"])])):(s(),p(i,{key:2,modelValue:l.value,"onUpdate:modelValue":o=>l.value=o,type:l.type,placeholder:"Value","flex-1":"","font-mono":"",n:"sm primary",disabled:a.disabled,class:v(a.disabled?"op75":"")},null,8,["modelValue","onUpdate:modelValue","type","disabled","class"]))],64)):n==="type"?(s(),p(c,{key:3,modelValue:l.type,"onUpdate:modelValue":o=>l.type=o,n:"sm green",class:v(a.disabled?"op75":""),disabled:a.disabled},{default:V(()=>[(s(),t(f,null,k(j,o=>S("option",{key:o,value:o},A(o),9,X)),64))]),_:2},1032,["modelValue","onUpdate:modelValue","class","disabled"])):y("",!0)],64))),128)),b(a.$slots,"input-actions",{},()=>[m(_,{n:"red",disabled:a.disabled,class:v(a.disabled?"op0!":""),onClick:n=>r(u).splice(h,1)},{default:V(()=>[m(F,{icon:"carbon:trash-can"})]),_:2},1032,["disabled","class","onClick"])])]))),128)),a.disabled?y("",!0):(s(),t("div",q,[b(a.$slots,"actions",{params:r(u)},()=>[m(_,{icon:"carbon-add",n:"sm primary",my1:"","px-3":"",onClick:e[0]||(e[0]=l=>r(u).push({...r(B)}))},{default:V(()=>[C(" Add ")]),_:1}),H,r(u).length?(s(),p(_,{key:0,icon:"carbon-trash-can",n:"sm red",my1:"","px-3":"",onClick:e[1]||(e[1]=l=>u.value=[])},{default:V(()=>[C(" Remove All ")]),_:1})):y("",!0)])])),b(a.$slots,"default")])}}});export{Y as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as C}from"./
|
|
1
|
+
import{_ as C}from"./ifvc2XRc.js";import{d as h,bl as S,e as x,a as B,aB as w,o as n,m as s,k as a,F as i,n as N,G as u,f as o,t as $,i as _,j as m,v as f,h as V,p,_ as T}from"./vTxNztlt.js";const D={key:0,relative:"","n-code-block":""},E={flex:"~ wrap","w-full":""},F=["onClick"],L=a("div",{border:"b base","flex-auto":""},null,-1),j={flex:"~ gap-2",px3:"",pb3:"",n:"sm primary"},q=h({__name:"CodeSnippets",props:{codeSnippets:{},eventType:{}},setup(v){const c=v,e=S(c.codeSnippets[0]),b=x(),k=B(()=>e.value?.lang||"text");return w(()=>{c.codeSnippets.includes(e.value)||(e.value=c.codeSnippets[0])}),(l,r)=>{const y=C,d=T;return l.codeSnippets.length?(n(),s("div",D,[a("div",E,[(n(!0),s(i,null,N(l.codeSnippets,(t,g)=>(n(),s("button",{key:g,px4:"",py2:"",border:"r base",hover:"bg-active",class:u(t===o(e)?"":"border-b"),onClick:z=>e.value=t},[a("div",{class:u(t===o(e)?"":"op30"),"font-mono":""},$(t.name),3)],10,F))),128)),L]),o(e)?(n(),s(i,{key:0},[_(y,{code:o(e).code,lang:o(k),lines:!1,"w-full":"","of-auto":"",p3:""},null,8,["code","lang"]),a("div",j,[_(d,{icon:"carbon-copy",onClick:r[0]||(r[0]=t=>o(b)(o(e).code,l.eventType||`code-snippet-${o(e).name}`))},{default:m(()=>[f(" Copy ")]),_:1}),o(e)?.docs?(n(),V(d,{key:0,to:o(e).docs,target:"_blank",icon:"carbon-catalog"},{default:m(()=>[f(" Docs ")]),_:1},8,["to"])):p("",!0)])],64)):p("",!0)])):p("",!0)}}});export{q as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as i,a0 as c,r as p,aW as u,o as m,m as f,aa as n,i as v,j as _,v as b,f as a,k,G as V,_ as B}from"./
|
|
1
|
+
import{d as i,a0 as c,r as p,aW as u,o as m,m as f,aa as n,i as v,j as _,v as b,f as a,k,G as V,_ as B}from"./vTxNztlt.js";const $=i({__name:"NDropdown",props:{modelValue:{type:Boolean},direction:{default:"start"}},setup(r,{emit:l}){const e=c(r,"modelValue",l,{passive:!0}),s=p();return u(s,()=>{e.value=!1}),(o,t)=>{const d=B;return m(),f("div",{ref_key:"el",ref:s,class:"relative"},[n(o.$slots,"trigger",{enabled:a(e),click:()=>e.value=!a(e)},()=>[v(d,{onClick:t[0]||(t[0]=g=>e.value=!a(e))},{default:_(()=>[b(" Dropdown ")]),_:1})]),k("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",o.direction==="end"?"right-0":"left-0"]])},[n(o.$slots,"default")],2)],512)}}});export{$ as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as t,o,m as s,G as a,p as n,aa as r,k as l,t as i}from"./
|
|
1
|
+
import{d as t,o,m as s,G as a,p as n,aa as r,k as l,t as i}from"./vTxNztlt.js";const c={flex:"~ gap-3","items-center":""},u=t({__name:"NIconTitle",props:{icon:{},text:{}},setup(p){return(e,m)=>(o(),s("div",c,[e.icon?(o(),s("div",{key:0,class:a(e.icon)},null,2)):n("",!0),r(e.$slots,"default",{},()=>[l("div",null,i(e.text),1)])]))}});export{u as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as r,u as s,a2 as c,I as i,o as p,h as _,_ as u}from"./
|
|
1
|
+
import{d as r,u as s,a2 as c,I as i,o as p,h as _,_ as u}from"./vTxNztlt.js";const f=r({__name:"DataSchemaButton",props:{getter:{type:Function}},setup(l){const t=s();return(n,e)=>{const o=u,a=c("tooltip");return i((p(),_(o,{title:"Generate Data Schema",icon:"carbon:container-services",border:!1,onClick:e[0]||(e[0]=m=>t.value=n.getter())},null,512)),[[a,"Generate Data Schema"]])}}});export{f as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as a,s as o,o as s,m as i,k as e,t as r,y as u,z as c}from"./
|
|
1
|
+
import{q as a,s as o,o as s,m as i,k as e,t as r,y as u,z as c}from"./vTxNztlt.js";const l=t=>(u("data-v-051f8ac4"),t=t(),c(),t),d={class:"font-sans antialiased bg-white dark:bg-black text-black dark:text-white grid min-h-screen place-content-center overflow-hidden"},p=l(()=>e("div",{class:"fixed -bottom-1/2 left-0 right-0 h-1/2 spotlight"},null,-1)),h={class:"max-w-520px text-center"},g=["textContent"],b=["textContent"],f={__name:"error-500",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},statusCode:{type:Number,default:500},statusMessage:{type:String,default:"Server error"},description:{type:String,default:"This page is temporarily unavailable."}},setup(t){const n=t;return o({title:`${n.statusCode} - ${n.statusMessage} | ${n.appName}`,script:[],style:[{children:'*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:var(--un-default-border-color, #e5e7eb)}:before,:after{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}h1{font-size:inherit;font-weight:inherit}h1,p{margin:0}*,:before,:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }'}]}),(m,x)=>(s(),i("div",d,[p,e("div",h,[e("h1",{class:"text-8xl sm:text-10xl font-medium mb-8",textContent:r(t.statusCode)},null,8,g),e("p",{class:"text-xl px-8 sm:px-0 sm:text-4xl font-light mb-16 leading-tight",textContent:r(t.description)},null,8,b)])]))}},k=a(f,[["__scopeId","data-v-051f8ac4"]]);export{k as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as K}from"./
|
|
1
|
+
import{_ as K}from"./CVTYawdK.js";import{_ as Q}from"./LlSIX508.js";import{d as X,al as Z,c1 as ee,aF as le,aB as E,m,i as n,k as e,F as v,n as N,f as t,j as a,L as oe,_ as ne,ar as te,o as r,h as j,t as y,G as A,p as F,v as U,l as c,C as D,B as ae,bY as se,c2 as ie}from"./vTxNztlt.js";import{_ as ue}from"./Bdw4ogYl.js";import{_ as de}from"./DvifPl4v.js";import{_ as re}from"./Dh5Afz2J.js";const ce={px8:"",py6:""},pe={grid:"~ md:cols-2 gap-x-10 gap-y-3","max-w-300":""},me={flex:"~ col gap-2"},_e=e("h3",{"text-lg":""}," Tabs ",-1),fe={flex:"~ gap-2","flex-auto":"","items-center":"","justify-start":""},ve={capitalize:"",op75:""},ge=e("div",{"mx--1":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1),he=e("div",{"flex-auto":""},null,-1),xe={flex:"~ col gap-2"},be=e("h3",{"text-lg":""}," Appearance ",-1),ye=e("div",{"i-carbon-sun":"","dark:i-carbon-moon":"","translate-y--1px":""},null,-1),ke=e("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1),Ve=e("p",null,"UI Scale",-1),Ce=["value"],we=e("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1),Te=e("span",null," Expand Sidebar ",-1),Se=e("span",null," Scrollable Sidebar ",-1),Ne=e("h3",{mt2:"","text-lg":""}," Features ",-1),Ue=e("span",null,"Close DevTools when clicking outside",-1),Oe=e("span",null,"Show help buttons",-1),$e=e("span",null,"Always show the floating panel",-1),Ie=e("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1),Be=e("p",null,"Minimize floating panel on inactive",-1),De=["value"],ze=e("h3",{mt2:"","text-lg":""}," Feedback ",-1),Le=e("span",null,"Send anonymous statistics, help us improving DevTools",-1),Ee=e("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1),je={flex:"~ gap-2"},Ae=e("div",{"i-carbon-data-enrichment":""},null,-1),Fe=e("div",{"i-carbon-debug":""},null,-1),Pe=e("h3",{mt2:"","text-lg":""}," Debug ",-1),Me={flex:"~ gap-2"},Re=e("div",{"i-carbon-breaking-change":""},null,-1),Qe=X({__name:"settings",setup(He){const{interactionCloseOnOutsideClick:k,showPanel:O,showHelpButtons:$,scale:I,hiddenTabs:g,pinnedTabs:u,hiddenTabCategories:h,minimizePanelInactive:V,sidebarExpanded:C,sidebarScrollable:B}=ae(),x=Z(),P=[["Tiny",12/15],["Small",14/15],["Normal",1],["Large",16/15],["Huge",18/15]],M=[["Always",0],["1s",1e3],["2s",2e3],["5s",5e3],["10s",1e4],["Never",-1]],R=ee(le());function H(s,o){o?g.value=g.value.filter(d=>d!==s):g.value.push(s)}function G(s,o){o?h.value=h.value.filter(d=>d!==s):h.value.push(s)}function W(s){u.value.includes(s)?u.value=u.value.filter(o=>o!==s):u.value.push(s)}function z(s,o){const d=u.value.indexOf(s);if(d===-1)return;const _=d+o;if(_<0||_>=u.value.length)return;const b=[...u.value];b.splice(d,1),b.splice(_,0,s),u.value=b}async function Y(){confirm("Are you sure you to reset all local settings & state? The app will reload.")&&(Object.keys(localStorage).forEach(s=>{s.startsWith("nuxt-devtools-")&&localStorage.removeItem(s)}),await oe.clearOptions(),x.value?.app?.reload?.(),window.location.reload())}return E(()=>{x.value&&(x.value.app.frameState.value.closeOnOutsideClick=k.value)}),E(()=>{x.value&&(x.value.app.frameState.value.minimizePanelInactive=V.value)}),(s,o)=>{const d=K,_=Q,b=se,p=ne,w=te,q=ie,L=ue,f=de,J=re;return r(),m("div",ce,[n(d,{class:"mb-5 text-xl op75",icon:"i-carbon-settings-adjust",text:"DevTools Settings"}),e("div",pe,[e("div",me,[_e,(r(!0),m(v,null,N(t(R),([l,T])=>(r(),m(v,{key:l},[T.length?(r(),j(w,{key:0,p3:"",flex:"~ col gap-1",class:A(t(h).includes(l)?"op50 grayscale":"")},{default:a(()=>[n(_,{flex:"~ row-reverse",py1:"",pl2:"",pr1:"","n-lime":"","model-value":!t(h).includes(l),"onUpdate:modelValue":i=>G(l,i)},{default:a(()=>[e("div",fe,[e("span",ve,y(l),1)])]),_:2},1032,["model-value","onUpdate:modelValue"]),ge,(r(!0),m(v,null,N(T,i=>(r(),j(_,{key:i.name,flex:"~ row-reverse",py1:"",pl2:"",pr1:"","n-primary":"","model-value":!t(g).includes(i.name),"onUpdate:modelValue":S=>H(i.name,S)},{default:a(()=>[e("div",{flex:"~ gap-2","flex-auto":"","items-center":"","justify-start":"","pr-4":"",class:A(t(g).includes(i.name)?"op25":"")},[n(b,{"text-xl":"",icon:i.icon,title:i.title},null,8,["icon","title"]),e("span",null,y(i.title),1),he,t(u).includes(i.name)?(r(),m(v,{key:0},[n(p,{icon:"i-carbon-caret-up",disabled:t(u).indexOf(i.name)===0,border:!1,onClick:S=>z(i.name,-1)},null,8,["disabled","onClick"]),n(p,{icon:"i-carbon-caret-down",disabled:t(u).indexOf(i.name)===t(u).length-1,border:!1,onClick:S=>z(i.name,1)},null,8,["disabled","onClick"])],64)):F("",!0),n(p,{icon:t(u).includes(i.name)?" i-carbon-pin-filled rotate--45":" i-carbon-pin op50",border:!1,onClick:S=>W(i.name)},null,8,["icon","onClick"])],2)]),_:2},1032,["model-value","onUpdate:modelValue"]))),128))]),_:2},1032,["class"])):F("",!0)],64))),128))]),e("div",xe,[be,n(w,{p4:"",flex:"~ col gap-2"},{default:a(()=>[e("div",null,[n(q,null,{default:a(({toggle:l,isDark:T})=>[n(p,{n:"primary",onClick:l},{default:a(()=>[ye,U(" "+y(T.value?"Dark":"Light"),1)]),_:2},1032,["onClick"])]),_:1})]),ke,Ve,n(L,{modelValue:t(I),"onUpdate:modelValue":o[0]||(o[0]=l=>c(I)?I.value=l:null),n:"primary"},{default:a(()=>[(r(),m(v,null,N(P,l=>e("option",{key:l[0],value:l[1]},y(l[0]),9,Ce)),64))]),_:1},8,["modelValue"]),we,n(f,{modelValue:t(C),"onUpdate:modelValue":o[1]||(o[1]=l=>c(C)?C.value=l:null),"n-primary":""},{default:a(()=>[Te]),_:1},8,["modelValue"]),n(f,{modelValue:t(B),"onUpdate:modelValue":o[2]||(o[2]=l=>c(B)?B.value=l:null),disabled:t(C),"n-primary":""},{default:a(()=>[Se]),_:1},8,["modelValue","disabled"])]),_:1}),Ne,n(w,{p4:"",flex:"~ col gap-2"},{default:a(()=>[n(f,{modelValue:t(k),"onUpdate:modelValue":o[3]||(o[3]=l=>c(k)?k.value=l:null),"n-primary":""},{default:a(()=>[Ue]),_:1},8,["modelValue"]),n(f,{modelValue:t($),"onUpdate:modelValue":o[4]||(o[4]=l=>c($)?$.value=l:null),"n-primary":""},{default:a(()=>[Oe]),_:1},8,["modelValue"]),n(f,{modelValue:t(O),"onUpdate:modelValue":o[5]||(o[5]=l=>c(O)?O.value=l:null),"n-primary":""},{default:a(()=>[$e]),_:1},8,["modelValue"]),Ie,Be,n(L,{modelValue:t(V),"onUpdate:modelValue":o[6]||(o[6]=l=>c(V)?V.value=l:null),modelModifiers:{number:!0},"n-primary":""},{default:a(()=>[(r(),m(v,null,N(M,l=>e("option",{key:l[0],value:l[1]},y(l[0]),9,De)),64))]),_:1},8,["modelValue"])]),_:1}),ze,n(w,{p4:"",flex:"~ col gap-2"},{default:a(()=>[n(f,{modelValue:t(D),"onUpdate:modelValue":o[7]||(o[7]=l=>c(D)?D.value=l:null),"n-primary":""},{default:a(()=>[Le,n(J,{href:"https://github.com/nuxt/devtools#anonymous-usage-analytics",target:"_blank",ml1:"",op50:"",textContent:"Learn more"})]),_:1},8,["modelValue"]),Ee,e("div",je,[n(p,{n:"blue",to:"https://github.com/nuxt/devtools/discussions/29",target:"_blank"},{default:a(()=>[Ae,U(" Ideas & Suggestions ")]),_:1}),n(p,{n:"orange",to:"https://github.com/nuxt/devtools/issues",target:"_blank"},{default:a(()=>[Fe,U(" Bug Reports ")]),_:1})])]),_:1}),Pe,e("div",Me,[n(p,{n:"orange",onClick:Y},{default:a(()=>[Re,U(" Reset Local Settings & State ")]),_:1})])])])])}}});export{Qe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as e,m as n,o}from"./
|
|
1
|
+
import{d as e,m as n,o}from"./vTxNztlt.js";const t={"h-screen":"","w-screen":"","bg-black":""},r=e({__name:"__blank",setup(c){return(s,_)=>(o(),n("div",t))}});export{r as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as S}from"./
|
|
1
|
+
import{_ as S}from"./Bm7GelXr.js";import{_ as D}from"./95vJRnOC.js";import{_ as C}from"./ElxmrMfl.js";import{d as v,ab as B,a as x,bg as V,o as n,m,k as t,t as P,i as l,f,h as u,p as d,as as F,aa as N,a6 as H,q as I,j as g,v as y,bi as E,al as W,F as k,n as j,G as L}from"./vTxNztlt.js";import{_ as M}from"./TuJR20B4.js";import{_ as q}from"./DP4rCJej.js";import"./CVTYawdK.js";const z={flex:"~ gap2","items-center":""},A={w8:"","text-right":"","text-sm":"",op25:""},G={key:0,"flex-auto":"","text-right":""},R=v({__name:"PluginItem",props:{plugin:{},index:{}},setup(p){const e=p,a=B(),r=x(()=>V(e.plugin.src,a.value?.rootDir||"").path);return(i,c)=>{const _=S,o=D,s=C;return n(),m("div",z,[t("div",A,P(i.index),1),l(_,{filepath:e.plugin.src,subpath:!0},null,8,["filepath"]),t("div",null,[f(r).startsWith("#")?(n(),u(o,{key:0,n:"rose",textContent:"virtual"})):f(r).startsWith(".")?d("",!0):(n(),u(o,{key:1,n:"gray",textContent:"module"})),i.plugin.mode==="server"?(n(),u(o,{key:2,n:"teal",textContent:"server"})):d("",!0),i.plugin.mode==="client"?(n(),u(o,{key:3,n:"orange",textContent:"client"})):d("",!0)]),i.plugin.metric?.duration!=null?(n(),m("div",G,[l(s,{duration:i.plugin.metric?.duration,factor:10},null,8,["duration"])])):d("",!0)])}}}),Y={class:"n-tip n-tip-base",flex:"~ col items-start","mx--4":"",px4:"",py4:""},J={flex:"~ items-center gap-1","font-bold":""},K=v({__name:"HelpTip",props:{title:{},icon:{}},setup(p){return(e,a)=>{const r=H,i=F("ContentSlot");return n(),m("div",Y,[t("div",J,[e.icon?(n(),u(r,{key:0,icon:e.icon,class:"n-tip-icon"},null,8,["icon"])):d("",!0),t("div",null,P(e.title),1)]),t("div",null,[N(e.$slots,"default",{},()=>[l(i,{use:e.$slots.default,unwrap:"p"},null,8,["use"])])])])}}}),O={};function Q(p,e){const a=K;return n(),u(a,{title:"Performance Tip",icon:"carbon-meter",n:"lime6 dark:lime5"},{default:g(()=>[N(p.$slots,"default")]),_:3})}const U=I(O,[["render",Q]]),X={class:"markdown-body"},Z=t("h1",null,"Plugins",-1),tt=t("p",null,[y("Nuxt plugins allow you to extend the functionality of the Nuxt runtime and the Vue instance. You can add plugins to the "),t("code",null,"plugins/"),y(" directory and they will be automatically imported and registered.")],-1),et=t("p",null,[t("a",{href:"https://nuxt.com/docs/guide/directory-structure/plugins",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1),nt={__name:"plugins",setup(p,{expose:e}){return e({frontmatter:{}}),(r,i)=>{const c=U;return n(),m("div",X,[Z,tt,l(c,null,{default:g(()=>[y(" Plugins always run before your application's runtime. The loading time of each plugin will directly impact your application's initial loading time. ")]),_:1}),et])}}},ot={pt4:""},st={class:"text-sm",flex:"~ gap-1 items-center justify-start","mt-3":""},it=t("div",{"i-carbon-timer":"","text-lg":"",op75:""},null,-1),at=t("span",{op50:""},"Total execution time:",-1),dt=v({__name:"plugins",setup(p){const e=E(),a=W(),r=x(()=>{const c=e.value?.plugins||[],_=a.value?.metrics.clientPlugins()||[];return c.map(o=>{const s=typeof o=="string"?{src:o}:o;return{...s,metric:_.find(h=>h.src===s.src||h.src.startsWith(s.src))}})}),i=x(()=>{const c=a.value?.metrics.clientPlugins()||[],_=Math.min(...c.map(s=>s.start));return Math.max(...c.map(s=>s.end))-_});return(c,_)=>{const o=R,s=C,h=M,T=nt,w=q;return n(),m(k,null,[l(h,{icon:"carbon-plug",text:"Plugins",description:`Total plugins: ${f(r).length}`},{default:g(()=>[t("div",ot,[(n(!0),m(k,null,j(f(r),($,b)=>(n(),u(o,{key:$.src,plugin:$,index:b+1,"ml--4":"","border-base":"",py2:"",class:L(b?"border-t":"")},null,8,["plugin","index","class"]))),128)),t("div",st,[it,at,l(s,{duration:f(i),factor:10},null,8,["duration"])])])]),_:1},8,["description"]),l(w,null,{default:g(()=>[l(T)]),_:1})],64)}}});export{dt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as F}from"./
|
|
1
|
+
import{_ as F}from"./95vJRnOC.js";import{_ as L}from"./ifvc2XRc.js";import{_ as A}from"./DvifPl4v.js";import{d as E,P as G,bd as W,r as V,be as Y,N as Z,R as q,o as m,m as g,aa as z,f as a,t as $,p as w,F as B,i as s,h as H,j as u,k as h,l as M,v as p,V as J,Y as K,_ as O,Z as Q,bf as X,ab as ee,a as te,au as ae,av as ne,bg as se,bc as oe}from"./vTxNztlt.js";const le={key:0},re={p4:"",flex:"~ col gap-1"},ue={class:"text-lg font-medium leading-6"},ie=h("p",{op50:""}," The following command will be executed in your terminal: ",-1),ce={flex:"~ gap-3",mt2:"","justify-end":""},ve=E({__name:"NpmVersionCheck",props:{packageName:{},options:{},showVersion:{type:Boolean,default:!0}},setup(l){const t=l,e=G(),{info:n,update:i,state:y,processId:k,restart:d}=W(t.packageName,t.options),f=V(!0),_=V(!0),R=Y(),N=Z(),U=q();async function b(){const r=await i(async o=>N.start(o));J("npm:update",{packageName:t.packageName,oldVersion:n.value?.current}),r&&_.value&&R.value.push({id:r,message:`${t.packageName} has been updated. Do you want to restart the Nuxt server now?`}),r&&f.value&&(U.value=r,e.push("/modules/terminals"))}return(r,o)=>{const C=F,S=L,x=A,T=K,P=O,I=Q;return m(),g(B,null,[z(r.$slots,"default",{id:a(k),info:a(n),update:b,state:a(y),restart:a(d)},()=>[a(n)&&r.showVersion?(m(),g("code",le,$(`v${a(n).current}`),1)):w("",!0),a(n)?.latest?(m(),g(B,{key:1},[a(n).needsUpdate?(m(),g("button",{key:0,onClick:o[0]||(o[0]=v=>b())},[s(C,{n:"green",title:"updates available",textContent:"updates available"})])):(m(),H(C,{key:1,n:"gray",title:"latest",textContent:"latest"}))],64)):w("",!0)]),s(a(N),null,{default:u(({resolve:v,args:j})=>[s(I,{"model-value":!0,onClose:c=>v(!1)},{default:u(()=>[h("div",re,[h("h3",ue," Update "+$(t.packageName)+"? ",1),ie,s(S,{code:j[0],lang:"bash",my3:"",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),s(x,{modelValue:a(f),"onUpdate:modelValue":o[1]||(o[1]=c=>M(f)?f.value=c:null),n:"primary"},{default:u(()=>[p(" Navigate to terminal ")]),_:1},8,["modelValue"]),s(x,{modelValue:a(_),"onUpdate:modelValue":o[2]||(o[2]=c=>M(_)?_.value=c:null),n:"primary"},{default:u(()=>[p(" Restart Nuxt server after update ")]),_:1},8,["modelValue"]),h("div",ce,[s(T,{n:"sm amber","flex-auto":"",icon:"i-carbon-data-backup"},{default:u(()=>[p(" Please make sure to backup your project first. ")]),_:1}),s(P,{onClick:c=>v(!1)},{default:u(()=>[p(" Cancel ")]),_:2},1032,["onClick"]),s(P,{n:"solid primary",onClick:c=>v(!0)},{default:u(()=>[p(" Update ")]),_:2},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1})],64)}}}),D=["pages","meta","components","imports","nuxt-config-schema","@nuxt/devtools","@nuxt/telemetry"];function de(){return oe("getModulesList",async()=>(await $fetch("https://api.nuxt.com/modules?version=3")).modules.filter(t=>!D.includes(t.npm)&&t.compatibility.nuxt.includes("^3")))}function ge(){return X("installed-modules",()=>{const l=ee(),t=de();return te(()=>(l.value?._installedModules||[]).map(e=>{if(!e.entryPath)return;const n=!!(e.entryPath&&ae(e.entryPath)),i=e.meta?.name?e.meta?.name:e.entryPath?n?ne(e.entryPath):l.value?.rootDir?se(e.entryPath,l.value?.rootDir).path:void 0:void 0,y=!!l.value?.modules?.includes(i),k=t.value?.find(d=>d.npm===i)||t.value?.find(d=>d.name===i);return{name:i,isPackageModule:n,isUninstallable:y,info:k,...e}}).filter(e=>e&&(!e.name||!D.includes(e.name))))})}export{ve as _,de as a,ge as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as Ee,r as ke,bR as Pe,aq as Ie,a1 as He,L as fe,M as ve,o as ee,m as he,k as oe,i as Re,f as te,h as ce,p as me,t as ge,F as xe,_ as Ae,bU as Fe,R as We,a as Ue,aB as Ne,n as $e,G as Le,bh as je,v as De,a6 as ze,j as Ke,aI as qe}from"./
|
|
1
|
+
import{d as Ee,r as ke,bR as Pe,aq as Ie,a1 as He,L as fe,M as ve,o as ee,m as he,k as oe,i as Re,f as te,h as ce,p as me,t as ge,F as xe,_ as Ae,bU as Fe,R as We,a as Ue,aB as Ne,n as $e,G as Le,bh as je,v as De,a6 as ze,j as Ke,aI as qe}from"./vTxNztlt.js";var Be={exports:{}};(function(ne,Y){(function(J,G){ne.exports=G()})(self,()=>(()=>{var J={4567:function(P,r,o){var c=this&&this.__decorate||function(i,a,l,v){var m,h=arguments.length,p=h<3?a:v===null?v=Object.getOwnPropertyDescriptor(a,l):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(i,a,l,v);else for(var b=i.length-1;b>=0;b--)(m=i[b])&&(p=(h<3?m(p):h>3?m(a,l,p):m(a,l))||p);return h>3&&p&&Object.defineProperty(a,l,p),p},u=this&&this.__param||function(i,a){return function(l,v){a(l,v,i)}};Object.defineProperty(r,"__esModule",{value:!0}),r.AccessibilityManager=void 0;const n=o(9042),d=o(6114),f=o(9924),g=o(844),_=o(5596),e=o(4725),s=o(3656);let t=r.AccessibilityManager=class extends g.Disposable{constructor(i,a){super(),this._terminal=i,this._renderService=a,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=document.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=document.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let l=0;l<this._terminal.rows;l++)this._rowElements[l]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[l]);if(this._topBoundaryFocusListener=l=>this._handleBoundaryFocus(l,0),this._bottomBoundaryFocusListener=l=>this._handleBoundaryFocus(l,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=document.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new f.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize(l=>this._handleResize(l.rows))),this.register(this._terminal.onRender(l=>this._refreshRows(l.start,l.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(l=>this._handleChar(l))),this.register(this._terminal.onLineFeed(()=>this._handleChar(`
|
|
2
2
|
`))),this.register(this._terminal.onA11yTab(l=>this._handleTab(l))),this.register(this._terminal.onKey(l=>this._handleKey(l.key))),this.register(this._terminal.onBlur(()=>this._clearLiveRegion())),this.register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this._screenDprMonitor=new _.ScreenDprMonitor(window),this.register(this._screenDprMonitor),this._screenDprMonitor.setListener(()=>this._refreshRowsDimensions()),this.register((0,s.addDisposableDomListener)(window,"resize",()=>this._refreshRowsDimensions())),this._refreshRows(),this.register((0,g.toDisposable)(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(i){for(let a=0;a<i;a++)this._handleChar(" ")}_handleChar(i){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==i&&(this._charsToAnnounce+=i):this._charsToAnnounce+=i,i===`
|
|
3
3
|
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=n.tooMuchOutput)),d.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(()=>{this._accessibilityContainer.appendChild(this._liveRegion)},0))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0,d.isMac&&this._liveRegion.remove()}_handleKey(i){this._clearLiveRegion(),/\p{Control}/u.test(i)||this._charsToConsume.push(i)}_refreshRows(i,a){this._liveRegionDebouncer.refresh(i,a,this._terminal.rows)}_renderRows(i,a){const l=this._terminal.buffer,v=l.lines.length.toString();for(let m=i;m<=a;m++){const h=l.translateBufferLineToString(l.ydisp+m,!0),p=(l.ydisp+m+1).toString(),b=this._rowElements[m];b&&(h.length===0?b.innerText=" ":b.textContent=h,b.setAttribute("aria-posinset",p),b.setAttribute("aria-setsize",v))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(i,a){const l=i.target,v=this._rowElements[a===0?1:this._rowElements.length-2];if(l.getAttribute("aria-posinset")===(a===0?"1":`${this._terminal.buffer.lines.length}`)||i.relatedTarget!==v)return;let m,h;if(a===0?(m=l,h=this._rowElements.pop(),this._rowContainer.removeChild(h)):(m=this._rowElements.shift(),h=l,this._rowContainer.removeChild(m)),m.removeEventListener("focus",this._topBoundaryFocusListener),h.removeEventListener("focus",this._bottomBoundaryFocusListener),a===0){const p=this._createAccessibilityTreeNode();this._rowElements.unshift(p),this._rowContainer.insertAdjacentElement("afterbegin",p)}else{const p=this._createAccessibilityTreeNode();this._rowElements.push(p),this._rowContainer.appendChild(p)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(a===0?-1:1),this._rowElements[a===0?1:this._rowElements.length-2].focus(),i.preventDefault(),i.stopImmediatePropagation()}_handleResize(i){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let a=this._rowContainer.children.length;a<this._terminal.rows;a++)this._rowElements[a]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[a]);for(;this._rowElements.length>i;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const i=document.createElement("div");return i.setAttribute("role","listitem"),i.tabIndex=-1,this._refreshRowDimensions(i),i}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let i=0;i<this._terminal.rows;i++)this._refreshRowDimensions(this._rowElements[i])}}_refreshRowDimensions(i){i.style.height=`${this._renderService.dimensions.css.cell.height}px`}};r.AccessibilityManager=t=c([u(1,e.IRenderService)],t)},3614:(P,r)=>{function o(d){return d.replace(/\r?\n/g,"\r")}function c(d,f){return f?"\x1B[200~"+d+"\x1B[201~":d}function u(d,f,g,_){d=c(d=o(d),g.decPrivateModes.bracketedPasteMode&&_.rawOptions.ignoreBracketedPasteMode!==!0),g.triggerDataEvent(d,!0),f.value=""}function n(d,f,g){const _=g.getBoundingClientRect(),e=d.clientX-_.left-10,s=d.clientY-_.top-10;f.style.width="20px",f.style.height="20px",f.style.left=`${e}px`,f.style.top=`${s}px`,f.style.zIndex="1000",f.focus()}Object.defineProperty(r,"__esModule",{value:!0}),r.rightClickHandler=r.moveTextAreaUnderMouseCursor=r.paste=r.handlePasteEvent=r.copyHandler=r.bracketTextForPaste=r.prepareTextForTerminal=void 0,r.prepareTextForTerminal=o,r.bracketTextForPaste=c,r.copyHandler=function(d,f){d.clipboardData&&d.clipboardData.setData("text/plain",f.selectionText),d.preventDefault()},r.handlePasteEvent=function(d,f,g,_){d.stopPropagation(),d.clipboardData&&u(d.clipboardData.getData("text/plain"),f,g,_)},r.paste=u,r.moveTextAreaUnderMouseCursor=n,r.rightClickHandler=function(d,f,g,_,e){n(d,f,g),e&&_.rightClickSelect(d),f.value=_.selectionText,f.select()}},7239:(P,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ColorContrastCache=void 0;const c=o(1505);r.ColorContrastCache=class{constructor(){this._color=new c.TwoKeyMap,this._css=new c.TwoKeyMap}setCss(u,n,d){this._css.set(u,n,d)}getCss(u,n){return this._css.get(u,n)}setColor(u,n,d){this._color.set(u,n,d)}getColor(u,n){return this._color.get(u,n)}clear(){this._color.clear(),this._css.clear()}}},3656:(P,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.addDisposableDomListener=void 0,r.addDisposableDomListener=function(o,c,u,n){o.addEventListener(c,u,n);let d=!1;return{dispose:()=>{d||(d=!0,o.removeEventListener(c,u,n))}}}},6465:function(P,r,o){var c=this&&this.__decorate||function(e,s,t,i){var a,l=arguments.length,v=l<3?s:i===null?i=Object.getOwnPropertyDescriptor(s,t):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(e,s,t,i);else for(var m=e.length-1;m>=0;m--)(a=e[m])&&(v=(l<3?a(v):l>3?a(s,t,v):a(s,t))||v);return l>3&&v&&Object.defineProperty(s,t,v),v},u=this&&this.__param||function(e,s){return function(t,i){s(t,i,e)}};Object.defineProperty(r,"__esModule",{value:!0}),r.Linkifier2=void 0;const n=o(3656),d=o(8460),f=o(844),g=o(2585);let _=r.Linkifier2=class extends f.Disposable{get currentLink(){return this._currentLink}constructor(e){super(),this._bufferService=e,this._linkProviders=[],this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new d.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new d.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,f.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,f.toDisposable)(()=>{this._lastMouseEvent=void 0})),this.register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0}))}registerLinkProvider(e){return this._linkProviders.push(e),{dispose:()=>{const s=this._linkProviders.indexOf(e);s!==-1&&this._linkProviders.splice(s,1)}}}attachToDom(e,s,t){this._element=e,this._mouseService=s,this._renderService=t,this.register((0,n.addDisposableDomListener)(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this.register((0,n.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,n.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,n.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(e){if(this._lastMouseEvent=e,!this._element||!this._mouseService)return;const s=this._positionFromMouseEvent(e,this._element,this._mouseService);if(!s)return;this._isMouseOut=!1;const t=e.composedPath();for(let i=0;i<t.length;i++){const a=t[i];if(a.classList.contains("xterm"))break;if(a.classList.contains("xterm-hover"))return}this._lastBufferCell&&s.x===this._lastBufferCell.x&&s.y===this._lastBufferCell.y||(this._handleHover(s),this._lastBufferCell=s)}_handleHover(e){if(this._activeLine!==e.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(e,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,e)||(this._clearCurrentLink(),this._askForLink(e,!0))}_askForLink(e,s){var t,i;this._activeProviderReplies&&s||((t=this._activeProviderReplies)===null||t===void 0||t.forEach(l=>{l?.forEach(v=>{v.link.dispose&&v.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=e.y);let a=!1;for(const[l,v]of this._linkProviders.entries())s?!((i=this._activeProviderReplies)===null||i===void 0)&&i.get(l)&&(a=this._checkLinkProviderResult(l,e,a)):v.provideLinks(e.y,m=>{var h,p;if(this._isMouseOut)return;const b=m?.map(L=>({link:L}));(h=this._activeProviderReplies)===null||h===void 0||h.set(l,b),a=this._checkLinkProviderResult(l,e,a),((p=this._activeProviderReplies)===null||p===void 0?void 0:p.size)===this._linkProviders.length&&this._removeIntersectingLinks(e.y,this._activeProviderReplies)})}_removeIntersectingLinks(e,s){const t=new Set;for(let i=0;i<s.size;i++){const a=s.get(i);if(a)for(let l=0;l<a.length;l++){const v=a[l],m=v.link.range.start.y<e?0:v.link.range.start.x,h=v.link.range.end.y>e?this._bufferService.cols:v.link.range.end.x;for(let p=m;p<=h;p++){if(t.has(p)){a.splice(l--,1);break}t.add(p)}}}}_checkLinkProviderResult(e,s,t){var i;if(!this._activeProviderReplies)return t;const a=this._activeProviderReplies.get(e);let l=!1;for(let v=0;v<e;v++)this._activeProviderReplies.has(v)&&!this._activeProviderReplies.get(v)||(l=!0);if(!l&&a){const v=a.find(m=>this._linkAtPosition(m.link,s));v&&(t=!0,this._handleNewLink(v))}if(this._activeProviderReplies.size===this._linkProviders.length&&!t)for(let v=0;v<this._activeProviderReplies.size;v++){const m=(i=this._activeProviderReplies.get(v))===null||i===void 0?void 0:i.find(h=>this._linkAtPosition(h.link,s));if(m){t=!0,this._handleNewLink(m);break}}return t}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(e){if(!this._element||!this._mouseService||!this._currentLink)return;const s=this._positionFromMouseEvent(e,this._element,this._mouseService);s&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,s)&&this._currentLink.link.activate(e,this._currentLink.link.text)}_clearCurrentLink(e,s){this._element&&this._currentLink&&this._lastMouseEvent&&(!e||!s||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=s)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,f.disposeArray)(this._linkCacheDisposables))}_handleNewLink(e){if(!this._element||!this._lastMouseEvent||!this._mouseService)return;const s=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);s&&this._linkAtPosition(e.link,s)&&(this._currentLink=e,this._currentLink.state={decorations:{underline:e.link.decorations===void 0||e.link.decorations.underline,pointerCursor:e.link.decorations===void 0||e.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,e.link,this._lastMouseEvent),e.link.decorations={},Object.defineProperties(e.link.decorations,{pointerCursor:{get:()=>{var t,i;return(i=(t=this._currentLink)===null||t===void 0?void 0:t.state)===null||i===void 0?void 0:i.decorations.pointerCursor},set:t=>{var i,a;!((i=this._currentLink)===null||i===void 0)&&i.state&&this._currentLink.state.decorations.pointerCursor!==t&&(this._currentLink.state.decorations.pointerCursor=t,this._currentLink.state.isHovered&&((a=this._element)===null||a===void 0||a.classList.toggle("xterm-cursor-pointer",t)))}},underline:{get:()=>{var t,i;return(i=(t=this._currentLink)===null||t===void 0?void 0:t.state)===null||i===void 0?void 0:i.decorations.underline},set:t=>{var i,a,l;!((i=this._currentLink)===null||i===void 0)&&i.state&&((l=(a=this._currentLink)===null||a===void 0?void 0:a.state)===null||l===void 0?void 0:l.decorations.underline)!==t&&(this._currentLink.state.decorations.underline=t,this._currentLink.state.isHovered&&this._fireUnderlineEvent(e.link,t))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(t=>{if(!this._currentLink)return;const i=t.start===0?0:t.start+1+this._bufferService.buffer.ydisp,a=this._bufferService.buffer.ydisp+1+t.end;if(this._currentLink.link.range.start.y>=i&&this._currentLink.link.range.end.y<=a&&(this._clearCurrentLink(i,a),this._lastMouseEvent&&this._element)){const l=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);l&&this._askForLink(l,!1)}})))}_linkHover(e,s,t){var i;!((i=this._currentLink)===null||i===void 0)&&i.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(s,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add("xterm-cursor-pointer")),s.hover&&s.hover(t,s.text)}_fireUnderlineEvent(e,s){const t=e.range,i=this._bufferService.buffer.ydisp,a=this._createLinkUnderlineEvent(t.start.x-1,t.start.y-i-1,t.end.x,t.end.y-i-1,void 0);(s?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(a)}_linkLeave(e,s,t){var i;!((i=this._currentLink)===null||i===void 0)&&i.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(s,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove("xterm-cursor-pointer")),s.leave&&s.leave(t,s.text)}_linkAtPosition(e,s){const t=e.range.start.y*this._bufferService.cols+e.range.start.x,i=e.range.end.y*this._bufferService.cols+e.range.end.x,a=s.y*this._bufferService.cols+s.x;return t<=a&&a<=i}_positionFromMouseEvent(e,s,t){const i=t.getCoords(e,s,this._bufferService.cols,this._bufferService.rows);if(i)return{x:i[0],y:i[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(e,s,t,i,a){return{x1:e,y1:s,x2:t,y2:i,cols:this._bufferService.cols,fg:a}}};r.Linkifier2=_=c([u(0,g.IBufferService)],_)},9042:(P,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.tooMuchOutput=r.promptLabel=void 0,r.promptLabel="Terminal input",r.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(P,r,o){var c=this&&this.__decorate||function(_,e,s,t){var i,a=arguments.length,l=a<3?e:t===null?t=Object.getOwnPropertyDescriptor(e,s):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(_,e,s,t);else for(var v=_.length-1;v>=0;v--)(i=_[v])&&(l=(a<3?i(l):a>3?i(e,s,l):i(e,s))||l);return a>3&&l&&Object.defineProperty(e,s,l),l},u=this&&this.__param||function(_,e){return function(s,t){e(s,t,_)}};Object.defineProperty(r,"__esModule",{value:!0}),r.OscLinkProvider=void 0;const n=o(511),d=o(2585);let f=r.OscLinkProvider=class{constructor(_,e,s){this._bufferService=_,this._optionsService=e,this._oscLinkService=s}provideLinks(_,e){var s;const t=this._bufferService.buffer.lines.get(_-1);if(!t)return void e(void 0);const i=[],a=this._optionsService.rawOptions.linkHandler,l=new n.CellData,v=t.getTrimmedLength();let m=-1,h=-1,p=!1;for(let b=0;b<v;b++)if(h!==-1||t.hasContent(b)){if(t.loadCell(b,l),l.hasExtendedAttrs()&&l.extended.urlId){if(h===-1){h=b,m=l.extended.urlId;continue}p=l.extended.urlId!==m}else h!==-1&&(p=!0);if(p||h!==-1&&b===v-1){const L=(s=this._oscLinkService.getLinkData(m))===null||s===void 0?void 0:s.uri;if(L){const y={start:{x:h+1,y:_},end:{x:b+(p||b!==v-1?0:1),y:_}};let k=!1;if(!a?.allowNonHttpProtocols)try{const x=new URL(L);["http:","https:"].includes(x.protocol)||(k=!0)}catch{k=!0}k||i.push({text:L,range:y,activate:(x,T)=>a?a.activate(x,T,y):g(0,T),hover:(x,T)=>{var O;return(O=a?.hover)===null||O===void 0?void 0:O.call(a,x,T,y)},leave:(x,T)=>{var O;return(O=a?.leave)===null||O===void 0?void 0:O.call(a,x,T,y)}})}p=!1,l.hasExtendedAttrs()&&l.extended.urlId?(h=b,m=l.extended.urlId):(h=-1,m=-1)}}e(i)}};function g(_,e){if(confirm(`Do you want to navigate to ${e}?
|
|
4
4
|
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{d as N,a as C,aX as oe,e as ae,ac as H,r as A,f as t,h as I,j as _,p as x,o,k as e,m as n,n as B,G as O,t as p,F as T,i as d,v as $,ar as V,_ as J,a9 as R,aY as P,aZ as ne,a_ as se,a$ as re,y as ie,z as ce,q as le,b0 as de,b1 as pe,b2 as me,b as ue,b3 as ge,b4 as he,b5 as _e,b6 as G,aA as fe,a2 as ve,l as be,ae as we,I as z,X as xe}from"./
|
|
1
|
+
import{d as N,a as C,aX as oe,e as ae,ac as H,r as A,f as t,h as I,j as _,p as x,o,k as e,m as n,n as B,G as O,t as p,F as T,i as d,v as $,ar as V,_ as J,a9 as R,aY as P,aZ as ne,a_ as se,a$ as re,y as ie,z as ce,q as le,b0 as de,b1 as pe,b2 as me,b as ue,b3 as ge,b4 as he,b5 as _e,b6 as G,aA as fe,a2 as ve,l as be,ae as we,I as z,X as xe}from"./vTxNztlt.js";import{_ as ye}from"./DYgqHVwa.js";import{_ as U}from"./Dh5Afz2J.js";import{_ as q}from"./TuJR20B4.js";import{_ as ke}from"./ifvc2XRc.js";import{_ as $e}from"./DP4rCJej.js";import"./CVTYawdK.js";import"./giz0tI1M.js";const K=[{name:"title",suggestion:"required",head:{title:"[title]"},seoMeta:{title:"[title]"},docs:"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title",description:"A concise and descriptive title for the browser that accurately summarizes the content of the page."},{name:"description",suggestion:"required",head:{meta:[{name:"description",content:"[description]"}]},seoMeta:{description:"[description]"},description:"A one to two sentence summary for search engines that includes relevant keywords to improve visibility in search results."},{name:"icon",suggestion:"recommended",head:{link:[{rel:"icon",type:"image/png",href:"/favicon.png"}]},description:"A small image that appears in the browser tab and bookmark menu to help users easily identify the page."},{name:"lang",suggestion:"recommended",head:{htmlAttrs:{lang:"en"}},description:"The primary language of the page to help search engines and browsers understand the content."},{name:"og:title",suggestion:"recommended",head:{meta:[{property:"og:title",content:"[og:title]"}]},seoMeta:{ogTitle:"[og:title]"},docs:"https://ogp.me/#metadata",description:"A title for the link preview used by social media platforms."},{name:"og:description",suggestion:"recommended",head:{meta:[{property:"og:description",content:"[og:description]"}]},seoMeta:{ogDescription:"[og:description]"},docs:"https://ogp.me/#metadata",description:"A description for the link preview used by social media platforms."},{name:"og:image",suggestion:"recommended",head:{meta:[{property:"og:image",content:"[og:image]"}]},seoMeta:{ogImage:"[og:image]"},docs:"https://ogp.me/#metadata",description:"An image for the link preview used by social media platforms."},{name:"og:url",suggestion:"recommended",head:{meta:[{property:"og:url",content:"[og:url]"}]},seoMeta:{ogUrl:"[og:url]"},docs:"https://ogp.me/#metadata",description:"A canonical URL for the link preview used to specify the preferred URL to display in search engine results and social media previews when multiple URLs may point to the same page."},{name:"twitter:title",suggestion:"optional",head:{meta:[{name:"twitter:title",content:"[twitter:title]"}]},seoMeta:{twitterTitle:"[twitter:title]"},docs:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards",description:"A title for the Twitter card used to provide a preview of the content shared on the page."},{name:"twitter:description",suggestion:"optional",head:{meta:[{name:"twitter:description",content:"[twitter:description]"}]},seoMeta:{twitterDescription:"[twitter:description]"},docs:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards",description:"A description for the Twitter card used to provide a preview of the content shared on the page."},{name:"twitter:image",suggestion:"optional",head:{meta:[{name:"twitter:image",content:"[twitter:image]"}]},seoMeta:{twitterImage:"[twitter:image]"},docs:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards",description:"An image for the Twitter card used to provide a preview of the content shared on the page."},{name:"twitter:card",suggestion:"optional",head:{meta:[{name:"twitter:card",content:"summary"}]},seoMeta:{twitterCard:"summary"},docs:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards",description:"The type of Twitter card to use, which determines the type of card to display in link previews on Twitter."}],Se={flex:"~ wrap","mt--2":"","w-full":"","flex-none":""},Te=["onClick"],Ce=e("div",{border:"b base","flex-auto":""},null,-1),Ne={key:0,"x-divider":""},Me={key:1,"x-divider":""},Oe={flex:"~ gap-1 items-center",class:"px2 pt2",lg:"px4 py2"},Ie=e("div",{"i-carbon-warning":"","text-orange":""},null,-1),Ae={"w-full":"",p2:"",op75:""},Be={key:1,m4:"",flex:"~ col gap-2"},Re={flex:"~ gap-1 wrap items-center"},Le={key:1},je={flex:"~ gap-2",n:"sm primary",absolute:"","right-2":"","top-2":""},Fe=N({__name:"OpenGraphMissingTabs",props:{tags:{},matchedRouteFilepath:{}},setup(h){const s=h,l=C(()=>K.filter(r=>!s.tags?.some(g=>g.name===r.name))),a=C(()=>{let r={};const g={};l.value.forEach(u=>{u.seoMeta?Object.assign(g,u.seoMeta):r=oe(r,u.head)});const b=[];if(Object.keys(g).length){const u=JSON.stringify(g,null,2).replace(/"([^"]+)":/g,"$1:").replace(/"/g,"'");b.push(`useSeoMeta(${u})`)}if(Object.keys(r).length){const u=JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:").replace(/"/g,"'");b.push(`useHead(${u})`)}return b.join(`
|
|
2
2
|
|
|
3
3
|
`)}),m=ae(),y=H(),k=["Missing Tags","Code Snippet"],f=A(k[0]);return(r,g)=>{const b=U,u=V,S=J,M=ke,L=q;return t(l).length?(o(),I(L,{key:0,text:"Missing Tags",description:`${t(l).length} missing tags`,icon:"carbon:warning-other","header-class":"text-orange op100! [[open]_&]:text-inherit",padding:!1},{default:_(()=>[e("div",Se,[(o(),n(T,null,B(k,(i,c)=>e("button",{key:c,px4:"",py2:"",border:"r t base",hover:"bg-active",class:O(i===t(f)?"":"border-b"),onClick:v=>f.value=i},[e("div",{class:O(i===t(f)?"":"op30"),capitalize:""},p(i),3)],10,Te)),64)),Ce]),t(f)===k[0]?(o(),I(u,{key:0,grid:"~ cols-[1fr] lg:cols-[max-content_1fr]",m4:"","items-center":"","justify-between":"","of-hidden":""},{default:_(()=>[(o(!0),n(T,null,B(t(l),(i,c)=>(o(),n(T,{key:c},[c?(o(),n("div",Ne)):x("",!0),c?(o(),n("div",Me)):x("",!0),e("div",Oe,[Ie,d(b,{"op-50":"",href:i.docs,target:"_blank",n:"orange"},{default:_(()=>[$(p(i.name),1)]),_:2},1032,["href"])]),e("div",Ae,p(i.description),1)],64))),128))]),_:1})):(o(),n("div",Be,[e("p",Re,[d(S,{icon:"carbon-copy",n:"xs","px-2":"",onClick:g[0]||(g[0]=i=>t(m)(t(a),"open-graph-suggestion"))},{default:_(()=>[$(" Copy ")]),_:1}),$(" the following code snippet and paste it into your "),r.matchedRouteFilepath?(o(),I(S,{key:0,icon:"carbon-launch",n:"xs","px-2":"",onClick:g[1]||(g[1]=i=>t(y)(r.matchedRouteFilepath))},{default:_(()=>[$(" page component ")]),_:1})):(o(),n("span",Le,"page component")),$(" to full fill the missing tags. ")]),d(u,{relative:"","n-code-block":""},{default:_(()=>[d(M,{code:t(a),lang:"ts",lines:!1,"w-full":"","of-auto":"",p3:""},null,8,["code"]),e("div",je,[d(S,{icon:"carbon-copy",onClick:g[2]||(g[2]=i=>t(m)(t(a),"open-graph-suggestion"))},{default:_(()=>[$(" Copy ")]),_:1})])]),_:1})]))]),_:1},8,["description"])):x("",!0)}}}),De={class:"max-w-[524px] min-w-[524px] cursor-pointer bg-base"},ze={class:"break-words border border-base px-[12px] py-[10px] antialiased"},Ee={class:"overflow-hidden truncate whitespace-nowrap text-[12px] leading-[11px] uppercase op50"},Ge={class:"block h-[46px] max-h-[46px] border-separate select-none overflow-hidden break-words text-left",style:{"border-spacing":"0px"}},He={class:"mt-[3px] truncate pt-[2px] text-[16px] font-semibold leading-[20px]"},Ve={class:"mt-[3px] block h-[18px] max-h-[80px] border-separate select-none overflow-hidden truncate whitespace-nowrap break-words text-left text-[14px] leading-[20px] op50",style:{"-webkit-line-clamp":"1","border-spacing":"0px","-webkit-box-orient":"vertical"}},Je=N({__name:"SocialFacebook",props:{card:{}},setup(h){return(s,l)=>(o(),n("div",De,[e("div",{class:"h-[274px] border border-b-0 border-base bg-cover bg-center bg-no-repeat",style:R({backgroundImage:`url(${JSON.stringify(s.card.image)})`})},null,4),e("div",ze,[e("div",Ee,p(s.card.url),1),e("div",Ge,[e("div",He,p(s.card.title),1),e("div",Ve,p(s.card.description),1)])])]))}}),Pe={class:"max-w-[438px] min-w-[438px] of-hidden border border-base rounded-[16px] bg-base -outline-offset-1",style:{"font-family":"TwitterChirp, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif"}},Ue={class:"break-words border-base p-[0.75em] antialiased",flex:"~ col justify-center gap-[2px]"},qe={class:"overflow-hidden truncate whitespace-nowrap text-[15px] leading-[20px] lowercase op50"},Ke={class:"m-0 truncate text-[15px] font-semibold leading-[20px]"},Xe={class:"line-clamp-2 select-none overflow-hidden break-words text-left text-[15px] leading-[20px] op50"},Ye=N({__name:"SocialTwitter",props:{tags:{}},setup(h){const s=h,l=C(()=>P(s.tags,{title:[{tag:"title"}],image:[{tag:"meta",name:"twitter:image"},{tag:"meta",name:"og:image"}],imageAlt:[{tag:"meta",name:"twitter:image:alt"}],description:[{tag:"meta",name:"twitter:description"},{tag:"meta",name:"description"}],favicon:[{tag:"link",name:"icon"}]})),a=C(()=>l.value.image?s.tags.find(m=>m.tag==="meta"&&m.name==="twitter:card")?.value||"summary_large_image":"summary");return(m,y)=>(o(),n("div",Pe,[e("div",{class:O(["cursor-pointer overflow-hidden leading-[1.3em]",t(a)==="summary_large_image"?"":"flex"]),hover:"bg-[#88888805]"},[t(a)==="summary_large_image"?(o(),n("div",{key:0,class:"h-[220px] border-b border-base bg-cover bg-center bg-no-repeat",style:R({backgroundImage:`url(${JSON.stringify(t(l).image)})`})},null,4)):(o(),n("div",{key:1,class:"h-[129px] w-[129px] flex-none border-r border-base bg-cover bg-center bg-no-repeat",style:R({backgroundImage:`url(${JSON.stringify(t(l).image)})`})},null,4)),e("div",Ue,[e("div",qe,p(t(l).url),1),e("div",Ke,p(t(l).title),1),e("div",Xe,p(t(l).description),1)])],2)]))}}),We={class:"max-w-[520px] min-w-[520px] cursor-pointer overflow-hidden border border-base rounded-[2px] shadow-md bg-base"},Ze={class:"break-words p-[10px] antialiased"},Qe={class:"block h-auto max-h-[50px] border-separate select-none break-words text-left",style:{"border-spacing":"0px"}},et={class:"pb-[2px] text-[16px] font-semibold leading-[24px]"},tt={class:"overflow-hidden truncate whitespace-nowrap text-xs font-normal uppercase op85"},ot=N({__name:"SocialLinkedin",props:{card:{}},setup(h){return(s,l)=>(o(),n("div",We,[e("div",{class:"h-[270px] border-b border-base bg-cover bg-center bg-no-repeat",style:R({backgroundImage:`url(${JSON.stringify(s.card.image)})`})},null,4),e("div",Ze,[e("div",Qe,[e("div",et,p(s.card.title),1),e("div",tt,p(s.card.url),1)])])]))}}),at=h=>(ie("data-v-6d584478"),h=h(),ce(),h),nt={class:"relative max-w-[420px] min-w-[420px] rounded-[16px] rounded-bl-0 py-[6px] leading-[18px] drop-shadow-sm drop-shadow-color-[#10232f26] bg-base"},st={class:"pl-[10px] pr-[8px]"},rt={class:"text-[#3390ec] leading-normal underline"},it={class:"quote w-full flex"},ct={class:"flex flex-col gap-1"},lt={key:0,class:"my-[3px] overflow-hidden rounded"},dt=["src"],pt={class:"cursor-pointer text-sm text-[#3390ec]"},mt={class:"cursor-pointer text-sm"},ut={class:"cursor-pointer text-sm"},gt={class:"flex justify-end text-xs text-[#707579]"},ht=at(()=>e("svg",{width:"11",height:"20",viewBox:"0 0 11 20",xmlns:"http://www.w3.org/2000/svg",class:"absolute bottom-0 ml-[-8.4px] translate-y-px text-white"},[e("g",{transform:"translate(9 -14)","fill-rule":"evenodd"},[e("path",{id:"corner-fill",d:"M-6 16h6v17c-.193-2.84-.876-5.767-2.05-8.782-.904-2.325-2.446-4.485-4.625-6.48A1 1 0 01-6 16z",transform:"matrix(1 0 0 -1 0 49)",fill:"currentColor"})])],-1)),_t=N({__name:"SocialTelegram",props:{card:{}},setup(h){const s=ne(),l=se(re(),"HH:mm");return(a,m)=>(o(),n("div",nt,[e("div",st,[e("div",rt,p(a.card.url),1),e("div",it,[e("div",ct,[a.card.image?(o(),n("div",lt,[e("img",{class:"h-full max-w-full w-full rounded object-cover",src:a.card.image},null,8,dt)])):x("",!0),e("div",pt,[e("strong",null,p(t(s).hostname),1)]),e("div",mt,[e("strong",null,p(a.card.title),1)]),e("div",ut,p(a.card.description),1)])]),e("div",gt,[e("span",null,p(t(l)),1)])]),ht]))}}),ft=le(_t,[["__scopeId","data-v-6d584478"]]),vt={flex:"~ col"},bt={flex:"~ wrap","w-full":"","flex-none":""},wt=["onClick"],xt=e("div",{border:"b base","flex-auto":""},null,-1),yt={flex:"~ items-center justify-center","flex-auto":"",p4:"","n-panel-grids":""},kt={key:0},$t={key:1},St={key:2},Tt={key:3},Ct=N({__name:"SocialPreviewGroup",props:{tags:{}},setup(h){const s=h,l=["twitter","facebook","linkedin","telegram"],a=de("nuxt-devtools-social-preview-tab",l[0]),m=C(()=>P(s.tags,{title:[{tag:"title"}],image:[{tag:"meta",name:"og:image"}],imageAlt:[{tag:"meta",name:"og:image:alt"}],description:[{tag:"meta",name:"og:description"},{tag:"meta",name:"description"}],favicon:[{tag:"link",name:"icon"}]}));return(y,k)=>{const f=Je,r=Ye,g=ot,b=ft;return o(),n("div",vt,[e("div",bt,[(o(),n(T,null,B(l,(u,S)=>e("button",{key:S,px4:"",py2:"",border:"r base",hover:"bg-active",class:O(u===t(a)?"":"border-b"),onClick:M=>a.value=u},[e("div",{class:O(u===t(a)?"":"op30"),capitalize:""},p(u),3)],10,wt)),64)),xt]),e("div",yt,[t(a)==="facebook"?(o(),n("div",kt,[d(f,{card:t(m)},null,8,["card"])])):t(a)==="twitter"?(o(),n("div",$t,[d(r,{tags:y.tags},null,8,["tags"])])):t(a)==="linkedin"?(o(),n("div",St,[d(g,{card:t(m)},null,8,["card"])])):t(a)==="telegram"?(o(),n("div",Tt,[d(b,{card:t(m)},null,8,["card"])])):x("",!0)])])}}}),Nt={class:"markdown-body"},Mt=pe('<h1>Open Graph</h1><p>Nuxt provides several different ways to manage your meta tags using <a href="https://unhead.harlanzw.com/" target="_blank" rel="noopener"><code>unhead</code></a>. Improve your Nuxt app’s SEO with powerful head config, composables and components.</p><p><a href="https://nuxt.com/docs/getting-started/seo-meta" target="_blank" rel="noopener">Learn more on the documentation</a></p><hr><p>You can also find how open graph specs are defined in:</p><ul><li><a href="https://ogp.me/" target="_blank" rel="noopener">The Open Graph protocol</a></li><li><a href="https://developer.twitter.com/en/docs/twitter-for-websites/cards/guides/getting-started" target="_blank" rel="noopener">Twitter Cards</a></li></ul>',6),Ot=[Mt],It={__name:"open-graph",setup(h,{expose:s}){return s({frontmatter:{}}),(a,m)=>(o(),n("div",Nt,Ot))}},At={flex:"~ col lg:row","h-full":"","w-full":"","of-hidden":""},Bt={"flex-auto":"","of-auto":""},Rt={"flex-none":"",flex:"~ gap2 items-center"},Lt={flex:"~ col"},jt={key:0,"x-divider":""},Ft={key:1,"x-divider":""},Dt={mr2:"",px4:"",py2:""},qt=N({__name:"open-graph",setup(h){const s=A(0),l=me(),a=ue(async()=>(s.value,(await l.value?.resolveTags()).map(c=>{const v=c.props||{};return c.tag==="htmlAttrs"&&v.lang?{tag:"html",name:"lang",value:v.lang}:v.charset?{tag:"meta",name:"charset",value:v.charset}:{tag:c.tag,name:v.property??v.name??v.rel??c.tag,value:v.content??v.href??c.textContent??JSON.stringify(v)}})),[]),m=A(!0);function y(){s.value+=1}const k=ge(),f=he(),r=A(""),g=_e(),b=H();async function u(){r.value!==f.value.path&&k.value.push(r.value||"/")}const S=C(()=>r.value===f.value.path?[]:k.value.resolve(r.value||"/").matched),M=C(()=>{const i=g.value.find(c=>c.path===f.value?.matched?.[0]?.path);return i?.file||i?.meta?.file});function L(i){return K.find(c=>c.name===i.name)?.docs}return G(f).toBeTruthy().then(i=>{r.value=i.path}),G(k).toBeTruthy().then(i=>{i.afterEach(()=>{fe(()=>{r.value=f.value.path,setTimeout(y,200),setTimeout(y,800)})})}),(i,c)=>{const v=xe,j=J,X=ye,E=U,Y=V,W=q,Z=Fe,Q=Ct,ee=It,te=$e,F=ve("tooltip");return o(),n(T,null,[e("div",At,[e("div",Bt,[d(X,null,{search:_(()=>[d(v,{modelValue:t(r),"onUpdate:modelValue":c[0]||(c[0]=w=>be(r)?r.value=w:null),placeholder:"Route",icon:"carbon-direction-right-01 scale-y--100",n:"primary","flex-auto":"","font-mono":"",class:O(["px-5 py-2",t(f)?.path===t(r)?"":t(S).length?"text-green":"text-orange"]),onKeydown:we(u,["enter"])},null,8,["modelValue","class"])]),actions:_(()=>[e("div",Rt,[t(M)?z((o(),I(j,{key:0,"text-lg":"",border:!1,icon:"carbon:launch",title:"Open file in editor",onClick:c[1]||(c[1]=w=>t(b)(t(M)))},null,512)),[[F,"Open file in editor"]]):x("",!0),z(d(j,{"text-lg":"",border:!1,icon:"carbon:reset",title:"Refresh Data",onClick:y},null,512),[[F,"Refresh Data"]]),z(d(j,{"text-lg":"",border:!1,icon:t(m)?"carbon:side-panel-open":"carbon:open-panel-right",title:"Toggle Preview",onClick:c[2]||(c[2]=w=>m.value=!t(m))},null,8,["icon"]),[[F,"Toggle Preview"]])])]),_:1}),e("div",Lt,[d(W,{text:"Tags",icon:"carbon:tag-group"},{default:_(()=>[d(Y,{grid:"~ cols-[max-content_1fr]","items-center":"","justify-between":"","of-hidden":""},{default:_(()=>[(o(!0),n(T,null,B(t(a),(w,D)=>(o(),n(T,{key:D},[D?(o(),n("div",jt)):x("",!0),D?(o(),n("div",Ft)):x("",!0),e("div",Dt,[d(E,{op50:"",href:L(w),target:"_blank",n:"primary"},{default:_(()=>[$(p(w.name),1)]),_:2},1032,["href"])]),d(E,{href:String(w.value).match(/^https?:\/\//)?w.value:void 0,target:"_blank","w-full":"",p2:"","font-mono":"",n:"primary"},{default:_(()=>[$(p(w.value),1)]),_:2},1032,["href"])],64))),128))]),_:1})]),_:1}),d(Z,{tags:t(a),"matched-route-filepath":t(M)},null,8,["tags","matched-route-filepath"])])]),t(m)&&t(a)?.length?(o(),I(Q,{key:0,tags:t(a),"flex-none":"","border-base":"","lt-lg":"border-t",lg:"h-full w-140 border-l"},null,8,["tags"])):x("",!0)]),d(te,null,{default:_(()=>[d(ee)]),_:1})],64)}}});export{qt as default};
|