@nuxt/devtools 0.4.6 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/chunks/analyze-build.mjs +25 -0
- package/dist/chunks/module-main.mjs +6175 -93
- package/dist/chunks/plugin-metrics.mjs +4 -4
- package/dist/chunks/vite-inspect.mjs +7 -1
- package/dist/chunks/vscode.mjs +12 -5
- package/dist/chunks/vue-inspector.mjs +3 -2
- package/dist/client/200.html +2 -2
- package/dist/client/404.html +2 -2
- package/dist/client/__inspecting/index.html +2 -2
- package/dist/client/_nuxt/{Badge.21478015.js → Badge.bd9688d4.js} +1 -1
- package/dist/client/_nuxt/CodeSnippets.vue.c6839222.js +1 -0
- package/dist/client/_nuxt/DrawerRight.vue.d8660e34.js +1 -0
- package/dist/client/_nuxt/{DurationDisplay.vue.d28a01f2.js → DurationDisplay.vue.f895ca51.js} +1 -1
- package/dist/client/_nuxt/FilepathItem.vue.1c96e6cc.js +1 -0
- package/dist/client/_nuxt/HelpFab.vue.748cc95d.js +1 -0
- package/dist/client/_nuxt/{LaunchPage.vue.e8117060.js → LaunchPage.vue.b71fffc3.js} +1 -1
- package/dist/client/_nuxt/NCheckbox.vue.96f7ae1a.js +1 -0
- package/dist/client/_nuxt/NCodeBlock.vue.d5603a1f.js +2 -0
- package/dist/client/_nuxt/NIconButton.vue.d0a9a760.js +1 -0
- package/dist/client/_nuxt/{NIconTitle.vue.636dd062.js → NIconTitle.vue.c8b7e265.js} +1 -1
- package/dist/client/_nuxt/NLink.vue.404a4f6c.js +1 -0
- package/dist/client/_nuxt/NMarkdown.vue.4d74a5d5.js +1 -0
- package/dist/client/_nuxt/{NPanelGrids.c52bd29c.js → NPanelGrids.7b5efdc5.js} +1 -1
- package/dist/client/_nuxt/NSectionBlock.5d6e9b8e.js +1 -0
- package/dist/client/_nuxt/NSectionBlock.63c19da9.css +1 -0
- package/dist/client/_nuxt/NSelect.vue.e5de3a65.js +1 -0
- package/dist/client/_nuxt/NSwitch.vue.25cba5a5.js +1 -0
- package/dist/client/_nuxt/NTextInput.vue.fc99730b.js +1 -0
- package/dist/client/_nuxt/NTip.vue.3c4f8e2d.js +1 -0
- package/dist/client/_nuxt/{Navbar.vue.e1117ac7.js → Navbar.vue.f2b7b652.js} +1 -1
- package/dist/client/_nuxt/NpmVersionCheck.vue.06d8aff2.js +1 -0
- package/dist/client/_nuxt/{PanelLeftRight.vue.8adf1a04.js → PanelLeftRight.vue.8eda640c.js} +1 -1
- package/dist/client/_nuxt/{StateEditor.vue.b3ad6a2d.js → StateEditor.vue.544a7d41.js} +1 -1
- package/dist/client/_nuxt/{__inspecting.f21fc4ff.js → __inspecting.fb15a5b2.js} +1 -1
- package/dist/client/_nuxt/analyze-build.1984767c.js +1 -0
- package/dist/client/_nuxt/assets.fe704899.js +16 -0
- package/dist/client/_nuxt/{client.44af506c.js → client.b1955e54.js} +1 -1
- package/dist/client/_nuxt/{components.0339ba8e.js → components.31fd2c9a.js} +31 -31
- package/dist/client/_nuxt/custom-_name_.424ca200.js +1 -0
- package/dist/client/_nuxt/default.4fda98d6.js +1 -0
- package/dist/client/_nuxt/{editor.4c6382c7.js → editor.02d33c7f.js} +1 -1
- package/dist/client/_nuxt/entry.5024288d.js +19 -0
- package/dist/client/_nuxt/entry.f90d2a3f.css +1 -0
- package/dist/client/_nuxt/error-404.39541df6.js +1 -0
- package/dist/client/_nuxt/{error-500.d6e09b3d.js → error-500.6d8c1090.js} +1 -1
- package/dist/client/_nuxt/error-component.d86d2bc0.js +3 -0
- package/dist/client/_nuxt/{full.e43d885f.js → full.e465e0f9.js} +1 -1
- package/dist/client/_nuxt/{hooks.073b884c.js → hooks.700e3ecc.js} +1 -1
- package/dist/client/_nuxt/imports.6c4842e1.js +1 -0
- package/dist/client/_nuxt/{index.3e121f4a.js → index.6feef59a.js} +5 -5
- package/dist/client/_nuxt/index.8ae957ed.js +1 -0
- package/dist/client/_nuxt/{json-editor-vue.c66387bd.js → json-editor-vue.2379a5ec.js} +1 -1
- package/dist/client/_nuxt/{middleware.a8c2264e.js → middleware.4b7f7a54.js} +1 -1
- package/dist/client/_nuxt/modules.0c194e4b.js +4 -0
- package/dist/client/_nuxt/{none.dd2b9c08.js → none.94eb9e94.js} +1 -1
- package/dist/client/_nuxt/open-graph.9ad8c33f.js +3 -0
- package/dist/client/_nuxt/overview.88b9ee1d.js +1 -0
- package/dist/client/_nuxt/pages.196c3253.js +1 -0
- package/dist/client/_nuxt/{payload.351fcd36.js → payload.b786d84c.js} +1 -1
- package/dist/client/_nuxt/plugins.06f4e6ce.js +1 -0
- package/dist/client/_nuxt/{runtime-configs.2908e02a.js → runtime-configs.bfbdafdb.js} +1 -1
- package/dist/client/_nuxt/server-routes.477b8c10.js +9 -0
- package/dist/client/_nuxt/settings.ffb64330.js +1 -0
- package/dist/client/_nuxt/storage.20802247.js +1 -0
- package/dist/client/_nuxt/{terminals.339eac8e.js → terminals.ab54a064.js} +1 -1
- package/dist/client/_nuxt/{unocss-runtime.6bcc481a.js → unocss-runtime.83acba48.js} +1 -1
- package/dist/client/_nuxt/virtual-files.35133aa6.js +1 -0
- package/dist/client/index.html +2 -2
- package/dist/client/modules/analyze-build/index.html +7 -0
- package/dist/client/modules/assets/index.html +2 -2
- package/dist/client/modules/components/index.html +2 -2
- package/dist/client/modules/hooks/index.html +2 -2
- package/dist/client/modules/imports/index.html +2 -2
- package/dist/client/modules/middleware/index.html +2 -2
- package/dist/client/modules/modules/index.html +2 -2
- package/dist/client/modules/open-graph/index.html +2 -2
- package/dist/client/modules/overview/index.html +2 -2
- package/dist/client/modules/pages/index.html +2 -2
- package/dist/client/modules/payload/index.html +2 -2
- package/dist/client/modules/plugins/index.html +2 -2
- package/dist/client/modules/runtime-configs/index.html +2 -2
- package/dist/client/modules/server-routes/index.html +2 -2
- package/dist/client/modules/storage/index.html +2 -2
- package/dist/client/modules/terminals/index.html +2 -2
- package/dist/client/modules/virtual-files/index.html +2 -2
- package/dist/client/settings/index.html +2 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/plugins/view/Container.vue +1 -1
- package/dist/runtime/plugins/view/Frame.vue +9 -4
- package/dist/runtime/plugins/view/state.d.ts +1 -2
- package/dist/runtime/plugins/view/state.mjs +2 -2
- package/dist/shared/{devtools.23768dcf.mjs → devtools.a2798b81.mjs} +2 -1
- package/dist/types.d.ts +14 -14
- package/package.json +29 -23
- package/dist/client/_nuxt/CodeSnippets.vue.cf956c68.js +0 -1
- package/dist/client/_nuxt/DrawerRight.vue.7d712780.js +0 -1
- package/dist/client/_nuxt/FilepathItem.vue.1374ae6e.js +0 -1
- package/dist/client/_nuxt/HelpFab.vue.8e13a60e.js +0 -1
- package/dist/client/_nuxt/NCheckbox.vue.002c643b.js +0 -1
- package/dist/client/_nuxt/NCodeBlock.vue.8fd682f9.js +0 -2
- package/dist/client/_nuxt/NIconButton.vue.61149d03.js +0 -1
- package/dist/client/_nuxt/NLink.vue.5e75761d.js +0 -1
- package/dist/client/_nuxt/NMarkdown.vue.8cf88cf5.js +0 -1
- package/dist/client/_nuxt/NSectionBlock.77e830ae.js +0 -1
- package/dist/client/_nuxt/NSectionBlock.83ecb54a.css +0 -1
- package/dist/client/_nuxt/NSelect.vue.90e01b18.js +0 -1
- package/dist/client/_nuxt/NSwitch.vue.1b0e3364.js +0 -1
- package/dist/client/_nuxt/NTextInput.vue.f5b2276f.js +0 -1
- package/dist/client/_nuxt/NpmVersionCheck.vue.80a75d57.js +0 -1
- package/dist/client/_nuxt/NuxtLogo.d17ca3c5.js +0 -1
- package/dist/client/_nuxt/assets.97af363e.js +0 -16
- package/dist/client/_nuxt/custom-_name_.aba84e7f.js +0 -1
- package/dist/client/_nuxt/default.d59c7459.js +0 -1
- package/dist/client/_nuxt/entry.079c020d.css +0 -1
- package/dist/client/_nuxt/entry.2a062301.js +0 -19
- package/dist/client/_nuxt/error-404.ce21871f.js +0 -1
- package/dist/client/_nuxt/error-component.bf406d2b.js +0 -3
- package/dist/client/_nuxt/imports.ba566562.js +0 -1
- package/dist/client/_nuxt/index.113a4cc6.js +0 -1
- package/dist/client/_nuxt/modules.b147b11c.js +0 -1
- package/dist/client/_nuxt/open-graph.cac96c16.js +0 -1
- package/dist/client/_nuxt/overview.848f0d2c.js +0 -1
- package/dist/client/_nuxt/pages.58612073.js +0 -1
- package/dist/client/_nuxt/plugins.14197f41.js +0 -1
- package/dist/client/_nuxt/server-routes.bf183192.js +0 -9
- package/dist/client/_nuxt/settings.59b94bec.js +0 -1
- package/dist/client/_nuxt/storage.76e0a760.js +0 -1
- package/dist/client/_nuxt/virtual-files.0b362e16.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as r,h as c,f as e,i as o,w as l,j as _,k as u,l as t,o as p,m as d}from"./entry.5024288d.js";import{_ as m}from"./Badge.bd9688d4.js";const x={flex:"~ col gap4",mxa:"","h-screen":"","w-160":"","items-center":"","justify-center":"","text-center":""},h={flex:"~","items-center":"","justify-center":""},f=e("p",{my2:"","text-xl":"","font-bold":""}," 👋 Welcome trying the preview of Nuxt DevTools! ",-1),v=e("p",{"text-lg":""},[e("b",{"font-bold":""},"Nuxt DevTools"),t(" is a set of visual tools that help you to know your app/site better, and enhance your development experience with Nuxt. ")],-1),g=e("p",{"text-lg":""},[t(" Be aware that "),e("span",{rounded:"","bg-orange:10":"",px2:"","py0.5":"","font-bold":"","text-orange":""},"Nuxt DevTools is still in early preview"),t(", features might be incomplete and unstable. "),e("a",{href:"https://github.com/nuxt/devtools",target:"_blank","text-primary":"","hover-underline":""},"Create an issue or discussion"),t(" if you find any bugs or have any suggestions. Thank you and have fun! ")],-1),y=e("span",null,"Get Started",-1),C=r({__name:"index",setup(b){function n(){_.value=!1}return(w,N)=>{const s=d,a=m,i=u;return p(),c("div",x,[e("div",h,[o(s,{"h-16":""}),o(a,{"mr--15":"","mt--5":"","bg-green-400:10":"","text-green-400":"",title:"preview",textContent:"preview"})]),f,v,g,o(i,{to:"/modules/overview","mt-4":"",n:"xl primary",onClick:n},{default:l(()=>[y]),_:1})])}}});export{C as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as I9,
|
|
1
|
+
import{a as I9,b3 as N9,r as ep,a1 as Mf,ah as D9,a0 as L9,u as B9,b4 as z9}from"./entry.5024288d.js";var np,vb,pb,mb,gb,yb,bb,wb,xb,kb,jb,$b,Sb,Cb,_b,Ob,Mb,Eb,Ab,Pb,Tb,Rb,Ib,Nb,Db,Lb,Bb,zb,qb,Fb,Vb,Wb,Hb,Ub,Jb,Kb,Gb,Qb,Yb,Zb,Xb,tw,ew,nw,rw,ow,iw,aw,sw,uw,cw,lw,fw,hw,dw,vw,pw,mw,gw,yw,bw,ww,xw,kw,jw,$w,Sw,Cw,_w,Ow,Mw,Ew,Aw,Pw,Tw,Rw,Iw,Nw,Dw,Lw,Bw,zw,qw,Fw,Vw,Ww,Hw,Uw,Jw,Kw,Gw,Qw,Yw,Zw,Xw,t2,e2,n2,r2,o2,i2,a2,s2,u2,c2,l2,f2,h2,d2,v2,p2,m2,g2,y2,b2,w2,x2,k2,j2,$2,S2,C2,_2,O2,M2,E2,A2,P2,T2,R2,I2,N2,D2,L2,B2,z2,q2,F2,V2,W2,H2,U2,J2,K2,G2,Q2,Y2,Z2,X2,tx,ex,nx,rx,ox,ix,ax,sx,ux,cx,lx,fx,hx,dx,vx,px,mx,gx,yx,bx,wx,xx,kx,jx,$x,Sx,Cx,_x,Ox,Mx,Ex,Ax,Px,Tx,Rx,Ix,Nx,Dx,Lx,Bx,zx,qx,Fx,Vx,Wx,Hx,Ux,Jx,Kx,Gx,Qx,Yx,Zx,Xx,tk,ek,nk,rk,ok,ik,ak,sk,uk,ck,lk,fk,hk,dk,vk,pk,mk,gk,yk,bk,wk,xk,kk,jk,$k,Sk,Ck,_k,Ok,Mk,Ek,Ak,Pk,Tk,Rk,Ik,Nk,Dk,Lk,Bk,zk,qk,Fk,Vk,Wk,Hk,Uk,Jk,Kk,Gk,Qk,Yk,Zk,Xk,tj,ej,nj,rj,oj,ij,aj,sj,uj,cj,lj,fj,hj,dj,vj,pj,mj,gj,yj,bj,wj,xj,kj,jj,$j,Sj,q9=["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"],F9=["mainAxis","crossAxis","limiter"];function wl(e){var t=typeof Map=="function"?new Map:void 0;return wl=function(n){if(n===null||(r=n,Function.toString.call(r).indexOf("[native code]")===-1))return n;var r;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(t!==void 0){if(t.has(n))return t.get(n);t.set(n,o)}function o(){return mm(n,arguments,Je(this).constructor)}return o.prototype=Object.create(n.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),xl(o,n)},wl(e)}function mm(e,t,n){return mm=G6()?Reflect.construct.bind():function(r,o,i){var a=[null];a.push.apply(a,o);var s=new(Function.bind.apply(r,a));return i&&xl(s,i.prototype),s},mm.apply(null,arguments)}function rt(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function U6(e,t){if(e==null)return{};var n,r,o=function(a,s){if(a==null)return{};var u,c,l={},f=Object.keys(a);for(c=0;c<f.length;c++)u=f[c],s.indexOf(u)>=0||(l[u]=a[u]);return l}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function at(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=ov(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(u){throw u},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var u=n.next();return a=u.done,u},e:function(u){s=!0,i=u},f:function(){try{a||n.return==null||n.return()}finally{if(s)throw i}}}}function Bt(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Bt=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(L,U,_){L[U]=_.value},o=typeof Symbol=="function"?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(L,U,_){return Object.defineProperty(L,U,{value:_,enumerable:!0,configurable:!0,writable:!0}),L[U]}try{u({},"")}catch{u=function(U,_,T){return U[_]=T}}function c(L,U,_,T){var H=U&&U.prototype instanceof h?U:h,B=Object.create(H.prototype),W=new M(T||[]);return r(B,"_invoke",{value:x(L,_,W)}),B}function l(L,U,_){try{return{type:"normal",arg:L.call(U,_)}}catch(T){return{type:"throw",arg:T}}}e.wrap=c;var f={};function h(){}function d(){}function v(){}var p={};u(p,i,function(){return this});var m=Object.getPrototypeOf,g=m&&m(m(D([])));g&&g!==t&&n.call(g,i)&&(p=g);var y=v.prototype=h.prototype=Object.create(p);function b(L){["next","throw","return"].forEach(function(U){u(L,U,function(_){return this._invoke(U,_)})})}function w(L,U){function _(H,B,W,S){var $=l(L[H],L,B);if($.type!=="throw"){var O=$.arg,A=O.value;return A&&ee(A)=="object"&&n.call(A,"__await")?U.resolve(A.__await).then(function(j){_("next",j,W,S)},function(j){_("throw",j,W,S)}):U.resolve(A).then(function(j){O.value=j,W(O)},function(j){return _("throw",j,W,S)})}S($.arg)}var T;r(this,"_invoke",{value:function(H,B){function W(){return new U(function(S,$){_(H,B,S,$)})}return T=T?T.then(W,W):W()}})}function x(L,U,_){var T="suspendedStart";return function(H,B){if(T==="executing")throw new Error("Generator is already running");if(T==="completed"){if(H==="throw")throw B;return N()}for(_.method=H,_.arg=B;;){var W=_.delegate;if(W){var S=k(W,_);if(S){if(S===f)continue;return S}}if(_.method==="next")_.sent=_._sent=_.arg;else if(_.method==="throw"){if(T==="suspendedStart")throw T="completed",_.arg;_.dispatchException(_.arg)}else _.method==="return"&&_.abrupt("return",_.arg);T="executing";var $=l(L,U,_);if($.type==="normal"){if(T=_.done?"completed":"suspendedYield",$.arg===f)continue;return{value:$.arg,done:_.done}}$.type==="throw"&&(T="completed",_.method="throw",_.arg=$.arg)}}}function k(L,U){var _=U.method,T=L.iterator[_];if(T===void 0)return U.delegate=null,_==="throw"&&L.iterator.return&&(U.method="return",U.arg=void 0,k(L,U),U.method==="throw")||_!=="return"&&(U.method="throw",U.arg=new TypeError("The iterator does not provide a '"+_+"' method")),f;var H=l(T,L.iterator,U.arg);if(H.type==="throw")return U.method="throw",U.arg=H.arg,U.delegate=null,f;var B=H.arg;return B?B.done?(U[L.resultName]=B.value,U.next=L.nextLoc,U.method!=="return"&&(U.method="next",U.arg=void 0),U.delegate=null,f):B:(U.method="throw",U.arg=new TypeError("iterator result is not an object"),U.delegate=null,f)}function I(L){var U={tryLoc:L[0]};1 in L&&(U.catchLoc=L[1]),2 in L&&(U.finallyLoc=L[2],U.afterLoc=L[3]),this.tryEntries.push(U)}function R(L){var U=L.completion||{};U.type="normal",delete U.arg,L.completion=U}function M(L){this.tryEntries=[{tryLoc:"root"}],L.forEach(I,this),this.reset(!0)}function D(L){if(L){var U=L[i];if(U)return U.call(L);if(typeof L.next=="function")return L;if(!isNaN(L.length)){var _=-1,T=function H(){for(;++_<L.length;)if(n.call(L,_))return H.value=L[_],H.done=!1,H;return H.value=void 0,H.done=!0,H};return T.next=T}}return{next:N}}function N(){return{value:void 0,done:!0}}return d.prototype=v,r(y,"constructor",{value:v,configurable:!0}),r(v,"constructor",{value:d,configurable:!0}),d.displayName=u(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(L){var U=typeof L=="function"&&L.constructor;return!!U&&(U===d||(U.displayName||U.name)==="GeneratorFunction")},e.mark=function(L){return Object.setPrototypeOf?Object.setPrototypeOf(L,v):(L.__proto__=v,u(L,s,"GeneratorFunction")),L.prototype=Object.create(y),L},e.awrap=function(L){return{__await:L}},b(w.prototype),u(w.prototype,a,function(){return this}),e.AsyncIterator=w,e.async=function(L,U,_,T,H){H===void 0&&(H=Promise);var B=new w(c(L,U,_,T),H);return e.isGeneratorFunction(U)?B:B.next().then(function(W){return W.done?W.value:B.next()})},b(y),u(y,s,"Generator"),u(y,i,function(){return this}),u(y,"toString",function(){return"[object Generator]"}),e.keys=function(L){var U=Object(L),_=[];for(var T in U)_.push(T);return _.reverse(),function H(){for(;_.length;){var B=_.pop();if(B in U)return H.value=B,H.done=!1,H}return H.done=!0,H}},e.values=D,M.prototype={constructor:M,reset:function(L){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(R),!L)for(var U in this)U.charAt(0)==="t"&&n.call(this,U)&&!isNaN(+U.slice(1))&&(this[U]=void 0)},stop:function(){this.done=!0;var L=this.tryEntries[0].completion;if(L.type==="throw")throw L.arg;return this.rval},dispatchException:function(L){if(this.done)throw L;var U=this;function _($,O){return B.type="throw",B.arg=L,U.next=$,O&&(U.method="next",U.arg=void 0),!!O}for(var T=this.tryEntries.length-1;T>=0;--T){var H=this.tryEntries[T],B=H.completion;if(H.tryLoc==="root")return _("end");if(H.tryLoc<=this.prev){var W=n.call(H,"catchLoc"),S=n.call(H,"finallyLoc");if(W&&S){if(this.prev<H.catchLoc)return _(H.catchLoc,!0);if(this.prev<H.finallyLoc)return _(H.finallyLoc)}else if(W){if(this.prev<H.catchLoc)return _(H.catchLoc,!0)}else{if(!S)throw new Error("try statement without catch or finally");if(this.prev<H.finallyLoc)return _(H.finallyLoc)}}}},abrupt:function(L,U){for(var _=this.tryEntries.length-1;_>=0;--_){var T=this.tryEntries[_];if(T.tryLoc<=this.prev&&n.call(T,"finallyLoc")&&this.prev<T.finallyLoc){var H=T;break}}H&&(L==="break"||L==="continue")&&H.tryLoc<=U&&U<=H.finallyLoc&&(H=null);var B=H?H.completion:{};return B.type=L,B.arg=U,H?(this.method="next",this.next=H.finallyLoc,f):this.complete(B)},complete:function(L,U){if(L.type==="throw")throw L.arg;return L.type==="break"||L.type==="continue"?this.next=L.arg:L.type==="return"?(this.rval=this.arg=L.arg,this.method="return",this.next="end"):L.type==="normal"&&U&&(this.next=U),f},finish:function(L){for(var U=this.tryEntries.length-1;U>=0;--U){var _=this.tryEntries[U];if(_.finallyLoc===L)return this.complete(_.completion,_.afterLoc),R(_),f}},catch:function(L){for(var U=this.tryEntries.length-1;U>=0;--U){var _=this.tryEntries[U];if(_.tryLoc===L){var T=_.completion;if(T.type==="throw"){var H=T.arg;R(_)}return H}}throw new Error("illegal catch attempt")},delegateYield:function(L,U,_){return this.delegate={iterator:D(L),resultName:U,nextLoc:_},this.method==="next"&&(this.arg=void 0),f}},e}function Cj(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(c){return void n(c)}s.done?t(u):Promise.resolve(u).then(r,o)}function Me(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(u){Cj(i,r,o,a,s,"next",u)}function s(u){Cj(i,r,o,a,s,"throw",u)}a(void 0)})}}function we(e,t){return K6(e)||function(n,r){var o=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(o!=null){var i,a,s,u,c=[],l=!0,f=!1;try{if(s=(o=o.call(n)).next,r===0){if(Object(o)!==o)return;l=!1}else for(;!(l=(i=s.call(o)).done)&&(c.push(i.value),c.length!==r);l=!0);}catch(h){f=!0,a=h}finally{try{if(!l&&o.return!=null&&(u=o.return(),Object(u)!==u))return}finally{if(f)throw a}}return c}}(e,t)||ov(e,t)||J6()}function J6(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
3
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function K6(e){if(Array.isArray(e))return e}function _j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function vt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_j(Object(n),!0).forEach(function(r){yo(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_j(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yo(e,t,n){return(t=Q6(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sn(){return sn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=V9(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},sn.apply(this,arguments)}function V9(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Je(e))!==null;);return e}function _t(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xl(e,t)}function xl(e,t){return xl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},xl(e,t)}function Ot(e){var t=G6();return function(){var n,r=Je(e);if(t){var o=Je(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return W9(this,n)}}function W9(e,t){if(t&&(ee(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ie(e)}function ie(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function G6(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Je(e){return Je=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Je(e)}function tt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Oj(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Q6(r.key),r)}}function et(e,t,n){return t&&Oj(e.prototype,t),n&&Oj(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Q6(e){var t=function(n,r){if(ee(n)!=="object"||n===null)return n;var o=n[Symbol.toPrimitive];if(o!==void 0){var i=o.call(n,r||"default");if(ee(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(n)}(e,"string");return ee(t)==="symbol"?t:String(t)}function Se(e){return function(t){if(Array.isArray(t))return gm(t)}(e)||Y6(e)||ov(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
4
4
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function ov(e,t){if(e){if(typeof e=="string")return gm(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?gm(e,t):void 0}}function Y6(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function gm(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ee(e){return ee=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ee(e)}function Rt(){}var Z6=function(e){return e};function wo(e,t){for(var n in t)e[n]=t[n];return e}function X6(e){return e()}function Mj(){return Object.create(null)}function Pn(e){e.forEach(X6)}function Nr(e){return typeof e=="function"}function Ar(e,t){return e!=e?t==t:e!==t||e&&ee(e)==="object"||typeof e=="function"}function De(e,t){return e!=e?t==t:e!==t}function or(e,t,n,r){if(e){var o=t_(e,t,n,r);return e[0](o)}}function t_(e,t,n,r){return e[1]&&r?wo(n.ctx.slice(),e[1](r(t))):n.ctx}function ir(e,t,n,r){if(e[2]&&r){var o=e[2](r(n));if(t.dirty===void 0)return o;if(ee(o)==="object"){for(var i=[],a=Math.max(t.dirty.length,o.length),s=0;s<a;s+=1)i[s]=t.dirty[s]|o[s];return i}return t.dirty|o}return t.dirty}function ar(e,t,n,r,o,i){if(o){var a=t_(t,n,r,i);e.p(a,o)}}function sr(e){if(e.ctx.length>32){for(var t=[],n=e.ctx.length/32,r=0;r<n;r++)t[r]=-1;return t}return-1}function e_(e){var t={};for(var n in e)n[0]!=="$"&&(t[n]=e[n]);return t}function td(e,t){var n={};for(var r in t=new Set(t),e)t.has(r)||r[0]==="$"||(n[r]=e[r]);return n}function Un(e){return e??""}function Lr(e){return e&&Nr(e.destroy)?e.destroy:Rt}var n_=typeof window<"u",H9=n_?function(){return window.performance.now()}:function(){return Date.now()},g0=n_?function(e){return requestAnimationFrame(e)}:Rt,ol=new Set;function r_(e){ol.forEach(function(t){t.c(e)||(ol.delete(t),t.f())}),ol.size!==0&&g0(r_)}function F(e,t){e.appendChild(t)}function Ee(e,t,n){var r=y0(e);if(!r.getElementById(t)){var o=Q("style");o.id=t,o.textContent=n,o_(r,o)}}function y0(e){if(!e)return document;var t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function U9(e){var t=Q("style");return o_(y0(e),t),t.sheet}function o_(e,t){return F(e.head||e,t),t.sheet}function it(e,t,n){e.insertBefore(t,n||null)}function ot(e){e.parentNode&&e.parentNode.removeChild(e)}function vr(e,t){for(var n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function Q(e){return document.createElement(e)}function sa(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function Vt(e){return document.createTextNode(e)}function pt(){return Vt(" ")}function dn(){return Vt("")}function Tt(e,t,n,r){return e.addEventListener(t,n,r),function(){return e.removeEventListener(t,n,r)}}function as(e){return function(t){return t.preventDefault(),e.call(this,t)}}function Ma(e){return function(t){return t.stopPropagation(),e.call(this,t)}}function C(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function Ej(e,t){var n=Object.getOwnPropertyDescriptors(e.__proto__);for(var r in t)t[r]==null?e.removeAttribute(r):r==="style"?e.style.cssText=t[r]:r==="__value"?e.value=e[r]=t[r]:n[r]&&n[r].set?e[r]=t[r]:C(e,r,t[r])}function tc(e,t){for(var n in t)C(e,n,t[n])}function J9(e){return Array.from(e.childNodes)}function me(e,t){t=""+t,e.data!==t&&(e.data=t)}function ss(e,t){e.value=t??""}function Qa(e,t,n,r){n===null?e.style.removeProperty(t):e.style.setProperty(t,n,r?"important":"")}function Aj(e,t,n){for(var r=0;r<e.options.length;r+=1){var o=e.options[r];if(o.__value===t)return void(o.selected=!0)}n&&t===void 0||(e.selectedIndex=-1)}function Et(e,t,n){e.classList[n?"add":"remove"](t)}function i_(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.bubbles,o=r!==void 0&&r,i=n.cancelable,a=i!==void 0&&i,s=document.createEvent("CustomEvent");return s.initCustomEvent(e,o,a,t),s}function ua(e,t){return new e(t)}var kl,ed=new Map,ym=0;function K9(e){for(var t=5381,n=e.length;n--;)t=(t<<5)-t^e.charCodeAt(n);return t>>>0}function G9(e,t){var n={stylesheet:U9(t),rules:{}};return ed.set(e,n),n}function Pj(e,t,n,r,o,i,a){for(var s=arguments.length>7&&arguments[7]!==void 0?arguments[7]:0,u=16.666/r,c=`{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,h as a,o as n}from"./entry.
|
|
1
|
+
import{a as e,h as a,o as n}from"./entry.5024288d.js";const s=e({__name:"middleware",setup(o){return(t,r)=>(n(),a("div",null," WIP "))}});export{s as default};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{_ as Le}from"./FilepathItem.vue.1c96e6cc.js";import{a as R,p as A,o as m,c as T,w as $,f as p,u as d,l as M,t as L,h as w,V as B,s as j,v as S,i as x,F as U,q as X,H as $e,a3 as we,an as Ee,r as Z,aa as Ae,k as le,ao as ke,ap as Be,aq as pe,ar as De,as as Re,af as Ie,at as Pe,au as Fe,av as He,a4 as Ue,aw as je,z as qe,a8 as he,ac as We,ax as Ke,P as Ye,ay as Ge,G as Je,a0 as Xe,az as Ze,R as Qe,aA as et,I as tt,ab as _e}from"./entry.5024288d.js";import{_ as nt}from"./NpmVersionCheck.vue.06d8aff2.js";import{u as ze}from"./editor.02d33c7f.js";import{_ as it}from"./NSectionBlock.5d6e9b8e.js";import{_ as Se}from"./NIconButton.vue.d0a9a760.js";import{_ as ot}from"./NIconTitle.vue.c8b7e265.js";import{_ as st}from"./NTextInput.vue.fc99730b.js";import{_ as rt}from"./Badge.bd9688d4.js";import{F as lt}from"./fuse.esm.88e2763d.js";import{_ as Ce}from"./NCodeBlock.vue.d5603a1f.js";import{_ as at}from"./NLink.vue.404a4f6c.js";import{_ as ut}from"./NTip.vue.3c4f8e2d.js";import{_ as ct}from"./HelpFab.vue.748cc95d.js";import"./NCheckbox.vue.96f7ae1a.js";import"./client.b1955e54.js";const dt={flex:"~ col gap2","flex-auto":"","of-hidden":"",px1:""},ft={"gap-1t":"",flex:"","items-center":"","text-ellipsis":"","ws-nowrap":"","text-lg":""},mt={key:2},pt=p("div",{"flex-auto":""},null,-1),ht={key:1,flex:"~ gap-2",title:"Documentation"},_t=p("span",{"i-carbon-link":"","text-lg":"",op50:""},null,-1),vt={key:2,flex:"~ gap-2"},yt=p("span",{"i-carbon-logo-github":"","text-lg":"",op50:""},null,-1),gt={flex:"~ col","items-end":""},bt={key:0,"h-20":"","w-20":"",flex:"","flex-none":"",rounded:"","bg-gray:3":"",p4:""},xt=["src","alt"],$t=p("div",{"i-carbon-circle-dash":"",ma:"","text-4xl":"",op50:""},null,-1),wt={key:1,flex:"~",mt2:"","flex-auto":"","items-end":"","justify-end":""},kt=["src"],It=p("div",{"flex-auto":""},null,-1),zt={flex:"","justify-end":""},St="https://api.nuxtjs.org/api/ipx/s_80,f_webp/gh/nuxt/modules/main/icons/",Ct="https://api.nuxtjs.org/api/ipx/s_44,f_webp/gh_avatar/",Mt="https://github.com/",Tt="https://www.npmjs.com/package/",ae=R({__name:"ModuleItemBase",props:{mod:null,info:null,compact:{type:Boolean}},setup(e){const t=e,n=A(()=>({...t.mod?.meta,...t.mod,...t.info})),i=ze();return(o,s)=>{const r=$e,a=we;return m(),T(a,{p4:"",flex:"~ gap2"},{default:$(()=>[p("div",dt,[p("div",ft,[e.mod.isPackageModule?(m(),T(r,{key:0,to:Tt+(d(n).npm||d(n).name),target:"_blank",hover:"underline text-primary"},{default:$(()=>[M(L(d(n).name),1)]),_:1},8,["to"])):e.mod.entryPath?(m(),w("button",{key:1,role:"button",hover:"underline text-primary",onClick:s[0]||(s[0]=l=>d(i)(e.mod.entryPath))},L(d(n).name),1)):(m(),w("span",mt,L(d(n).name),1)),B(o.$slots,"badge")]),d(n).description?(m(),w("div",{key:0,class:j(e.compact?"ws-nowrap of-hidden truncate":"line-clamp-2"),"mt--1":"","text-sm":"",op50:""},L(d(n).description),3)):S("",!0),pt,d(n).website?(m(),w("div",ht,[_t,x(r,{to:d(n).website,target:"_blank","of-hidden":"",truncate:"","ws-nowrap":"","text-sm":"",op50:"",hover:"op100 underline text-primary"},{default:$(()=>[M(L(d(n).website.replace(/^https?:\/\//,"")),1)]),_:1},8,["to"])])):S("",!0),d(n).github?(m(),w("div",vt,[yt,x(r,{to:d(n).github,target:"_blank","of-hidden":"",truncate:"","ws-nowrap":"","text-sm":"",op50:"",hover:"op100 underline text-primary"},{default:$(()=>[M(L(d(n).github.replace(/^https?:\/\/github.com\//,"")),1)]),_:1},8,["to"])])):S("",!0),B(o.$slots,"items")]),p("div",gt,[d(n).icon||e.mod.isPackageModule?(m(),w("div",bt,[d(n).icon?(m(),w("img",{key:0,src:St+d(n).icon,alt:e.mod.name,ma:""},null,8,xt)):S("",!0),$t])):S("",!0),d(n).maintainers?.length?(m(),w("div",wt,[(m(!0),w(U,null,X(d(n).maintainers,l=>(m(),T(r,{key:l.name,target:"_blank",to:Mt+l.github,title:l.name},{default:$(()=>[p("img",{src:Ct+l.github,"h-6":"","w-6":"","rounded-full":""},null,8,kt)]),_:2},1032,["to","title"]))),128))])):S("",!0),o.$slots.actions?(m(),w(U,{key:2},[It,p("div",zt,[B(o.$slots,"actions")])],64)):S("",!0)])]),_:3})}}}),Ot={key:0,flex:"~ gap-2",title:"Open on filesystem"},Vt=p("span",{"i-carbon-folder-move-to":"","text-lg":"",op50:""},null,-1),Nt=p("span",{"i-carbon-circle-dash":"","animate-spin":"","text-lg":"",op50:""},null,-1),Lt=p("code",{"text-sm":"",op50:""},"Upgrading...",-1),Et={key:1,"mx--2":""},At=["onClick"],Bt=p("span",{"i-carbon-intent-request-active":"","text-lg":"","text-primary":""},null,-1),Dt=p("code",{"text-xs":""},"Update installed, click to restart",-1),Rt=[Bt,Dt],Pt={key:2,"mx--2":""},Ft=["onClick"],Ht=p("span",{"i-carbon-intent-request-upgrade":"","text-lg":"",op50:""},null,-1),Ut={op50:""},jt=p("div",{"i-carbon-arrow-right":"",op50:""},null,-1),qt={"text-green":""},Wt={key:3,flex:"~ gap-2","items-center":"",title:"NPM"},Kt=p("span",{"i-carbon-cube":"","text-lg":"",op50:""},null,-1),Yt={"text-sm":"",op50:""},Gt=R({__name:"ModuleItem",props:{mod:null},setup(e){const t=e,n=A(()=>t.mod.info),i=A(()=>({...t.mod?.meta,...t.mod,...n.value}));return(o,s)=>{const r=Le,a=$e,l=nt,u=ae;return m(),T(u,{mod:e.mod,info:d(n)},{items:$(()=>[e.mod.entryPath?(m(),w("div",Ot,[Vt,x(r,{filepath:e.mod.entryPath,"text-sm":"",op50:"",hover:"text-primary op100"},null,8,["filepath"])])):S("",!0),d(i).npm?(m(),T(l,{key:d(i).npm,"package-name":d(i).npm,options:{dev:!0}},{default:$(({info:f,update:g,state:_,id:v,restart:k})=>[_==="running"?(m(),T(a,{key:0,flex:"~ gap-2","animate-pulse":"","items-center":"",to:v?`/modules/terminals?id=${encodeURIComponent(v)}`:void 0},{default:$(()=>[Nt,Lt]),_:2},1032,["to"])):_==="updated"?(m(),w("div",Et,[p("button",{flex:"~ gap-2",hover:"bg-primary/20","items-center":"",rounded:"","bg-primary:10":"",px2:"","text-sm":"","text-primary":"",onClick:k},Rt,8,At)])):f?.needsUpdate?(m(),w("div",Pt,[p("button",{flex:"~ gap-2",title:"Click to upgrade","items-center":"",rounded:"",px2:"","text-sm":"",hover:"bg-active",onClick:c=>g()},[Ht,p("code",Ut,"v"+L(f.current),1),jt,p("code",qt,"v"+L(f.latest),1)],8,Ft)])):f?.latest?(m(),w("div",Wt,[Kt,p("code",Yt,"v"+L(f.current),1)])):S("",!0)]),_:1},8,["package-name"])):S("",!0)]),_:1},8,["mod","info"])}}}),Jt=R({__name:"NDropdown",props:{modelValue:{type:Boolean}},emits:[],setup(e,{emit:t}){const i=Ee(e,"modelValue",t,{passive:!0}),o=Z();return Ae(o,()=>{i.value=!1}),(s,r)=>{const a=le;return m(),w("div",{ref_key:"el",ref:o,class:"relative"},[B(s.$slots,"trigger",{enabled:d(i),click:()=>i.value=!d(i)},()=>[x(a,{onClick:r[0]||(r[0]=l=>i.value=!d(i))},{default:$(()=>[M(" Dropdown ")]),_:1})]),p("div",{class:j(["absolute z-10 border n-border-base rounded shadow n-transition n-bg-base",[d(i)?"op-100":"op0 pointer-events-none -translate-y-1"]])},[B(s.$slots,"default")],2)],512)}}}),Xt=R({__name:"ModuleItemInstall",props:{item:null},setup(e){const t=e,n=ke(),i=A(()=>n.value.find(r=>r.name===t.item.npm)),o=A(()=>i.value&&i.value.isPackageModule),s=A(()=>i.value&&i.value.isPackageModule&&i.value.isUninstallable);return(r,a)=>{const l=rt,u=Se,f=le,g=Jt,_=ae;return m(),T(_,{mod:{},role:d(o)?"":"button",info:e.item,mb2:"","h-full":"",class:j(d(o)?"border-dashed op75":"hover:bg-active!"),compact:!0,onClick:a[1]||(a[1]=v=>d(o)?null:("useModuleAction"in r?r.useModuleAction:d(pe))(e.item,"install"))},Be({_:2},[d(o)?{name:"badge",fn:$(()=>[x(l,{"bg-green-400:10":"","text-green-400":""},{default:$(()=>[M(" Installed ")]),_:1}),d(s)?(m(),T(g,{key:0,n:"sm green"},{trigger:$(({click:v})=>[x(u,{icon:"carbon-overflow-menu-vertical",onClick:k=>v()},null,8,["onClick"])]),default:$(()=>[x(f,{icon:"carbon-trash-can",n:"red",onClick:a[0]||(a[0]=v=>("useModuleAction"in r?r.useModuleAction:d(pe))(e.item,"uninstall"))},{default:$(()=>[M(" Uninstall ")]),_:1})]),_:1})):S("",!0)]),key:"0"}:void 0]),1032,["role","info","class"])}}});function Zt(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);var n=e.indexOf("Trident/");if(n>0){var i=e.indexOf("rv:");return parseInt(e.substring(i+3,e.indexOf(".",i)),10)}var o=e.indexOf("Edge/");return o>0?parseInt(e.substring(o+5,e.indexOf(".",o)),10):-1}let Y;function te(){te.init||(te.init=!0,Y=Zt()!==-1)}var Q={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){te(),Ie(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const e=document.createElement("object");this._resizeObject=e,e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex",-1),e.onload=this.addResizeHandlers,e.type="text/html",Y&&this.$el.appendChild(e),e.data="about:blank",Y||this.$el.appendChild(e)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!Y&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const Qt=Pe();De("data-v-b329ee4c");const en={class:"resize-observer",tabindex:"-1"};Re();const tn=Qt((e,t,n,i,o,s)=>(m(),T("div",en)));Q.render=tn;Q.__scopeId="data-v-b329ee4c";Q.__file="src/components/ResizeObserver.vue";function G(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?G=function(t){return typeof t}:G=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},G(e)}function nn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ve(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function on(e,t,n){return t&&ve(e.prototype,t),n&&ve(e,n),e}function ye(e){return sn(e)||rn(e)||ln(e)||an()}function sn(e){if(Array.isArray(e))return ne(e)}function rn(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function ln(e,t){if(e){if(typeof e=="string")return ne(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ne(e,t)}}function ne(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function an(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function un(e){var t;return typeof e=="function"?t={callback:e}:t=e,t}function cn(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,o,s,r=function(l){for(var u=arguments.length,f=new Array(u>1?u-1:0),g=1;g<u;g++)f[g-1]=arguments[g];if(s=f,!(i&&l===o)){var _=n.leading;typeof _=="function"&&(_=_(l,o)),(!i||l!==o)&&_&&e.apply(void 0,[l].concat(ye(s))),o=l,clearTimeout(i),i=setTimeout(function(){e.apply(void 0,[l].concat(ye(s))),i=0},t)}};return r._clear=function(){clearTimeout(i),i=null},r}function Me(e,t){if(e===t)return!0;if(G(e)==="object"){for(var n in e)if(!Me(e[n],t[n]))return!1;return!0}return!1}var dn=function(){function e(t,n,i){nn(this,e),this.el=t,this.observer=null,this.frozen=!1,this.createObserver(n,i)}return on(e,[{key:"createObserver",value:function(n,i){var o=this;if(this.observer&&this.destroyObserver(),!this.frozen){if(this.options=un(n),this.callback=function(a,l){o.options.callback(a,l),a&&o.options.once&&(o.frozen=!0,o.destroyObserver())},this.callback&&this.options.throttle){var s=this.options.throttleOptions||{},r=s.leading;this.callback=cn(this.callback,this.options.throttle,{leading:function(l){return r==="both"||r==="visible"&&l||r==="hidden"&&!l}})}this.oldResult=void 0,this.observer=new IntersectionObserver(function(a){var l=a[0];if(a.length>1){var u=a.find(function(g){return g.isIntersecting});u&&(l=u)}if(o.callback){var f=l.isIntersecting&&l.intersectionRatio>=o.threshold;if(f===o.oldResult)return;o.oldResult=f,o.callback(f,l)}},this.options.intersection),Ie(function(){o.observer&&o.observer.observe(o.el)})}}},{key:"destroyObserver",value:function(){this.observer&&(this.observer.disconnect(),this.observer=null),this.callback&&this.callback._clear&&(this.callback._clear(),this.callback=null)}},{key:"threshold",get:function(){return this.options.intersection&&typeof this.options.intersection.threshold=="number"?this.options.intersection.threshold:0}}]),e}();function Te(e,t,n){var i=t.value;if(i)if(typeof IntersectionObserver>"u")console.warn("[vue-observe-visibility] IntersectionObserver API is not available in your browser. Please install this polyfill: https://github.com/w3c/IntersectionObserver/tree/master/polyfill");else{var o=new dn(e,i,n);e._vue_visibilityState=o}}function fn(e,t,n){var i=t.value,o=t.oldValue;if(!Me(i,o)){var s=e._vue_visibilityState;if(!i){Oe(e);return}s?s.createObserver(i,n):Te(e,{value:i},n)}}function Oe(e){var t=e._vue_visibilityState;t&&(t.destroyObserver(),delete e._vue_visibilityState)}var mn={beforeMount:Te,updated:fn,unmounted:Oe},pn={itemsLimit:1e3},hn=/(auto|scroll)/;function Ve(e,t){return e.parentNode===null?t:Ve(e.parentNode,t.concat([e]))}var ee=function(t,n){return getComputedStyle(t,null).getPropertyValue(n)},_n=function(t){return ee(t,"overflow")+ee(t,"overflow-y")+ee(t,"overflow-x")},vn=function(t){return hn.test(_n(t))};function ge(e){if(e instanceof HTMLElement||e instanceof SVGElement){for(var t=Ve(e.parentNode,[]),n=0;n<t.length;n+=1)if(vn(t[n]))return t[n];return document.scrollingElement||document.documentElement}}function ie(e){"@babel/helpers - typeof";return ie=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ie(e)}var yn={items:{type:Array,required:!0},keyField:{type:String,default:"id"},direction:{type:String,default:"vertical",validator:function(t){return["vertical","horizontal"].includes(t)}},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"}};function gn(){return this.items.length&&ie(this.items[0])!=="object"}var oe=!1;if(typeof window<"u"){oe=!1;try{var bn=Object.defineProperty({},"passive",{get:function(){oe=!0}});window.addEventListener("test",null,bn)}catch{}}let xn=0;var ue={name:"RecycleScroller",components:{ResizeObserver:Q},directives:{ObserveVisibility:mn},props:{...yn,itemSize:{type:Number,default:null},gridItems:{type:Number,default:void 0},itemSecondarySize:{type:Number,default:void 0},minItemSize:{type:[Number,String],default:null},sizeField:{type:String,default:"size"},typeField:{type:String,default:"type"},buffer:{type:Number,default:200},pageMode:{type:Boolean,default:!1},prerender:{type:Number,default:0},emitUpdate:{type:Boolean,default:!1},updateInterval:{type:Number,default:0},skipHover:{type:Boolean,default:!1},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"},listClass:{type:[String,Object,Array],default:""},itemClass:{type:[String,Object,Array],default:""}},emits:["resize","visible","hidden","update","scroll-start","scroll-end"],data(){return{pool:[],totalSize:0,ready:!1,hoverKey:null}},computed:{sizes(){if(this.itemSize===null){const e={"-1":{accumulator:0}},t=this.items,n=this.sizeField,i=this.minItemSize;let o=1e4,s=0,r;for(let a=0,l=t.length;a<l;a++)r=t[a][n]||i,r<o&&(o=r),s+=r,e[a]={accumulator:s,size:r};return this.$_computedMinItemSize=o,e}return[]},simpleArray:gn,itemIndexByKey(){const{keyField:e,items:t}=this,n={};for(let i=0,o=t.length;i<o;i++)n[t[i][e]]=i;return n}},watch:{items(){this.updateVisibleItems(!0)},pageMode(){this.applyPageMode(),this.updateVisibleItems(!1)},sizes:{handler(){this.updateVisibleItems(!1)},deep:!0},gridItems(){this.updateVisibleItems(!0)},itemSecondarySize(){this.updateVisibleItems(!0)}},created(){this.$_startIndex=0,this.$_endIndex=0,this.$_views=new Map,this.$_unusedViews=new Map,this.$_scrollDirty=!1,this.$_lastUpdateScrollPosition=0,this.prerender&&(this.$_prerender=!0,this.updateVisibleItems(!1)),this.gridItems&&!this.itemSize&&console.error("[vue-recycle-scroller] You must provide an itemSize when using gridItems")},mounted(){this.applyPageMode(),this.$nextTick(()=>{this.$_prerender=!1,this.updateVisibleItems(!0),this.ready=!0})},activated(){const e=this.$_lastUpdateScrollPosition;typeof e=="number"&&this.$nextTick(()=>{this.scrollToPosition(e)})},beforeUnmount(){this.removeListeners()},methods:{addView(e,t,n,i,o){const s=Fe({id:xn++,index:t,used:!0,key:i,type:o}),r=He({item:n,position:0,nr:s});return e.push(r),r},unuseView(e,t=!1){const n=this.$_unusedViews,i=e.nr.type;let o=n.get(i);o||(o=[],n.set(i,o)),o.push(e),t||(e.nr.used=!1,e.position=-9999)},handleResize(){this.$emit("resize"),this.ready&&this.updateVisibleItems(!1)},handleScroll(e){if(!this.$_scrollDirty){if(this.$_scrollDirty=!0,this.$_updateTimeout)return;const t=()=>requestAnimationFrame(()=>{this.$_scrollDirty=!1;const{continuous:n}=this.updateVisibleItems(!1,!0);n||(clearTimeout(this.$_refreshTimout),this.$_refreshTimout=setTimeout(this.handleScroll,this.updateInterval+100))});t(),this.updateInterval&&(this.$_updateTimeout=setTimeout(()=>{this.$_updateTimeout=0,this.$_scrollDirty&&t()},this.updateInterval))}},handleVisibilityChange(e,t){this.ready&&(e||t.boundingClientRect.width!==0||t.boundingClientRect.height!==0?(this.$emit("visible"),requestAnimationFrame(()=>{this.updateVisibleItems(!1)})):this.$emit("hidden"))},updateVisibleItems(e,t=!1){const n=this.itemSize,i=this.gridItems||1,o=this.itemSecondarySize||n,s=this.$_computedMinItemSize,r=this.typeField,a=this.simpleArray?null:this.keyField,l=this.items,u=l.length,f=this.sizes,g=this.$_views,_=this.$_unusedViews,v=this.pool,k=this.itemIndexByKey;let c,b,E,I,O;if(!u)c=b=I=O=E=0;else if(this.$_prerender)c=I=0,b=O=Math.min(this.prerender,l.length),E=null;else{const y=this.getScroll();if(t){let C=y.start-this.$_lastUpdateScrollPosition;if(C<0&&(C=-C),n===null&&C<s||C<n)return{continuous:!0}}this.$_lastUpdateScrollPosition=y.start;const V=this.buffer;y.start-=V,y.end+=V;let z=0;if(this.$refs.before&&(z=this.$refs.before.scrollHeight,y.start-=z),this.$refs.after){const C=this.$refs.after.scrollHeight;y.end+=C}if(n===null){let C,q=0,fe=u-1,N=~~(u/2),me;do me=N,C=f[N].accumulator,C<y.start?q=N:N<u-1&&f[N+1].accumulator>y.start&&(fe=N),N=~~((q+fe)/2);while(N!==me);for(N<0&&(N=0),c=N,E=f[u-1].accumulator,b=N;b<u&&f[b].accumulator<y.end;b++);for(b===-1?b=l.length-1:(b++,b>u&&(b=u)),I=c;I<u&&z+f[I].accumulator<y.start;I++);for(O=I;O<u&&z+f[O].accumulator<y.end;O++);}else{c=~~(y.start/n*i);const C=c%i;c-=C,b=Math.ceil(y.end/n*i),I=Math.max(0,Math.floor((y.start-z)/n*i)),O=Math.floor((y.end-z)/n*i),c<0&&(c=0),b>u&&(b=u),I<0&&(I=0),O>u&&(O=u),E=Math.ceil(u/i)*n}}b-c>pn.itemsLimit&&this.itemsLimitError(),this.totalSize=E;let h;const F=c<=this.$_endIndex&&b>=this.$_startIndex;if(F)for(let y=0,V=v.length;y<V;y++)h=v[y],h.nr.used&&(e&&(h.nr.index=k[h.item[a]]),(h.nr.index==null||h.nr.index<c||h.nr.index>=b)&&this.unuseView(h));const de=F?null:new Map;let H,D,K;for(let y=c;y<b;y++){H=l[y];const V=a?H[a]:H;if(V==null)throw new Error(`Key is ${V} on item (keyField is '${a}')`);if(h=g.get(V),!n&&!f[y].size){h&&this.unuseView(h);continue}D=H[r];let z=_.get(D),C=!1;if(!h)F?z&&z.length?h=z.pop():h=this.addView(v,y,H,V,D):(K=de.get(D)||0,(!z||K>=z.length)&&(h=this.addView(v,y,H,V,D),this.unuseView(h,!0),z=_.get(D)),h=z[K],de.set(D,K+1)),g.delete(h.nr.key),h.nr.used=!0,h.nr.index=y,h.nr.key=V,h.nr.type=D,g.set(V,h),C=!0;else if(!h.nr.used&&(h.nr.used=!0,C=!0,z)){const q=z.indexOf(h);q!==-1&&z.splice(q,1)}h.item=H,C&&(y===l.length-1&&this.$emit("scroll-end"),y===0&&this.$emit("scroll-start")),n===null?(h.position=f[y-1].accumulator,h.offset=0):(h.position=Math.floor(y/i)*n,h.offset=y%i*o)}return this.$_startIndex=c,this.$_endIndex=b,this.emitUpdate&&this.$emit("update",c,b,I,O),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:F}},getListenerTarget(){let e=ge(this.$el);return window.document&&(e===window.document.documentElement||e===window.document.body)&&(e=window),e},getScroll(){const{$el:e,direction:t}=this,n=t==="vertical";let i;if(this.pageMode){const o=e.getBoundingClientRect(),s=n?o.height:o.width;let r=-(n?o.top:o.left),a=n?window.innerHeight:window.innerWidth;r<0&&(a+=r,r=0),r+a>s&&(a=s-r),i={start:r,end:r+a}}else n?i={start:e.scrollTop,end:e.scrollTop+e.clientHeight}:i={start:e.scrollLeft,end:e.scrollLeft+e.clientWidth};return i},applyPageMode(){this.pageMode?this.addListeners():this.removeListeners()},addListeners(){this.listenerTarget=this.getListenerTarget(),this.listenerTarget.addEventListener("scroll",this.handleScroll,oe?{passive:!0}:!1),this.listenerTarget.addEventListener("resize",this.handleResize)},removeListeners(){this.listenerTarget&&(this.listenerTarget.removeEventListener("scroll",this.handleScroll),this.listenerTarget.removeEventListener("resize",this.handleResize),this.listenerTarget=null)},scrollToItem(e){let t;const n=this.gridItems||1;this.itemSize===null?t=e>0?this.sizes[e-1].accumulator:0:t=Math.floor(e/n)*this.itemSize,this.scrollToPosition(t)},scrollToPosition(e){const t=this.direction==="vertical"?{scroll:"scrollTop",start:"top"}:{scroll:"scrollLeft",start:"left"};let n,i,o;if(this.pageMode){const s=ge(this.$el),r=s.tagName==="HTML"?0:s[t.scroll],a=s.getBoundingClientRect(),u=this.$el.getBoundingClientRect()[t.start]-a[t.start];n=s,i=t.scroll,o=e+r+u}else n=this.$el,i=t.scroll,o=e;n[i]=o},itemsLimitError(){throw setTimeout(()=>{console.log("It seems the scroller element isn't scrolling, so it tries to render all the items at once.","Scroller:",this.$el),console.log("Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.")}),new Error("Rendered items limit reached")},sortViews(){this.pool.sort((e,t)=>e.nr.index-t.nr.index)}}};const $n={key:0,ref:"before",class:"vue-recycle-scroller__slot"},wn={key:1,ref:"after",class:"vue-recycle-scroller__slot"};function kn(e,t,n,i,o,s){const r=Ue("ResizeObserver"),a=je("observe-visibility");return qe((m(),w("div",{class:j(["vue-recycle-scroller",{ready:o.ready,"page-mode":n.pageMode,[`direction-${e.direction}`]:!0}]),onScrollPassive:t[0]||(t[0]=(...l)=>s.handleScroll&&s.handleScroll(...l))},[e.$slots.before?(m(),w("div",$n,[B(e.$slots,"before")],512)):S("v-if",!0),(m(),T(he(n.listTag),{ref:"wrapper",style:Ye({[e.direction==="vertical"?"minHeight":"minWidth"]:o.totalSize+"px"}),class:j(["vue-recycle-scroller__item-wrapper",n.listClass])},{default:$(()=>[(m(!0),w(U,null,X(o.pool,l=>(m(),T(he(n.itemTag),We({key:l.nr.id,style:o.ready?{transform:`translate${e.direction==="vertical"?"Y":"X"}(${l.position}px) translate${e.direction==="vertical"?"X":"Y"}(${l.offset}px)`,width:n.gridItems?`${e.direction==="vertical"&&n.itemSecondarySize||n.itemSize}px`:void 0,height:n.gridItems?`${e.direction==="horizontal"&&n.itemSecondarySize||n.itemSize}px`:void 0}:null,class:["vue-recycle-scroller__item-view",[n.itemClass,{hover:!n.skipHover&&o.hoverKey===l.nr.key}]]},Ke(n.skipHover?{}:{mouseenter:()=>{o.hoverKey=l.nr.key},mouseleave:()=>{o.hoverKey=null}})),{default:$(()=>[B(e.$slots,"default",{item:l.item,index:l.nr.index,active:l.nr.used})]),_:2},1040,["style","class"]))),128)),B(e.$slots,"empty")]),_:3},8,["style","class"])),e.$slots.after?(m(),w("div",wn,[B(e.$slots,"after")],512)):S("v-if",!0),x(r,{onNotify:s.handleResize},null,8,["onNotify"])],34)),[[a,s.handleVisibilityChange]])}ue.render=kn;ue.__file="src/components/RecycleScroller.vue";const In={"h-full":"",flex:"~ col gap-4"},zn={"flex-auto":"","of-auto":"",flex:"~ col gap-2",pl6:"",pr4:""},Sn=R({__name:"ModuleInstallList",setup(e){const t=Ge(),n=Z(""),i=A(()=>new lt(t.value||[],{keys:["name","description","npm","category"]})),o=A(()=>n.value?i.value.search(n.value).map(s=>s.item):t.value);return(s,r)=>{const a=ot,l=st,u=Xt;return m(),w("div",In,[x(a,{mx6:"",mt6:"","text-xl":"",op75:"",icon:"i-carbon-intent-request-create",text:"Install Module"}),x(l,{modelValue:d(n),"onUpdate:modelValue":r[0]||(r[0]=f=>Je(n)?n.value=f:null),placeholder:"Search...",icon:"carbon-search",n:"primary",mx6:"","px-5":"","py-2":""},null,8,["modelValue"]),p("div",zn,[x(d(ue),{class:"scroller",items:d(o),"item-size":160,"key-field":"name"},{default:$(({item:f})=>[x(u,{item:f},null,8,["item"])]),_:1},8,["items"])])])}}});function P(){}P.prototype={diff:function(t,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.callback;typeof i=="function"&&(o=i,i={}),this.options=i;var s=this;function r(c){return o?(setTimeout(function(){o(void 0,c)},0),!0):c}t=this.castInput(t),n=this.castInput(n),t=this.removeEmpty(this.tokenize(t)),n=this.removeEmpty(this.tokenize(n));var a=n.length,l=t.length,u=1,f=a+l;i.maxEditLength&&(f=Math.min(f,i.maxEditLength));var g=[{newPos:-1,components:[]}],_=this.extractCommon(g[0],n,t,0);if(g[0].newPos+1>=a&&_+1>=l)return r([{value:this.join(n),count:n.length}]);function v(){for(var c=-1*u;c<=u;c+=2){var b=void 0,E=g[c-1],I=g[c+1],O=(I?I.newPos:0)-c;E&&(g[c-1]=void 0);var h=E&&E.newPos+1<a,F=I&&0<=O&&O<l;if(!h&&!F){g[c]=void 0;continue}if(!h||F&&E.newPos<I.newPos?(b=Mn(I),s.pushComponent(b.components,void 0,!0)):(b=E,b.newPos++,s.pushComponent(b.components,!0,void 0)),O=s.extractCommon(b,n,t,c),b.newPos+1>=a&&O+1>=l)return r(Cn(s,b.components,n,t,s.useLongestToken));g[c]=b}u++}if(o)(function c(){setTimeout(function(){if(u>f)return o();v()||c()},0)})();else for(;u<=f;){var k=v();if(k)return k}},pushComponent:function(t,n,i){var o=t[t.length-1];o&&o.added===n&&o.removed===i?t[t.length-1]={count:o.count+1,added:n,removed:i}:t.push({count:1,added:n,removed:i})},extractCommon:function(t,n,i,o){for(var s=n.length,r=i.length,a=t.newPos,l=a-o,u=0;a+1<s&&l+1<r&&this.equals(n[a+1],i[l+1]);)a++,l++,u++;return u&&t.components.push({count:u}),t.newPos=a,l},equals:function(t,n){return this.options.comparator?this.options.comparator(t,n):t===n||this.options.ignoreCase&&t.toLowerCase()===n.toLowerCase()},removeEmpty:function(t){for(var n=[],i=0;i<t.length;i++)t[i]&&n.push(t[i]);return n},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};function Cn(e,t,n,i,o){for(var s=0,r=t.length,a=0,l=0;s<r;s++){var u=t[s];if(u.removed){if(u.value=e.join(i.slice(l,l+u.count)),l+=u.count,s&&t[s-1].added){var g=t[s-1];t[s-1]=t[s],t[s]=g}}else{if(!u.added&&o){var f=n.slice(a,a+u.count);f=f.map(function(v,k){var c=i[l+k];return c.length>v.length?c:v}),u.value=e.join(f)}else u.value=e.join(n.slice(a,a+u.count));a+=u.count,u.added||(l+=u.count)}}var _=t[r-1];return r>1&&typeof _.value=="string"&&(_.added||_.removed)&&e.equals("",_.value)&&(t[r-2].value+=_.value,t.pop()),t}function Mn(e){return{newPos:e.newPos,components:e.components.slice(0)}}var be=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,xe=/\S/,Ne=new P;Ne.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!xe.test(e)&&!xe.test(t)};Ne.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&be.test(t[n])&&be.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var ce=new P;ce.tokenize=function(e){var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var i=0;i<n.length;i++){var o=n[i];i%2&&!this.options.newlineIsToken?t[t.length-1]+=o:(this.options.ignoreWhitespace&&(o=o.trim()),t.push(o))}return t};function Tn(e,t,n){return ce.diff(e,t,n)}var On=new P;On.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var Vn=new P;Vn.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function J(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?J=function(t){return typeof t}:J=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},J(e)}var Nn=Object.prototype.toString,W=new P;W.useLongestToken=!0;W.tokenize=ce.tokenize;W.castInput=function(e){var t=this.options,n=t.undefinedReplacement,i=t.stringifyReplacer,o=i===void 0?function(s,r){return typeof r>"u"?n:r}:i;return typeof e=="string"?e:JSON.stringify(se(e,null,null,o),o," ")};W.equals=function(e,t){return P.prototype.equals.call(W,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function se(e,t,n,i,o){t=t||[],n=n||[],i&&(e=i(o,e));var s;for(s=0;s<t.length;s+=1)if(t[s]===e)return n[s];var r;if(Nn.call(e)==="[object Array]"){for(t.push(e),r=new Array(e.length),n.push(r),s=0;s<e.length;s+=1)r[s]=se(e[s],t,n,i,o);return t.pop(),n.pop(),r}if(e&&e.toJSON&&(e=e.toJSON()),J(e)==="object"&&e!==null){t.push(e),r={},n.push(r);var a=[],l;for(l in e)e.hasOwnProperty(l)&&a.push(l);for(a.sort(),s=0;s<a.length;s+=1)l=a[s],r[l]=se(e[l],t,n,i,l);t.pop(),n.pop()}else r=e;return r}var re=new P;re.tokenize=function(e){return e.slice()};re.join=re.removeEmpty=function(e){return e};const Ln=R({__name:"CodeDiff",props:{from:null,to:null,lang:null},setup(e){const t=e;function n(a,l){const u=Tn(a.trim(),l.trim()),f=[],g=[],_=[];for(const v of u){const k=v.value.trimEnd().split(`
|
|
3
|
+
`);for(const c of k)v.added?(f.push(_.length),_.push(c)):(v.removed&&g.push(_.length),_.push(c))}return{added:f,removed:g,result:_.join(`
|
|
4
|
+
`)}}const i=A(()=>n(t.from,t.to));function o(a){let l=0;return a.replace(/class="shiki/,'class="shiki diff').replace(/class="line"/g,u=>(l++,i.value.added.includes(l-1)?'class="line line-added"':i.value.removed.includes(l-1)?'class="line line-removed"':u))}const s=Z();Xe(r);function r(){const a=Ze(s);a&&a.querySelector(".line-added,.line-removed")?.scrollIntoView()}return(a,l)=>{const u=Ce;return m(),T(u,{ref_key:"elRef",ref:s,code:d(i).result,lang:e.lang,"transform-rendered":o,onLoaded:r},null,8,["code","lang"])}}}),En={flex:"~ col gap-2","w-150":"",p4:"",border:"t base"},An={capitalize:""},Bn=p("p",{op50:""}," Following command will be executed in your terminal: ",-1),Dn={op50:""},Rn=p("p",null,[p("span",{op50:""},"After that, Nuxt will "),p("span",{"text-orange":""},"restart automatically"),M(". ")],-1),Pn={flex:"~ gap-3",mt2:"","justify-end":""},Fn=R({__name:"ModuleActionDialog",setup(e){const t=Qe(),n=ze();return(i,o)=>{const s=ae,r=Ce,a=at,l=Ln,u=ut,f=le,g=tt;return m(),T(d(et),null,{default:$(({resolve:_,args:v})=>[x(g,{"model-value":!0,onClose:k=>_(!1)},{default:$(()=>[x(s,{mod:{},info:v[0],border:"none","w-150":"","n-panel-grids":""},null,8,["info"]),p("div",En,[p("h2",{"text-xl":"",class:j(v[2]==="install"?"text-primary":"text-red")},[p("span",An,L(v[2]),1),M(),p("code",null,L(v[0].name),1),M("? ")],2),Bn,x(r,{code:v[1].commands.join(" "),lang:"bash",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),p("p",Dn,[M(" Then your "),x(a,{role:"button",n:"primary",onClick:o[0]||(o[0]=k=>d(n)(d(t)?._nuxtConfigFile)),textContent:"Nuxt config"}),M(" will be updated as: ")]),x(l,{from:v[1].configOriginal,to:v[1].configGenerated,"max-h-80":"","of-auto":"",py2:"",border:"~ base rounded",lang:"ts"},null,8,["from","to"]),Rn,p("div",Pn,[x(u,{n:"sm purple","flex-auto":"",icon:"carbon-chemistry"},{default:$(()=>[M(" Experimental. Backup your project first. ")]),_:1}),x(f,{onClick:k=>_(!1)},{default:$(()=>[M(" Cancel ")]),_:2},1032,["onClick"]),x(f,{n:"solid",capitalize:"",class:j(v[2]==="install"?"n-primary":"n-red"),onClick:k=>_(!0)},{default:$(()=>[M(L(v[2]),1)]),_:2},1032,["class","onClick"])])])]),_:2},1032,["onClose"])]),_:1})}}}),Hn={class:"markdown-body"},Un=p("h1",null,"Modules",-1),jn=p("p",null,[M("Nuxt provides a module system to extend the framework core and simplify integrations. You don’t need to develop everything from scratch or maintain boilerplate if there is already a Nuxt module for it. Adding Nuxt modules is possible using "),p("code",null,"nuxt.config"),M(".")],-1),qn=p("p",null,[p("a",{href:"https://nuxt.com/docs/guide/concepts/modules",target:"_blank",rel:"noopener"},"Learn more on the documentation")],-1),Wn=[Un,jn,qn],Kn={__name:"modules",setup(e,{expose:t}){return t({frontmatter:{}}),(i,o)=>(m(),w("div",Hn,Wn))}},Yn={"h-full":"","w-full":"","of-auto":""},Gn=p("div",{"i-carbon-intent-request-create":"","text-4xl":"",op40:"","group-hover":"op75 text-primary",transition:""},null,-1),Jn=p("div",{"text-lg":"",op40:"","group-hover":"op75 text-primary",transition:""}," Install New Module ",-1),Xn={key:0,border:"l base",pos:"fixed bottom-0 right-0 top-0","z-200":"","w-150":"","bg-base":""},pi=R({__name:"modules",setup(e){const t=Z(!1),n=ke(),i=A(()=>n.value.filter(s=>s.isPackageModule)),o=A(()=>n.value.filter(s=>!s.isPackageModule));return(s,r)=>{const a=Gt,l=we,u=it,f=Se,g=Sn,_=Fn,v=Kn,k=ct;return m(),w(U,null,[p("div",Yn,[x(u,{icon:"carbon-3d-mpr-toggle",text:"Installed Modules","container-class":"grid grid-cols-minmax-400px gap3 px4",padding:!1,description:`Total modules: ${d(i).length}`},{default:$(()=>[(m(!0),w(U,null,X(d(i),c=>(m(),T(a,{key:c.name,mod:c},null,8,["mod"]))),128)),x(l,{border:"1.5 dashed","min-h-30":"",p4:"",transition:"",hover:"border-primary",flex:"~ col gap-2 items-center justify-center",role:"button",class:"group",onClick:r[0]||(r[0]=c=>t.value=!0)},{default:$(()=>[Gn,Jn]),_:1})]),_:1},8,["description"]),d(o).length?(m(),T(u,{key:0,icon:"carbon-3d-mpr-toggle",text:"User Modules","container-class":"grid grid-cols-minmax-400px gap3 px4",padding:!1,description:`Total modules: ${d(o).length}`},{default:$(()=>[(m(!0),w(U,null,X(d(o),c=>(m(),w(U,{key:c.meta?.name||c.entryPath},[c.meta?.name||c.entryPath?(m(),T(a,{key:0,mod:c},null,8,["mod"])):S("",!0)],64))),128))]),_:1},8,["description"])):S("",!0),x(_e,{name:"fade-in"},{default:$(()=>[d(t)?(m(),w("div",{key:0,class:"fixed bottom-0 left-0 right-0 top-0 z-100","bg-black:20":"","backdrop-blur-2":"",onClick:r[1]||(r[1]=c=>t.value=!1)})):S("",!0)]),_:1}),x(_e,{name:"slide-in"},{default:$(()=>[d(t)?(m(),w("div",Xn,[x(f,{icon:"carbon-close",pos:"absolute top-3 right-3","rounded-full":"","text-xl":"",onClick:r[2]||(r[2]=c=>t.value=!1)}),x(g)])):S("",!0)]),_:1}),x(_)]),x(k,null,{default:$(()=>[x(v)]),_:1})],64)}}});export{pi as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{aU as r,V as n}from"./entry.5024288d.js";const t={};function o(e,s){return n(e.$slots,"default")}const c=r(t,[["render",o]]);export{c as default};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{_ as Z}from"./NTextInput.vue.fc99730b.js";import{_ as ee}from"./NIconButton.vue.d0a9a760.js";import{_ as te}from"./Navbar.vue.f2b7b652.js";import{_ as oe}from"./NLink.vue.404a4f6c.js";import{a as C,o,c as N,w as g,V as ne,h as a,v as x,n as ae,g as se,a8 as re,p as T,aB as ie,r as I,u as e,f as t,q as R,s as M,t as _,F as $,i as d,l as k,a3 as V,k as ce,P as B,aC as j,aD as le,aE as de,Q as pe,aF as me,aG as ue,aH as ge,aI as P,af as he,G as _e,aJ as fe}from"./entry.5024288d.js";import{_ as z}from"./NSectionBlock.5d6e9b8e.js";import{_ as ve}from"./NCodeBlock.vue.d5603a1f.js";import{a as be,u as D}from"./editor.02d33c7f.js";import{_ as we}from"./HelpFab.vue.748cc95d.js";import"./NIconTitle.vue.c8b7e265.js";import"./client.b1955e54.js";const xe={key:0,"i-carbon:arrow-up-right":"","translate-y--1":"","text-xs":"",op50:""},J=C({__name:"NTextExternalLink",props:{link:null},setup(n){return(m,i)=>(o(),N(re(n.link?oe:"div"),ae(se(n.link?{href:n.link,target:"_blank",rel:"noopener noreferrer"}:{})),{default:g(()=>[ne(m.$slots,"default"),n.link?(o(),a("div",xe)):x("",!0)]),_:3},16))}}),H=[{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:"recommended",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:"recommended",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:"recommended",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:"recommended",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."}],ye={flex:"~ wrap","mt--2":"","w-full":"","flex-none":""},ke=["onClick"],$e=t("div",{border:"b base","flex-auto":""},null,-1),Te={key:0,"x-divider":""},Ce={key:1,"x-divider":""},Se={flex:"~ gap-1 items-center",px4:"",py2:""},Ne=t("div",{"i-carbon-warning":"","text-orange":""},null,-1),Me={"w-full":"",p2:"",op75:""},Oe={key:1,m4:"",flex:"~ col gap-2"},Ae={flex:"~ gap-1 wrap items-center"},Ie={key:1},Re={flex:"~ gap-2",n:"sm primary",absolute:"","right-2":"","top-2":""},Be=C({__name:"OpenGraphMissingTabs",props:{tags:null,matchedRouteFilepath:null},setup(n){const m=n,i=T(()=>H.filter(c=>!m.tags?.some(p=>p.name===c.name))),l=T(()=>{let c={};const p={};i.value.forEach(h=>{h.seoMeta?Object.assign(p,h.seoMeta):c=ie(c,h.head)});const b=[];if(Object.keys(p).length){const h=JSON.stringify(p,null,2).replace(/"([^"]+)":/g,"$1:").replace(/"/g,"'");b.push(`useSeoMeta(${h})`)}if(Object.keys(c).length){const h=JSON.stringify(c,null,2).replace(/"([^"]+)":/g,"$1:").replace(/"/g,"'");b.push(`useHead(${h})`)}return b.join(`
|
|
2
|
+
|
|
3
|
+
`)}),u=be(),O=D(),y=["Missing Tags","Code Snippet"],f=I(y[0]);return(c,p)=>{const b=J,h=V,S=ce,A=ve,E=z;return e(i).length?(o(),N(E,{key:0,text:"Missing Tags",description:`${e(i).length} missing tags`,icon:"carbon:warning-other","header-class":"text-orange op100! [[open]_&]:text-inherit",padding:!1},{default:g(()=>[t("div",ye,[(o(),a($,null,R(y,(s,r)=>t("button",{key:r,px4:"",py2:"",border:"r t base",hover:"bg-active",class:M(s===e(f)?"":"border-b"),onClick:v=>f.value=s},[t("div",{class:M(s===e(f)?"":"op30"),capitalize:""},_(s),3)],10,ke)),64)),$e]),e(f)===y[0]?(o(),N(h,{key:0,grid:"~ cols-[max-content_1fr]",m4:"","items-center":"","justify-between":"","of-hidden":""},{default:g(()=>[(o(!0),a($,null,R(e(i),(s,r)=>(o(),a($,{key:r},[r?(o(),a("div",Te)):x("",!0),r?(o(),a("div",Ce)):x("",!0),t("div",Se,[Ne,d(b,{op50:"",link:s.docs,n:"orange"},{default:g(()=>[k(_(s.name),1)]),_:2},1032,["link"])]),t("div",Me,_(s.description),1)],64))),128))]),_:1})):(o(),a("div",Oe,[t("p",Ae,[d(S,{icon:"carbon-copy",n:"xs","px-2":"",onClick:p[0]||(p[0]=s=>e(u)(e(l)))},{default:g(()=>[k(" Copy ")]),_:1}),k(" the following code snippet and paste it into your "),n.matchedRouteFilepath?(o(),N(S,{key:0,icon:"carbon-launch",n:"xs","px-2":"",onClick:p[1]||(p[1]=s=>e(O)(n.matchedRouteFilepath))},{default:g(()=>[k(" page component ")]),_:1})):(o(),a("span",Ie,"page component")),k(" to full fill the missing tags. ")]),d(h,{relative:"","n-code-block":""},{default:g(()=>[d(A,{code:e(l),lang:"ts",lines:!1,"w-full":"","of-auto":"",p3:""},null,8,["code"]),t("div",Re,[d(S,{icon:"carbon-copy",onClick:p[2]||(p[2]=s=>e(u)(e(l)))},{default:g(()=>[k(" Copy ")]),_:1})])]),_:1})]))]),_:1},8,["description"])):x("",!0)}}}),Ee={class:"max-w-[524px] min-w-[524px] cursor-pointer bg-base"},Le={class:"break-words border border-base px-[12px] py-[10px] antialiased"},Fe={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"}},Pe={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=C({__name:"SocialFacebook",props:{card:null},setup(n){return(m,i)=>(o(),a("div",Ee,[t("div",{class:"h-[274px] border border-b-0 border-base bg-cover bg-center bg-no-repeat",style:B({backgroundImage:`url(${JSON.stringify(n.card.image)})`})},null,4),t("div",Le,[t("div",Fe,_(n.card.url),1),t("div",Ge,[t("div",Pe,_(n.card.title),1),t("div",Ve,_(n.card.description),1)])])]))}}),ze={class:"max-w-[438px] min-w-[438px] border border-base rounded-[0.85714em] bg-base -outline-offset-1"},De={class:"break-words border-base p-[0.75em] antialiased",flex:"~ col justify-center gap-1"},Je={class:"mt-[0.32333em] overflow-hidden truncate whitespace-nowrap text-[14px] leading-[18px] lowercase op50"},He={class:"m-0 truncate text-[14px] font-semibold leading-[19px]"},Ue={class:"line-clamp-2 block select-none overflow-hidden break-words text-left text-[14px] leading-[18px] op50"},qe=C({__name:"SocialTwitter",props:{tags:null},setup(n){const m=n,i=T(()=>j(m.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"}]})),l=T(()=>i.value.image?m.tags.find(u=>u.tag==="meta"&&u.name==="twitter:card")?.value||"summary_large_image":"summary");return(u,O)=>(o(),a("div",ze,[t("div",{class:M(["cursor-pointer overflow-hidden leading-[1.3em]",e(l)==="summary_large_image"?"":"flex"]),hover:"bg-[#88888805]"},[e(l)==="summary_large_image"?(o(),a("div",{key:0,class:"h-[220px] border-b border-base bg-cover bg-center bg-no-repeat",style:B({backgroundImage:`url(${JSON.stringify(e(i).image)})`})},null,4)):(o(),a("div",{key:1,class:"h-[122px] w-[122px] flex-none border-r border-base bg-cover bg-center bg-no-repeat",style:B({backgroundImage:`url(${JSON.stringify(e(i).image)})`})},null,4)),t("div",De,[t("div",Je,_(e(i).url),1),t("div",He,_(e(i).title),1),t("div",Ue,_(e(i).description),1)])],2)]))}}),Ke={class:"max-w-[520px] min-w-[520px] cursor-pointer overflow-hidden border border-base rounded-[2px] shadow-md bg-base"},Qe={class:"break-words p-[10px] antialiased"},We={class:"block h-auto max-h-[50px] border-separate select-none break-words text-left",style:{"border-spacing":"0px"}},Ye={class:"pb-[2px] text-[16px] font-semibold leading-[24px]"},Xe={class:"overflow-hidden truncate whitespace-nowrap text-xs font-normal uppercase op85"},Ze=C({__name:"SocialLinkedin",props:{card:null},setup(n){return(m,i)=>(o(),a("div",Ke,[t("div",{class:"h-[270px] border-b border-base bg-cover bg-center bg-no-repeat",style:B({backgroundImage:`url(${JSON.stringify(n.card.image)})`})},null,4),t("div",Qe,[t("div",We,[t("div",Ye,_(n.card.title),1),t("div",Xe,_(n.card.url),1)])])]))}}),et={"h-full":"","w-520":"",flex:"~ col"},tt={flex:"~ wrap","w-full":"","flex-none":""},ot=["onClick"],nt=t("div",{border:"b base","flex-auto":""},null,-1),at={flex:"~ items-center justify-center","flex-auto":"",p4:"","n-panel-grids":""},st={key:0},rt={key:1},it={key:2},ct=C({__name:"SocialPreviewGroup",props:{tags:null},setup(n){const m=n,i=["twitter","facebook","linkedin"],l=I(i[0]),u=T(()=>j(m.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(O,y)=>{const f=je,c=qe,p=Ze;return o(),a("div",et,[t("div",tt,[(o(),a($,null,R(i,(b,h)=>t("button",{key:h,px4:"",py2:"",border:"r base",hover:"bg-active",class:M(b===e(l)?"":"border-b"),onClick:S=>l.value=b},[t("div",{class:M(b===e(l)?"":"op30"),capitalize:""},_(b),3)],10,ot)),64)),nt]),t("div",at,[e(l)==="facebook"?(o(),a("div",st,[d(f,{card:e(u)},null,8,["card"])])):e(l)==="twitter"?(o(),a("div",rt,[d(c,{tags:n.tags},null,8,["tags"])])):e(l)==="linkedin"?(o(),a("div",it,[d(p,{card:e(u)},null,8,["card"])])):x("",!0)])])}}}),lt={class:"markdown-body"},dt=le('<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),pt=[dt],mt={__name:"open-graph",setup(n,{expose:m}){return m({frontmatter:{}}),(l,u)=>(o(),a("div",lt,pt))}},ut={flex:"~","h-full":"","w-full":"","of-hidden":""},gt={"h-full":"","flex-auto":"","of-auto":""},ht={"flex-none":"",flex:"~ gap2 items-center"},_t={flex:"~ col"},ft={key:0,"x-divider":""},vt={key:1,"x-divider":""},bt={mr2:"",px4:"",py2:""},At=C({__name:"open-graph",setup(n){const m=I(0),i=de(),l=pe(async()=>(m.value,(await i.value?.resolveTags()).map(r=>{const v=r.props||{};return r.tag==="htmlAttrs"&&v.lang?{tag:"html",name:"lang",value:v.lang}:v.charset?{tag:"meta",name:"charset",value:v.charset}:{tag:r.tag,name:v.property??v.name??v.rel??r.tag,value:v.content??v.href??r.textContent??JSON.stringify(v)}})),[]),u=I(!0);function O(){m.value+=1}const y=me(),f=ue(),c=I(""),p=ge(),b=D();async function h(){c.value!==f.value.path&&y.value.push(c.value||"/")}const S=T(()=>c.value===f.value.path?[]:y.value.resolve(c.value||"/").matched),A=T(()=>{const s=p.value.find(r=>r.path===f.value?.matched?.[0]?.path);return s?.file||s?.meta?.file});function E(s){return H.find(r=>r.name===s.name)?.docs}return P(f).toBeTruthy().then(s=>{c.value=s.path}),P(y).toBeTruthy().then(s=>{s.afterEach(()=>{he(()=>{c.value=f.value.path})})}),(s,r)=>{const v=Z,L=ee,U=te,G=J,q=V,K=z,Q=Be,W=ct,Y=mt,X=we;return o(),a($,null,[t("div",ut,[t("div",gt,[d(U,null,{search:g(()=>[d(v,{modelValue:e(c),"onUpdate:modelValue":r[0]||(r[0]=w=>_e(c)?c.value=w:null),placeholder:"Route",icon:"carbon-direction-right-01 scale-y--100",n:"primary","flex-auto":"","font-mono":"",class:M(["px-5 py-2",e(f).path===e(c)?"":e(S).length?"text-green":"text-orange"]),onKeydown:fe(h,["enter"])},null,8,["modelValue","class","onKeydown"])]),actions:g(()=>[t("div",ht,[e(A)?(o(),N(L,{key:0,"text-lg":"",icon:"carbon:launch",title:"Open file in editor",onClick:r[1]||(r[1]=w=>e(b)(e(A)))})):x("",!0),d(L,{"text-lg":"",icon:"carbon:reset",title:"Refresh Data",onClick:O}),d(L,{"text-lg":"",icon:e(u)?"carbon:side-panel-open":"carbon:open-panel-right",title:"Toggle Preview",onClick:r[2]||(r[2]=w=>u.value=!e(u))},null,8,["icon"])])]),_:1}),t("div",_t,[d(K,{text:"Tags",icon:"carbon:tag-group"},{default:g(()=>[d(q,{grid:"~ cols-[max-content_1fr]","items-center":"","justify-between":"","of-hidden":""},{default:g(()=>[(o(!0),a($,null,R(e(l),(w,F)=>(o(),a($,{key:F},[F?(o(),a("div",ft)):x("",!0),F?(o(),a("div",vt)):x("",!0),t("div",bt,[d(G,{op50:"",link:E(w),n:"primary"},{default:g(()=>[k(_(w.name),1)]),_:2},1032,["link"])]),d(G,{link:w.value.match(/^https?:\/\//)?w.value:void 0,"w-full":"",p2:"","font-mono":"",n:"primary"},{default:g(()=>[k(_(w.value),1)]),_:2},1032,["link"])],64))),128))]),_:1})]),_:1}),d(Q,{tags:e(l),"matched-route-filepath":e(A)},null,8,["tags","matched-route-filepath"])])]),e(u)&&e(l)?.length?(o(),N(W,{key:0,tags:e(l),border:"l base","w-540px":"","flex-none":""},null,8,["tags"])):x("",!0)]),d(X,null,{default:g(()=>[d(Y)]),_:1})],64)}}});export{At as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as V,b as j,R as D,a7 as I,al as R,aK as A,aL as L,D as M,p as T,c,w as o,o as s,u as e,h as d,f as t,i as l,t as r,v as a,F as p,aM as $,l as n,j as F,m as O,H as P,k as W}from"./entry.5024288d.js";import{_ as G}from"./Badge.bd9688d4.js";import{_ as H}from"./NpmVersionCheck.vue.06d8aff2.js";import{_ as E}from"./NTip.vue.3c4f8e2d.js";import{_ as K}from"./NPanelGrids.7b5efdc5.js";import"./NCodeBlock.vue.d5603a1f.js";import"./client.b1955e54.js";import"./NCheckbox.vue.96f7ae1a.js";const U="0.5.1",q={key:0},z={key:1,flex:"~ col gap2",ma:"","h-full":"","max-w-300":"","w-full":"",p8:"",px20:""},J=t("div",{"flex-auto":""},null,-1),Q={flex:"~ col","mt-20":"","items-center":""},X={flex:"~","mt--10":"","items-center":"","justify-center":""},Y={mb6:"","mt--1":"","text-center":"","text-sm":"",flex:"~ gap-1"},Z=t("span",{op40:""}," Nuxt DevTools ",-1),tt={op40:""},et={flex:"~ gap2 wrap"},ot={p4:"","theme-card-green":"",flex:"~ col auto"},nt=t("div",{"logos-nuxt-icon":"","text-3xl":""},null,-1),st={key:0,p4:"","theme-card-green":"",flex:"~ col auto"},lt=t("div",{"logos-vue":"","text-3xl":""},null,-1),it=t("div",{"carbon-tree-view-alt":"","text-3xl":""},null,-1),at=t("div",{"i-carbon-assembly-cluster":"","text-3xl":""},null,-1),ct=t("div",{"carbon-function":"","text-3xl":""},null,-1),rt=t("div",{"carbon-3d-mpr-toggle":"","text-3xl":""},null,-1),ut=t("div",{"carbon-plug":"","text-3xl":""},null,-1),_t={flex:"~ col gap2"},dt={flex:"~ gap-6 wrap","mt-5":"","items-center":"","justify-center":""},pt=t("a",{href:"https://github.com/nuxt/devtools",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-blue",transition:""},[t("div",{"i-carbon-star":""}),n(" Star on GitHub ")],-1),mt=t("a",{href:"https://github.com/nuxt/devtools/discussions/29",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-yellow",transition:""},[t("div",{"i-carbon-data-enrichment":""}),n(" Ideas & Suggestions ")],-1),ht=t("a",{href:"https://github.com/nuxt/devtools/discussions/31",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-lime",transition:""},[t("div",{"i-carbon-plan":""}),n(" Project Roadmap ")],-1),xt=t("a",{href:"https://github.com/nuxt/devtools/issues",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-rose",transition:""},[t("div",{"i-carbon-debug":""}),n(" Bug Reports ")],-1),ft=t("div",{"i-carbon-settings":""},null,-1),gt=t("div",{"flex-auto":""},null,-1),vt={flex:"~ gap-1","items-center":"","justify-center":"","text-sm":"",op40:""},bt=t("span",null,"+",-1),kt=t("span",null,"+",-1),wt=t("span",null,"+",-1),yt=t("span",null,"+",-1),Lt=V({__name:"overview",setup(Ct){const m=j(),i=D(),v=I(),h=R(),b=A(),k=L(),w=M();function y(){F.value=!0,w.push("/")}const x=T(()=>m.value?.nuxt.vueApp.version);return(f,Nt)=>{const C=O,N=G,g=H,u=P,S=E,_=W,B=K;return s(),c(B,{"h-screen":"","w-full":"",flex:""},{default:o(()=>[e(i)?(s(),d("div",z,[J,t("div",Q,[t("div",X,[l(C,{"h-18":""}),t("button",{"mr--16":"","mt--6":"",onClick:y},[l(N,{"bg-green-400:10":"","text-green-400":"",title:"preview",textContent:"preview"})])]),t("div",Y,[Z,t("code",tt,"v"+r(e(U)),1),l(g,{"package-name":"@nuxt/devtools",options:{dev:!0},"show-version":!1})])]),t("div",et,[t("div",ot,[nt,l(g,{"package-name":"nuxt",options:{dev:!0}})]),e(x)?(s(),d("div",st,[lt,t("code",null,"v"+r(e(x)),1)])):a("",!0),e(i)?(s(),d(p,{key:1},[e(i)&&e(i).pages&&e(m)?(s(),c(u,{key:0,"min-w-40":"",p4:"","theme-card-lime":"",flex:"~ col auto",to:"/modules/pages"},{default:o(()=>[it,t("div",null,r(e(b).length)+" pages",1)]),_:1})):a("",!0),e(i)?(s(),c(u,{key:1,"min-w-40":"",p4:"","theme-card-lime":"",flex:"~ col auto",to:"/modules/components"},{default:o(()=>[at,t("div",null,r(e(v).length)+" components",1)]),_:1})):a("",!0),e(i)&&e(h)?(s(),c(u,{key:2,"min-w-40":"",p4:"","theme-card-yellow":"",flex:"~ col auto",to:"/modules/imports"},{default:o(()=>[ct,t("div",null,r(e(h).imports.length)+" imports",1)]),_:1})):a("",!0),e(i)?(s(),c(u,{key:3,"min-w-40":"",p4:"","theme-card-purple":"",flex:"~ col auto",to:"/modules/modules"},{default:o(()=>[rt,t("div",null,r(e(i)._installedModules.length)+" modules",1)]),_:1})):a("",!0),e(i)?(s(),c(u,{key:4,"min-w-40":"",p4:"","theme-card-teal":"",flex:"~ col auto",to:"/modules/plugins"},{default:o(()=>[ut,t("div",null,r(e(i).plugins.length)+" plugins",1)]),_:1})):a("",!0)],64)):a("",!0)]),t("div",_t,[("showConnectionWarning"in f?f.showConnectionWarning:e($))?(s(),c(S,{key:0,n:"yellow5",icon:"carbon-unlink","justify-center":""},{default:o(()=>[n(" Not connected to the client app, showing server-side data only. Use the embedded mode for full features. ")]),_:1})):a("",!0)]),t("div",dt,[pt,mt,ht,xt,l(u,{to:"/settings",flex:"~ gap1","inline-block":"","items-center":"",op50:"","hover:op80":""},{default:o(()=>[ft,n(" Settings ")]),_:1})]),gt,t("div",vt,[n(" Press "),e(k)?(s(),d(p,{key:0},[l(_,{n:"xs",class:"px2"},{default:o(()=>[n(" ⇧ Shift ")]),_:1}),bt,l(_,{n:"xs",class:"px2"},{default:o(()=>[n(" ⌥ Option ")]),_:1}),kt,l(_,{n:"xs",class:"px2"},{default:o(()=>[n(" D ")]),_:1})],64)):(s(),d(p,{key:1},[l(_,{n:"xs",class:"px2"},{default:o(()=>[n(" Shift ")]),_:1}),wt,l(_,{n:"xs",class:"px2"},{default:o(()=>[n(" Alt ")]),_:1}),yt,l(_,{n:"xs",class:"px2"},{default:o(()=>[n(" D ")]),_:1})],64)),n(" to toggle DevTools ")])])):(s(),d("div",q," Loading... "))]),_:1})}}});export{Lt as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as T}from"./NTextInput.vue.fc99730b.js";import{_ as M}from"./Badge.bd9688d4.js";import{a as B,r as F,p as R,aP as j,a4 as q,u as t,o,h as s,f as e,t as $,c as g,w as k,aQ as G,F as h,q as I,v,i as p,l as V,s as L,k as H,aR as S,aF as J,aG as W,R as Q,Y,aH as X,aI as E,af as Z,G as ee,aJ as te,y as oe}from"./entry.5024288d.js";import{_ as A}from"./FilepathItem.vue.1c96e6cc.js";import{u as ne}from"./editor.02d33c7f.js";import{_ as ae}from"./NSectionBlock.5d6e9b8e.js";import{_ as se}from"./LaunchPage.vue.b71fffc3.js";import{_ as re}from"./HelpFab.vue.748cc95d.js";import"./NIconTitle.vue.c8b7e265.js";import"./NMarkdown.vue.4d74a5d5.js";import"./client.b1955e54.js";import"./NPanelGrids.7b5efdc5.js";import"./NIconButton.vue.d0a9a760.js";const le={block:"","cursor-pointer":""},ie={p2:""},ue=["onSubmit"],ce=e("div",{px2:"","text-sm":"",op50:""}," Fill params and navigate: ",-1),de={flex:"~","items-center":"",p2:"","font-mono":"","text-sm":""},pe={key:1},_e=B({__name:"RoutePathItem",props:{route:null},emits:["navigate"],setup(c,{emit:u}){const l=c,_=F([]),f=R(()=>{const n=j(l.route.path);return _.value=Array.from({length:n.length},()=>""),n}),y=R(()=>f.value.map((n,m)=>n[0]===":"?_.value[m]:n).join("").replace(/\/+/g,"/")),x=R(()=>l.route.path.includes(":"));function i(){u("navigate",y.value)}return(n,m)=>{const d=T,w=H,a=q("VDropdown");return t(x)?(o(),g(a,{key:1},{popper:k(({hide:r})=>[e("div",ie,[e("form",{flex:"~ col",onSubmit:G(()=>{i(),r()},["prevent"])},[t(x)?(o(),s(h,{key:0},[ce,e("div",de,[(o(!0),s(h,null,I(t(f),(b,C)=>(o(),s(h,{key:C},[b[0]===":"?(o(),g(d,{key:0,modelValue:t(_)[C],"onUpdate:modelValue":P=>t(_)[C]=P,"w-20":"","n-sm":"",placeholder:b.slice(1)},null,8,["modelValue","onUpdate:modelValue","placeholder"])):(o(),s("span",pe,$(b),1))],64))),128))])],64)):v("",!0),p(w,{block:"",n:"primary"},{default:k(()=>[V(" Navigate ")]),_:1})],40,ue)])]),default:k(()=>[e("code",le,[(o(!0),s(h,null,I(t(f),(r,b)=>(o(),s("span",{key:b,class:L(r[0]===":"?"text-gray border border-dashed rounded border-gray:50 px1":"")},$(r[0]===":"?r.slice(1):r),3))),128))])]),_:1})):(o(),s("button",{key:0,onClick:i},[e("code",null,$(c.route.path),1)]))}}}),me={"w-full":""},he=e("thead",{border:"b base"},[e("tr",null,[e("th",{"text-left":""}),e("th",{"text-left":""}," Route Path "),e("th",{"text-left":""}," Name "),e("th",{"text-left":""}," Middleware "),e("th",null," Layout ")])],-1),fe={"w-20":"","pr-1":""},ge={flex:"","items-center":"","justify-end":""},ve={"text-sm":""},ye={flex:"inline gap3","items-center":""},xe={op0:"","group-hover:op100":"",flex:"~ gap1"},be=["onClick"],ke=e("div",{"i-carbon-script-reference":""},null,-1),$e=[ke],we={"w-0":"","ws-nowrap":"","pr-1":"","text-left":"","font-mono":"","text-sm":"",op50:""},Ce={"w-0":"","ws-nowrap":"","pr-1":"","text-center":"","font-mono":"","text-sm":"",op50:""},Ne={"w-0":"","ws-nowrap":"","text-center":"","font-mono":"","text-sm":""},Re={key:0},Pe=["onClick"],Ve=B({__name:"RoutesTable",props:{pages:null,layouts:null,matched:null,matchedPending:null},emits:["navigate"],setup(c){const u=c,l=ne(),_=S(),f=R(()=>[...u.pages].sort((i,n)=>i.path.localeCompare(n.path)));function y(i){const n=u.layouts.find(m=>m.name===i);n&&l(n.file)}function x(i){if(typeof i=="string")return _.value?.middleware.find(n=>n.name===i)?.path}return(i,n)=>{const m=M,d=_e,w=A;return o(),s("div",null,[e("table",me,[he,e("tbody",null,[(o(!0),s(h,null,I(t(f),a=>(o(),s("tr",{key:a.name,class:"group","h-7":"",border:"b dashed transparent hover:base"},[e("td",fe,[e("div",ge,[c.matched.find(r=>r.name===a.name)?(o(),g(m,{key:0,"bg-green-400:10":"","text-green-400":"",title:"active",textContent:"active"})):v("",!0),c.matchedPending.find(r=>r.name===a.name)?(o(),g(m,{key:1,"bg-teal-400:10":"","text-teal-400":"",title:"next",textContent:"next"})):v("",!0)])]),e("td",ve,[e("div",ye,[p(d,{route:a,class:L(c.matched.find(r=>r.name===a.name)?"text-primary":c.matchedPending.find(r=>r.name===a.name)?"text-teal":""),onNavigate:n[0]||(n[0]=r=>i.$emit("navigate",r))},null,8,["route","class"]),e("div",xe,[a.file||a.meta?.file?(o(),s("button",{key:0,"text-sm":"",op40:"",hover:"op100 text-primary",title:"Open in editor",onClick:r=>t(l)(a.file||a.meta?.file)},$e,8,be)):v("",!0)])])]),e("td",we,$(a.name),1),e("td",Ce,[p(w,{filepath:x(a.meta.middleware),override:`${a.meta.middleware||"-"}`},null,8,["filepath","override"])]),e("td",Ne,[a.meta.layout===!1?(o(),s("span",Re,"-")):a.meta.layout?(o(),s("button",{key:1,onClick:r=>y(a.meta.layout)},$(a.meta.layout),9,Pe)):(o(),s("button",{key:2,"text-sm":"",op15:"",onClick:n[1]||(n[1]=r=>y("default"))}," (default) "))])]))),128))])])])}}}),Ie={class:"markdown-body"},Be=e("h1",null,"Pages",-1),Le=e("p",null,[V("One core feature of Nuxt is the file system router. Every Vue file inside the "),e("code",null,"pages/"),V(" directory creates a corresponding URL (or route) that displays the contents of the file. By using dynamic imports for each page, Nuxt leverages code-splitting to ship the minimum amount of JavaScript for the requested route.")],-1),Ee=e("p",null,[e("a",{href:"https://nuxt.com/docs/getting-started/routing",target:"_blank",rel:"noopener"},"Learn more on the documentation")],-1),Te=e("hr",null,null,-1),Me=e("h1",null,"Middlewares",-1),Fe=e("p",null,"Nuxt provides a customizable route middleware framework you can use throughout your application, ideal for extracting code that you want to run before navigating to a particular route.",-1),Se=e("p",null,[e("a",{href:"https://nuxt.com/docs/guide/directory-structure/middleware",target:"_blank",rel:"noopener"},"Learn more on the documentation")],-1),Ae=[Be,Le,Ee,Te,Me,Fe,Se],De={__name:"pages",setup(c,{expose:u}){return u({frontmatter:{}}),(_,f)=>(o(),s("div",Ie,Ae))}},Ue={key:0,"h-full":"","of-auto":""},ze={border:"b base",flex:"~ col gap1",px4:"",py3:"","navbar-glass":""},Ke=e("span",{op50:""},"Navigate from ",-1),Oe={"font-mono":""},je=e("span",{op50:""}," to ",-1),qe={key:1,op50:""},Ge=e("span",null,[V("Press "),e("b",{"font-bold":""},"Enter"),V(" to navigate")],-1),He={key:0,"text-orange":"",op75:""},Je={key:1,op50:""},We={"w-full":""},Qe=e("thead",{border:"b base","h-7":""},[e("tr",null,[e("th",{"text-left":""}," Name "),e("th",{"text-left":""}," Path ")])],-1),Ye={mr1:""},dt=B({__name:"pages",setup(c){const u=J(),l=W(),_=Q(),f=S(),y=Y(),x=X(),i=R(()=>f.value?.middleware||[]),n=F("");E(l).toBeTruthy().then(a=>{n.value=a.path}),E(u).toBeTruthy().then(a=>{a.afterEach(()=>{Z(()=>{n.value=l.value.path})})});async function m(){n.value!==l.value.path&&u.value.push(n.value||"/")}const d=R(()=>n.value===l.value.path?[]:u.value.resolve(n.value||"/").matched);function w(a){u.value.push(a)}return(a,r)=>{const b=T,C=Ve,P=ae,D=M,U=A,z=se,K=De,O=re;return o(),s(h,null,[t(_)?.pages&&t(u)?(o(),s("div",Ue,[e("div",ze,[e("div",null,[t(l).path!==t(n)?(o(),s(h,{key:0},[Ke,e("span",Oe,$(t(l).path),1),je],64)):(o(),s("span",qe,"Current route"))]),p(b,{modelValue:t(n),"onUpdate:modelValue":r[0]||(r[0]=N=>ee(n)?n.value=N:null),"font-mono":"",icon:"carbon-direction-right-01 scale-y--100",class:L(t(l).path===t(n)?"":t(d).length?"text-green":"text-orange"),onKeydown:te(m,["enter"])},null,8,["modelValue","class","onKeydown"]),e("div",null,[t(l).path!==t(n)?(o(),s(h,{key:0},[Ge,t(d).length?v("",!0):(o(),s("span",He," (no match)"))],64)):(o(),s("span",Je,"Edit path above to navigate"))])]),t(d).length?(o(),g(P,{key:0,icon:"carbon-tree-view",text:"Matched Routes",padding:!1},{default:k(()=>[p(C,{pages:t(d),layouts:t(y)||[],matched:[],"matched-pending":t(d),onNavigate:w},null,8,["pages","layouts","matched-pending"])]),_:1})):v("",!0),p(P,{icon:"carbon-tree-view-alt",text:"All Routes",description:`${t(x).length} routes registered in your application`,padding:"pr5"},{default:k(()=>[p(C,{pages:t(x),layouts:t(y)||[],matched:t(l).matched,"matched-pending":t(d),onNavigate:w},null,8,["pages","layouts","matched","matched-pending"])]),_:1},8,["description"]),t(i).length?(o(),g(P,{key:1,icon:"carbon:ibm-watson-studio",text:"Middleware",description:`${t(i).length} middleware registered in your application`,padding:"px13"},{default:k(()=>[e("table",We,[Qe,(o(!0),s(h,null,I(t(i),N=>(o(),s("tr",{key:N.path,"h-7":""},[e("td",null,[e("span",Ye,$(N.name),1),N.global?(o(),g(D,{key:0,"bg-green-400:10":"","text-green-400":"",title:"Registered at runtime as a global component",textContent:"global"})):v("",!0)]),e("td",null,[p(U,{filepath:N.path},null,8,["filepath"])])]))),128))])]),_:1},8,["description"])):v("",!0)])):(o(),g(z,{key:1,icon:"carbon-tree-view-alt",title:"Nuxt Routing",description:"Create `./pages/index.vue` to enable routing",actions:[{label:"Learn more",src:"https://nuxt.com/docs/getting-started/routing",attrs:{n:"primary"}},{label:"Enable Routing",handle(){return("rpc"in a?a.rpc:t(oe)).runWizard("enablePages")}}]},null,8,["actions"])),p(O,null,{default:k(()=>[p(K)]),_:1})],64)}}});export{dt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as x}from"./StateEditor.vue.
|
|
1
|
+
import{_ as x}from"./StateEditor.vue.544a7d41.js";import{a as y,o as t,h as r,F as k,q as B,c as f,w as a,V as C,n as D,g as V,f as $,b as w,p as F,u as i,i as e,v as m,l as O,k as P}from"./entry.5024288d.js";import{_ as E}from"./NSectionBlock.5d6e9b8e.js";import{_ as R}from"./NIconButton.vue.d0a9a760.js";import{_ as j}from"./HelpFab.vue.748cc95d.js";import"./json-editor-vue.2379a5ec.js";import"./NIconTitle.vue.c8b7e265.js";const A={key:0,flex:"~ col gap-1"},G={key:1,mt2:"",px4:"",italic:"",op35:""},H=y({__name:"StateGroup",props:{state:null,prefix:{default:""}},setup(n){return(o,s)=>{const l=x;return t(),r("div",null,[n.state&&Object.keys(n.state).length>0?(t(),r("div",A,[(t(!0),r(k,null,B(n.state,(_,c)=>(t(),f(l,{key:c,state:_,name:c.startsWith(n.prefix)?c.slice(n.prefix.length):c},{actions:a(u=>[C(o.$slots,"actions",D(V(u)))]),_:2},1032,["state","name"]))),128))])):(t(),r("div",G," No data "))])}}}),K={class:"markdown-body"},T=$("h1",null,"State & Async Data",-1),q=$("p",null,"// TODO",-1),z=[T,q],I={__name:"payload",setup(n,{expose:o}){return o({frontmatter:{}}),(l,_)=>(t(),r("div",K,z))}},L={key:0},tt=y({__name:"payload",setup(n){const o=w(),s=F(()=>o.value?.nuxt.payload);async function l(_){await o.value?.nuxt.hooks.callHookParallel("app:data:refresh",_)}return(_,c)=>{const u=H,d=E,b=P,v=R,S=x,g=I,N=j;return t(),r(k,null,[i(o)?(t(),r("div",L,[e(d,{icon:"carbon-data-set",text:"State",description:"Keyed state from `useState`",padding:!1},{default:a(()=>[e(u,{state:i(s).state,prefix:"$s"},null,8,["state"])]),_:1}),e(d,{icon:"carbon-data-blob",text:"Data",description:"Keyed state from `useAsyncData`",padding:!1},{actions:a(()=>[e(b,{n:"xs primary","self-start":"",icon:"i-carbon-recycle",onClick:c[0]||(c[0]=h=>l())},{default:a(()=>[O(" Re-fetch all data ")]),_:1})]),default:a(()=>[e(u,{state:i(s).data},{actions:a(({isOpen:h,name:p})=>[h&&p?(t(),f(v,{key:0,title:`Re-fetch '${p}'`,icon:"carbon-recycle",onClick:W=>l([p])},null,8,["title","onClick"])):m("",!0)]),_:1},8,["state"])]),_:1}),i(s).functions&&Object.keys(i(s).functions).length?(t(),f(d,{key:0,icon:"carbon-function",text:"Functions",description:"State for functions (experimental)"},{default:a(()=>[e(S,{"ml--6":"",state:i(s).functions},null,8,["state"])]),_:1})):m("",!0)])):m("",!0),e(N,null,{default:a(()=>[e(g)]),_:1})],64)}}});export{tt as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as S}from"./FilepathItem.vue.1c96e6cc.js";import{_ as D}from"./Badge.bd9688d4.js";import{_ as k}from"./DurationDisplay.vue.f895ca51.js";import{a as v,R as B,p as x,aT as V,o as n,h as _,f as e,t as P,i as l,u as f,c as u,v as d,a4 as M,V as T,M as F,aU as H,w as h,l as y,aR as I,b as E,F as C,q as R,s as W}from"./entry.5024288d.js";import{_ as L}from"./NSectionBlock.5d6e9b8e.js";import{_ as j}from"./HelpFab.vue.748cc95d.js";import"./editor.02d33c7f.js";import"./NIconTitle.vue.c8b7e265.js";import"./NIconButton.vue.d0a9a760.js";const q={flex:"~ gap2","items-center":""},z={w8:"","text-right":"","text-sm":"",op25:""},A={key:0,"flex-auto":"","text-right":""},U=v({__name:"PluginItem",props:{plugin:null,index:null},setup(t){const i=t,a=B(),r=x(()=>V(i.plugin.src,a.value?.rootDir||"").path);return(m,c)=>{const p=S,o=D,s=k;return n(),_("div",q,[e("div",z,P(t.index),1),l(p,{filepath:i.plugin.src,subpath:!0},null,8,["filepath"]),e("div",null,[f(r).startsWith("#")?(n(),u(o,{key:0,"bg-rose-400:10":"","text-rose":"",textContent:"virtual"})):f(r).startsWith(".")?d("",!0):(n(),u(o,{key:1,"bg-gray-400:10":"","text-gray":"",textContent:"module"})),t.plugin.mode==="server"?(n(),u(o,{key:2,"bg-teal-400:10":"","text-teal-400":"",textContent:"server"})):d("",!0),t.plugin.mode==="client"?(n(),u(o,{key:3,"bg-orange-400:10":"","text-orange-400":"",textContent:"client"})):d("",!0)]),t.plugin.metric?.duration!=null?(n(),_("div",A,[l(s,{duration:t.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:""},G={flex:"~ items-center gap-1","font-bold":""},J=v({__name:"HelpTip",props:{title:null,icon:null},setup(t){return(i,a)=>{const r=F,m=M("ContentSlot");return n(),_("div",Y,[e("div",G,[t.icon?(n(),u(r,{key:0,icon:t.icon,class:"n-tip-icon"},null,8,["icon"])):d("",!0),e("div",null,P(t.title),1)]),e("div",null,[T(i.$slots,"default",{},()=>[l(m,{use:i.$slots.default,unwrap:"p"},null,8,["use"])])])])}}}),K={};function O(t,i){const a=J;return n(),u(a,{title:"Performance Tip",icon:"carbon-meter",n:"lime6 dark:lime5"},{default:h(()=>[T(t.$slots,"default")]),_:3})}const Q=H(K,[["render",O]]),X={class:"markdown-body"},Z=e("h1",null,"Plugins",-1),tt=e("p",null,[y("Nuxt plugins allows you to extend the functionality of Nuxt runtime and the Vue instance. You can add plugins to the "),e("code",null,"plugins/"),y(" directory and they will be automatically imported and registered.")],-1),et=e("p",null,[e("a",{href:"https://nuxt.com/docs/guide/directory-structure/plugins",target:"_blank",rel:"noopener"},"Learn more on the documentation")],-1),nt={__name:"plugins",setup(t,{expose:i}){return i({frontmatter:{}}),(r,m)=>{const c=Q;return n(),_("div",X,[Z,tt,l(c,null,{default:h(()=>[y(" Plugins runs before your application at runtime, the time each plugin cost will directly affect your application's initial loading time. ")]),_:1}),et])}}},ot={pt4:""},st={class:"text-sm",flex:"~ gap-1 items-center justify-end","mt-3":""},it=e("div",{"i-carbon-timer":"","text-lg":"",op75:""},null,-1),at=e("span",{op50:""},"Total execution time:",-1),gt=v({__name:"plugins",setup(t){const i=I(),a=E(),r=x(()=>{const c=i.value?.plugins||[],p=a.value?.getClientPluginMetrics()||[];return c.map(o=>{const s=typeof o=="string"?{src:o}:o;return{...s,metric:p.find(g=>g.src===s.src||g.src.startsWith(s.src))}})}),m=x(()=>{const c=a.value?.getClientPluginMetrics()||[],p=Math.min(...c.map(s=>s.start));return Math.max(...c.map(s=>s.end))-p});return(c,p)=>{const o=U,s=k,g=L,w=nt,N=j;return n(),_(C,null,[l(g,{icon:"carbon-plug",text:"Plugins",description:`Total plugins: ${f(r).length}`},{default:h(()=>[e("div",ot,[(n(!0),_(C,null,R(f(r),($,b)=>(n(),u(o,{key:$.src,plugin:$,index:b+1,"ml--4":"","border-base":"",py2:"",class:W(b?"border-t":"")},null,8,["plugin","index","class"]))),128)),e("div",st,[it,at,l(s,{duration:f(m),factor:10},null,8,["duration"])])])]),_:1},8,["description"]),l(N,null,{default:h(()=>[l(w)]),_:1})],64)}}});export{gt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as C}from"./StateEditor.vue.
|
|
1
|
+
import{_ as C}from"./StateEditor.vue.544a7d41.js";import{_ as h}from"./NSectionBlock.5d6e9b8e.js";import{o as c,h as r,f as m,a as v,b as x,R as b,p as u,u as o,i as e,w as s,v as y,F as R}from"./entry.5024288d.js";import{_ as k}from"./HelpFab.vue.748cc95d.js";import"./NIconButton.vue.d0a9a760.js";import"./json-editor-vue.2379a5ec.js";import"./NIconTitle.vue.c8b7e265.js";const B={class:"markdown-body"},N=m("h1",null,"Runtime Configs",-1),$=m("p",null,"// TODO:",-1),w=[N,$],D={__name:"runtime-configs",setup(d,{expose:t}){return t({frontmatter:{}}),(l,p)=>(c(),r("div",B,w))}},F={key:0},j=v({__name:"runtime-configs",setup(d){const t=x(),_=b(),l=u(()=>t.value?.nuxt.payload),p=u(()=>{const n={..._.value?.runtimeConfig};return delete n.public,delete n.app,n});return(n,S)=>{const a=C,i=h,f=D,g=k;return c(),r(R,null,[o(t)?(c(),r("div",F,[e(i,{icon:"carbon-settings-services",text:"App Config",padding:!1},{default:s(()=>[e(a,{state:o(t).appConfig},null,8,["state"])]),_:1}),e(i,{icon:"carbon-settings",text:"Public Runtime Config",padding:!1},{default:s(()=>[e(a,{state:o(l).config?.public},null,8,["state"])]),_:1}),e(i,{icon:"i-carbon-code-signing-service",text:"Private Runtime Config",open:!1,padding:!1,description:"These values are not exposed to the client. Readonly in the DevTools."},{default:s(()=>[e(a,{state:o(p),readonly:""},null,8,["state"])]),_:1})])):y("",!0),e(g,null,{default:s(()=>[e(f)]),_:1})],64)}}});export{j as default};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{_ as ie}from"./Navbar.vue.f2b7b652.js";import{_ as Y}from"./Badge.bd9688d4.js";import{a as Z,R as ce,ad as de,p,r as k,o as a,h as m,f as i,c as x,w as l,l as h,t as y,u as e,s as b,aW as G,F as j,q as W,G as ee,i as s,v as $,k as pe,M as me,aX as fe,E as _e,aY as ve,aZ as he,H as ye,a3 as ge}from"./entry.5024288d.js";import{_ as xe}from"./NSelect.vue.e5de3a65.js";import{_ as be}from"./NTextInput.vue.fc99730b.js";import{_ as Ce}from"./CodeSnippets.vue.c6839222.js";import{_ as te}from"./NPanelGrids.7b5efdc5.js";import{_ as ke}from"./NCodeBlock.vue.d5603a1f.js";import{u as $e}from"./editor.02d33c7f.js";import{C as X}from"./constants.d7bcda3c.js";import{_ as Re}from"./PanelLeftRight.vue.8eda640c.js";import{F as Te}from"./fuse.esm.88e2763d.js";import"./client.b1955e54.js";const qe={"h-full":"","w-full":"",flex:"~ col"},je={flex:"~ col gap-2","flex-none":"",p4:"","navbar-glass":""},Se={flex:"~ gap2"},Ve={flex:"~ gap2","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},we=i("div",{"flex-auto":""},null,-1),Ee={key:0,border:"b base","items-center":"",px4:"",py2:"",grid:"~ cols-[max-content_1fr] gap-2"},Ne={"text-right":"","font-mono":""},Ue={key:1,relative:""},Pe={key:2,px4:"",py2:"",flex:"~ col gap-2",border:"b base"},Be={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},Me=i("div",null,"Response",-1),Oe={key:1,"text-xs":"",op50:""},Le=i("div",{"flex-auto":""},null,-1),De=i("div",{op50:""}," Request finished in ",-1),Fe=Z({__name:"ServerRouteDetails",props:{route:{type:Object,required:!0}},setup(P){const B=P,R=ce(),u=de({contentType:"text/plain",data:"",statusCode:200,error:void 0}),T=p(()=>u.contentType.includes("application/json")?"json":u.contentType.includes("text/html")?"html":u.contentType.includes("text/css")?"css":u.contentType.includes("text/javascript")?"javascript":u.contentType.includes("text/xml")||u.contentType.includes("application/xml")?"xml":"text"),q=p(()=>T.value==="json"?JSON.stringify(u.data,null,2):u.data),w=k(0),C=k(!1),E=k(!1),A=$e(),M=p(()=>B.route.route?.split(/((?:\*\*)?:[\w_]+)/g)),S=p(()=>M.value?.filter(o=>o.startsWith(":")||o.startsWith("**:"))||[]),g=k(B.route.method||"GET"),N=k({}),U=k([{key:"",value:""}]),V=k([{key:"",value:""}]),f=k([{key:"Content-Type",value:"application/json"}]),z=p(()=>V.value.filter(({key:o})=>o).length),J=p(()=>f.value.filter(({key:o})=>o).length),H=p(()=>{const o={};for(let t=0;t<U.value.length;t++){const{key:n,value:c}=U.value[t];o[n]=c}return Object.keys(o)[0]?o:null}),oe=p(()=>{let o=R.value?.devServer.url||"http://localhost";o.charAt(o.length-1)==="/"&&(o=o.slice(0,-1));const t=R.value?.devServer.port||3e3;return o.includes(`:${t}`)?o:`${o}:${t}`}),O=p(()=>{let o=new URLSearchParams(Object.fromEntries(V.value.filter(({key:c})=>c).map(({key:c,value:_})=>[c,_]))).toString();o&&(o=`?${o}`);const t=(M.value?.map(c=>(c.startsWith(":")||c.startsWith("**:"))&&N.value[c]||c).join("")||"")+o;let n=R.value?.app.baseURL||"";return(n==="./"||n===".")&&(n=""),n.endsWith("/")&&(n=n.slice(0,-1)),n+t}),ne=p(()=>oe.value+O.value);async function K(){E.value=!0,C.value=!0,Object.assign(u,{lang:"text",contentType:"",data:"",content:"",error:void 0});const o=Date.now();try{u.data=await $fetch(ne.value,{method:g.value.toUpperCase(),headers:Object.fromEntries(f.value.filter(({key:t,value:n})=>t&&n).map(({key:t,value:n})=>[t,n])),query:Object.fromEntries(V.value.filter(({key:t,value:n})=>t&&n).map(({key:t,value:n})=>[t,n])),body:H.value,onResponse({response:t}){u.contentType=(t.headers.get("content-type")||"").toString().toLowerCase().trim(),u.statusCode=t.status},onResponseError(t){u.error=t.response._data,u.data=t.response._data}})}catch{}C.value=!1,w.value=Date.now()-o}const Q=p(()=>{const o=[],t=[],n=f.value.filter(({key:_,value:v})=>_&&v&&!(_==="Content-Type"&&v==="application/json")).map(({key:_,value:v})=>` '${_}': '${v}'`).join(`,
|
|
2
|
+
`);g.value.toUpperCase()!=="GET"&&t.push(`method: '${g.value.toUpperCase()}'`),n&&t.push(`headers: {
|
|
3
|
+
${n}
|
|
4
|
+
}`),H.value&&t.push(`body: ${JSON.stringify(H.value,null,2)}`);const c=t.length?`, {
|
|
5
|
+
${t.join(`,
|
|
6
|
+
`).split(`
|
|
7
|
+
`).map(_=>` ${_}`).join(`
|
|
8
|
+
`)}
|
|
9
|
+
}`:"";return o.push({name:"useFetch",lang:"javascript",docs:X.nuxt.useFetch,code:`const { data, pending, error, refresh } = useFetch('${O.value}'${c})`}),o.push({name:"$fetch",lang:"javascript",docs:X.nuxt.$fetch,code:`await $fetch('${O.value}'${c})`}),o}),d=k(S.value.length?"params":"query"),L=p(()=>{if(d.value==="query")return V.value;if(d.value==="body")return U.value;if(d.value==="headers")return f.value}),se=["GET","POST","PUT","PATCH","DELETE","HEAD"];return(o,t)=>{const n=pe,c=xe,_=be,v=me,ae=Ce,re=te,le=fe,I=Y,ue=ke;return a(),m("div",qe,[i("div",je,[i("div",Se,[P.route.method?(a(),x(n,{key:0,class:b(("getRequestMethodClass"in o?o.getRequestMethodClass:e(G))(e(g))),"pointer-events-none":"",tabindex:"-1"},{default:l(()=>[h(y(e(g).toUpperCase()),1)]),_:1},8,["class"])):(a(),x(c,{key:1,modelValue:e(g),"onUpdate:modelValue":t[0]||(t[0]=r=>ee(g)?g.value=r:null),class:b(("getRequestMethodClass"in o?o.getRequestMethodClass:e(G))(e(g)))},{default:l(()=>[(a(),m(j,null,W(se,r=>i("option",{key:r,class:b(("getRequestMethodClass"in o?o.getRequestMethodClass:e(G))(r))},y(r.toUpperCase()),3)),64))]),_:1},8,["modelValue","class"])),s(_,{"model-value":e(O),disabled:"","flex-auto":"","font-mono":"",p:"x5 y2",n:"primary xs"},null,8,["model-value"]),s(n,{n:"primary solid",onClick:K},{default:l(()=>[s(v,{icon:"carbon:send"})]),_:1})])]),i("div",Ve,[e(S).length?(a(),x(n,{key:0,class:b(e(d)==="params"?"text-primary n-primary":"border-transparent! shadow-none!"),onClick:t[1]||(t[1]=r=>d.value="params")},{default:l(()=>[s(v,{icon:"i-carbon-text-selection"}),h(" Params ("+y(e(S).length)+") ",1)]),_:1},8,["class"])):$("",!0),s(n,{class:b(e(d)==="query"?"text-primary n-primary":"border-transparent! shadow-none!"),onClick:t[2]||(t[2]=r=>d.value="query")},{default:l(()=>[s(v,{icon:"i-carbon-help"}),h(" Query "+y(e(z)?`(${e(z)})`:""),1)]),_:1},8,["class"]),e(g)!=="GET"?(a(),x(n,{key:1,class:b(e(d)==="body"?"text-primary n-primary":"border-transparent! shadow-none!"),onClick:t[3]||(t[3]=r=>d.value="body")},{default:l(()=>[s(v,{icon:"i-carbon-document"}),h(" Body ")]),_:1},8,["class"])):$("",!0),s(n,{class:b(e(d)==="headers"?"text-primary n-primary":"border-transparent! shadow-none!"),onClick:t[4]||(t[4]=r=>d.value="headers")},{default:l(()=>[s(v,{icon:"i-carbon-html-reference"}),h(" Headers "+y(e(J)?`(${e(J)})`:""),1)]),_:1},8,["class"]),s(n,{class:b(e(d)==="snippet"?"text-primary n-primary":"border-transparent! shadow-none!"),onClick:t[5]||(t[5]=r=>d.value="snippet")},{default:l(()=>[s(v,{icon:"carbon:code"}),h(" Snippets ")]),_:1},8,["class"]),we,s(n,{icon:"carbon-launch",onClick:t[6]||(t[6]=r=>e(A)(P.route.filepath))},{default:l(()=>[h(" Open in Editor ")]),_:1})]),e(d)==="params"?(a(),m("div",Ee,[(a(!0),m(j,null,W(e(S),r=>(a(),m(j,{key:r},[i("div",Ne,y(r),1),s(_,{modelValue:e(N)[r],"onUpdate:modelValue":D=>e(N)[r]=D,placeholder:r,"flex-1":""},null,8,["modelValue","onUpdate:modelValue","placeholder"])],64))),128))])):$("",!0),e(d)==="snippet"?(a(),m("div",Ue,[e(Q).length?(a(),x(ae,{key:0,border:"b base","code-snippets":e(Q)},null,8,["code-snippets"])):$("",!0)])):e(L)?(a(),m("div",Pe,[(a(!0),m(j,null,W(e(L),(r,D)=>(a(),m("div",{key:D,flex:"~ gap-2","justify-around":""},[s(_,{modelValue:r.key,"onUpdate:modelValue":F=>r.key=F,placeholder:"Key","flex-1":"","font-mono":"",n:"sm"},null,8,["modelValue","onUpdate:modelValue"]),s(_,{modelValue:r.value,"onUpdate:modelValue":F=>r.value=F,placeholder:"Value","flex-1":"","font-mono":"",n:"sm"},null,8,["modelValue","onUpdate:modelValue"]),s(n,{n:"red",onClick:F=>e(L).splice(D,1)},{default:l(()=>[s(v,{icon:"carbon:delete"})]),_:2},1032,["onClick"])]))),128)),i("div",null,[s(n,{icon:"carbon-add",n:"sm primary",my1:"","px-3":"",onClick:t[7]||(t[7]=r=>e(L).push({key:"",value:""}))},{default:l(()=>[h(" Add ")]),_:1})])])):$("",!0),e(E)?e(C)?(a(),x(le,{key:4,"z-10":"","flex-auto":"","backdrop-blur":""},{default:l(()=>[h(" Fetching... ")]),_:1})):(a(),m(j,{key:5},[i("div",Be,[Me,e(u).error?(a(),x(I,{key:0,"bg-red-400:10":"","text-red-400":""},{default:l(()=>[h(" Error ")]),_:1})):$("",!0),s(I,{class:b({"bg-orange-400:10 text-orange-400":e(u).error,"bg-green-400:10 text-green-400":!e(u).error})},{default:l(()=>[h(y(e(u).statusCode),1)]),_:1},8,["class"]),e(u).contentType?(a(),m("code",Oe,y(e(u).contentType),1)):$("",!0),Le,De,s(I,{"bg-green-400:10":"","text-green-400":""},{default:l(()=>[h(y(e(w))+" ms ",1)]),_:1})]),s(ue,{"flex-auto":"","overflow-auto":"","py-2":"",code:e(q),lang:e(T)},null,8,["code","lang"])],64)):(a(),x(re,{key:3},{default:l(()=>[s(n,{n:"primary",onClick:K},{default:l(()=>[s(v,{icon:"carbon:send"}),h(" Send request ")]),_:1})]),_:1}))])}}}),Ge={flex:"~ gap1","text-sm":"",op50:""},We={key:0},Ae={"w-12":"","flex-none":"","text-right":""},He={"font-mono":"","text-sm":""},Ie=i("div",{"x-divider":""},null,-1),ze=i("span",{op75:""},"Select a route to start",-1),lt=Z({__name:"server-routes",setup(P){const B=_e(),R=ve(),u=p(()=>new Te(R.value||[],{keys:["method","route"],shouldSort:!0})),T=p(()=>R.value?.find(C=>C.path===B.query?.path)),q=k(""),w=p(()=>R.value?q.value?u.value.search(q.value).map(C=>C.item):R.value:[]);return(C,E)=>{const A=ie,M=Y,S=ye,g=Fe,N=ge,U=te,V=Re;return a(),x(V,null,{left:l(()=>[s(A,{search:e(q),"onUpdate:search":E[0]||(E[0]=f=>ee(q)?q.value=f:null),pb2:""},{default:l(()=>[i("div",Ge,[e(q)?(a(),m("span",We,y(e(w).length)+" matched · ",1)):$("",!0),i("span",null,y(e(R)?.length)+" routes in total",1)])]),_:1},8,["search"]),(a(!0),m(j,null,W(e(w),f=>(a(),m(j,{key:f.id},[s(S,{flex:"~ gap-2","items-center":"","hover-bg-active":"",px2:"",py1:"",class:b([{"bg-active":e(T)?.path===f.path}]),to:{query:{path:f.path}}},{default:l(()=>[i("div",Ae,[s(M,{class:b(("getRequestMethodClass"in C?C.getRequestMethodClass:e(G))(f.method||"*")),title:"updates available",textContent:y((f.method||"*").toUpperCase())},null,8,["class","textContent"])]),i("span",He,y(f.route),1)]),_:2},1032,["class","to"]),Ie],64))),128))]),right:l(()=>[(a(),x(he,{max:10},[e(T)?(a(),x(g,{key:e(T).path,route:e(T)},null,8,["route"])):$("",!0)],1024)),e(T)?$("",!0):(a(),x(U,{key:0},{default:l(()=>[s(N,{px6:"",py2:""},{default:l(()=>[ze]),_:1})]),_:1}))]),_:1})}}});export{lt as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as F}from"./NIconTitle.vue.c8b7e265.js";import{_ as O}from"./NSwitch.vue.25cba5a5.js";import{a as j,bb as z,h as d,i as s,f as e,F as m,q as h,u as a,w as n,G as y,a2 as I,bc as L,o as i,s as k,t as f,c as E,v as H,l as q,aS as A,k as G}from"./entry.5024288d.js";import{_ as R}from"./NSelect.vue.e5de3a65.js";import{_ as J}from"./NCheckbox.vue.96f7ae1a.js";const K={px6:"",py6:""},M={grid:"~ md:cols-2 gap-x-10 gap-y-3","max-w-300":""},P={flex:"~ col gap-1",py3:""},Q=e("h3",{mb1:"","text-lg":""}," Tabs ",-1),W={flex:"~ gap-2","flex-auto":"","items-center":"","justify-start":""},X={capitalize:"",op75:""},Y={flex:"~ col gap-1",border:"~ base rounded",py3:"",pl4:"",pr2:""},Z={py3:"",flex:"~ col gap-1",border:"b base"},ee=e("h3",{mb1:"","text-lg":""}," Appearance ",-1),oe=e("div",{"carbon-sun":"","dark:carbon-moon":"","translate-y--1px":""},null,-1),te={py3:"",flex:"~ col gap-1",border:"b base"},le=e("h3",{mb1:"","text-lg":""}," UI Scale ",-1),se=["value"],ae={py3:"",flex:"~ col gap-1"},ne=e("h3",{mb1:"","text-lg":""}," Features ",-1),ie=e("span",null,"Close DevTools when clicking outside",-1),ce=e("span",null,"Show help buttons",-1),ge=j({__name:"settings",setup(de){const{interactionCloseOnOutsideClick:g,showExperimentalFeatures:re,showHelpButtons:v,scale:x,hiddenTabs:r,hiddenTabCategories:u}=I(),T=[["Tiny",12/15],["Small",14/15],["Normal",1],["Large",16/15],["Huge",18/15]],C=z(!1);function N(c,t){t?r.value=r.value.filter(p=>p!==c):r.value.push(c)}function w(c,t){t?u.value=u.value.filter(p=>p!==c):u.value.push(c)}return(c,t)=>{const p=F,b=O,S=A,U=G,$=L,B=R,V=J;return i(),d("div",K,[s(p,{class:"mb-5 text-xl op75",icon:"i-carbon-settings-adjust",text:"DevTools Settings"}),e("div",M,[e("div",P,[Q,(i(!0),d(m,null,h(a(C),([o,_])=>(i(),d(m,{key:o},[_.length?(i(),d("div",{key:0,flex:"~ col gap-1","mx--1":"",class:k(a(u).includes(o)?"op50 grayscale":""),"pt-2":""},[s(b,{flex:"~ row-reverse",px2:"",py1:"","n-lime":"","model-value":!a(u).includes(o),"onUpdate:modelValue":l=>w(o,l)},{default:n(()=>[e("div",W,[e("span",X,f(o),1)])]),_:2},1032,["model-value","onUpdate:modelValue"]),e("div",Y,[(i(!0),d(m,null,h(_,l=>(i(),E(b,{key:l.name,flex:"~ row-reverse",py1:"",pl2:"",pr1:"","n-primary":"","model-value":!a(r).includes(l.name),"onUpdate:modelValue":D=>N(l.name,D)},{default:n(()=>[e("div",{flex:"~ gap-2","flex-auto":"","items-center":"","justify-start":"",class:k(a(r).includes(l.name)?"op25":"")},[s(S,{"text-xl":"",icon:l.icon,title:l.title},null,8,["icon","title"]),e("span",null,f(l.title),1)],2)]),_:2},1032,["model-value","onUpdate:modelValue"]))),128))])],2)):H("",!0)],64))),128))]),e("div",null,[e("div",Z,[ee,e("div",null,[s($,null,{default:n(({toggle:o,isDark:_})=>[s(U,{n:"primary",onClick:o},{default:n(()=>[oe,q(" "+f(_.value?"Dark":"Light"),1)]),_:2},1032,["onClick"])]),_:1})])]),e("div",te,[le,s(B,{modelValue:a(x),"onUpdate:modelValue":t[0]||(t[0]=o=>y(x)?x.value=o:null),n:"primary"},{default:n(()=>[(i(),d(m,null,h(T,o=>e("option",{key:o[0],value:o[1]},f(o[0]),9,se)),64))]),_:1},8,["modelValue"])]),e("div",ae,[ne,s(V,{modelValue:a(g),"onUpdate:modelValue":t[1]||(t[1]=o=>y(g)?g.value=o:null),"n-primary":""},{default:n(()=>[ie]),_:1},8,["modelValue"]),s(V,{modelValue:a(v),"onUpdate:modelValue":t[2]||(t[2]=o=>y(v)?v.value=o:null),"n-primary":""},{default:n(()=>[ce]),_:1},8,["modelValue"])])])])])}}});export{ge as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as ne}from"./NIconButton.vue.d0a9a760.js";import{_ as oe}from"./NSelect.vue.e5de3a65.js";import{_ as ae}from"./NTextInput.vue.fc99730b.js";import{a as se,a$ as re,D as le,r as I,p as S,E,b0 as R,ah as ue,a1 as ie,ag as de,e as ce,y as p,u as n,c as _,w as u,b1 as z,o as r,f as l,i as d,h as c,q as U,t as v,F as x,G as j,l as i,s as F,aJ as q,v as P,ac as me,z as pe,b2 as _e,aQ as fe,H as ye,M as ve,k as ge,a3 as he}from"./entry.5024288d.js";import{_ as ke}from"./NLink.vue.404a4f6c.js";import{_ as be}from"./NPanelGrids.7b5efdc5.js";import{_ as xe}from"./PanelLeftRight.vue.8eda640c.js";import{_ as we}from"./FilepathItem.vue.1c96e6cc.js";import{U as Ke}from"./json-editor-vue.2379a5ec.js";import"./editor.02d33c7f.js";const Ce={class:"h-[48px] flex items-center justify-between gap1 px-3"},Ve={class:"w-full text-sm"},Ne=["value"],$e=l("div",{"x-divider":""},null,-1),Ie={key:0,"h-full":"","of-hidden":"",flex:"~ col"},Se={border:"b base",class:"h-[49px] flex flex-none items-center justify-between px-4 text-sm"},Ue={class:"flex items-center gap-4"},je={key:1},qe=["onKeyup"],Le=l("br",null,null,-1),Me={key:0,op50:""},Be={key:1},De=l("code",null,"nitro.storage",-1),Ae=l("br",null,null,-1),Ee={"font-bold":""},Re=l("br",null,null,-1),ze={"text-sm":""},Fe=l("br",null,null,-1),tt=se({__name:"storage",async setup(Pe){let m,g;const T=re(),h=le(),k=I(""),y=I(""),a=S({get(){return E().query?.storage},set(t){h.replace({query:{storage:t}})}}),e=I(),b=S(()=>E().query?.key),{data:w}=([m,g]=R(()=>z("storageMounts",()=>p.getStorageMounts())),m=await m,g(),m),{data:K,refresh:L}=([m,g]=R(async()=>z("storageKeys",async()=>a.value?await p.getStorageKeys(a.value):[])),m=await m,g(),m),G=T.hook("storage:key:update",async(t,s)=>{if(!(!a.value||t.split(":")[0]!==a.value)&&(await L(),b.value===t)){if(s==="remove")return h.replace({query:{storage:a.value}});await V(b.value)}});ue(G),ie(a,L),de(async()=>{if(!b.value){e.value=null;return}V(b.value)}),ce("keydown",t=>{t.key==="s"&&(t.ctrlKey||t.metaKey)&&(N(),t.preventDefault())});function C(t){return t.replace(`${a.value}:`,"")}const H=S(()=>K.value?K.value.filter(t=>t.includes(k.value)):[]);async function V(t){const s=await p.getStorageItem(t);e.value={key:t,updatedKey:C(t),editingKey:!1,content:s,updatedContent:s}}async function J(){if(!y.value||!a.value)return;const t=`${a.value}:${y.value}`;K.value?.includes(t)||await p.setStorageItem(t,""),h.replace({query:{storage:a.value,key:t}}),y.value=""}async function N(){e.value&&(await p.setStorageItem(e.value.key,e.value.updatedContent),await V(e.value.key))}async function O(){!e.value||!a.value||(await p.removeStorageItem(e.value.key),e.value=null)}async function Q(){if(!e.value||!a.value)return;const t=`${a.value}:${e.value.updatedKey}`;await p.setStorageItem(t,e.value.updatedContent),await p.removeStorageItem(e.value.key),h.replace({query:{storage:a.value,key:t}})}return(t,s)=>{const W=ne,X=oe,$=ae,Y=ye,Z=ve,M=ge,B=ke,D=he,A=be,ee=xe,te=we;return n(a)?(r(),_(ee,{key:0,"storage-key":"tab-storage"},{left:u(()=>[l("div",Ce,[d(W,{icon:"carbon-chevron-left","ml--1":"",onClick:s[0]||(s[0]=o=>a.value="")}),l("div",Ve,[d(X,{modelValue:n(a),"onUpdate:modelValue":s[1]||(s[1]=o=>j(a)?a.value=o:null),n:"primary",icon:"carbon-data-base"},{default:u(()=>[(r(!0),c(x,null,U(n(w),(o,f)=>(r(),c("option",{key:f,value:f},v(f),9,Ne))),128))]),_:1},8,["modelValue"])])]),d($,{modelValue:n(k),"onUpdate:modelValue":s[2]||(s[2]=o=>j(k)?k.value=o:null),icon:"carbon-search",placeholder:"Search...",n:"primary sm",border:"y x-none base! rounded-0",class:"w-full py2 ring-0!"},null,8,["modelValue"]),(r(!0),c(x,null,U(n(H),o=>(r(),c(x,{key:o},[d(Y,{block:"",truncate:"",px2:"",py1:"","font-mono":"","text-sm":"",to:{query:{key:o,storage:n(a)}},class:F(o===n(e)?.key?"text-primary n-bg-active":"text-secondary hover:n-bg-hover")},{default:u(()=>[i(v(C(o)),1)]),_:2},1032,["to","class"]),$e],64))),128)),d($,{modelValue:n(y),"onUpdate:modelValue":s[3]||(s[3]=o=>j(y)?y.value=o:null),icon:"carbon-add",placeholder:"key",n:"sm",border:"t-none x-none base! rounded-0",class:"w-full py2 font-mono ring-0!",onKeyup:q(J,["enter"])},null,8,["modelValue","onKeyup"])]),right:u(()=>[n(e)?.key?(r(),c("div",Ie,[l("div",Se,[l("div",Ue,[n(e).editingKey?(r(),_($,{key:0,modelValue:n(e).updatedKey,"onUpdate:modelValue":s[4]||(s[4]=o=>n(e).updatedKey=o),onKeyup:q(Q,["enter"])},null,8,["modelValue","onKeyup"])):(r(),c("code",je,[i(v(C(n(e).key))+" ",1),d(Z,{icon:"carbon-edit",class:"cursor-pointer op50 hover:op100",onClick:s[5]||(s[5]=o=>n(e).editingKey=!0)})])),n(e).editingKey?P("",!0):(r(),_(M,{key:2,n:"green xs",disabled:n(e).content===n(e).updatedContent,class:F({"border-green":n(e).content!==n(e).updatedContent}),onClick:N},{default:u(()=>[i(" Save ")]),_:1},8,["disabled","class"]))]),l("div",null,[d(M,{n:"red xs",onClick:O},{default:u(()=>[i(" Delete ")]),_:1})])]),typeof n(e).content=="object"?(r(),_(n(Ke),me({key:0,modelValue:n(e).updatedContent,"onUpdate:modelValue":s[6]||(s[6]=o=>n(e).updatedContent=o),class:[[t.$colorMode.value==="dark"?"jse-theme-dark":"light"],"json-editor-vue h-full of-auto text-sm outline-none"]},t.$attrs,{mode:"text","navigation-bar":!1,indentation:2,"tab-size":2}),null,16,["modelValue","class"])):pe((r(),c("textarea",{key:1,"onUpdate:modelValue":s[7]||(s[7]=o=>n(e).updatedContent=o),placeholder:"Item value...",class:"h-full of-auto p-4 font-mono text-sm outline-none",onKeyup:q(fe(N,["ctrl"]),["enter"])},null,40,qe)),[[_e,n(e).updatedContent]])])):(r(),_(A,{key:1},{default:u(()=>[d(D,{px6:"",py4:""},{default:u(()=>[i(" Select one key to start."),Le,i("Learn more about "),d(B,{href:"https://nitro.unjs.io/guide/storage",n:"orange",target:"_blank"},{default:u(()=>[i(" Nitro storage ")]),_:1})]),_:1})]),_:1}))]),_:1})):(r(),_(A,{key:1},{default:u(()=>[Object.keys(n(w)).length?(r(),c("p",Me," Select one storage to start: ")):(r(),c("p",Be,[i(" No custom storage defined in "),De,i("."),Ae,i(" Learn more about "),d(B,{href:"https://nitro.unjs.io/guide/storage",n:"orange",target:"_blank"},{default:u(()=>[i(" Nitro storage ")]),_:1})])),(r(!0),c(x,null,U(n(w),(o,f)=>(r(),_(D,{key:f,"min-w-80":"","cursor-pointer":"","p-4":"","text-left":"",hover:"border-green",onClick:Te=>a.value=f},{default:u(()=>[l("span",Ee,v(f),1),Re,l("span",ze,v(o.driver)+" driver",1),Fe,o.base?(r(),_(te,{key:0,"text-xs":"",filepath:o.base},null,8,["filepath"])):P("",!0)]),_:2},1032,["onClick"]))),128))]),_:1}))}}});export{tt as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as le,r as ae,
|
|
1
|
+
import{a as le,r as ae,a$ as pe,a0 as me,e as Se,y as se,h as re,f as te,i as Ce,u as J,c as ie,v as oe,t as ne,F as de,o as Q,b7 as be,E as ye,D as we,p as Ee,ag as Le,q as ke,l as he,w as Re,s as ce,aQ as De,M as Ae,H as xe}from"./entry.5024288d.js";import{_ as _e}from"./NIconButton.vue.d0a9a760.js";var ue={exports:{}};(function(ee,Z){(function(Y,X){ee.exports=X()})(self,function(){return(()=>{var Y={4567:(B,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.AccessibilityManager=void 0;const h=a(9042),u=a(6114),d=a(9924),_=a(3656),g=a(844),v=a(5596),c=a(9631);class e extends g.Disposable{constructor(n,t){super(),this._terminal=n,this._renderService=t,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityTreeRoot=document.createElement("div"),this._accessibilityTreeRoot.classList.add("xterm-accessibility"),this._accessibilityTreeRoot.tabIndex=0,this._rowContainer=document.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let r=0;r<this._terminal.rows;r++)this._rowElements[r]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[r]);if(this._topBoundaryFocusListener=r=>this._handleBoundaryFocus(r,0),this._bottomBoundaryFocusListener=r=>this._handleBoundaryFocus(r,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityTreeRoot.appendChild(this._rowContainer),this._renderRowsDebouncer=new d.TimeBasedDebouncer(this._renderRows.bind(this)),this._refreshRows(),this._liveRegion=document.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityTreeRoot.appendChild(this._liveRegion),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityTreeRoot),this.register(this._renderRowsDebouncer),this.register(this._terminal.onResize(r=>this._handleResize(r.rows))),this.register(this._terminal.onRender(r=>this._refreshRows(r.start,r.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(r=>this._handleChar(r))),this.register(this._terminal.onLineFeed(()=>this._handleChar(`
|
|
2
2
|
`))),this.register(this._terminal.onA11yTab(r=>this._handleTab(r))),this.register(this._terminal.onKey(r=>this._handleKey(r.key))),this.register(this._terminal.onBlur(()=>this._clearLiveRegion())),this.register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this._screenDprMonitor=new v.ScreenDprMonitor(window),this.register(this._screenDprMonitor),this._screenDprMonitor.setListener(()=>this._refreshRowsDimensions()),this.register((0,_.addDisposableDomListener)(window,"resize",()=>this._refreshRowsDimensions())),this.register((0,g.toDisposable)(()=>{(0,c.removeElementFromParent)(this._accessibilityTreeRoot),this._rowElements.length=0}))}_handleBoundaryFocus(n,t){const r=n.target,l=this._rowElements[t===0?1:this._rowElements.length-2];if(r.getAttribute("aria-posinset")===(t===0?"1":`${this._terminal.buffer.lines.length}`)||n.relatedTarget!==l)return;let f,S;if(t===0?(f=r,S=this._rowElements.pop(),this._rowContainer.removeChild(S)):(f=this._rowElements.shift(),S=r,this._rowContainer.removeChild(f)),f.removeEventListener("focus",this._topBoundaryFocusListener),S.removeEventListener("focus",this._bottomBoundaryFocusListener),t===0){const o=this._createAccessibilityTreeNode();this._rowElements.unshift(o),this._rowContainer.insertAdjacentElement("afterbegin",o)}else{const o=this._createAccessibilityTreeNode();this._rowElements.push(o),this._rowContainer.appendChild(o)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(t===0?-1:1),this._rowElements[t===0?1:this._rowElements.length-2].focus(),n.preventDefault(),n.stopImmediatePropagation()}_handleResize(n){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let t=this._rowContainer.children.length;t<this._terminal.rows;t++)this._rowElements[t]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[t]);for(;this._rowElements.length>n;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const n=document.createElement("div");return n.setAttribute("role","listitem"),n.tabIndex=-1,this._refreshRowDimensions(n),n}_handleTab(n){for(let t=0;t<n;t++)this._handleChar(" ")}_handleChar(n){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==n&&(this._charsToAnnounce+=n):this._charsToAnnounce+=n,n===`
|
|
3
3
|
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=h.tooMuchOutput)),u.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(()=>{this._accessibilityTreeRoot.appendChild(this._liveRegion)},0))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0,u.isMac&&(0,c.removeElementFromParent)(this._liveRegion)}_handleKey(n){this._clearLiveRegion(),/\p{Control}/u.test(n)||this._charsToConsume.push(n)}_refreshRows(n,t){this._renderRowsDebouncer.refresh(n,t,this._terminal.rows)}_renderRows(n,t){const r=this._terminal.buffer,l=r.lines.length.toString();for(let f=n;f<=t;f++){const S=r.translateBufferLineToString(r.ydisp+f,!0),o=(r.ydisp+f+1).toString(),p=this._rowElements[f];p&&(S.length===0?p.innerText=" ":p.textContent=S,p.setAttribute("aria-posinset",o),p.setAttribute("aria-setsize",l))}this._announceCharacters()}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityTreeRoot.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let n=0;n<this._terminal.rows;n++)this._refreshRowDimensions(this._rowElements[n])}}_refreshRowDimensions(n){n.style.height=`${this._renderService.dimensions.css.cell.height}px`}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}}i.AccessibilityManager=e},3614:(B,i)=>{function a(_){return _.replace(/\r?\n/g,"\r")}function h(_,g){return g?"\x1B[200~"+_+"\x1B[201~":_}function u(_,g,v){_=h(_=a(_),v.decPrivateModes.bracketedPasteMode),v.triggerDataEvent(_,!0),g.value=""}function d(_,g,v){const c=v.getBoundingClientRect(),e=_.clientX-c.left-10,s=_.clientY-c.top-10;g.style.width="20px",g.style.height="20px",g.style.left=`${e}px`,g.style.top=`${s}px`,g.style.zIndex="1000",g.focus()}Object.defineProperty(i,"__esModule",{value:!0}),i.rightClickHandler=i.moveTextAreaUnderMouseCursor=i.paste=i.handlePasteEvent=i.copyHandler=i.bracketTextForPaste=i.prepareTextForTerminal=void 0,i.prepareTextForTerminal=a,i.bracketTextForPaste=h,i.copyHandler=function(_,g){_.clipboardData&&_.clipboardData.setData("text/plain",g.selectionText),_.preventDefault()},i.handlePasteEvent=function(_,g,v){_.stopPropagation(),_.clipboardData&&u(_.clipboardData.getData("text/plain"),g,v)},i.paste=u,i.moveTextAreaUnderMouseCursor=d,i.rightClickHandler=function(_,g,v,c,e){d(_,g,v),e&&c.rightClickSelect(_),g.value=c.selectionText,g.select()}},7239:(B,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.ColorContrastCache=void 0;const h=a(1505);i.ColorContrastCache=class{constructor(){this._color=new h.TwoKeyMap,this._css=new h.TwoKeyMap}setCss(u,d,_){this._css.set(u,d,_)}getCss(u,d){return this._css.get(u,d)}setColor(u,d,_){this._color.set(u,d,_)}getColor(u,d){return this._color.get(u,d)}clear(){this._color.clear(),this._css.clear()}}},9631:(B,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.removeElementFromParent=void 0,i.removeElementFromParent=function(...a){var h;for(const u of a)(h=u?.parentElement)===null||h===void 0||h.removeChild(u)}},3656:(B,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.addDisposableDomListener=void 0,i.addDisposableDomListener=function(a,h,u,d){a.addEventListener(h,u,d);let _=!1;return{dispose:()=>{_||(_=!0,a.removeEventListener(h,u,d))}}}},6465:function(B,i,a){var h=this&&this.__decorate||function(e,s,n,t){var r,l=arguments.length,f=l<3?s:t===null?t=Object.getOwnPropertyDescriptor(s,n):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(e,s,n,t);else for(var S=e.length-1;S>=0;S--)(r=e[S])&&(f=(l<3?r(f):l>3?r(s,n,f):r(s,n))||f);return l>3&&f&&Object.defineProperty(s,n,f),f},u=this&&this.__param||function(e,s){return function(n,t){s(n,t,e)}};Object.defineProperty(i,"__esModule",{value:!0}),i.Linkifier2=void 0;const d=a(2585),_=a(8460),g=a(844),v=a(3656);let c=class extends g.Disposable{constructor(e){super(),this._bufferService=e,this._linkProviders=[],this._linkCacheDisposables=[],this._isMouseOut=!0,this._activeLine=-1,this._onShowLinkUnderline=this.register(new _.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new _.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,g.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,g.toDisposable)(()=>{this._lastMouseEvent=void 0}))}get currentLink(){return this._currentLink}registerLinkProvider(e){return this._linkProviders.push(e),{dispose:()=>{const s=this._linkProviders.indexOf(e);s!==-1&&this._linkProviders.splice(s,1)}}}attachToDom(e,s,n){this._element=e,this._mouseService=s,this._renderService=n,this.register((0,v.addDisposableDomListener)(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this.register((0,v.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,v.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,v.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 n=e.composedPath();for(let t=0;t<n.length;t++){const r=n[t];if(r.classList.contains("xterm"))break;if(r.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)return this._clearCurrentLink(),void this._askForLink(e,!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,e)||(this._clearCurrentLink(),this._askForLink(e,!0))}_askForLink(e,s){var n,t;this._activeProviderReplies&&s||((n=this._activeProviderReplies)===null||n===void 0||n.forEach(l=>{l?.forEach(f=>{f.link.dispose&&f.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=e.y);let r=!1;for(const[l,f]of this._linkProviders.entries())s?!((t=this._activeProviderReplies)===null||t===void 0)&&t.get(l)&&(r=this._checkLinkProviderResult(l,e,r)):f.provideLinks(e.y,S=>{var o,p;if(this._isMouseOut)return;const C=S?.map(y=>({link:y}));(o=this._activeProviderReplies)===null||o===void 0||o.set(l,C),r=this._checkLinkProviderResult(l,e,r),((p=this._activeProviderReplies)===null||p===void 0?void 0:p.size)===this._linkProviders.length&&this._removeIntersectingLinks(e.y,this._activeProviderReplies)})}_removeIntersectingLinks(e,s){const n=new Set;for(let t=0;t<s.size;t++){const r=s.get(t);if(r)for(let l=0;l<r.length;l++){const f=r[l],S=f.link.range.start.y<e?0:f.link.range.start.x,o=f.link.range.end.y>e?this._bufferService.cols:f.link.range.end.x;for(let p=S;p<=o;p++){if(n.has(p)){r.splice(l--,1);break}n.add(p)}}}}_checkLinkProviderResult(e,s,n){var t;if(!this._activeProviderReplies)return n;const r=this._activeProviderReplies.get(e);let l=!1;for(let f=0;f<e;f++)this._activeProviderReplies.has(f)&&!this._activeProviderReplies.get(f)||(l=!0);if(!l&&r){const f=r.find(S=>this._linkAtPosition(S.link,s));f&&(n=!0,this._handleNewLink(f))}if(this._activeProviderReplies.size===this._linkProviders.length&&!n)for(let f=0;f<this._activeProviderReplies.size;f++){const S=(t=this._activeProviderReplies.get(f))===null||t===void 0?void 0:t.find(o=>this._linkAtPosition(o.link,s));if(S){n=!0,this._handleNewLink(S);break}}return n}_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,g.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 n,t;return(t=(n=this._currentLink)===null||n===void 0?void 0:n.state)===null||t===void 0?void 0:t.decorations.pointerCursor},set:n=>{var t,r;!((t=this._currentLink)===null||t===void 0)&&t.state&&this._currentLink.state.decorations.pointerCursor!==n&&(this._currentLink.state.decorations.pointerCursor=n,this._currentLink.state.isHovered&&((r=this._element)===null||r===void 0||r.classList.toggle("xterm-cursor-pointer",n)))}},underline:{get:()=>{var n,t;return(t=(n=this._currentLink)===null||n===void 0?void 0:n.state)===null||t===void 0?void 0:t.decorations.underline},set:n=>{var t,r,l;!((t=this._currentLink)===null||t===void 0)&&t.state&&((l=(r=this._currentLink)===null||r===void 0?void 0:r.state)===null||l===void 0?void 0:l.decorations.underline)!==n&&(this._currentLink.state.decorations.underline=n,this._currentLink.state.isHovered&&this._fireUnderlineEvent(e.link,n))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(n=>{const t=n.start===0?0:n.start+1+this._bufferService.buffer.ydisp,r=this._currentLink?this._lastMouseEvent:void 0;if(this._clearCurrentLink(t,n.end+1+this._bufferService.buffer.ydisp),r&&this._element){const l=this._positionFromMouseEvent(r,this._element,this._mouseService);l&&this._askForLink(l,!1)}})))}_linkHover(e,s,n){var t;!((t=this._currentLink)===null||t===void 0)&&t.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(n,s.text)}_fireUnderlineEvent(e,s){const n=e.range,t=this._bufferService.buffer.ydisp,r=this._createLinkUnderlineEvent(n.start.x-1,n.start.y-t-1,n.end.x,n.end.y-t-1,void 0);(s?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(r)}_linkLeave(e,s,n){var t;!((t=this._currentLink)===null||t===void 0)&&t.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(n,s.text)}_linkAtPosition(e,s){const n=e.range.start.y*this._bufferService.cols+e.range.start.x,t=e.range.end.y*this._bufferService.cols+e.range.end.x,r=s.y*this._bufferService.cols+s.x;return n<=r&&r<=t}_positionFromMouseEvent(e,s,n){const t=n.getCoords(e,s,this._bufferService.cols,this._bufferService.rows);if(t)return{x:t[0],y:t[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(e,s,n,t,r){return{x1:e,y1:s,x2:n,y2:t,cols:this._bufferService.cols,fg:r}}};c=h([u(0,d.IBufferService)],c),i.Linkifier2=c},9042:(B,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.tooMuchOutput=i.promptLabel=void 0,i.promptLabel="Terminal input",i.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(B,i,a){var h=this&&this.__decorate||function(c,e,s,n){var t,r=arguments.length,l=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,s):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,s,n);else for(var f=c.length-1;f>=0;f--)(t=c[f])&&(l=(r<3?t(l):r>3?t(e,s,l):t(e,s))||l);return r>3&&l&&Object.defineProperty(e,s,l),l},u=this&&this.__param||function(c,e){return function(s,n){e(s,n,c)}};Object.defineProperty(i,"__esModule",{value:!0}),i.OscLinkProvider=void 0;const d=a(511),_=a(2585);let g=class{constructor(c,e,s){this._bufferService=c,this._optionsService=e,this._oscLinkService=s}provideLinks(c,e){var s;const n=this._bufferService.buffer.lines.get(c-1);if(!n)return void e(void 0);const t=[],r=this._optionsService.rawOptions.linkHandler,l=new d.CellData,f=n.getTrimmedLength();let S=-1,o=-1,p=!1;for(let C=0;C<f;C++)if(o!==-1||n.hasContent(C)){if(n.loadCell(C,l),l.hasExtendedAttrs()&&l.extended.urlId){if(o===-1){o=C,S=l.extended.urlId;continue}p=l.extended.urlId!==S}else o!==-1&&(p=!0);if(p||o!==-1&&C===f-1){const y=(s=this._oscLinkService.getLinkData(S))===null||s===void 0?void 0:s.uri;if(y){const w={start:{x:o+1,y:c},end:{x:C+(p||C!==f-1?0:1),y:c}};let D=!1;if(!r?.allowNonHttpProtocols)try{const x=new URL(y);["http:","https:"].includes(x.protocol)||(D=!0)}catch{D=!0}D||t.push({text:y,range:w,activate:(x,I)=>r?r.activate(x,I,w):v(0,I),hover:(x,I)=>{var H;return(H=r?.hover)===null||H===void 0?void 0:H.call(r,x,I,w)},leave:(x,I)=>{var H;return(H=r?.leave)===null||H===void 0?void 0:H.call(r,x,I,w)}})}p=!1,l.hasExtendedAttrs()&&l.extended.urlId?(o=C,S=l.extended.urlId):(o=-1,S=-1)}}e(t)}};function v(c,e){if(confirm(`Do you want to navigate to ${e}?
|
|
4
4
|
|