@nuxt/devtools 2.2.1 → 2.3.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 +0 -3
- package/dist/chunks/module-main.mjs +125 -26
- package/dist/chunks/vscode.mjs +1 -1
- package/dist/client/200.html +24 -24
- package/dist/client/404.html +24 -24
- package/dist/client/_nuxt/__blank-mlfs714t.js +1 -0
- package/dist/client/_nuxt/analyze-build-o6948dlp.js +1 -0
- package/dist/client/_nuxt/assets-fc8kk69n.js +16 -0
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/20291db0-158a-4546-9c85-d3d4300c08ae.json +1 -0
- package/dist/client/_nuxt/{client-gsjyqe32.js → client-bqg1k5yt.js} +1 -1
- package/dist/client/_nuxt/{code-diff.vue-cmobgah0.js → code-diff.vue-wlkcn0ij.js} +3 -3
- package/dist/client/_nuxt/{code-snippets.vue-kiughdhz.js → code-snippets.vue-nnusc3m1.js} +1 -1
- package/dist/client/_nuxt/color-mt9xuhgy.js +1 -0
- package/dist/client/_nuxt/components-dnigdvlk.js +1 -0
- package/dist/client/_nuxt/composable-item.vue-hcm2n3uw.js +1 -0
- package/dist/client/_nuxt/custom-_name_-lea3ahcj.js +1 -0
- package/dist/client/_nuxt/{data-schema-button.vue-j12zu5ly.js → data-schema-button.vue-dgj05cxb.js} +1 -1
- package/dist/client/_nuxt/{data-schema-drawer-c0s8h2rf.js → data-schema-drawer-b6p6fr6f.js} +2 -2
- package/dist/client/_nuxt/debug-l9iw9jsl.js +1 -0
- package/dist/client/_nuxt/{default-gc7ie9i4.js → default-0qldsilx.js} +1 -1
- package/dist/client/_nuxt/duration-display.vue-lb5nc1xj.js +1 -0
- package/dist/client/_nuxt/entry.css-n6hiodwz.css +1 -0
- package/dist/client/_nuxt/{error-404-dlnouvoa.js → error-404-dw25cf31.js} +1 -1
- package/dist/client/_nuxt/error-404.css-k9d8ozcm.css +1 -0
- package/dist/client/_nuxt/{error-500-nwpcih6s.js → error-500-my62qy53.js} +1 -1
- package/dist/client/_nuxt/error-500.css-kolntf6l.css +1 -0
- package/dist/client/_nuxt/{error-n1d3rwvz.js → error-kr6ygqpy.js} +4 -4
- package/dist/client/_nuxt/{filepath-item.vue-csqbsvc3.js → filepath-item.vue-fd1zdt53.js} +1 -1
- package/dist/client/_nuxt/full-lau7d2fq.js +1 -0
- package/dist/client/_nuxt/{help-fab.vue-d99t6zdw.js → help-fab.vue-ob0qjvk7.js} +1 -1
- package/dist/client/_nuxt/hooks-duc6okah.js +1 -0
- package/dist/client/_nuxt/imports-cnlswbzv.js +1 -0
- package/dist/client/_nuxt/{index-izwizeyn.js → index-oskeiuxt.js} +1 -1
- package/dist/client/_nuxt/kvwmbylm.js +15 -0
- package/dist/client/_nuxt/launch-page.vue-nmjrqgea.js +1 -0
- package/dist/client/_nuxt/modules-jlynnmc3.js +1 -0
- package/dist/client/_nuxt/nbadge-njv6jhyo.js +1 -0
- package/dist/client/_nuxt/ncheckbox.vue-g4ghknbn.js +1 -0
- package/dist/client/_nuxt/ncode-block.vue-h2q9yyre.js +2 -0
- package/dist/client/_nuxt/{ndrawer.vue-m60bsg9x.js → ndrawer.vue-d58cjy0i.js} +1 -1
- package/dist/client/_nuxt/{ndropdown.vue-e8of1w4q.js → ndropdown.vue-hod8tej8.js} +1 -1
- package/dist/client/_nuxt/{nicon-title.vue-dsf9ygne.js → nicon-title.vue-oyhtd7jm.js} +1 -1
- package/dist/client/_nuxt/{nlink.vue-msx1bzvo.js → nlink.vue-hf7re1rn.js} +1 -1
- package/dist/client/_nuxt/nmarkdown.vue-io3ubke7.js +1 -0
- package/dist/client/_nuxt/nnavbar.vue-nqx0vxgx.js +1 -0
- package/dist/client/_nuxt/none-l9dnfz1g.js +1 -0
- package/dist/client/_nuxt/nsection-block-b5ox8weq.js +1 -0
- package/dist/client/_nuxt/nselect-tabs.vue-kce1z6go.js +1 -0
- package/dist/client/_nuxt/{nselect.vue-cwn1habi.js → nselect.vue-d6y2loab.js} +1 -1
- package/dist/client/_nuxt/{nswitch.vue-jbyu7ls8.js → nswitch.vue-fl7pkx4a.js} +1 -1
- package/dist/client/_nuxt/{open-graph-efd91aeh.js → open-graph-kjrergv9.js} +2 -2
- package/dist/client/_nuxt/{overview-b0jfropt.js → overview-e5oab66c.js} +1 -1
- package/dist/client/_nuxt/pages-o9m20tol.js +1 -0
- package/dist/client/_nuxt/{payload-nzogw6cx.js → payload-kye3mqim.js} +1 -1
- package/dist/client/_nuxt/pinia-jh2ui16k.js +1 -0
- package/dist/client/_nuxt/plugins-od29606e.js +1 -0
- package/dist/client/_nuxt/render-tree-c85w7f8g.js +1 -0
- package/dist/client/_nuxt/{runtime-configs-iwo02vae.js → runtime-configs-gzn1lbwe.js} +1 -1
- package/dist/client/_nuxt/server-discovery-hojt1s3k.js +1 -0
- package/dist/client/_nuxt/{server-route-inputs.vue-ouiap82r.js → server-route-inputs.vue-e2xp979g.js} +1 -1
- package/dist/client/_nuxt/server-routes-n5xn8rel.js +9 -0
- package/dist/client/_nuxt/server-tasks-if1rfb26.js +1 -0
- package/dist/client/_nuxt/settings-jzkg1swh.js +1 -0
- package/dist/client/_nuxt/stacktrace-list.vue-gmd7fzml.js +1 -0
- package/dist/client/_nuxt/{state-components-iu73pb63.js → state-components-jpzjqlfw.js} +1 -1
- package/dist/client/_nuxt/state-editor.vue-lnhqkmb1.js +1 -0
- package/dist/client/_nuxt/state-modules-l0rued1s.js +1 -0
- package/dist/client/_nuxt/storage-muwnw6ww.js +1 -0
- package/dist/client/_nuxt/terminals-mzadk7wd.js +1 -0
- package/dist/client/_nuxt/timeline-ezsq4bra.js +31 -0
- package/dist/client/_nuxt/timeline.css-pdb8jvzb.css +1 -0
- package/dist/client/_nuxt/{unocss-runtime-l2otbg6e.js → unocss-runtime-bag0aauk.js} +1 -1
- package/dist/client/_nuxt/vendor/json-editor-vue-huf8dypo.js +3846 -0
- package/dist/client/_nuxt/vendor/quicktype-core-klbd9u2j.js +1007 -0
- package/dist/client/_nuxt/vendor/{shiki-kdj4mcqm.js → shiki-jv02kgzv.js} +55 -54
- package/dist/client/_nuxt/vendor/{unocss-mvzv9iuf.js → unocss-e7oqigho.js} +2 -2
- package/dist/client/_nuxt/virtual-files-jdb2jga6.js +1 -0
- package/dist/client/_nuxt/vue-devtools-l332du22.js +2 -0
- package/dist/client/_nuxt/{vue-virtual-scroller.esm-gnguvd0a.js → vue-virtual-scroller.esm-bjuzk3oj.js} +2 -2
- package/dist/client/index.html +24 -24
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/shared/{devtools.60b2ba4d.mjs → devtools.c069f83f.mjs} +2 -2
- package/package.json +20 -22
- package/dist/client/_nuxt/__blank-o25h0hkz.js +0 -1
- package/dist/client/_nuxt/analyze-build-h1qtv94t.js +0 -1
- package/dist/client/_nuxt/assets-oebtr6sn.js +0 -16
- package/dist/client/_nuxt/builds/meta/917012c8-846d-4264-bce5-f9be7333c9da.json +0 -1
- package/dist/client/_nuxt/components-jia8wtb3.js +0 -1
- package/dist/client/_nuxt/composable-item.vue-gfbdvk92.js +0 -1
- package/dist/client/_nuxt/custom-_name_-m80m298x.js +0 -1
- package/dist/client/_nuxt/duration-display.vue-h9mqvgci.js +0 -1
- package/dist/client/_nuxt/entry.css-jfo9gib8.css +0 -1
- package/dist/client/_nuxt/error-404.css-cyoi3t2n.css +0 -1
- package/dist/client/_nuxt/error-500.css-c3osv0mr.css +0 -1
- package/dist/client/_nuxt/full-3l6dimb1.js +0 -1
- package/dist/client/_nuxt/hooks-jk04ky26.js +0 -1
- package/dist/client/_nuxt/imports-dqjyu7ow.js +0 -1
- package/dist/client/_nuxt/launch-page.vue-b5znlr95.js +0 -1
- package/dist/client/_nuxt/modules-ftim9y66.js +0 -1
- package/dist/client/_nuxt/n2dc525b.js +0 -17
- package/dist/client/_nuxt/nbadge-htrvttst.js +0 -1
- package/dist/client/_nuxt/ncheckbox.vue-m6od5ntc.js +0 -1
- package/dist/client/_nuxt/ncode-block.vue-bir2wz4z.js +0 -2
- package/dist/client/_nuxt/nmarkdown.vue-iw2voruc.js +0 -1
- package/dist/client/_nuxt/nnavbar.vue-mt44hnfg.js +0 -1
- package/dist/client/_nuxt/none-fqfjn9dv.js +0 -1
- package/dist/client/_nuxt/nsection-block-blzeji2j.js +0 -1
- package/dist/client/_nuxt/nselect-tabs.vue-eewrxxrw.js +0 -1
- package/dist/client/_nuxt/pages-owmi8y1w.js +0 -1
- package/dist/client/_nuxt/pinia-h28kc7st.js +0 -1
- package/dist/client/_nuxt/plugins-cvrrxd2o.js +0 -1
- package/dist/client/_nuxt/render-tree-f4btmb99.js +0 -1
- package/dist/client/_nuxt/server-discovery-kduvqt6t.js +0 -1
- package/dist/client/_nuxt/server-routes-otulhw4o.js +0 -9
- package/dist/client/_nuxt/server-tasks-fb19xaov.js +0 -1
- package/dist/client/_nuxt/settings-m340011e.js +0 -1
- package/dist/client/_nuxt/stacktrace-list.vue-jk5kvmxj.js +0 -1
- package/dist/client/_nuxt/state-editor.vue-ccl909mt.js +0 -1
- package/dist/client/_nuxt/state-modules-mc97lhwd.js +0 -1
- package/dist/client/_nuxt/storage-jl97i4lz.js +0 -1
- package/dist/client/_nuxt/terminals-hicd7c09.js +0 -1
- package/dist/client/_nuxt/timeline-d6b5hxwa.js +0 -31
- package/dist/client/_nuxt/timeline.css-lhkpu01p.css +0 -1
- package/dist/client/_nuxt/vendor/json-editor-vue-llkaejaf.js +0 -3819
- package/dist/client/_nuxt/vendor/quicktype-core-o2aektoq.js +0 -1006
- package/dist/client/_nuxt/virtual-files-kopy8ufw.js +0 -1
- package/dist/client/_nuxt/vue-devtools-nhi1fp41.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xe(e){var t;return typeof e=="function"?t={callback:e}:t=e,t}function ke(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s,r,a,u=function(n){for(var d=arguments.length,p=new Array(d>1?d-1:0),S=1;S<d;S++)p[S-1]=arguments[S];if(a=p,!(s&&n===r)){var _=i.leading;typeof _=="function"&&(_=_(n,r)),(!s||n!==r)&&_&&e.apply(void 0,[n].concat(X(a))),r=n,clearTimeout(s),s=setTimeout(function(){e.apply(void 0,[n].concat(X(a))),s=0},t)}};return u._clear=function(){clearTimeout(s),s=null},u}function J(e,t){if(e===t)return!0;if(C(e)==="object"){for(var i in e)if(!J(e[i],t[i]))return!1;return!0}return!1}var Me=function(){function e(t,i,s){we(this,e),this.el=t,this.observer=null,this.frozen=!1,this.createObserver(i,s)}return Ie(e,[{key:"createObserver",value:function(i,s){var r=this;if(this.observer&&this.destroyObserver(),!this.frozen){if(this.options=xe(i),this.callback=function(c,n){r.options.callback(c,n),c&&r.options.once&&(r.frozen=!0,r.destroyObserver())},this.callback&&this.options.throttle){var a=this.options.throttleOptions||{},u=a.leading;this.callback=ke(this.callback,this.options.throttle,{leading:function(n){return u==="both"||u==="visible"&&n||u==="hidden"&&!n}})}this.oldResult=void 0,this.observer=new IntersectionObserver(function(c){var n=c[0];if(c.length>1){var d=c.find(function(S){return S.isIntersecting});d&&(n=d)}if(r.callback){var p=n.isIntersecting&&n.intersectionRatio>=r.threshold;if(p===r.oldResult)return;r.oldResult=p,r.callback(p,n)}},this.options.intersection),Z(function(){r.observer&&r.observer.observe(r.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 Q(e,t,i){var s=t.value;if(s)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 r=new Me(e,s,i);e._vue_visibilityState=r}}function Ae(e,t,i){var s=t.value,r=t.oldValue;if(!J(s,r)){var a=e._vue_visibilityState;if(!s){ee(e);return}a?a.createObserver(s,i):Q(e,{value:s},i)}}function ee(e){var t=e._vue_visibilityState;t&&(t.destroyObserver(),delete e._vue_visibilityState)}var Re={beforeMount:Q,updated:Ae,unmounted:ee},Ce={itemsLimit:1e3},Ee=/(auto|scroll)/;function te(e,t){return e.parentNode===null?t:te(e.parentNode,t.concat([e]))}var P=function(t,i){return getComputedStyle(t,null).getPropertyValue(i)},Pe=function(t){return P(t,"overflow")+P(t,"overflow-y")+P(t,"overflow-x")},Le=function(t){return Ee.test(Pe(t))};function G(e){if(e instanceof HTMLElement||e instanceof SVGElement){for(var t=te(e.parentNode,[]),i=0;i<t.length;i+=1)if(Le(t[i]))return t[i];return document.scrollingElement||document.documentElement}}function j(e){"@babel/helpers - typeof";return j=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},j(e)}var He={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 Ne(){return this.items.length&&j(this.items[0])!=="object"}var B=!1;if(typeof window<"u"){B=!1;try{var je=Object.defineProperty({},"passive",{get:function(){B=!0}});window.addEventListener("test",null,je)}catch{}}let Be=0;var ie={name:"RecycleScroller",components:{ResizeObserver:E},directives:{ObserveVisibility:Re},props:{...He,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,i=this.sizeField,s=this.minItemSize;let r=1e4,a=0,u;for(let c=0,n=t.length;c<n;c++)u=t[c][i]||s,u<r&&(r=u),a+=u,e[c]={accumulator:a,size:u};return this.$_computedMinItemSize=r,e}return[]},simpleArray:Ne,itemIndexByKey(){const{keyField:e,items:t}=this,i={};for(let s=0,r=t.length;s<r;s++)i[t[s][e]]=s;return i}},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,i,s,r){const a=le({id:Be++,index:t,used:!0,key:s,type:r}),u=ae({item:i,position:0,nr:a});return e.push(u),u},unuseView(e,t=!1){const i=this.$_unusedViews,s=e.nr.type;let r=i.get(s);r||(r=[],i.set(s,r)),r.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:i}=this.updateVisibleItems(!1,!0);i||(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 i=this.itemSize,s=this.gridItems||1,r=this.itemSecondarySize||i,a=this.$_computedMinItemSize,u=this.typeField,c=this.simpleArray?null:this.keyField,n=this.items,d=n.length,p=this.sizes,S=this.$_views,_=this.$_unusedViews,V=this.pool,se=this.itemIndexByKey;let y,f,T,g,z;if(!d)y=f=g=z=T=0;else if(this.$_prerender)y=g=0,f=z=Math.min(this.prerender,n.length),T=null;else{const o=this.getScroll();if(t){let m=o.start-this.$_lastUpdateScrollPosition;if(m<0&&(m=-m),i===null&&m<a||m<i)return{continuous:!0}}this.$_lastUpdateScrollPosition=o.start;const v=this.buffer;o.start-=v,o.end+=v;let h=0;if(this.$refs.before&&(h=this.$refs.before.scrollHeight,o.start-=h),this.$refs.after){const m=this.$refs.after.scrollHeight;o.end+=m}if(i===null){let m,O=0,F=d-1,b=~~(d/2),U;do U=b,m=p[b].accumulator,m<o.start?O=b:b<d-1&&p[b+1].accumulator>o.start&&(F=b),b=~~((O+F)/2);while(b!==U);for(b<0&&(b=0),y=b,T=p[d-1].accumulator,f=b;f<d&&p[f].accumulator<o.end;f++);for(f===-1?f=n.length-1:(f++,f>d&&(f=d)),g=y;g<d&&h+p[g].accumulator<o.start;g++);for(z=g;z<d&&h+p[z].accumulator<o.end;z++);}else{y=~~(o.start/i*s);const m=y%s;y-=m,f=Math.ceil(o.end/i*s),g=Math.max(0,Math.floor((o.start-h)/i*s)),z=Math.floor((o.end-h)/i*s),y<0&&(y=0),f>d&&(f=d),g<0&&(g=0),z>d&&(z=d),T=Math.ceil(d/s)*i}}f-y>Ce.itemsLimit&&this.itemsLimitError(),this.totalSize=T;let l;const x=y<=this.$_endIndex&&f>=this.$_startIndex;if(x)for(let o=0,v=V.length;o<v;o++)l=V[o],l.nr.used&&(e&&(l.nr.index=se[l.item[c]]),(l.nr.index==null||l.nr.index<y||l.nr.index>=f)&&this.unuseView(l));const D=x?null:new Map;let I,w,k;for(let o=y;o<f;o++){I=n[o];const v=c?I[c]:I;if(v==null)throw new Error(`Key is ${v} on item (keyField is '${c}')`);if(l=S.get(v),!i&&!p[o].size){l&&this.unuseView(l);continue}w=I[u];let h=_.get(w),m=!1;if(!l)x?h&&h.length?l=h.pop():l=this.addView(V,o,I,v,w):(k=D.get(w)||0,(!h||k>=h.length)&&(l=this.addView(V,o,I,v,w),this.unuseView(l,!0),h=_.get(w)),l=h[k],D.set(w,k+1)),S.delete(l.nr.key),l.nr.used=!0,l.nr.index=o,l.nr.key=v,l.nr.type=w,S.set(v,l),m=!0;else if(!l.nr.used&&(l.nr.used=!0,m=!0,h)){const O=h.indexOf(l);O!==-1&&h.splice(O,1)}l.item=I,m&&(o===n.length-1&&this.$emit("scroll-end"),o===0&&this.$emit("scroll-start")),i===null?(l.position=p[o-1].accumulator,l.offset=0):(l.position=Math.floor(o/s)*i,l.offset=o%s*r)}return this.$_startIndex=y,this.$_endIndex=f,this.emitUpdate&&this.$emit("update",y,f,g,z),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:x}},getListenerTarget(){let e=G(this.$el);return window.document&&(e===window.document.documentElement||e===window.document.body)&&(e=window),e},getScroll(){const{$el:e,direction:t}=this,i=t==="vertical";let s;if(this.pageMode){const r=e.getBoundingClientRect(),a=i?r.height:r.width;let u=-(i?r.top:r.left),c=i?window.innerHeight:window.innerWidth;u<0&&(c+=u,u=0),u+c>a&&(c=a-u),s={start:u,end:u+c}}else i?s={start:e.scrollTop,end:e.scrollTop+e.clientHeight}:s={start:e.scrollLeft,end:e.scrollLeft+e.clientWidth};return s},applyPageMode(){this.pageMode?this.addListeners():this.removeListeners()},addListeners(){this.listenerTarget=this.getListenerTarget(),this.listenerTarget.addEventListener("scroll",this.handleScroll,B?{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 i=this.gridItems||1;this.itemSize===null?t=e>0?this.sizes[e-1].accumulator:0:t=Math.floor(e/i)*this.itemSize,this.scrollToPosition(t)},scrollToPosition(e){const t=this.direction==="vertical"?{scroll:"scrollTop",start:"top"}:{scroll:"scrollLeft",start:"left"};let i,s,r;if(this.pageMode){const a=G(this.$el),u=a.tagName==="HTML"?0:a[t.scroll],c=a.getBoundingClientRect(),d=this.$el.getBoundingClientRect()[t.start]-c[t.start];i=a,s=t.scroll,r=e+u+d}else i=this.$el,s=t.scroll,r=e;i[s]=r},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 De={key:0,ref:"before",class:"vue-recycle-scroller__slot"},Fe={key:1,ref:"after",class:"vue-recycle-scroller__slot"};function Ue(e,t,i,s,r,a){const u=ue("ResizeObserver"),c=ce("observe-visibility");return de(($(),M("div",{class:Y(["vue-recycle-scroller",{ready:r.ready,"page-mode":i.pageMode,[`direction-${e.direction}`]:!0}]),onScrollPassive:t[0]||(t[0]=(...n)=>a.handleScroll&&a.handleScroll(...n))},[e.$slots.before?($(),M("div",De,[A(e.$slots,"before")],512)):W("v-if",!0),($(),L(q(i.listTag),{ref:"wrapper",style:ve({[e.direction==="vertical"?"minHeight":"minWidth"]:r.totalSize+"px"}),class:Y(["vue-recycle-scroller__item-wrapper",i.listClass])},{default:K(()=>[($(!0),M(he,null,me(r.pool,n=>($(),L(q(i.itemTag),pe({key:n.nr.id,style:r.ready?{transform:`translate${e.direction==="vertical"?"Y":"X"}(${n.position}px) translate${e.direction==="vertical"?"X":"Y"}(${n.offset}px)`,width:i.gridItems?`${e.direction==="vertical"&&i.itemSecondarySize||i.itemSize}px`:void 0,height:i.gridItems?`${e.direction==="horizontal"&&i.itemSecondarySize||i.itemSize}px`:void 0}:null,class:["vue-recycle-scroller__item-view",[i.itemClass,{hover:!i.skipHover&&r.hoverKey===n.nr.key}]]},ye(i.skipHover?{}:{mouseenter:()=>{r.hoverKey=n.nr.key},mouseleave:()=>{r.hoverKey=null}})),{default:K(()=>[A(e.$slots,"default",{item:n.item,index:n.nr.index,active:n.nr.used})]),_:2},1040,["style","class"]))),128)),A(e.$slots,"empty")]),_:3},8,["style","class"])),e.$slots.after?($(),M("div",Fe,[A(e.$slots,"after")],512)):W("v-if",!0),fe(u,{onNotify:a.handleResize},null,8,["onNotify"])],34)),[[c,a.handleVisibilityChange]])}ie.render=Ue;ie.__file="src/components/RecycleScroller.vue";export{ie as s};
|
|
1
|
+
import{p as Q,Y as re,Z as ne,$ as oe,R as P,a0 as $,ax as le,s as ae,X as ue,af as ce,a9 as de,O as M,Q as W,a2 as fe,S as A,a1 as K,F as he,ad as me,ac as q,a3 as pe,ay as ye,W as Y,U as ve}from"./vendor/json-editor-vue-huf8dypo.js";function be(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);var i=e.indexOf("Trident/");if(i>0){var s=e.indexOf("rv:");return parseInt(e.substring(s+3,e.indexOf(".",s)),10)}var r=e.indexOf("Edge/");return r>0?parseInt(e.substring(r+5,e.indexOf(".",r)),10):-1}let R;function H(){H.init||(H.init=!0,R=be()!==-1)}var E={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){H(),Q(()=>{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",R&&this.$el.appendChild(e),e.data="about:blank",R||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&&(!R&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const ge=oe();re("data-v-b329ee4c");const Se={class:"resize-observer",tabindex:"-1"};ne();const ze=ge((e,t,i,s,r,a)=>($(),P("div",Se)));E.render=ze;E.__scopeId="data-v-b329ee4c";E.__file="src/components/ResizeObserver.vue";function C(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?C=function(t){return typeof t}:C=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},C(e)}function _e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function we(e,t){for(var i=0;i<t.length;i++){var s=t[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}function Ie(e,t,i){return t&&we(e.prototype,t),e}function X(e){return $e(e)||Te(e)||Oe(e)||Ve()}function $e(e){if(Array.isArray(e))return N(e)}function Te(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Oe(e,t){if(e){if(typeof e=="string")return N(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);if(i==="Object"&&e.constructor&&(i=e.constructor.name),i==="Map"||i==="Set")return Array.from(e);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return N(e,t)}}function N(e,t){(t==null||t>e.length)&&(t=e.length);for(var i=0,s=new Array(t);i<t;i++)s[i]=e[i];return s}function Ve(){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 xe(e){var t;return typeof e=="function"?t={callback:e}:t=e,t}function ke(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s,r,a,u=function(n){for(var d=arguments.length,p=new Array(d>1?d-1:0),S=1;S<d;S++)p[S-1]=arguments[S];if(a=p,!(s&&n===r)){var w=i.leading;typeof w=="function"&&(w=w(n,r)),(!s||n!==r)&&w&&e.apply(void 0,[n].concat(X(a))),r=n,clearTimeout(s),s=setTimeout(function(){e.apply(void 0,[n].concat(X(a))),s=0},t)}};return u._clear=function(){clearTimeout(s),s=null},u}function Z(e,t){if(e===t)return!0;if(C(e)==="object"){for(var i in e)if(!Z(e[i],t[i]))return!1;return!0}return!1}var Me=function(){function e(t,i,s){_e(this,e),this.el=t,this.observer=null,this.frozen=!1,this.createObserver(i,s)}return Ie(e,[{key:"createObserver",value:function(i,s){var r=this;if(this.observer&&this.destroyObserver(),!this.frozen){if(this.options=xe(i),this.callback=function(c,n){r.options.callback(c,n),c&&r.options.once&&(r.frozen=!0,r.destroyObserver())},this.callback&&this.options.throttle){var a=this.options.throttleOptions||{},u=a.leading;this.callback=ke(this.callback,this.options.throttle,{leading:function(n){return u==="both"||u==="visible"&&n||u==="hidden"&&!n}})}this.oldResult=void 0,this.observer=new IntersectionObserver(function(c){var n=c[0];if(c.length>1){var d=c.find(function(S){return S.isIntersecting});d&&(n=d)}if(r.callback){var p=n.isIntersecting&&n.intersectionRatio>=r.threshold;if(p===r.oldResult)return;r.oldResult=p,r.callback(p,n)}},this.options.intersection),Q(function(){r.observer&&r.observer.observe(r.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 J(e,t,i){var s=t.value;if(s)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 r=new Me(e,s,i);e._vue_visibilityState=r}}function Ae(e,t,i){var s=t.value,r=t.oldValue;if(!Z(s,r)){var a=e._vue_visibilityState;if(!s){ee(e);return}a?a.createObserver(s,i):J(e,{value:s},i)}}function ee(e){var t=e._vue_visibilityState;t&&(t.destroyObserver(),delete e._vue_visibilityState)}var Re={beforeMount:J,updated:Ae,unmounted:ee},Ce={itemsLimit:1e3},Ee=/(auto|scroll)/;function te(e,t){return e.parentNode===null?t:te(e.parentNode,t.concat([e]))}var L=function(t,i){return getComputedStyle(t,null).getPropertyValue(i)},Le=function(t){return L(t,"overflow")+L(t,"overflow-y")+L(t,"overflow-x")},Pe=function(t){return Ee.test(Le(t))};function G(e){if(e instanceof HTMLElement||e instanceof SVGElement){for(var t=te(e.parentNode,[]),i=0;i<t.length;i+=1)if(Pe(t[i]))return t[i];return document.scrollingElement||document.documentElement}}function j(e){"@babel/helpers - typeof";return j=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},j(e)}var He={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 Ne(){return this.items.length&&j(this.items[0])!=="object"}var B=!1;if(typeof window<"u"){B=!1;try{var je=Object.defineProperty({},"passive",{get:function(){B=!0}});window.addEventListener("test",null,je)}catch{}}let Be=0;var ie={name:"RecycleScroller",components:{ResizeObserver:E},directives:{ObserveVisibility:Re},props:{...He,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,i=this.sizeField,s=this.minItemSize;let r=1e4,a=0,u;for(let c=0,n=t.length;c<n;c++)u=t[c][i]||s,u<r&&(r=u),a+=u,e[c]={accumulator:a,size:u};return this.$_computedMinItemSize=r,e}return[]},simpleArray:Ne,itemIndexByKey(){const{keyField:e,items:t}=this,i={};for(let s=0,r=t.length;s<r;s++)i[t[s][e]]=s;return i}},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,i,s,r){const a=le({id:Be++,index:t,used:!0,key:s,type:r}),u=ae({item:i,position:0,nr:a});return e.push(u),u},unuseView(e,t=!1){const i=this.$_unusedViews,s=e.nr.type;let r=i.get(s);r||(r=[],i.set(s,r)),r.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:i}=this.updateVisibleItems(!1,!0);i||(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 i=this.itemSize,s=this.gridItems||1,r=this.itemSecondarySize||i,a=this.$_computedMinItemSize,u=this.typeField,c=this.simpleArray?null:this.keyField,n=this.items,d=n.length,p=this.sizes,S=this.$_views,w=this.$_unusedViews,V=this.pool,se=this.itemIndexByKey;let y,f,T,g,z;if(!d)y=f=g=z=T=0;else if(this.$_prerender)y=g=0,f=z=Math.min(this.prerender,n.length),T=null;else{const o=this.getScroll();if(t){let m=o.start-this.$_lastUpdateScrollPosition;if(m<0&&(m=-m),i===null&&m<a||m<i)return{continuous:!0}}this.$_lastUpdateScrollPosition=o.start;const v=this.buffer;o.start-=v,o.end+=v;let h=0;if(this.$refs.before&&(h=this.$refs.before.scrollHeight,o.start-=h),this.$refs.after){const m=this.$refs.after.scrollHeight;o.end+=m}if(i===null){let m,O=0,F=d-1,b=~~(d/2),U;do U=b,m=p[b].accumulator,m<o.start?O=b:b<d-1&&p[b+1].accumulator>o.start&&(F=b),b=~~((O+F)/2);while(b!==U);for(b<0&&(b=0),y=b,T=p[d-1].accumulator,f=b;f<d&&p[f].accumulator<o.end;f++);for(f===-1?f=n.length-1:(f++,f>d&&(f=d)),g=y;g<d&&h+p[g].accumulator<o.start;g++);for(z=g;z<d&&h+p[z].accumulator<o.end;z++);}else{y=~~(o.start/i*s);const m=y%s;y-=m,f=Math.ceil(o.end/i*s),g=Math.max(0,Math.floor((o.start-h)/i*s)),z=Math.floor((o.end-h)/i*s),y<0&&(y=0),f>d&&(f=d),g<0&&(g=0),z>d&&(z=d),T=Math.ceil(d/s)*i}}f-y>Ce.itemsLimit&&this.itemsLimitError(),this.totalSize=T;let l;const x=y<=this.$_endIndex&&f>=this.$_startIndex;if(x)for(let o=0,v=V.length;o<v;o++)l=V[o],l.nr.used&&(e&&(l.nr.index=se[l.item[c]]),(l.nr.index==null||l.nr.index<y||l.nr.index>=f)&&this.unuseView(l));const D=x?null:new Map;let I,_,k;for(let o=y;o<f;o++){I=n[o];const v=c?I[c]:I;if(v==null)throw new Error(`Key is ${v} on item (keyField is '${c}')`);if(l=S.get(v),!i&&!p[o].size){l&&this.unuseView(l);continue}_=I[u];let h=w.get(_),m=!1;if(!l)x?h&&h.length?l=h.pop():l=this.addView(V,o,I,v,_):(k=D.get(_)||0,(!h||k>=h.length)&&(l=this.addView(V,o,I,v,_),this.unuseView(l,!0),h=w.get(_)),l=h[k],D.set(_,k+1)),S.delete(l.nr.key),l.nr.used=!0,l.nr.index=o,l.nr.key=v,l.nr.type=_,S.set(v,l),m=!0;else if(!l.nr.used&&(l.nr.used=!0,m=!0,h)){const O=h.indexOf(l);O!==-1&&h.splice(O,1)}l.item=I,m&&(o===n.length-1&&this.$emit("scroll-end"),o===0&&this.$emit("scroll-start")),i===null?(l.position=p[o-1].accumulator,l.offset=0):(l.position=Math.floor(o/s)*i,l.offset=o%s*r)}return this.$_startIndex=y,this.$_endIndex=f,this.emitUpdate&&this.$emit("update",y,f,g,z),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:x}},getListenerTarget(){let e=G(this.$el);return window.document&&(e===window.document.documentElement||e===window.document.body)&&(e=window),e},getScroll(){const{$el:e,direction:t}=this,i=t==="vertical";let s;if(this.pageMode){const r=e.getBoundingClientRect(),a=i?r.height:r.width;let u=-(i?r.top:r.left),c=i?window.innerHeight:window.innerWidth;u<0&&(c+=u,u=0),u+c>a&&(c=a-u),s={start:u,end:u+c}}else i?s={start:e.scrollTop,end:e.scrollTop+e.clientHeight}:s={start:e.scrollLeft,end:e.scrollLeft+e.clientWidth};return s},applyPageMode(){this.pageMode?this.addListeners():this.removeListeners()},addListeners(){this.listenerTarget=this.getListenerTarget(),this.listenerTarget.addEventListener("scroll",this.handleScroll,B?{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 i=this.gridItems||1;this.itemSize===null?t=e>0?this.sizes[e-1].accumulator:0:t=Math.floor(e/i)*this.itemSize,this.scrollToPosition(t)},scrollToPosition(e){const t=this.direction==="vertical"?{scroll:"scrollTop",start:"top"}:{scroll:"scrollLeft",start:"left"};let i,s,r;if(this.pageMode){const a=G(this.$el),u=a.tagName==="HTML"?0:a[t.scroll],c=a.getBoundingClientRect(),d=this.$el.getBoundingClientRect()[t.start]-c[t.start];i=a,s=t.scroll,r=e+u+d}else i=this.$el,s=t.scroll,r=e;i[s]=r},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 De={key:0,ref:"before",class:"vue-recycle-scroller__slot"},Fe={key:1,ref:"after",class:"vue-recycle-scroller__slot"};function Ue(e,t,i,s,r,a){const u=ue("ResizeObserver"),c=ce("observe-visibility");return de(($(),M("div",{class:Y(["vue-recycle-scroller",{ready:r.ready,"page-mode":i.pageMode,[`direction-${e.direction}`]:!0}]),onScrollPassive:t[0]||(t[0]=(...n)=>a.handleScroll&&a.handleScroll(...n))},[e.$slots.before?($(),M("div",De,[A(e.$slots,"before")],512)):W("v-if",!0),($(),P(q(i.listTag),{ref:"wrapper",style:ve({[e.direction==="vertical"?"minHeight":"minWidth"]:r.totalSize+"px"}),class:Y(["vue-recycle-scroller__item-wrapper",i.listClass])},{default:K(()=>[($(!0),M(he,null,me(r.pool,n=>($(),P(q(i.itemTag),pe({key:n.nr.id,style:r.ready?{transform:`translate${e.direction==="vertical"?"Y":"X"}(${n.position}px) translate${e.direction==="vertical"?"X":"Y"}(${n.offset}px)`,width:i.gridItems?`${e.direction==="vertical"&&i.itemSecondarySize||i.itemSize}px`:void 0,height:i.gridItems?`${e.direction==="horizontal"&&i.itemSecondarySize||i.itemSize}px`:void 0}:null,class:["vue-recycle-scroller__item-view",[i.itemClass,{hover:!i.skipHover&&r.hoverKey===n.nr.key}]]},ye(i.skipHover?{}:{mouseenter:()=>{r.hoverKey=n.nr.key},mouseleave:()=>{r.hoverKey=null}})),{default:K(()=>[A(e.$slots,"default",{item:n.item,index:n.nr.index,active:n.nr.used})]),_:2},1040,["style","class"]))),128)),A(e.$slots,"empty")]),_:3},8,["style","class"])),e.$slots.after?($(),M("div",Fe,[A(e.$slots,"after")],512)):W("v-if",!0),fe(u,{onNotify:a.handleResize},null,8,["onNotify"])],34)),[[c,a.handleVisibilityChange]])}ie.render=Ue;ie.__file="src/components/RecycleScroller.vue";export{ie as s};
|
package/dist/client/index.html
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
<!DOCTYPE html><html
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8">
|
|
2
2
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
3
|
-
<link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.css-
|
|
3
|
+
<link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.css-n6hiodwz.css" crossorigin>
|
|
4
4
|
<link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue.css-mqq5uooj.css" crossorigin>
|
|
5
5
|
<link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss.css-mhvipxpl.css" crossorigin>
|
|
6
|
-
<link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/
|
|
7
|
-
<link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue-
|
|
8
|
-
<link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss-
|
|
9
|
-
<link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/shiki-
|
|
6
|
+
<link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/kvwmbylm.js">
|
|
7
|
+
<link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue-huf8dypo.js">
|
|
8
|
+
<link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss-e7oqigho.js">
|
|
9
|
+
<link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/shiki-jv02kgzv.js">
|
|
10
10
|
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/markdown-it-fvu08dbs.js">
|
|
11
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/default-
|
|
12
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/full-
|
|
13
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/none-
|
|
11
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/default-0qldsilx.js">
|
|
12
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/full-lau7d2fq.js">
|
|
13
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/none-l9dnfz1g.js">
|
|
14
14
|
<link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ncode-block.css-lvdc77tw.css">
|
|
15
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/data-schema-drawer-
|
|
16
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nselect.vue-
|
|
17
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nswitch.vue-
|
|
18
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndropdown.vue-
|
|
19
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ncode-block.vue-
|
|
20
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/client-
|
|
21
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndrawer.vue-
|
|
22
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/quicktype-core-
|
|
23
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/unocss-runtime-
|
|
24
|
-
<link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404.css-
|
|
25
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404-
|
|
26
|
-
<link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500.css-
|
|
27
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500-
|
|
28
|
-
<script type="module" src="/__NUXT_DEVTOOLS_BASE__/_nuxt/
|
|
29
|
-
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_BASE__/",buildId:"
|
|
15
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/data-schema-drawer-b6p6fr6f.js">
|
|
16
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nselect.vue-d6y2loab.js">
|
|
17
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nswitch.vue-fl7pkx4a.js">
|
|
18
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndropdown.vue-hod8tej8.js">
|
|
19
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ncode-block.vue-h2q9yyre.js">
|
|
20
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/client-bqg1k5yt.js">
|
|
21
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndrawer.vue-d58cjy0i.js">
|
|
22
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/quicktype-core-klbd9u2j.js">
|
|
23
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/unocss-runtime-bag0aauk.js">
|
|
24
|
+
<link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404.css-k9d8ozcm.css">
|
|
25
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404-dw25cf31.js">
|
|
26
|
+
<link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500.css-kolntf6l.css">
|
|
27
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500-my62qy53.js">
|
|
28
|
+
<script type="module" src="/__NUXT_DEVTOOLS_BASE__/_nuxt/kvwmbylm.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1742438481201,false]</script>
|
|
29
|
+
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_BASE__/",buildId:"20291db0-158a-4546-9c85-d3d4300c08ae",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { defineNuxtModule } from '@nuxt/kit';
|
|
2
2
|
import { isGlobalInstall } from '../dirs.mjs';
|
|
3
3
|
|
|
4
|
-
const r=Object.create(null),i=e=>globalThis.process?.env||import.meta.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?r:globalThis),
|
|
4
|
+
const r=Object.create(null),i=e=>globalThis.process?.env||import.meta.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?r:globalThis),o=new Proxy(r,{get(e,s){return i()[s]??r[s]},has(e,s){const E=i();return s in E||s in r},set(e,s,E){const B=i(!0);return B[s]=E,!0},deleteProperty(e,s){if(!s)return !1;const E=i(!0);return delete E[s],!0},ownKeys(){const e=i(!0);return Object.keys(e)}}),t=typeof process<"u"&&process.env&&process.env.NODE_ENV||"",f=[["APPVEYOR"],["AWS_AMPLIFY","AWS_APP_ID",{ci:!0}],["AZURE_PIPELINES","SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],["AZURE_STATIC","INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],["APPCIRCLE","AC_APPCIRCLE"],["BAMBOO","bamboo_planKey"],["BITBUCKET","BITBUCKET_COMMIT"],["BITRISE","BITRISE_IO"],["BUDDY","BUDDY_WORKSPACE_ID"],["BUILDKITE"],["CIRCLE","CIRCLECI"],["CIRRUS","CIRRUS_CI"],["CLOUDFLARE_PAGES","CF_PAGES",{ci:!0}],["CODEBUILD","CODEBUILD_BUILD_ARN"],["CODEFRESH","CF_BUILD_ID"],["DRONE"],["DRONE","DRONE_BUILD_EVENT"],["DSARI"],["GITHUB_ACTIONS"],["GITLAB","GITLAB_CI"],["GITLAB","CI_MERGE_REQUEST_ID"],["GOCD","GO_PIPELINE_LABEL"],["LAYERCI"],["HUDSON","HUDSON_URL"],["JENKINS","JENKINS_URL"],["MAGNUM"],["NETLIFY"],["NETLIFY","NETLIFY_LOCAL",{ci:!1}],["NEVERCODE"],["RENDER"],["SAIL","SAILCI"],["SEMAPHORE"],["SCREWDRIVER"],["SHIPPABLE"],["SOLANO","TDDIUM"],["STRIDER"],["TEAMCITY","TEAMCITY_VERSION"],["TRAVIS"],["VERCEL","NOW_BUILDER"],["VERCEL","VERCEL",{ci:!1}],["VERCEL","VERCEL_ENV",{ci:!1}],["APPCENTER","APPCENTER_BUILD_ID"],["CODESANDBOX","CODESANDBOX_SSE",{ci:!1}],["CODESANDBOX","CODESANDBOX_HOST",{ci:!1}],["STACKBLITZ"],["STORMKIT"],["CLEAVR"],["ZEABUR"],["CODESPHERE","CODESPHERE_APP_ID",{ci:!0}],["RAILWAY","RAILWAY_PROJECT_ID"],["RAILWAY","RAILWAY_SERVICE_ID"],["DENO-DEPLOY","DENO_DEPLOYMENT_ID"],["FIREBASE_APP_HOSTING","FIREBASE_APP_HOSTING",{ci:!0}]];function b(){if(globalThis.process?.env)for(const e of f){const s=e[1]||e[0];if(globalThis.process?.env[s])return {name:e[0].toLowerCase(),...e[2]}}return globalThis.process?.env?.SHELL==="/bin/jsh"&&globalThis.process?.versions?.webcontainer?{name:"stackblitz",ci:!1}:{name:"",ci:!1}}const l=b(),p=l.name;function n(e){return e?e!=="false":!1}const I=globalThis.process?.platform||"",T=n(o.CI)||l.ci!==!1,a=n(globalThis.process?.stdout&&globalThis.process?.stdout.isTTY);n(o.DEBUG);const R=t==="test"||n(o.TEST);n(o.MINIMAL)||T||R||!a;const A=/^win/i.test(I);!n(o.NO_COLOR)&&(n(o.FORCE_COLOR)||(a||A)&&o.TERM!=="dumb"||T);const C=(globalThis.process?.versions?.node||"").replace(/^v/,"")||null;Number(C?.split(".")[0])||null;const y=globalThis.process||Object.create(null),_={versions:{}};new Proxy(y,{get(e,s){if(s==="env")return o;if(s in e)return e[s];if(s in _)return _[s]}});const c=globalThis.process?.release?.name==="node",O=!!globalThis.Bun||!!globalThis.process?.versions?.bun,D=!!globalThis.Deno,L=!!globalThis.fastly,S=!!globalThis.Netlify,u=!!globalThis.EdgeRuntime,N=globalThis.navigator?.userAgent==="Cloudflare-Workers",F=[[S,"netlify"],[u,"edge-light"],[N,"workerd"],[L,"fastly"],[D,"deno"],[O,"bun"],[c,"node"]];function G(){const e=F.find(s=>s[0]);if(e)return {name:e[1]}}const P=G();P?.name||"";
|
|
5
5
|
|
|
6
6
|
const WS_EVENT_NAME = "nuxt:devtools:rpc";
|
|
7
|
-
const isSandboxed =
|
|
7
|
+
const isSandboxed = p === "stackblitz" || p === "codesandbox";
|
|
8
8
|
const defaultOptions = {
|
|
9
9
|
enabled: void 0,
|
|
10
10
|
// determine multiple conditions
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/devtools",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.3.1",
|
|
5
5
|
"description": "The Nuxt DevTools gives you insights and transparency about your Nuxt App.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://devtools.nuxt.com",
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
"vite": ">=6.0"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@nuxt/kit": "^3.
|
|
35
|
+
"@nuxt/kit": "^3.16.1",
|
|
36
36
|
"@vue/devtools-core": "^7.7.2",
|
|
37
37
|
"@vue/devtools-kit": "^7.7.2",
|
|
38
38
|
"birpc": "^2.2.0",
|
|
39
|
-
"consola": "^3.4.
|
|
39
|
+
"consola": "^3.4.2",
|
|
40
40
|
"destr": "^2.0.3",
|
|
41
41
|
"error-stack-parser-es": "^1.0.5",
|
|
42
|
-
"execa": "^
|
|
42
|
+
"execa": "^8.0.1",
|
|
43
43
|
"fast-npm-meta": "^0.3.1",
|
|
44
44
|
"get-port-please": "^3.1.2",
|
|
45
45
|
"hookable": "^5.5.3",
|
|
@@ -59,11 +59,11 @@
|
|
|
59
59
|
"structured-clone-es": "^1.0.0",
|
|
60
60
|
"tinyglobby": "^0.2.12",
|
|
61
61
|
"vite-plugin-inspect": "^11.0.0",
|
|
62
|
-
"vite-plugin-vue-tracer": "^0.1.
|
|
62
|
+
"vite-plugin-vue-tracer": "^0.1.1",
|
|
63
63
|
"which": "^5.0.0",
|
|
64
64
|
"ws": "^8.18.1",
|
|
65
|
-
"@nuxt/devtools-
|
|
66
|
-
"@nuxt/devtools-
|
|
65
|
+
"@nuxt/devtools-wizard": "2.3.1",
|
|
66
|
+
"@nuxt/devtools-kit": "2.3.1"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@antfu/utils": "^9.1.0",
|
|
@@ -73,48 +73,46 @@
|
|
|
73
73
|
"@iconify-json/carbon": "^1.2.8",
|
|
74
74
|
"@iconify-json/logos": "^1.2.4",
|
|
75
75
|
"@iconify-json/ri": "^1.2.5",
|
|
76
|
-
"@iconify-json/simple-icons": "^1.2.
|
|
77
|
-
"@iconify-json/tabler": "^1.2.
|
|
78
|
-
"@nuxt/
|
|
79
|
-
"@nuxt/test-utils": "^3.17.1",
|
|
76
|
+
"@iconify-json/simple-icons": "^1.2.29",
|
|
77
|
+
"@iconify-json/tabler": "^1.2.17",
|
|
78
|
+
"@nuxt/test-utils": "^3.17.2",
|
|
80
79
|
"@parcel/watcher": "^2.5.1",
|
|
81
|
-
"@shikijs/langs-precompiled": "^3.1.0",
|
|
82
80
|
"@types/markdown-it-link-attributes": "^3.0.5",
|
|
81
|
+
"@unhead/schema": "^1.11.20",
|
|
83
82
|
"@unocss/nuxt": "^66.0.0",
|
|
84
83
|
"@unocss/preset-icons": "^66.0.0",
|
|
85
84
|
"@unocss/preset-uno": "^66.0.0",
|
|
86
85
|
"@unocss/runtime": "^66.0.0",
|
|
87
|
-
"@vitest/ui": "^3.0.
|
|
86
|
+
"@vitest/ui": "^3.0.9",
|
|
88
87
|
"@vue/devtools-applet": "^7.7.2",
|
|
89
|
-
"@vueuse/nuxt": "^
|
|
88
|
+
"@vueuse/nuxt": "^13.0.0",
|
|
90
89
|
"@xterm/addon-fit": "^0.10.0",
|
|
91
90
|
"@xterm/xterm": "^5.5.0",
|
|
92
91
|
"cronstrue": "^2.56.0",
|
|
93
|
-
"esno": "^4.8.0",
|
|
94
92
|
"floating-vue": "^5.2.2",
|
|
95
93
|
"fuse.js": "^7.1.0",
|
|
96
94
|
"json-editor-vue": "^0.18.1",
|
|
97
95
|
"markdown-it": "^14.1.0",
|
|
98
96
|
"markdown-it-link-attributes": "^4.0.1",
|
|
99
97
|
"my-ua-parser": "^2.0.4",
|
|
100
|
-
"
|
|
101
|
-
"
|
|
102
|
-
"nuxt": "^3.15.4",
|
|
98
|
+
"nitropack": "^2.11.7",
|
|
99
|
+
"nuxt": "^3.16.1",
|
|
103
100
|
"ofetch": "^1.4.1",
|
|
104
101
|
"quicktype-core": "22.0.0",
|
|
105
102
|
"scule": "^1.3.0",
|
|
106
|
-
"shiki": "^3.1
|
|
107
|
-
"shiki-codegen": "^3.1
|
|
103
|
+
"shiki": "^3.2.1",
|
|
104
|
+
"shiki-codegen": "^3.2.1",
|
|
108
105
|
"theme-vitesse": "^0.8.3",
|
|
106
|
+
"tsx": "^4.19.3",
|
|
109
107
|
"unimport": "^4.1.2",
|
|
110
108
|
"unocss": "^66.0.0",
|
|
111
109
|
"unplugin-vue-markdown": "^28.3.1",
|
|
112
|
-
"vanilla-jsoneditor": "^3.
|
|
110
|
+
"vanilla-jsoneditor": "^3.1.1",
|
|
113
111
|
"vis-data": "^7.1.9",
|
|
114
112
|
"vis-network": "^9.1.9",
|
|
115
113
|
"vue-tsc": "^2.2.8",
|
|
116
114
|
"vue-virtual-scroller": "^2.0.0-beta.8",
|
|
117
|
-
"@nuxt/devtools": "2.
|
|
115
|
+
"@nuxt/devtools": "2.3.1"
|
|
118
116
|
},
|
|
119
117
|
"scripts": {
|
|
120
118
|
"build": "pnpm dev:prepare && pnpm build:module && pnpm build:discovery && pnpm build:client",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./n2dc525b.js";import{p as e,P as t,a1 as o}from"./vendor/json-editor-vue-llkaejaf.js";import"./vendor/unocss-mvzv9iuf.js";import"./vendor/shiki-kdj4mcqm.js";const n={"h-screen":"","w-screen":"","bg-black":""},i=e({__name:"__blank",setup(r){return(a,c)=>(o(),t("div",n))}});export{i as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{k as Z,l as P,_ as R,r as S,m as j,n as J,o as h,p as ee,q as ne,s as te,v as le,i as ie,w as k,x as oe,y as re,z as ue,A as se,B as ae}from"./n2dc525b.js";import{_ as de}from"./filepath-item.vue-csqbsvc3.js";import{p as L,q as V,f as F,P as u,a1 as i,Q as e,R as g,F as p,ae as U,a3 as d,a8 as v,u as x,a2 as a,a9 as f,aa as D,ab as I,X as E,S as B}from"./vendor/json-editor-vue-llkaejaf.js";import{_ as me}from"./ncode-block.vue-bir2wz4z.js";import{_ as pe}from"./ncheckbox.vue-m6od5ntc.js";import{_ as ve}from"./help-fab.vue-d99t6zdw.js";import"./vendor/unocss-mvzv9iuf.js";import"./vendor/shiki-kdj4mcqm.js";import"./client-gsjyqe32.js";const fe={"h-full":"",grid:"~ rows-[max-content_1fr]"},ye={flex:"~ wrap","w-full":""},ce=["onClick"],xe={key:0,flex:"~ col gap-4 items-center justify-center",p4:""},be={grid:"~ cols-[30px_1fr] gap-x-2 gap-y-3 items-center justify-center","w-100":""},ge="/__nuxt_devtools__/client",_e=L({__name:"BuildAnalyzeDetails",props:{current:{},prev:{}},setup(N){const y=N,w=`${Z().app.baseURL.replace(ge,"/")}/__nuxt_devtools__/analyze/`.replace(/\/+/g,"/"),c=V(()=>{const l=[{name:"Overview",id:"overview"}];return y.current.features.bundleClient&&l.push({name:"Client Bundle",id:"bundle-client"}),y.current.features.bundleNitro&&l.push({name:"Nitro Bundle",id:"bundle-nitro"}),y.current.features.viteInspect&&l.push({name:"Vite Inspect",id:"vite-inspect"}),l}),o=F(c.value[0]);function z(l){return`${((l.endTime-l.startTime)/1e3).toFixed(1)}s`}function m(l){return l<1024?`${l}B`:l<1024*1024?`${(l/1024).toFixed(1)}KB`:l<1024*1024*1024?`${(l/1024/1024).toFixed(1)}MB`:`${(l/1024/1024/1024).toFixed(1)}GB`}async function T(l){return S.clearAnalyzeBuilds(await j(),[l])}return(l,n)=>{const A=de,C=R;return i(),u("div",fe,[e("div",ye,[(i(!0),u(p,null,U(c.value,(r,t)=>(i(),u("button",{key:t,px4:"",py2:"",border:"r base",hover:"bg-active",class:E(r.id===o.value.id?"":"border-b"),onClick:$=>o.value=r},[e("div",{class:E(r.id===o.value.id?"":"op30")},v(r.name),3)],10,ce))),128)),n[1]||(n[1]=e("div",{border:"b base","flex-auto":""},null,-1))]),o.value.id==="overview"?(i(),u("div",xe,[n[15]||(n[15]=e("div",{"flex-auto":""},null,-1)),e("div",be,[n[10]||(n[10]=e("div",{"i-carbon-commit":"","text-xl":""},null,-1)),e("div",null,[n[2]||(n[2]=e("div",{"text-sm":"",op50:""}," Name ",-1)),e("div",null,v(l.current.name),1)]),n[11]||(n[11]=e("div",{"i-carbon-time":"","text-xl":""},null,-1)),e("div",null,[n[3]||(n[3]=e("div",{"text-sm":"",op50:""}," Build duration ",-1)),e("div",null,v(z(l.current)),1)]),l.current.size?.clientBundle?(i(),u(p,{key:0},[n[5]||(n[5]=e("div",{"i-carbon-cics-program":"","text-xl":""},null,-1)),e("div",null,[n[4]||(n[4]=e("div",{"text-sm":"",op50:""}," Client bundle size ",-1)),e("div",null,v(m(l.current.size.clientBundle)),1)])],64)):g("",!0),l.current.size?.nitroBundle?(i(),u(p,{key:1},[n[7]||(n[7]=e("div",{"i-carbon-bare-metal-server":"","text-xl":""},null,-1)),e("div",null,[n[6]||(n[6]=e("div",{"text-sm":"",op50:""}," Nitro bundle size ",-1)),e("div",null,v(m(l.current.size.nitroBundle)),1)])],64)):g("",!0),n[12]||(n[12]=e("div",{"i-carbon-edge-node":"","text-xl":""},null,-1)),e("div",null,[n[8]||(n[8]=e("div",{"text-sm":"",op50:""}," Built ",-1)),e("div",null,v(x(P)(new Date(l.current.endTime))),1)]),n[13]||(n[13]=e("div",{"i-carbon:folder-parent":"","text-xl":""},null,-1)),e("div",null,[n[9]||(n[9]=e("div",{"text-sm":"",op50:""}," Report Path ",-1)),d(A,{filepath:l.current.analyzeDir},null,8,["filepath"])])]),n[16]||(n[16]=e("div",{"flex-auto":""},null,-1)),d(C,{n:"rose",icon:"carbon-delete",onClick:n[0]||(n[0]=r=>T(l.current.name))},{default:a(()=>n[14]||(n[14]=[f(" Delete this report ")])),_:1})])):g("",!0),n._lazyshow1||o.value.id==="bundle-client"?(n._lazyshow1=!0,i(),u(p,null,[D(e("iframe",{src:`${x(w)}${l.current.slug}/client.html`,"h-full":"","w-full":""},null,8,["src"]),[[I,o.value.id==="bundle-client"]])],64)):g("v-show-if",!0),n._lazyshow2||o.value.id==="bundle-nitro"?(n._lazyshow2=!0,i(),u(p,null,[D(e("iframe",{src:`${x(w)}${l.current.slug}/nitro.html`,"h-full":"","w-full":""},null,8,["src"]),[[I,o.value.id==="bundle-nitro"]])],64)):g("v-show-if",!0),n._lazyshow3||o.value.id==="vite-inspect"?(n._lazyshow3=!0,i(),u(p,null,[D(e("iframe",{src:`${x(w)}${l.current.slug}/.vite-inspect/`,"h-full":"","w-full":""},null,8,["src"]),[[I,o.value.id==="vite-inspect"]])],64)):g("v-show-if",!0)])}}}),we={class:"markdown-body"},ze={__name:"analyze-build",setup(N,{expose:y}){return y({frontmatter:{}}),(w,c)=>(i(),u("div",we,c[0]||(c[0]=[e("h1",null,"Build Analyze",-1),e("p",null,[f("DevTools provides a build analyze tool to help you understand the size of your app in production. Whenever you start a new build, it runs the command "),e("code",null,"nuxt build --analyze"),f(" and present the output data directly in DevTools for easy browsing and comparing.")],-1)])))}},$e={flex:"~ col"},Be=["onClick"],Ce={flex:"~ gap-1 items-center wrap","w-full":"","text-sm":"",op60:""},ke={flex:"~ items-center justify-center wrap",p4:""},Ne={flex:"~ col gap-1","w-250":"",p4:""},Te={flex:"~ gap-3",mt2:"","justify-end":""},je=L({__name:"analyze-build",setup(N){const y=J(),_=h(),w=ee(),c=ne("analyze-build:slug",""),o=V(()=>_.value?.builds.find(r=>r.slug===c.value)??_.value?.builds[0]),z=F(!1),m=F(""),T=V(()=>_.value?.builds.some(r=>r.name===m.value.trim()));async function l(){m.value=await S.generateAnalyzeBuildName(),await y.start()&&(ae("analyze-build:start"),k.value={name:m.value,processId:await S.startAnalyzeBuild(await j(),m.value)},z.value&&C())}const n=te();function A(r){return`${((r.endTime-r.startTime)/1e3).toFixed(1)}s`}function C(){k.value?.processId&&(n.value=k.value.processId,w.push("/modules/terminals"))}return le(()=>[{id:"action:analyze-build: start",title:"Start a new analyze build",icon:"i-carbon-edge-node",action:l}]),(r,t)=>{const $=R,G=_e,q=ie,O=oe,H=ue,K=se,M=me,Q=pe,W=re,X=ze,Y=ve;return i(),u(p,null,[d(O,{"left-size":30},{left:a(()=>[e("div",$e,[(i(!0),u(p,null,U(x(_)?.builds,s=>(i(),u(p,{key:s.slug},[e("button",{flex:"~ col gap1","hover:bg-active":"",p3:"",class:E(s.slug===o.value?.slug?"text-primary bg-active":""),onClick:b=>c.value=s.slug},[e("code",null,v(s.name),1),e("div",Ce,[t[4]||(t[4]=e("div",{"i-carbon-time":""},null,-1)),e("span",null,v(A(s)),1),t[5]||(t[5]=e("div",{"flex-auto":""},null,-1)),e("span",null,v(x(P)(new Date(s.endTime))),1)])],10,Be),t[6]||(t[6]=e("div",{"x-divider":""},null,-1))],64))),128)),e("div",ke,[x(k)?(i(),B($,{key:1,n:"primary",icon:"carbon-circle-dash animate-spin",onClick:t[1]||(t[1]=s=>C())},{default:a(()=>t[8]||(t[8]=[f(" Building... ")])),_:1})):(i(),B($,{key:0,n:"primary",icon:"carbon-edge-node",onClick:t[0]||(t[0]=s=>l())},{default:a(()=>t[7]||(t[7]=[f(" Start a new build ")])),_:1}))])])]),right:a(()=>[o.value?(i(),B(G,{key:0,current:o.value},null,8,["current"])):(i(),B(q,{key:1}))]),_:1}),d(x(y),null,{default:a(({resolve:s})=>[d(W,{"model-value":!0,onClose:b=>s(!1)},{default:a(()=>[e("div",Ne,[t[13]||(t[13]=e("h3",{class:"text-lg font-medium leading-6",mb2:""}," Start analyze build? ",-1)),t[14]||(t[14]=e("p",{op50:""}," Enter the name of the build: ",-1)),d(H,{modelValue:m.value,"onUpdate:modelValue":t[2]||(t[2]=b=>m.value=b),placeholder:"Build name"},null,8,["modelValue"]),T.value?(i(),B(K,{key:0,"n-orange":""},{default:a(()=>t[9]||(t[9]=[f(" A build with the same name already exists, continue would overrides the previous build result. ")])),_:1})):g("",!0),t[15]||(t[15]=e("div",{my3:"","x-divider":""},null,-1)),t[16]||(t[16]=e("p",{op50:""}," The following command will be executed in your terminal: ",-1)),d(M,{code:`npx nuxi analyze --no-serve --name=${m.value}`,lang:"bash",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),d(Q,{modelValue:z.value,"onUpdate:modelValue":t[3]||(t[3]=b=>z.value=b),mt2:"",n:"primary"},{default:a(()=>t[10]||(t[10]=[f(" Navigate to terminal ")])),_:1},8,["modelValue"]),e("div",Te,[d($,{onClick:b=>s(!1)},{default:a(()=>t[11]||(t[11]=[f(" Cancel ")])),_:2},1032,["onClick"]),d($,{n:"solid primary",onClick:b=>s(!0)},{default:a(()=>t[12]||(t[12]=[f(" Start ")])),_:2},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1}),d(Y,null,{default:a(()=>[d(X)]),_:1})],64)}}});export{je as default};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import{C as ne,D as Q,_ as oe,E as se,F as R,G as me,H as fe,B as ve,r as X,m as Z,z as ae,I as he,c as ie,J as ge,a as ye,K as be,L as we,y as _e,M as xe,N as $e,O as ke,g as Ce,P as Ae}from"./n2dc525b.js";import{_ as Be}from"./ncheckbox.vue-m6od5ntc.js";import{_ as Pe}from"./ndropdown.vue-e8of1w4q.js";import{_ as Ve}from"./nnavbar.vue-mt44hnfg.js";import{p as W,f as T,ag as le,P as f,a1 as a,X as Y,u as y,aa as q,a3 as v,Q as l,a9 as S,F as L,ae as J,S as z,R as U,a2 as A,q as I,V as re,a8 as F,U as De,C as je,an as ze,W as Se}from"./vendor/json-editor-vue-llkaejaf.js";import{_ as Fe}from"./nsection-block-blzeji2j.js";import{_ as Ne}from"./filepath-item.vue-csqbsvc3.js";import{_ as Ue}from"./code-snippets.vue-kiughdhz.js";import{_ as Ie}from"./ndrawer.vue-m60bsg9x.js";import{D as Oe}from"./constants-b32h69zq.js";import"./vendor/unocss-mvzv9iuf.js";import"./vendor/shiki-kdj4mcqm.js";import"./nicon-title.vue-dsf9ygne.js";import"./ncode-block.vue-bir2wz4z.js";import"./client-gsjyqe32.js";const Te={key:0,"h-full":"","w-full":"",flex:"","items-center":"","justify-center":""},Ee={for:"drop-zone-input","text-3xl":"",hover:"text-green cursor-pointer","transition-all":""},Me={key:1,relative:"","h-full":"","w-full":"",grid:"~ rows-[max-content_1fr_max-content]"},Le={grid:"~ cols-minmax-8rem gap-8","overflow-auto":"",p6:""},Re={flex:"","items-center":"","justify-center":"","of-hidden":"",rounded:"","rounded-t-lg":"","bg-active":"","object-cover":"",class:"aspect-1/1",border:"~ base"},Ke=["src"],qe={flex:"~ gap1","items-center":""},Ge={flex:"~ gap-2","items-center":"","justify-center":"",p8:""},Je=W({__name:"AssetDropZone",props:{modelValue:{type:Boolean,required:!0},folder:{type:String,required:!0}},setup(w){const s=w,e=ne(s,"modelValue"),o=T(),n=T([]);function i(u){o.value=u.target,e.value=!0}function r(u){u.target===o.value&&(e.value=!1)}function _(u){u.preventDefault()}function g(u){u.preventDefault(),b(u.dataTransfer.files)}function b(u){const c=Array.from(u||[]);if(c.length){const $=[],x=n.value.map(p=>p.name);for(const p of c)if(x.includes(p.name)){let B=1;const[P,E]=p.name.split(".");for(;x.includes(`${P} (${B}).${E}`);)B++;const K=`${P}-${B}.${E}`,m=new Blob([p],{type:p.type}),t=new File([m],K,{lastModified:Date.now()});$.push(t),x.push(K)}else p.type===""&&R({message:"Folders are not supported yet",icon:"carbon:face-dissatisfied",classes:"text-orange"}),$.push(p);n.value=[...n.value,...$]}}async function D(){if(me.value||fe.value)return;ve("assets:upload");const u=[];for(const c of n.value){const $=new FileReader;$.readAsDataURL(c);const p=(await new Promise(B=>{$.onload=()=>B($.result)})).split(";base64,").pop();u.push({path:c.name,encoding:"base64",content:p})}await X.writeStaticAssets(await Z(),[...u],s.folder).then(()=>{h(),R({message:"Files uploaded successfully!",icon:"i-carbon:checkmark"})}).catch(c=>{h(),R({message:`Error uploading files: ${c?.message??"unknown"}`,icon:"i-carbon-warning",classes:"text-red"})}),e.value=!1}function M(u){n.value?.splice(u,1)}function k(u){return URL.createObjectURL(u)}function C(u,c){const[$,x]=u.name.split("."),p=c.replace(/\.\w+$/,""),B=`${p}.${x}`;return p.length===0?(alert("File name must be at least 1 characters long"),$):(Object.defineProperty(u,"name",{value:B,writable:!1}),n.value.splice(n.value.indexOf(u),1,u),u)}function d(){n.value=[]}function h(){e.value=!1,d()}return Q("dragenter",i),Q("dragleave",r),Q("dragover",_),Q("drop",g),(u,c)=>{const $=oe,x=se,p=ae,B=le("tooltip");return a(),f("div",{fixed:"","bottom-0":"","left-13":"","right-0":"","top-0":"","z-10":"","backdrop-blur-20":"","transition-all":"",class:Y(y(e)?"opacity-100 visible":"opacity-0 invisible")},[q(v($,{icon:"carbon-close",title:"Close",absolute:"","right-5":"","top-5":"","z-20":"","text-xl":"",border:!1,onClick:h},null,512),[[B,"Close",void 0,{"bottom-end":!0}]]),n.value?.length?(a(),f("div",Me,[c[4]||(c[4]=l("div",{px6:"",py6:""},[l("h1",{"text-2xl":""}," Upload "),l("p",{"text-sm":"",op50:""}," Drag and drop files to upload ")],-1)),l("div",Le,[(a(!0),f(L,null,J(n.value,(P,E)=>(a(),f("div",{key:P.name,flex:"~ col gap-2",relative:"","h-50":"","w-40":"","items-center":""},[l("div",Re,[l("img",{"h-full":"","w-full":"","rounded-t-lg":"","object-cover":"",src:k(P)},null,8,Ke)]),l("div",qe,[v(p,{n:"xs","h-full":"","flex-auto":"","model-value":P.name,"onUpdate:modelValue":K=>C(P,K.target.value)},null,8,["model-value","onUpdate:modelValue"]),v($,{n:"red",icon:"carbon-trash-can","h-full":"","flex-none":"",title:"Remove file",onClick:K=>M(E)},null,8,["onClick"])])]))),128))]),l("div",Ge,[n.value.length?(a(),z($,{key:0,n:"red",onClick:d},{default:A(()=>[v(x,{icon:"carbon-clean"}),c[2]||(c[2]=S(" Clear "))]),_:1})):U("",!0),v($,{disabled:!n.value.length,n:"primary solid",onClick:D},{default:A(()=>[v(x,{icon:"carbon-cloud-upload"}),c[3]||(c[3]=S(" Upload "))]),_:1},8,["disabled"])])])):(a(),f("div",Te,[l("label",Ee,[v(x,{icon:"carbon-cloud-upload","mr-2":""}),c[1]||(c[1]=S(" Drop files here or click to select "))]),l("input",{id:"drop-zone-input",type:"file",multiple:"",hidden:"",onChange:c[0]||(c[0]=P=>b(P.target.files))},null,32)]))],2)}}});function We(w){return typeof w=="string"?`'${w}'`:new Xe().serialize(w)}const Xe=function(){class w{#e=new Map;compare(e,o){const n=typeof e,i=typeof o;return n==="string"&&i==="string"?e.localeCompare(o):n==="number"&&i==="number"?e-o:String.prototype.localeCompare.call(this.serialize(e,!0),this.serialize(o,!0))}serialize(e,o){if(e===null)return"null";switch(typeof e){case"string":return o?e:`'${e}'`;case"bigint":return`${e}n`;case"object":return this.$object(e);case"function":return this.$function(e)}return String(e)}serializeObject(e){const o=Object.prototype.toString.call(e);if(o!=="[object Object]")return this.serializeBuiltInType(o.length<10?`unknown:${o}`:o.slice(8,-1),e);const n=e.constructor,i=n===Object||n===void 0?"":n.name;if(i!==""&&globalThis[i]===n)return this.serializeBuiltInType(i,e);if(typeof e.toJSON=="function"){const r=e.toJSON();return i+(r!==null&&typeof r=="object"?this.$object(r):`(${this.serialize(r)})`)}return this.serializeObjectEntries(i,Object.entries(e))}serializeBuiltInType(e,o){const n=this["$"+e];if(n)return n.call(this,o);if(typeof o?.entries=="function")return this.serializeObjectEntries(e,o.entries());throw new Error(`Cannot serialize ${e}`)}serializeObjectEntries(e,o){const n=Array.from(o).sort((r,_)=>this.compare(r[0],_[0]));let i=`${e}{`;for(let r=0;r<n.length;r++){const[_,g]=n[r];i+=`${this.serialize(_,!0)}:${this.serialize(g)}`,r<n.length-1&&(i+=",")}return i+"}"}$object(e){let o=this.#e.get(e);return o===void 0&&(this.#e.set(e,`#${this.#e.size}`),o=this.serializeObject(e),this.#e.set(e,o)),o}$function(e){const o=Function.prototype.toString.call(e);return o.slice(-15)==="[native code] }"?`${e.name||""}()[native]`:`${e.name}(${e.length})${o.replace(/\s*\n\s*/g,"")}`}$Array(e){let o="[";for(let n=0;n<e.length;n++)o+=this.serialize(e[n]),n<e.length-1&&(o+=",");return o+"]"}$Date(e){try{return`Date(${e.toISOString()})`}catch{return"Date(null)"}}$ArrayBuffer(e){return`ArrayBuffer[${new Uint8Array(e).join(",")}]`}$Set(e){return`Set${this.$Array(Array.from(e).sort((o,n)=>this.compare(o,n)))}`}$Map(e){return this.serializeObjectEntries("Map",e.entries())}}for(const s of["Error","RegExp","URL"])w.prototype["$"+s]=function(e){return`${s}(${e})`};for(const s of["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"])w.prototype["$"+s]=function(e){return`${s}[${e.join(",")}]`};for(const s of["BigInt64Array","BigUint64Array"])w.prototype["$"+s]=function(e){return`${s}[${e.join("n,")}${e.length>0?"n":""}]`};return w}(),Ze=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],He=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],Qe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",G=[];class Ye{_data=new H;_hash=new H([...Ze]);_nDataBytes=0;_minBufferSize=0;finalize(s){s&&this._append(s);const e=this._nDataBytes*8,o=this._data.sigBytes*8;return this._data.words[o>>>5]|=128<<24-o%32,this._data.words[(o+64>>>9<<4)+14]=Math.floor(e/4294967296),this._data.words[(o+64>>>9<<4)+15]=e,this._data.sigBytes=this._data.words.length*4,this._process(),this._hash}_doProcessBlock(s,e){const o=this._hash.words;let n=o[0],i=o[1],r=o[2],_=o[3],g=o[4],b=o[5],D=o[6],M=o[7];for(let k=0;k<64;k++){if(k<16)G[k]=s[e+k]|0;else{const x=G[k-15],p=(x<<25|x>>>7)^(x<<14|x>>>18)^x>>>3,B=G[k-2],P=(B<<15|B>>>17)^(B<<13|B>>>19)^B>>>10;G[k]=p+G[k-7]+P+G[k-16]}const C=g&b^~g&D,d=n&i^n&r^i&r,h=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),u=(g<<26|g>>>6)^(g<<21|g>>>11)^(g<<7|g>>>25),c=M+u+C+He[k]+G[k],$=h+d;M=D,D=b,b=g,g=_+c|0,_=r,r=i,i=n,n=c+$|0}o[0]=o[0]+n|0,o[1]=o[1]+i|0,o[2]=o[2]+r|0,o[3]=o[3]+_|0,o[4]=o[4]+g|0,o[5]=o[5]+b|0,o[6]=o[6]+D|0,o[7]=o[7]+M|0}_append(s){typeof s=="string"&&(s=H.fromUtf8(s)),this._data.concat(s),this._nDataBytes+=s.sigBytes}_process(s){let e,o=this._data.sigBytes/64;s?o=Math.ceil(o):o=Math.max((o|0)-this._minBufferSize,0);const n=o*16,i=Math.min(n*4,this._data.sigBytes);if(n){for(let r=0;r<n;r+=16)this._doProcessBlock(this._data.words,r);e=this._data.words.splice(0,n),this._data.sigBytes-=i}return new H(e,i)}}class H{words;sigBytes;constructor(s,e){s=this.words=s||[],this.sigBytes=e===void 0?s.length*4:e}static fromUtf8(s){const e=unescape(encodeURIComponent(s)),o=e.length,n=[];for(let i=0;i<o;i++)n[i>>>2]|=(e.charCodeAt(i)&255)<<24-i%4*8;return new H(n,o)}toBase64(){const s=[];for(let e=0;e<this.sigBytes;e+=3){const o=this.words[e>>>2]>>>24-e%4*8&255,n=this.words[e+1>>>2]>>>24-(e+1)%4*8&255,i=this.words[e+2>>>2]>>>24-(e+2)%4*8&255,r=o<<16|n<<8|i;for(let _=0;_<4&&e*8+_*6<this.sigBytes*8;_++)s.push(Qe.charAt(r>>>6*(3-_)&63))}return s.join("")}concat(s){if(this.words[this.sigBytes>>>2]&=4294967295<<32-this.sigBytes%4*8,this.words.length=Math.ceil(this.sigBytes/4),this.sigBytes%4)for(let e=0;e<s.sigBytes;e++){const o=s.words[e>>>2]>>>24-e%4*8&255;this.words[this.sigBytes+e>>>2]|=o<<24-(this.sigBytes+e)%4*8}else for(let e=0;e<s.sigBytes;e+=4)this.words[this.sigBytes+e>>>2]=s.words[e>>>2];this.sigBytes+=s.sigBytes}}function et(w){return new Ye().finalize(w).toBase64()}function tt(w){return et(We(w))}const nt=W({__name:"AssetFontPreview",props:{asset:{}},setup(w){const s=w,e=I(()=>`devtools-assets-${tt(s.asset)}`);return he(I(()=>`
|
|
2
|
-
@font-face {
|
|
3
|
-
font-family: '${e.value}';
|
|
4
|
-
src: url('${s.asset.publicPath}');
|
|
5
|
-
}
|
|
6
|
-
`)),(o,n)=>(a(),f("div",{"of-hidden":"",style:re({fontFamily:`'${e.value}'`})}," Aa Bb Cc Dd Ee Ff Gg Hh Ii Jj Kk Ll Mm Nn Oo Pp Qq Rr Ss Tt Uu Vv Ww Xx Yy Zz ",4))}}),ot={flex:"","items-center":"","justify-center":"","of-hidden":"","bg-active":"","object-cover":"",p1:""},st=["src"],lt={key:2,"i-carbon-document":"","text-3xl":"",op20:""},it={key:3,"w-full":"","self-start":"",p4:""},at=["textContent"],rt={key:4},ut=["src","autoplay","controls"],dt={key:5},ct={key:0,"i-carbon-volume-up":"","text-3xl":"",op20:""},pt=["src"],mt={key:6,"i-carbon-help":"","text-3xl":"",op20:""},ue=W({__name:"AssetPreview",props:{asset:{},textContent:{},detail:{type:Boolean}},setup(w){return(s,e)=>{const o=nt;return a(),f("div",ot,[s.asset.type==="image"?(a(),f("img",{key:0,src:s.asset.publicPath},null,8,st)):s.asset.type==="font"?(a(),z(o,{key:s.asset.publicPath,asset:s.asset,"self-stretch":"",p2:"","text-2xl":""},null,8,["asset"])):s.asset.type==="text"&&!s.textContent?(a(),f("div",lt)):s.asset.type==="text"&&s.textContent?(a(),f("div",it,[l("pre",{"max-h-10rem":"","of-hidden":"","text-xs":"","font-mono":"",textContent:F(s.textContent)},null,8,at)])):s.asset.type==="video"?(a(),f("div",rt,[l("video",{src:s.asset.publicPath,autoplay:s.detail,controls:s.detail},null,8,ut)])):s.asset.type==="audio"?(a(),f("div",dt,[s.detail?(a(),f("audio",{key:1,src:s.asset.publicPath,controls:""},null,8,pt)):(a(),f("div",ct))])):(a(),f("div",mt))])}}}),ft={relative:"",flex:"~ col gap-1",hover:"bg-active","items-center":"","of-hidden":"",rounded:"",p2:""},vt={"w-full":"","of-hidden":"",truncate:"","ws-nowrap":"","text-center":"","text-xs":""},ht=W({__name:"AssetGridItem",props:{asset:{},folder:{}},setup(w){const s=w,e=I(()=>s.folder&&s.asset.path.startsWith(s.folder)?s.asset.path.slice(s.folder.length):s.asset.path);return(o,n)=>{const i=se,r=ue;return a(),f("button",ft,[o.asset.layer?(a(),z(i,{key:0,icon:"i-carbon-layers",absolute:"","right-4":"","top-4":"","bg-primary":""})):U("",!0),v(r,{"h-30":"","w-30":"",rounded:"",border:"~ base",asset:o.asset},null,8,["asset"]),l("div",vt,F(e.value),1)])}}}),de=W({__name:"AssetListItem",props:{item:{},index:{default:0},modelValue:{}},setup(w,{emit:s}){const e=w,n=ne(e,"modelValue",s,{passive:!0}),i=I(()=>e.item?.children?.length),r=T(!0),_=I(()=>i.value?"i-carbon-folder":e.item.type==="image"?"i-carbon-image":e.item.type==="video"?"i-carbon-video":e.item.type==="audio"?"i-carbon-volume-up":e.item.type==="font"?"i-carbon-text-small-caps":e.item.type==="text"?"i-carbon-document":e.item.type==="json"?"i-carbon-json":"i-carbon-document-blank");return(g,b)=>{const D=se,M=de;return a(),f("div",null,[l("button",{flex:"~ gap-2","w-full":"","items-center":"",hover:"bg-active",px4:"",py1:"",style:re({paddingLeft:`calc(1rem + ${g.index*1.5}em)`}),class:Y({"bg-active":!i.value&&y(n)?.filePath===g.item?.filePath}),border:"b base",onClick:b[0]||(b[0]=k=>i.value?r.value=!r.value:n.value=g.item)},[l("div",{class:Y(_.value)},null,2),l("span",{class:Y({"flex items-center":i.value}),"flex-auto":"","text-start":"","text-sm":"","font-mono":""},[S(F(g.item.path)+" ",1),g.item.layer?(a(),z(D,{key:0,icon:"i-carbon-layers","bg-primary":""})):U("",!0)],2),i.value?(a(),z(D,{key:0,icon:"carbon:chevron-right","transform-rotate":r.value?90:0,transition:""},null,8,["transform-rotate"])):U("",!0)],6),r.value?De(g.$slots,"default",{key:0},()=>[(a(!0),f(L,null,J(g.item?.children,k=>(a(),z(M,{key:k.filepath,modelValue:y(n),"onUpdate:modelValue":b[1]||(b[1]=C=>je(n)?n.value=C:null),item:k,index:g.index+1},null,8,["modelValue","item","index"]))),128))]):U("",!0)])}}}),gt={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p4:""},yt={flex:"~","items-center":"","justify-center":""},bt={"max-w-full":"","w-full":"","table-fixed":""},wt={flex:"~ gap-1","w-full":"","items-center":""},_t={flex:"~ gap-1","w-full":"","items-center":"","of-hidden":""},xt={"flex-auto":"","of-hidden":"",truncate:"","ws-pre":"","font-mono":""},$t={capitalize:""},kt={key:0},Ct={op70:""},At={flex:"~ gap2 wrap"},Bt={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p8:""},Pt={flex:"~ gap2 wrap justify-center"},Vt={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p8:""},Dt={flex:"~ gap2 wrap justify-center"},jt={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p4:""},zt={flex:"","justify-end":"","gap-4":""},St=W({__name:"AssetDetails",props:{modelValue:{}},setup(w,{emit:s}){const n=ne(w,"modelValue",s,{passive:!0}),i=ie(async()=>{if(n.value.type==="image")return X.getImageMeta(await Z(),n.value.filePath)}),r=T(!1),_=T(),g=T(0),b=ie(async()=>{if(n.value.type!=="text")return;g.value;const m=await X.getTextAssetContent(await Z(),n.value.filePath);return _.value=m,m});async function D(){if(b.value!==_.value)try{await X.writeStaticAssets(await Z(),[{path:n.value.path,content:_.value,override:!0}],""),r.value=!1,g.value++,R({message:"Updated",icon:"i-carbon-checkmark",classes:"text-green"})}catch(m){console.error(m),R({message:"Something went wrong!",icon:"i-carbon-warning",classes:"text-red"})}}const M=ge(),k=I(()=>(M.value?._installedModules||[]).some(t=>t.meta?.name==="@nuxt/image"||t.meta?.name==="@nuxt/image-edge"||t.meta?.name==="@nuxt/image-nightly")),C=I(()=>{const m=[];if(n.value.type==="image"){const t=i.value?.width?`
|
|
7
|
-
width="${i.value.width}"
|
|
8
|
-
height="${i.value.height}" `:" ";return m.push({lang:"vue-html",code:`<img${t}
|
|
9
|
-
src="${n.value.publicPath}"
|
|
10
|
-
/>`,name:"Plain Image"}),k.value&&m.push({lang:"vue-html",code:`<NuxtImg${t}
|
|
11
|
-
src="${n.value.publicPath}"
|
|
12
|
-
/>`,name:"Nuxt Img",docs:"https://image.nuxt.com/usage/nuxt-img"},{lang:"vue-html",code:`<NuxtPicture${t}
|
|
13
|
-
src="${n.value.publicPath}"
|
|
14
|
-
/>`,name:"Nuxt Picture",docs:"https://image.nuxt.com/usage/nuxt-picture"}),m}return m.push({lang:"html",code:`<a download href="${n.value.publicPath}">
|
|
15
|
-
Download ${n.value.path.split("/").slice(-1)[0]}
|
|
16
|
-
</a>`,name:"Download link"}),m}),d=ye(),h=be(),u=we(()=>n.value.mtime),c=I(()=>{const m=n.value.size;return m<1024?`${m} B`:m<1024*1024?`${(m/1024).toFixed(2)} KB`:`${(m/1024/1024).toFixed(2)} MB`}),$=I(()=>{if(!i.value?.width||!i.value?.height)return"";const m=(V,O)=>O?m(O,V%O):V,t=m(i.value.width,i.value.height);return t>3?`${i.value.width/t}:${i.value.height/t}`:""}),x=I(()=>["image","text","video","audio","font"].includes(n.value.type)),p=T(!1);async function B(){try{await X.deleteStaticAsset(await Z(),n.value.filePath),n.value=void 0,p.value=!1,R({message:"Asset deleted",icon:"i-carbon-checkmark",classes:"text-green"})}catch(m){console.error(m),R({message:"Something went wrong!",icon:"i-carbon-warning",classes:"text-red"})}}const P=T(!1),E=T("");async function K(){const m=n.value.filePath.split("/"),t=m.slice(-1)[0].split(".").slice(0,-1).join(".");if(!E.value||E.value===t)return R({message:"Please enter a new name",icon:"i-carbon-warning",classes:"text-orange"});try{const V=m.slice(-1)[0].split(".").slice(-1)[0],O=`${m.slice(0,-1).join("/")}/${E.value}.${V}`;await X.renameStaticAsset(await Z(),n.value.filePath,O),n.value=void 0,P.value=!1,R({message:"Asset renamed",icon:"i-carbon-checkmark",classes:"text-green"})}catch(V){console.error(V),R({message:"Something went wrong!",icon:"i-carbon-warning",classes:"text-red"})}}return(m,t)=>{const V=ue,O=Ne,N=oe,ce=Ue,ee=_e,pe=ae,te=le("tooltip");return a(),f(L,null,[l("div",gt,[x.value?(a(),f(L,{key:0},[t[13]||(t[13]=l("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[l("div",{"x-divider":""}),l("div",{"flex-none":""}," Preview "),l("div",{"x-divider":""})],-1)),l("div",yt,[v(V,{detail:"","max-h-80":"","min-h-20":"","min-w-20":"","w-auto":"",rounded:"",border:"~ base",asset:y(n),"text-content":y(b)},null,8,["asset","text-content"])])],64)):U("",!0),t[25]||(t[25]=l("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[l("div",{"x-divider":""}),l("div",{"flex-none":""}," Details "),l("div",{"x-divider":""})],-1)),l("table",bt,[l("tbody",null,[l("tr",null,[t[14]||(t[14]=l("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Filepath ",-1)),l("td",null,[l("div",wt,[v(O,{filepath:y(n).filePath,"text-left":""},null,8,["filepath"]),q(v(N,{"flex-none":"",title:"Open in Editor",icon:"carbon-launch",border:!1,onClick:t[0]||(t[0]=j=>y(h)(y(n).filePath))},null,512),[[te,"Open in Editor"]])])])]),l("tr",null,[t[15]||(t[15]=l("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Public Path ",-1)),l("td",null,[l("div",_t,[l("div",xt,F(y(n).publicPath),1),q(v(N,{"flex-none":"",title:"Copy public path",icon:"carbon-copy",border:!1,onClick:t[1]||(t[1]=j=>y(d)(y(n).publicPath,"assets-public-path"))},null,512),[[te,"Copy public path"]]),q(v(N,{"flex-none":"",to:y(n).publicPath,icon:"carbon-launch",target:"_blank",border:!1,title:"Open in browser"},null,8,["to"]),[[te,"Open in browser"]])])])]),l("tr",null,[t[16]||(t[16]=l("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Type ",-1)),l("td",$t,F(y(n).type),1)]),y(i)?.width?(a(),f(L,{key:0},[l("tr",null,[t[17]||(t[17]=l("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Image Size ",-1)),l("td",null,F(y(i).width)+" x "+F(y(i).height),1)]),$.value?(a(),f("tr",kt,[t[18]||(t[18]=l("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Aspect Ratio ",-1)),l("td",null,F($.value),1)])):U("",!0)],64)):U("",!0),l("tr",null,[t[19]||(t[19]=l("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," File size ",-1)),l("td",null,F(c.value),1)]),l("tr",null,[t[20]||(t[20]=l("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Last modified ",-1)),l("td",null,[S(F(new Date(y(n).mtime).toLocaleString())+" ",1),l("span",Ct,"("+F(y(u))+")",1)])])])]),t[26]||(t[26]=l("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[l("div",{"x-divider":""}),l("div",{"flex-none":""}," Actions "),l("div",{"x-divider":""})],-1)),l("div",At,[v(N,{to:y(n).publicPath,download:"",target:"_blank",icon:"carbon-download",n:"green"},{default:A(()=>t[21]||(t[21]=[S(" Download ")])),_:1},8,["to"]),y(n).type==="text"?(a(),z(N,{key:0,icon:"carbon-edit",n:"cyan",onClick:t[2]||(t[2]=j=>r.value=!r.value)},{default:A(()=>t[22]||(t[22]=[S(" Edit ")])),_:1})):U("",!0),v(N,{icon:"carbon-text-annotation-toggle",n:"blue",onClick:t[3]||(t[3]=j=>P.value=!P.value)},{default:A(()=>t[23]||(t[23]=[S(" Rename ")])),_:1}),v(N,{icon:"carbon-delete",n:"red",onClick:t[4]||(t[4]=j=>p.value=!p.value)},{default:A(()=>t[24]||(t[24]=[S(" Delete ")])),_:1})]),t[27]||(t[27]=l("div",{"flex-auto":""},null,-1)),C.value.length?(a(),z(ce,{key:1,border:"t base","mx--4":"","mb--4":"","code-snippets":C.value},null,8,["code-snippets"])):U("",!0)]),v(ee,{modelValue:p.value,"onUpdate:modelValue":t[6]||(t[6]=j=>p.value=j)},{default:A(()=>[l("div",Bt,[t[30]||(t[30]=l("span",null," Are you sure you want to delete this asset? ",-1)),l("div",Pt,[v(N,{icon:"carbon-close",onClick:t[5]||(t[5]=j=>p.value=!1)},{default:A(()=>t[28]||(t[28]=[S(" Cancel ")])),_:1}),v(N,{icon:"carbon-delete",n:"red",onClick:B},{default:A(()=>t[29]||(t[29]=[S(" Delete ")])),_:1})])])]),_:1},8,["modelValue"]),v(ee,{modelValue:P.value,"onUpdate:modelValue":t[9]||(t[9]=j=>P.value=j)},{default:A(()=>[l("div",Vt,[v(pe,{modelValue:E.value,"onUpdate:modelValue":t[7]||(t[7]=j=>E.value=j),placeholder:"New name",n:"blue"},null,8,["modelValue"]),l("div",Dt,[v(N,{icon:"carbon-close",onClick:t[8]||(t[8]=j=>P.value=!1)},{default:A(()=>t[31]||(t[31]=[S(" Cancel ")])),_:1}),v(N,{icon:"carbon-text-annotation-toggle",n:"blue",onClick:K},{default:A(()=>t[32]||(t[32]=[S(" Rename ")])),_:1})])])]),_:1},8,["modelValue"]),y(n).type==="text"?(a(),z(ee,{key:0,modelValue:r.value,"onUpdate:modelValue":t[12]||(t[12]=j=>r.value=j)},{default:A(()=>[l("div",jt,[q(l("textarea",{"onUpdate:modelValue":t[10]||(t[10]=j=>_.value=j),placeholder:"Item value...",class:"h-lg w-xl of-auto rounded-lg p-4 text-sm font-mono outline-none",onKeydown:Se(D,["enter"])},null,544),[[ze,_.value]]),l("div",zt,[v(N,{icon:"carbon-close",onClick:t[11]||(t[11]=j=>r.value=!1)},{default:A(()=>t[33]||(t[33]=[S(" Cancel ")])),_:1}),v(N,{icon:"carbon:save",n:"primary",onClick:D},{default:A(()=>t[34]||(t[34]=[S(" save ")])),_:1})])])]),_:1},8,["modelValue"])):U("",!0)],64)}}}),Ft={"h-full":"","of-auto":""},Nt={"flex-none":"",flex:"~ gap2 items-center","text-lg":""},Ut={flex:"~ items-center justify-center",absolute:"","bottom--1":"","right--1":"","h-4":"","w-4":"","rounded-full":"","bg-primary:30":"","text-8px":""},It={flex:"~ col","w-30":"","of-auto":""},Ot={"text-xs":"",op75:""},Tt={op50:""},Et={key:0},Mt={"mt--4":"",px2:"",grid:"~ cols-minmax-8rem"},Lt={key:1,p2:"",grid:"~ cols-minmax-8rem"},Rt={key:1},ln=W({__name:"assets",setup(w){const s=xe(),e=T(!1),o=T(""),n=I(()=>new $e(s.value||[],{keys:["path"]})),i=ke(()=>{const C=[];for(const d of s.value||[]){const h=d.path.split(".").pop();h&&!C.find(u=>u.name===h)&&C.push({name:h,value:!0})}return C}),r=I(()=>(o.value?n.value.search(o.value).map(d=>d.item):s.value||[]).filter(d=>{const h=d.path.split(".").pop();return!h||i.some(u=>u.name===h&&u.value)})),_=I(()=>{const C={};for(const d of r.value){const h=`${d.path.split("/").slice(0,-1).join("/")}/`;C[h]||(C[h]=[]),C[h].push(d)}return Object.entries(C).sort(([d],[h])=>d.localeCompare(h))}),g=I(()=>{const C={children:[]},d=(h,u,c)=>{const[$,...x]=u;let p=h.children.find(B=>B.path===$);p||(p={...c,path:$,children:[]},h.children.push(p)),x.length>1?d(p,x,c):x.length===1&&p.children.push({...c,path:x[0]})};return r.value.forEach(h=>{const u=h.path.split("/").filter(c=>c!=="");d(C,u,h)}),C.children}),b=T(),{view:D}=Ce("assets");function M(){D.value=D.value==="list"?"grid":"list"}Ae("Escape",()=>{b.value=void 0});const k=T();return(C,d)=>{const h=oe,u=Be,c=Pe,$=Ve,x=Je,p=ht,B=Fe,P=de,E=St,K=Ie,m=le("tooltip");return a(),f("div",Ft,[v($,{ref_key:"navbar",ref:k,search:o.value,"onUpdate:search":d[1]||(d[1]=t=>o.value=t),pb2:""},{actions:A(()=>[l("div",Nt,[q(v(h,{icon:"carbon:cloud-upload",title:"File Upload",border:!1,onClick:d[0]||(d[0]=t=>e.value=!e.value)},null,512),[[m,"File Upload",void 0,{"bottom-end":!0}]]),y(i).length?(a(),z(c,{key:0,direction:"end",n:"sm primary"},{trigger:A(({click:t})=>[q(v(h,{icon:"carbon-filter",border:!1,title:"Filter",p3:"","text-lg":"",onClick:V=>t()},null,8,["onClick"]),[[m,"Filter",void 0,{"bottom-end":!0}]]),l("span",Ut,F(y(i).length),1)]),default:A(()=>[l("div",It,[(a(!0),f(L,null,J(y(i),t=>(a(),z(u,{key:t.name,modelValue:t.value,"onUpdate:modelValue":V=>t.value=V,flex:"~ gap-2",rounded:"",px2:"",py2:""},{default:A(()=>[l("span",Ot,F(t.name),1)]),_:2},1032,["modelValue","onUpdate:modelValue"]))),128))])]),_:1})):U("",!0),q(v(h,{"text-lg":"",border:!1,icon:y(D)==="grid"?"i-carbon-list":"i-carbon-grid",title:"Toggle view",onClick:M},null,8,["icon"]),[[m,"Toggle View",void 0,{"bottom-end":!0}]])])]),default:A(()=>[l("div",Tt,[o.value?(a(),f("span",Et,F(r.value.length)+" matched · ",1)):U("",!0),l("span",null,F(y(s)?.length)+" assets in total",1)])]),_:1},8,["search"]),v(x,{modelValue:e.value,"onUpdate:modelValue":d[2]||(d[2]=t=>e.value=t),folder:"/"},null,8,["modelValue"]),y(D)==="grid"?(a(),f(L,{key:0},[_.value.length>1?(a(!0),f(L,{key:0},J(_.value,([t,V])=>(a(),z(B,{key:t,text:t,description:`${V.length} items`,open:V.length<=y(Oe),padding:!1},{default:A(()=>[l("div",Mt,[(a(!0),f(L,null,J(V,O=>(a(),z(p,{key:O.path,asset:O,folder:t,onClick:N=>b.value=O},null,8,["asset","folder","onClick"]))),128))])]),_:2},1032,["text","description","open"]))),128)):(a(),f("div",Lt,[(a(!0),f(L,null,J(r.value,t=>(a(),z(p,{key:t.path,asset:t,onClick:V=>b.value=t},null,8,["asset","onClick"]))),128))]))],64)):(a(),f("div",Rt,[(a(!0),f(L,null,J(g.value,(t,V)=>(a(),z(P,{key:V,modelValue:b.value,"onUpdate:modelValue":d[3]||(d[3]=O=>b.value=O),item:t},null,8,["modelValue","item"]))),128))])),v(K,{"model-value":!!b.value,"auto-close":"","w-120":"",top:k.value,onClose:d[5]||(d[5]=t=>b.value=void 0)},{default:A(()=>[b.value?(a(),z(E,{key:0,modelValue:b.value,"onUpdate:modelValue":d[4]||(d[4]=t=>b.value=t)},null,8,["modelValue"])):U("",!0)]),_:1},8,["model-value","top"])])}}});export{ln as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"id":"917012c8-846d-4264-bce5-f9be7333c9da","timestamp":1741166454011,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as pe,_ as O,Q as re,R as ue,J as me,S as de,g as J,T as ce,U as fe,V as ve,N as _e,W as he,X as be,E as ge,f as ye}from"./n2dc525b.js";import{P as m,a1 as t,Q as o,p as I,q as D,a9 as q,a8 as W,R as w,U as j,a3 as u,S as y,u as $,F as T,ae as L,f as U,m as we,E as xe,j as ke,a2 as f,C as z,Y as Ce,X as $e,a4 as E,ag as Ne,aa as Q,ad as Ve}from"./vendor/json-editor-vue-llkaejaf.js";import{_ as Pe}from"./help-fab.vue-d99t6zdw.js";import{_ as De}from"./ncheckbox.vue-m6od5ntc.js";import{_ as Y}from"./nnavbar.vue-mt44hnfg.js";import{p as K}from"./index-jc4yj4to.js";import{_ as Z}from"./nbadge-htrvttst.js";import{_ as ee}from"./filepath-item.vue-csqbsvc3.js";import{_ as Se}from"./ndrawer.vue-m60bsg9x.js";import{D as Te,N as Be}from"./vendor/vis-fth2qiu5.js";import{_ as Le}from"./nselect-tabs.vue-eewrxxrw.js";import{_ as Me}from"./nsection-block-blzeji2j.js";import{_ as Ue}from"./nicon-title.vue-dsf9ygne.js";import{D as X}from"./constants-b32h69zq.js";import{u as Ie,a as Fe}from"./state-components-iu73pb63.js";import"./vendor/unocss-mvzv9iuf.js";import"./vendor/shiki-kdj4mcqm.js";const Ge={class:"markdown-body"},Re={__name:"components",setup(P,{expose:s}){return s({frontmatter:{}}),(i,c)=>(t(),m("div",Ge,c[0]||(c[0]=[o("h1",null,"Components",-1),o("p",null,"Vue Components allow us to split the UI into independent and reusable pieces, and think about each piece in isolation. This is very similar to how we nest native HTML elements, but Vue implements its own component model that allow us to encapsulate custom content and logic in each component.",-1),o("p",null,"Components placed in the components/ directory are automatically registered by Nuxt. They can be used in your templates without importing them.",-1),o("p",null,[o("a",{href:"https://nuxt.com/docs/guide/directory-structure/components",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1)])))}},ze={"text-sm":"","font-mono":""},oe=I({__name:"ComponentName",props:{component:{}},setup(P){const s=P,v=D(()=>s.component.pascalName||K(s.component.name||s.component.__name||s.component.kebabName||""));return(i,c)=>(t(),m("code",ze,[c[0]||(c[0]=o("span",{mr1:"",op20:""},"<",-1)),q(W(v.value),1),c[1]||(c[1]=o("span",{ml1:"",op20:""},"/>",-1))]))}}),Ae={flex:"~ col gap1","items-start":"","of-hidden":""},Ee={flex:"~ gap2",px3:""},We={px3:"",pb2:""},je={key:0,border:"t base","max-h-60":"","w-full":"","of-auto":"",px3:"",py3:""},He={"text-sm":""},Xe={"text-primary":""},qe={key:0,flex:"~ col gap-2","items-start":"",pt3:"","text-sm":"",op75:""},Oe={key:1,border:"t base","max-h-60":"","w-full":"","of-auto":"",px3:"",py3:""},Qe={"text-sm":""},Je={"text-primary":""},Ye={key:0,flex:"~ col gap-2","items-start":"",pt3:"","text-sm":"",op75:""},ne=I({__name:"ComponentDetails",props:{component:{},dependencies:{},dependents:{}},setup(P){const s=P,v=D(()=>s.component.pascalName||K(s.component.name||s.component.__name||s.component.kebabName||"")),i=D(()=>s.component.filePath||s.component.file||s.component.__file||""),c=pe();return(l,a)=>{const h=oe,r=O,b=Z,x=ee;return t(),m("div",Ae,[o("div",Ee,[u(h,{component:l.component},null,8,["component"]),u(r,{title:"Copy name","flex-none":"",icon:"carbon-copy",border:!1,onClick:a[0]||(a[0]=d=>$(c)(`<${v.value}></${v.value}>`,"component-name"))}),l.component.global?(t(),y(b,{key:0,n:"green",title:"Registered at runtime as a global component",textContent:"runtime"})):w("",!0)]),o("div",We,[i.value?(t(),y(x,{key:0,filepath:i.value,"w-full":"","text-sm":"",op40:"","group-hover:op75":""},null,8,["filepath"])):w("",!0)]),l.dependents?(t(),m("div",je,[o("div",He,[o("strong",Xe,W(l.dependents.length),1),a[1]||(a[1]=o("span",{op50:""}," references",-1))]),l.dependents.length?(t(),m("div",qe,[(t(!0),m(T,null,L(l.dependents,d=>(t(),y(x,{key:d,filepath:d},null,8,["filepath"]))),128))])):w("",!0)])):w("",!0),l.dependencies?(t(),m("div",Oe,[o("div",Qe,[o("strong",Je,W(l.dependencies.length),1),a[2]||(a[2]=o("span",{op50:""}," dependencies",-1))]),l.dependencies.length?(t(),m("div",Ye,[(t(!0),m(T,null,L(l.dependencies,d=>(t(),y(x,{key:d,filepath:d},null,8,["filepath"]))),128))])):w("",!0)])):w("",!0),j(l.$slots,"default")])}}}),Ke={flex:"~ gap-x-3 gap-y-1 wrap","w-full":""},Ze={relative:"","h-full":"","w-full":""},eo={key:0,py4:"",pt4:"",flex:"~ col"},oo={border:"t base",p4:""},no=I({__name:"ComponentsGraph",props:{components:{},relationships:{}},setup(P){const s=P,v=U(),i=U(),c=re(),l=we(),a=ue(),h=me(),r=de(),{componentsGraphShowNodeModules:b,componentsGraphShowGlobalComponents:x,componentsGraphShowPages:d,componentsGraphShowLayouts:N,componentsGraphShowWorkspace:_}=J("ui"),k=U(),p=U(""),F=ce(p,300),G=D(()=>{const V=s.relationships||[];if(k.value){let e=function(C){!C||n.has(C)||(n.add(C),C.deps.forEach(B=>{e(V.find(M=>M.id===B))}))};const n=new Set;return e(k.value),Array.from(n)}return V}),A=D(()=>{const V=G.value.map(n=>{const C=s.components.find(R=>R.filePath===n.id),B=a.value?.find(R=>R.file===n.id),M=r.value?.find(R=>R.file===n.id),S=n.id.includes("/node_modules/")?"lib":C?C.global?"global":"user":M?"layout":B?"page":"unknown";if(!b.value&&S==="lib"||!d.value&&S==="page"||!N.value&&S==="layout"||!_.value&&S==="user"&&h.value&&!n.id.startsWith(h.value.rootDir)||!x.value&&S==="global")return null;const H=S==="layout"?"hexagon":S==="page"?"square":"dot",g=F.value&&!n.id.toLowerCase().includes(F.value.toLowerCase());return{id:n.id,label:ae(n.id),group:S,shape:H,size:15+Math.min(n.deps.length/2,8),font:{color:g?"#8885":c.value==="dark"?"white":"black"},color:g?"#8885":k.value?.id===n.id?"#82c742":void 0,extra:{id:n.id,component:C,page:B,layout:M,relationship:n}}}).filter(n=>!!n),e=G.value.flatMap(n=>n.deps.map(C=>({from:n.id,to:C,arrows:{to:{enabled:!0,scaleFactor:.8}}})));return{nodes:new Te(V),edges:e}}),te=D(()=>l.value?.component?s.relationships?.find(e=>e.id===l.value?.component?.filePath)?.deps?.map(e=>s.relationships?.find(n=>n.id===e)?.id).filter(Boolean):[]),se=D(()=>l.value?.component?s.relationships?.filter(e=>e.deps.includes(l.value.component.filePath))?.map(e=>s.relationships?.find(n=>n.id===e.id)?.id).filter(Boolean):[]);xe(()=>{const V={nodes:{shape:"dot",size:16},physics:{repulsion:{centralGravity:.7,springLength:100,springConstant:.01},maxVelocity:146,solver:"forceAtlas2Based",timestep:.35,stabilization:{enabled:!0,iterations:200}},groups:{user:{color:"#42b883"},unknown:{color:"#b86542"},lib:{color:"#b4b842"},page:{color:"#42b2b8"},layout:{color:"#4256b8"}}},e=new Be(v.value,A.value,V);e.on("click",n=>{const C=n.nodes?.[0],B=A.value.nodes.get(C).extra;l.value=B}),ke(A,()=>{e.setData(A.value)})});function le(){l.value=void 0}function ae(V){const e=s.components.find(n=>n.filePath===V);return e?e.pascalName:V.replace(/.*\/components\//,"").replace(/\.vue$/,"").replace(/\/index$/,"").split("/").map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join("")}function ie(){k.value=l.value?.relationship,l.value=void 0}return(V,e)=>{const n=De,C=Y,B=fe,M=ne,S=O,H=Se;return t(),m(T,null,[u(C,{ref_key:"navbar",ref:i,search:p.value,"onUpdate:search":e[6]||(e[6]=g=>p.value=g),absolute:"","left-0":"","right-0":"","top-0":""},{actions:f(()=>[o("div",Ke,[u(n,{modelValue:$(d),"onUpdate:modelValue":e[0]||(e[0]=g=>z(d)?d.value=g:null),n:"primary sm"},{default:f(()=>e[8]||(e[8]=[o("span",{op75:""},"Show pages",-1)])),_:1},8,["modelValue"]),u(n,{modelValue:$(N),"onUpdate:modelValue":e[1]||(e[1]=g=>z(N)?N.value=g:null),n:"primary sm"},{default:f(()=>e[9]||(e[9]=[o("span",{op75:""},"Show layouts",-1)])),_:1},8,["modelValue"]),u(n,{modelValue:$(_),"onUpdate:modelValue":e[2]||(e[2]=g=>z(_)?_.value=g:null),n:"primary sm"},{default:f(()=>e[10]||(e[10]=[o("span",{op75:""},"Show workspace",-1)])),_:1},8,["modelValue"]),u(n,{modelValue:$(b),"onUpdate:modelValue":e[3]||(e[3]=g=>z(b)?b.value=g:null),n:"primary sm"},{default:f(()=>e[11]||(e[11]=[o("span",{op75:""},"Show node_modules",-1)])),_:1},8,["modelValue"]),u(n,{modelValue:$(x),"onUpdate:modelValue":e[4]||(e[4]=g=>z(x)?x.value=g:null),n:"primary sm"},{default:f(()=>e[12]||(e[12]=[o("span",{op75:""},"Show global components",-1)])),_:1},8,["modelValue"])]),k.value?(t(),m("button",{key:0,flex:"~ gap-1","flex-none":"","items-center":"","rounded-full":"","bg-gray:20":"",py1:"",pl3:"",pr2:"","text-xs":"",op50:"","hover:op100":"",onClick:e[5]||(e[5]=g=>k.value=void 0)},e[13]||(e[13]=[q(" Clear filter "),o("div",{"i-carbon-close":""},null,-1)]))):w("",!0),e[14]||(e[14]=o("div",{"flex-auto":""},null,-1)),j(V.$slots,"default")]),_:3},8,["search"]),o("div",Ze,[o("div",{ref_key:"container",ref:v,"h-full":"","w-full":""},null,512),u(B,{absolute:"","bottom-3":"","left-3":"","border-0":"",p2:"",px3:"","text-sm":"","n-glass-effect":""},{default:f(()=>e[15]||(e[15]=[o("div",{grid:"~ cols-[20px_1fr] items-center gap-y-1"},[o("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-42b883":""}),o("div",{op50:""}," Component "),o("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-97c2fc":""}),o("div",{op50:""}," Global Component "),o("div",{"h-3":"","w-3":"","bg-hex-42b2b8":""}),o("div",{op50:""}," Page "),o("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 726 628","ml--1px":"","h-3":""},[o("path",{fill:"#4256b8","stroke-width":"4",d:"M723 314 543 625.8H183L3 314 183 2.2h360L723 314z"})]),o("div",{op50:""}," Layout "),o("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-b4b842":""}),o("div",{op50:""}," Library Component "),o("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-b86542":""}),o("div",{op50:""}," Unknown ")],-1)])),_:1}),u(H,{"model-value":!!(l.value&&l.value.component),top:i.value,border:"t l base","w-80":"",onClose:le},{default:f(()=>[l.value&&l.value.component?(t(),m("div",eo,[u(M,{component:l.value.component,dependencies:te.value,dependents:se.value},null,8,["component","dependencies","dependents"]),o("div",oo,[u(S,{n:"primary solid",onClick:e[7]||(e[7]=g=>ie())},{default:f(()=>e[16]||(e[16]=[q(" Filter to this component ")])),_:1})])])):w("",!0)]),_:1},8,["model-value","top"])])],64)}}}),to={hover:"bg-active",class:"group",flex:"~ gap2","w-full":"","items-center":"",rounded:"",px2:"",py1:""},so={key:0,"ml--1":"","text-primary":""},lo=I({__name:"ComponentItem",props:{component:{},dependencies:{},dependents:{}},setup(P){const s=P,v=D(()=>s.component.filePath||s.component.file||s.component.__file||"");return(i,c)=>{const l=oe,a=ne,h=Ce("VDropdown"),r=Z,b=ee;return t(),m("div",to,[u(h,null,{popper:f(()=>[u(a,{component:i.component,dependencies:i.dependencies,dependents:i.dependents,"w-100":"",pt4:""},null,8,["component","dependencies","dependents"])]),default:f(()=>[o("button",{"hover:text-primary":"",class:$e(i.dependents&&i.dependents.length===0?"op50":"")},[u(l,{component:i.component},null,8,["component"])],2)]),_:1}),i.dependents?.length?(t(),m("sup",so," x"+W(i.dependents?.length),1)):w("",!0),i.component.global?(t(),y(r,{key:1,n:"green",title:"Registered at runtime as a global component",textContent:"runtime"})):w("",!0),j(i.$slots,"default"),v.value?(t(),y(b,{key:2,filepath:v.value,"text-sm":"",op25:"","group-hover:op75":""},null,8,["filepath"])):w("",!0)])}}}),ao={flex:"~ gap-2 items-center"},io={pl4:""},po=I({__name:"ComponentsList",props:{components:{},relationships:{}},setup(P){const s=P,v=U(""),i=U("all"),c=D(()=>{const h=s.components.map(r=>ve(r,s.relationships));return i.value==="using"?h.filter(r=>r.dependents?.length):i.value==="not-used"?h.filter(r=>!r.dependents?.length):h}),l=D(()=>new _e(c.value,{keys:["component.pascalName","component.filePath","component.kebabName"]})),a=D(()=>{const h=[],r=new Map,b=[],x=[],d={user:0,lib:0,builtin:0,runtime:0};return(v.value?l.value.search(v.value).map(_=>_.item):c.value).forEach(_=>{const k=_.component;if(k.filePath&&he(k.filePath)){const p=be(k.filePath);if(!p)return;p==="nuxt"?(b.push(_),d.builtin++):(r.has(p)||r.set(p,[]),r.get(p).push(_),d.lib++)}else k.global&&!k.filePath?(x.push(_),d.runtime++):(h.push(_),d.user++)}),{count:d,user:h,builtin:b,lib:r,runtime:x}});return(h,r)=>{const b=ge,x=Le,d=Y,N=lo,_=Me,k=Ue;return t(),m(T,null,[u(d,{search:v.value,"onUpdate:search":r[1]||(r[1]=p=>v.value=p),pb3:""},{actions:f(()=>[j(h.$slots,"default")]),default:f(()=>[o("div",ao,[u(b,{icon:"carbon-filter",op50:""}),u(x,{modelValue:i.value,"onUpdate:modelValue":r[0]||(r[0]=p=>i.value=p),n:"primary sm",options:[{label:"All",value:"all"},{label:"Using",value:"using"},{label:"Not used",value:"not-used"}]},null,8,["modelValue"])])]),_:3},8,["search"]),a.value.user.length?(t(),y(_,{key:0,icon:"carbon-nominal",text:"User components",open:a.value.user.length<=$(X),description:`Total components: ${a.value.count.user}`},{default:f(()=>[(t(!0),m(T,null,L(a.value.user,p=>(t(),y(N,E({key:p.component.filePath,ref_for:!0},p),null,16))),128))]),_:1},8,["open","description"])):w("",!0),a.value.runtime.length?(t(),y(_,{key:1,icon:"carbon-load-balancer-global",open:a.value.runtime.length<=$(X),text:"Runtime components",description:`Total components: ${a.value.count.runtime}`},{default:f(()=>[(t(!0),m(T,null,L(a.value.runtime,p=>(t(),y(N,E({key:p.component.filePath,ref_for:!0},p),null,16))),128))]),_:1},8,["open","description"])):w("",!0),a.value.builtin.length?(t(),y(_,{key:2,icon:"simple-icons-nuxtdotjs",text:"Built-in components",description:`Total components: ${a.value.count.builtin}`},{default:f(()=>[(t(!0),m(T,null,L(a.value.builtin,p=>(t(),y(N,E({key:p.component.filePath,ref_for:!0},p),null,16))),128))]),_:1},8,["description"])):w("",!0),a.value.lib.size?(t(),y(_,{key:3,open:a.value.count.lib<=$(X),icon:"carbon-3d-mpr-toggle",text:"Components from libraries",description:`${a.value.count.lib} components from ${a.value.lib.size} packages`},{default:f(()=>[(t(!0),m(T,null,L(a.value.lib.entries(),([p,F])=>(t(),m("div",{key:p,"ml-2":""},[u(k,{text:`${p} (${F.length})`,py1:"",op50:""},null,8,["text"]),o("div",io,[(t(!0),m(T,null,L(F,G=>(t(),y(N,E({key:G.component.filePath,ref_for:!0},G),null,16))),128))])]))),128))]),_:1},8,["open","description"])):w("",!0)],64)}}}),ro={relative:"","h-full":"","of-auto":""},uo={"flex-none":"",flex:"~ gap3"},Do=I({__name:"components",setup(P){const s=ye(),v=Ie(),i=Fe(),{componentsView:c}=J("ui");function l(){s.value?.inspector?.enable()}function a(){c.value=c.value==="list"?"graph":"list"}return(h,r)=>{const b=O,x=Re,d=Pe,N=Ne("tooltip");return t(),m(T,null,[o("div",ro,[(t(),y(Ve($(c)==="list"?po:no),{components:$(v),relationships:$(i)},{default:f(()=>[o("div",uo,[Q(u(b,{"text-lg":"",border:!1,icon:$(c)==="graph"?"i-carbon-list":"i-carbon-network-4",title:"Toggle view",onClick:a},null,8,["icon"]),[[N,"Toggle View",void 0,{"bottom-end":!0}]]),$(s)?.inspector?.isAvailable?Q((t(),y(b,{key:0,"text-lg":"",border:!1,icon:"i-tabler-focus-2",title:"Inspect Vue components",onClick:l},null,512)),[[N,"Inspect Vue components",void 0,{"bottom-end":!0}]]):w("",!0)])]),_:1},8,["components","relationships"]))]),u(d,null,{default:f(()=>[u(x)]),_:1})],64)}}});export{Do as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as $,K as U,E,_ as F}from"./n2dc525b.js";import{_ as S}from"./nmarkdown.vue-iw2voruc.js";import{_ as j}from"./filepath-item.vue-csqbsvc3.js";import{k as q}from"./index-jc4yj4to.js";import{C as y}from"./constants-b32h69zq.js";import{p as z,q as r,Y as K,S as i,a1 as s,a2 as m,Q as a,X as L,P as p,R as l,a9 as c,a8 as _,a3 as b,u as k,F as x,ae as M}from"./vendor/json-editor-vue-llkaejaf.js";const O={rounded:"","font-mono":""},P={key:0,"text-primary":""},Q={key:0},R={title:"Vue Directive"},T={"max-w-100":""},W={px4:"",py3:"","text-sm":""},X={flex:"~ gap2",n:"primary xs"},Y={border:"t base","max-h-60":"","of-auto":"",px4:"",py3:""},A={"text-sm":""},G={"text-primary":""},H={flex:"~ col gap-2","items-start":"",pt3:"","text-sm":"",op75:""},J={key:1,"text-sm":"",op50:""},ne=z({__name:"ComposableItem",props:{item:{},isDirective:{type:Boolean,default:!1},metadata:{},filepath:{},counter:{type:Boolean,default:!0},classes:{default:"px2 py1 text-sm bg-gray:5 "}},setup(g){const o=g,C=$(),h=U(),u=r(()=>o.item.as||o.item.name),D=r(()=>{let e=u.value;return o.isDirective&&(e[0]!=="v"&&(e=`v${e}`),e=q(e)),e}),n=r(()=>o.metadata?.injectionUsage?.[u.value]?.count||0),N=r(()=>(o.metadata?.injectionUsage?.[u.value]?.moduleIds||[]).filter(e=>!e.endsWith("?macro=true"))),v=r(()=>o.item.meta?.docsUrl?o.item.meta.docsUrl:["nuxt","#app","nuxt3"].includes(o.item.from)?y.nuxt[o.item.name]:o.item.from==="vue"?y.vue[o.item.name]:null);return(e,t)=>{const w=E,B=S,f=F,I=j,V=K("VDropdown");return s(),i(V,{disabled:!o.metadata},{popper:m(()=>[a("div",T,[a("div",W,[e.item.meta?.description?(s(),i(B,{key:0,tag:"div",pb3:"","text-sm":"",markdown:e.item.meta.description},null,8,["markdown"])):l("",!0),a("div",X,[b(f,{icon:"carbon-copy",onClick:t[0]||(t[0]=d=>k(C)(D.value,"imports-name"))},{default:m(()=>t[2]||(t[2]=[c(" Copy ")])),_:1}),e.filepath?(s(),i(f,{key:0,icon:"carbon-code",onClick:t[1]||(t[1]=d=>e.filepath&&k(h)(e.filepath))},{default:m(()=>t[3]||(t[3]=[c(" Source ")])),_:1})):l("",!0),v.value?(s(),i(f,{key:1,icon:"carbon-catalog",to:v.value,target:"_blank"},{default:m(()=>t[4]||(t[4]=[c(" Docs ")])),_:1},8,["to"])):l("",!0)])]),a("div",Y,[n.value?(s(),p(x,{key:0},[a("div",A,[t[5]||(t[5]=a("span",{op50:""},"It has been referenced ",-1)),a("strong",G,_(n.value),1),t[6]||(t[6]=a("span",{op50:""}," times by:",-1))]),a("div",H,[(s(!0),p(x,null,M(N.value,d=>(s(),i(I,{key:d,filepath:d},null,8,["filepath"]))),128))])],64)):(s(),p("div",J," Not in use via auto import. "))])])]),default:m(()=>[a("button",{"hover:text-primary":"",class:L([e.metadata&&!n.value?"op30 hover:op100":"",e.classes])},[a("code",O,[c(_(u.value)+" ",1),n.value&&e.counter?(s(),p("sup",P,"x"+_(n.value),1)):l("",!0)]),e.isDirective?(s(),p("sup",Q,[a("abbr",R,[b(w,{icon:"tabler:hexagon-letter-d"})])])):l("",!0)],2)]),_:1},8,["disabled"])}}});export{ne as _};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Q as E,Y as M,Z as N,$ as j,p as B,a0 as I,a1 as k,a2 as P,i as V,a3 as D,r as L,U as S}from"./n2dc525b.js";import{p as $,f as C,q as x,r as W,E as q,n as O,w as b,I as R,P as U,a1 as n,S as u,a2 as y,Q as r,a9 as w,a8 as A,u as T,ad as F,a3 as Q}from"./vendor/json-editor-vue-llkaejaf.js";import{_ as G}from"./launch-page.vue-b5znlr95.js";import"./vendor/unocss-mvzv9iuf.js";import"./vendor/shiki-kdj4mcqm.js";import"./nmarkdown.vue-iw2voruc.js";import"./client-gsjyqe32.js";const h=new Map,X=$({__name:"IframeView",props:{tab:{}},setup(f){const m=f,c=E(),d=C(),i=x(()=>m.tab.name),e=C(),t=W(M(d));q(()=>{const o=m.tab.view,l=o.persistent!==!1,_=["clipboard-write","clipboard-read"];if(h.get(i.value)&&l)e.value=h.get(i.value),e.value.style.visibility="visible";else{e.value=document.createElement("iframe"),e.value.setAttribute("allow",_.join("; ")),e.value.setAttribute("aria-label","Nuxt Devtools"),l&&h.set(i.value,e.value),e.value.src=o.src;try{e.value.style.opacity="0.01",e.value.onload=()=>{v(),s(),e.value.style.opacity="1"}}catch{e.value.style.opacity="1"}document.body.appendChild(e.value),O(p)}setTimeout(s,100)}),b(p),b(s),b(v),R(()=>{e.value&&(e.value.style.visibility="hidden")});function s(){if(!(!e.value||!e.value.contentWindow))try{const o=e.value.contentWindow.document.querySelector("html");o?.classList.toggle("dark",c.value==="dark"),o?.classList.toggle("light",c.value==="dark"),new MutationObserver(()=>{c.value=e.value?.contentWindow?.document.querySelector("html")?.classList.contains("dark")?"dark":"light"}).observe(o,{attributes:!0,attributeFilter:["class"]})}catch{}}const a=N();function v(){if(!(!e.value||!e.value.contentWindow))try{e.value.contentWindow.__NUXT_DEVTOOLS__=a.value}catch{}}function p(){e.value&&Object.assign(e.value.style,{position:"fixed",left:`${t.left}px`,top:`${t.top}px`,width:`${t.width}px`,height:`${t.height}px`,outline:"none"})}return(o,l)=>(n(),U("div",{ref_key:"anchor",ref:d,"h-full":"","w-full":""},null,512))}}),Y={flex:"~ col gap2",mxa:"","items-center":""},Z={"text-xl":""},z={"text-rose":""},ne=$({__name:"custom-[name]",props:{name:{}},setup(f){const m=f,c=j(),d=B(),i=x(()=>m.name??c.params.name),e=I(),t=x(()=>e.value.find(s=>s.name===i.value));return q(()=>{t.value?t.value.requireAuth&&!k.value&&P():setTimeout(()=>{t.value||d.push("/modules/overview")},2e3)}),(s,a)=>{const v=V,p=D,o=X,l=G,_=S;return t.value?t.value.requireAuth&&!T(k)?(n(),u(p,{key:1})):t.value.view.type==="iframe"?(n(),u(o,{key:2,tab:t.value},null,8,["tab"])):t.value.view.type==="vnode"?(n(),u(F(t.value.view.vnode),{key:3})):t.value.view.type==="launch"?(n(),u(l,{key:4,name:`custom-${t.value.name}`,icon:t.value.view.icon||t.value.icon,title:t.value.view.title||t.value.title,description:t.value.view.description,actions:t.value.view.actions,onAction:a[0]||(a[0]=g=>T(L).customTabAction(t.value.name,g))},null,8,["name","icon","title","description","actions"])):(n(),u(v,{key:5},{default:y(()=>[Q(_,{flex:"~ col","h-full":"","items-center":"","justify-center":""},{default:y(()=>[w(" Unknown tab type "+A(t.value.view),1)]),_:1})]),_:1})):(n(),u(v,{key:0},{default:y(()=>[r("div",Y,[a[3]||(a[3]=r("div",{"i-carbon-queued":"",mb2:"","text-5xl":"",op50:""},null,-1)),r("p",Z,[a[1]||(a[1]=w(" Tab ")),r("code",z,A(i.value),1),a[2]||(a[2]=w(" not found "))]),a[4]||(a[4]=r("p",{op50:""}," It might because the module contributing this tab is not installed or enabled ",-1)),a[5]||(a[5]=r("p",{mt8:"","animate-pulse":""}," Redirecting to overview page... ",-1))])]),_:1}))}}});export{ne as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as i,q as u,P as d,a1 as f,X as l,U as o,a9 as p,Q as c,a8 as a}from"./vendor/json-editor-vue-llkaejaf.js";const m={"ml-1":"","text-xs":"",op50:""},g=i({__name:"DurationDisplay",props:{duration:{},factor:{default:1},color:{type:Boolean,default:!0}},setup(n){const t=n;function s(e){return t.color?e?(e=e*t.factor,e<.5?"text-gray:50":e>1e3?"text-red-400":e>500?"text-orange-400":e>200?"text-yellow-400":""):"text-gray-400":""}const r=u(()=>!t.duration||t.duration<1?["<1","ms"]:t.duration<1e3?[t.duration.toFixed(0),"ms"]:t.duration<1e3*60?[(t.duration/1e3).toFixed(1),"s"]:[(t.duration/1e3/60).toFixed(1),"min"]);return(e,x)=>(f(),d("div",{class:l(s(e.duration))},[o(e.$slots,"before"),p(" "+a(r.value[0]),1),c("span",m,a(r.value[1]),1),o(e.$slots,"after")],2))}});export{g as _};
|