@nuxt/devtools-nightly 0.0.0 → 2.0.0-beta.0-28940205.5b566fb
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/LICENSE +21 -0
- package/README.md +129 -0
- package/cli.mjs +2 -0
- package/dist/chunks/analyze-build.mjs +58 -0
- package/dist/chunks/module-main.mjs +2044 -0
- package/dist/chunks/plugin-metrics.mjs +68 -0
- package/dist/chunks/timeline.mjs +73 -0
- package/dist/chunks/vite-inspect.mjs +61 -0
- package/dist/chunks/vscode.mjs +195 -0
- package/dist/chunks/vue-devtools.mjs +30 -0
- package/dist/chunks/vue-inspector.mjs +15 -0
- package/dist/client/200.html +20 -0
- package/dist/client/404.html +20 -0
- package/dist/client/_nuxt/__blank-n15vnpb5.js +1 -0
- package/dist/client/_nuxt/analyze-build-kcwmvlyl.js +1 -0
- package/dist/client/_nuxt/assets-ivvrbi3q.js +16 -0
- package/dist/client/_nuxt/assets.css-hmxl533k.css +1 -0
- package/dist/client/_nuxt/b6bfxrb8.js +17 -0
- package/dist/client/_nuxt/builds/latest.json +1 -0
- package/dist/client/_nuxt/builds/meta/b8bbfd27-5704-4be8-a606-01af93c734ef.json +1 -0
- package/dist/client/_nuxt/client-c9f80qsp.js +1 -0
- package/dist/client/_nuxt/code-diff.vue-bhijg81q.js +8 -0
- package/dist/client/_nuxt/code-snippets.vue-i4e657wf.js +1 -0
- package/dist/client/_nuxt/components-krpx1826.js +1 -0
- package/dist/client/_nuxt/composable-item.vue-kwpzi9u7.js +1 -0
- package/dist/client/_nuxt/constants-b32h69zq.js +1 -0
- package/dist/client/_nuxt/custom-_name_-cepykbos.js +1 -0
- package/dist/client/_nuxt/default-mk5axw1k.js +1 -0
- package/dist/client/_nuxt/duration-display.vue-kqe6a4wx.js +1 -0
- package/dist/client/_nuxt/entry.css-nqz5coc9.css +1 -0
- package/dist/client/_nuxt/error-404-lp8coab3.js +1 -0
- package/dist/client/_nuxt/error-404.css-b3x40x40.css +1 -0
- package/dist/client/_nuxt/error-500-d4b6gi3u.js +1 -0
- package/dist/client/_nuxt/error-500.css-hilpkhd4.css +1 -0
- package/dist/client/_nuxt/error-ojb7cn7v.js +9 -0
- package/dist/client/_nuxt/filepath-item.vue-b829sn9l.js +1 -0
- package/dist/client/_nuxt/full-j8mngb76.js +1 -0
- package/dist/client/_nuxt/help-fab.css-ms50khsu.css +1 -0
- package/dist/client/_nuxt/help-fab.vue-gtlaa6k2.js +1 -0
- package/dist/client/_nuxt/hooks-htmew7il.js +1 -0
- package/dist/client/_nuxt/imports-18kqq3am.js +1 -0
- package/dist/client/_nuxt/index-dl6nn7ct.js +2 -0
- package/dist/client/_nuxt/index-e7wrzeix.js +1 -0
- package/dist/client/_nuxt/launch-page.vue-iyi310zf.js +1 -0
- package/dist/client/_nuxt/modules-hdu1ikfi.js +1 -0
- package/dist/client/_nuxt/nbadge-fktngirm.js +1 -0
- package/dist/client/_nuxt/ncheckbox.vue-fs1yhvat.js +1 -0
- package/dist/client/_nuxt/ncode-block.css-c9cb29at.css +1 -0
- package/dist/client/_nuxt/ncode-block.vue-gy1ero5j.js +2 -0
- package/dist/client/_nuxt/ndrawer.vue-cjxfdzsk.js +1 -0
- package/dist/client/_nuxt/ndropdown.vue-fe8ybtb0.js +1 -0
- package/dist/client/_nuxt/nicon-title.vue-ouqsubn7.js +1 -0
- package/dist/client/_nuxt/nlink.vue-jafnipxp.js +1 -0
- package/dist/client/_nuxt/nmarkdown.vue-hygash5x.js +1 -0
- package/dist/client/_nuxt/nnavbar.vue-d5x8tq5w.js +1 -0
- package/dist/client/_nuxt/none-i3w61o4x.js +1 -0
- package/dist/client/_nuxt/nsection-block-ivkmhmn9.js +1 -0
- package/dist/client/_nuxt/nsection-block.css-e7kbjm7k.css +1 -0
- package/dist/client/_nuxt/nselect-tabs.vue-sw71szzx.js +1 -0
- package/dist/client/_nuxt/nselect.vue-mkp3umn0.js +1 -0
- package/dist/client/_nuxt/open-graph-i5rptgvl.js +3 -0
- package/dist/client/_nuxt/open-graph.css-e21qzmvj.css +1 -0
- package/dist/client/_nuxt/overview-jzek603r.js +1 -0
- package/dist/client/_nuxt/pages-mhjzw1eo.js +1 -0
- package/dist/client/_nuxt/payload-kjhui3c5.js +1 -0
- package/dist/client/_nuxt/pinia-jy0feqo2.js +1 -0
- package/dist/client/_nuxt/plugins-d2vnj57a.js +1 -0
- package/dist/client/_nuxt/render-tree-malxu5t7.js +1 -0
- package/dist/client/_nuxt/runtime-configs-c8u0cuv7.js +1 -0
- package/dist/client/_nuxt/server-route-inputs.vue-dfs3eezs.js +1 -0
- package/dist/client/_nuxt/server-routes-ea89bftg.js +9 -0
- package/dist/client/_nuxt/server-tasks-guw0x7eh.js +1 -0
- package/dist/client/_nuxt/settings-nr7x6wel.js +1 -0
- package/dist/client/_nuxt/stacktrace-list.vue-cfyme80n.js +1 -0
- package/dist/client/_nuxt/state-components-f29eyhzi.js +1 -0
- package/dist/client/_nuxt/state-editor.vue-nd6tb0dn.js +1 -0
- package/dist/client/_nuxt/state-modules-gh2s62ky.js +1 -0
- package/dist/client/_nuxt/storage-d1qa6fff.js +1 -0
- package/dist/client/_nuxt/terminals-igsxvm6w.js +1 -0
- package/dist/client/_nuxt/terminals.css-mejv43xm.css +1 -0
- package/dist/client/_nuxt/timeline-lm6kcwsd.js +31 -0
- package/dist/client/_nuxt/timeline.css-lhkpu01p.css +1 -0
- package/dist/client/_nuxt/unocss-runtime-jzfgcoxk.js +1 -0
- package/dist/client/_nuxt/vendor/json-editor-vue-gi2fewby.js +3818 -0
- package/dist/client/_nuxt/vendor/json-editor-vue.css-mqq5uooj.css +1 -0
- package/dist/client/_nuxt/vendor/markdown-it-fvu08dbs.js +16 -0
- package/dist/client/_nuxt/vendor/shiki-bnvxb5wv.js +147 -0
- package/dist/client/_nuxt/vendor/unocss-3uirpnla.js +2 -0
- package/dist/client/_nuxt/vendor/unocss.css-mhvipxpl.css +1 -0
- package/dist/client/_nuxt/vendor/vis-dlwijd5n.js +98 -0
- package/dist/client/_nuxt/vendor/xterm-dbpzgj7s.js +9 -0
- package/dist/client/_nuxt/vendor/xterm.css-egmhki83.css +32 -0
- package/dist/client/_nuxt/virtual-files-jzsbborg.js +1 -0
- package/dist/client/_nuxt/virtual-files.css-gqpg2wnb.css +1 -0
- package/dist/client/_nuxt/vue-virtual-scroller.esm-hx1s7s1b.js +2 -0
- package/dist/client/index.html +20 -0
- package/dist/client/nuxt.svg +3 -0
- package/dist/dirs.d.mts +7 -0
- package/dist/dirs.d.ts +7 -0
- package/dist/dirs.mjs +28 -0
- package/dist/module.cjs +5 -0
- package/dist/module.d.mts +9 -0
- package/dist/module.d.ts +9 -0
- package/dist/module.json +9 -0
- package/dist/module.mjs +6 -0
- package/dist/runtime/auth/index.html +76 -0
- package/dist/runtime/function-metrics-helpers.d.ts +3 -0
- package/dist/runtime/function-metrics-helpers.js +69 -0
- package/dist/runtime/nitro/inline.d.ts +3 -0
- package/dist/runtime/nitro/inline.js +6 -0
- package/dist/runtime/plugins/devtools.client.d.ts +2 -0
- package/dist/runtime/plugins/devtools.client.js +56 -0
- package/dist/runtime/plugins/devtools.server.d.ts +2 -0
- package/dist/runtime/plugins/devtools.server.js +7 -0
- package/dist/runtime/plugins/view/FrameBox.vue +167 -0
- package/dist/runtime/plugins/view/Main.vue +422 -0
- package/dist/runtime/plugins/view/client.d.ts +12 -0
- package/dist/runtime/plugins/view/client.js +332 -0
- package/dist/runtime/plugins/view/state.d.ts +5 -0
- package/dist/runtime/plugins/view/state.js +17 -0
- package/dist/runtime/plugins/view/utils.d.ts +31 -0
- package/dist/runtime/plugins/view/utils.js +156 -0
- package/dist/runtime/settings.d.ts +4 -0
- package/dist/runtime/settings.js +2 -0
- package/dist/runtime/shared/hooks.d.ts +2 -0
- package/dist/runtime/shared/hooks.js +33 -0
- package/dist/runtime/use-nuxt-devtools.d.ts +8 -0
- package/dist/runtime/use-nuxt-devtools.js +23 -0
- package/dist/runtime/vue-devtools/overlay.d.ts +1 -0
- package/dist/runtime/vue-devtools/overlay.js +8 -0
- package/dist/shared/devtools-nightly.2a48a9e5.d.mts +62 -0
- package/dist/shared/devtools-nightly.2a48a9e5.d.ts +62 -0
- package/dist/shared/devtools-nightly.5ac54dae.mjs +121 -0
- package/dist/types.d.mts +42 -0
- package/dist/types.d.ts +42 -0
- package/dist/types.mjs +1 -0
- package/package.json +123 -2
- package/types.d.ts +1 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2014 The xterm.js authors. All rights reserved.
|
|
3
|
+
* Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
|
|
4
|
+
* https://github.com/chjj/term.js
|
|
5
|
+
* @license MIT
|
|
6
|
+
*
|
|
7
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
* in the Software without restriction, including without limitation the rights
|
|
10
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
* furnished to do so, subject to the following conditions:
|
|
13
|
+
*
|
|
14
|
+
* The above copyright notice and this permission notice shall be included in
|
|
15
|
+
* all copies or substantial portions of the Software.
|
|
16
|
+
*
|
|
17
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
23
|
+
* THE SOFTWARE.
|
|
24
|
+
*
|
|
25
|
+
* Originally forked from (with the author's permission):
|
|
26
|
+
* Fabrice Bellard's javascript vt100 for jslinux:
|
|
27
|
+
* http://bellard.org/jslinux/
|
|
28
|
+
* Copyright (c) 2011 Fabrice Bellard
|
|
29
|
+
* The original design remains. The terminal itself
|
|
30
|
+
* has been extended to include xterm CSI codes, among
|
|
31
|
+
* other features.
|
|
32
|
+
*/.xterm{cursor:text;position:relative;-moz-user-select:none;user-select:none;-ms-user-select:none;-webkit-user-select:none}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{position:absolute;top:0;z-index:5}.xterm .xterm-helper-textarea{border:0;height:0;left:-9999em;margin:0;opacity:0;overflow:hidden;padding:0;position:absolute;resize:none;top:0;white-space:nowrap;width:0;z-index:-5}.xterm .composition-view{background:#000;color:#fff;display:none;position:absolute;white-space:nowrap;z-index:1}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{background-color:#000;cursor:default;inset:0;overflow-y:scroll;position:absolute}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{left:0;position:absolute;top:0}.xterm .xterm-scroll-area{visibility:hidden}.xterm-char-measure-element{display:inline-block;left:-9999em;line-height:normal;position:absolute;top:0;visibility:hidden}.xterm.enable-mouse-events{cursor:default}.xterm .xterm-cursor-pointer,.xterm.xterm-cursor-pointer{cursor:pointer}.xterm.column-select.focus{cursor:crosshair}.xterm .xterm-accessibility:not(.debug),.xterm .xterm-message{color:transparent;inset:0;pointer-events:none;position:absolute;z-index:10}.xterm .xterm-accessibility-tree:not(.debug) ::-moz-selection{color:transparent}.xterm .xterm-accessibility-tree:not(.debug) ::selection{color:transparent}.xterm .xterm-accessibility-tree{-webkit-user-select:text;-moz-user-select:text;user-select:text;white-space:pre}.xterm .live-region{height:1px;left:-9999px;overflow:hidden;position:absolute;width:1px}.xterm-dim{opacity:1!important}.xterm-underline-1{text-decoration:underline}.xterm-underline-2{-webkit-text-decoration:double underline;text-decoration:double underline}.xterm-underline-3{-webkit-text-decoration:wavy underline;text-decoration:wavy underline}.xterm-underline-4{-webkit-text-decoration:dotted underline;text-decoration:dotted underline}.xterm-underline-5{-webkit-text-decoration:dashed underline;text-decoration:dashed underline}.xterm-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:overline underline}.xterm-overline.xterm-underline-2{-webkit-text-decoration:overline double underline;text-decoration:overline double underline}.xterm-overline.xterm-underline-3{-webkit-text-decoration:overline wavy underline;text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{-webkit-text-decoration:overline dotted underline;text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{-webkit-text-decoration:overline dashed underline;text-decoration:overline dashed underline}.xterm-strikethrough{text-decoration:line-through}.xterm-screen .xterm-decoration-container .xterm-decoration{position:absolute;z-index:6}.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}.xterm-decoration-overview-ruler{pointer-events:none;position:absolute;right:0;top:0;z-index:8}.xterm-decoration-top{position:relative;z-index:2}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as V}from"./nnavbar.vue-d5x8tq5w.js";import{_ as D}from"./ncode-block.vue-gy1ero5j.js";import{bk as S,bl as B,M as j,p as P,T as U,c as E}from"./b6bfxrb8.js";import{Q as i,S as c,U as a,k as I,b as m,w as M,l as _,a0 as l,$ as u,F as d,ab as W,a5 as v,Y as z,M as G}from"./vendor/json-editor-vue-gi2fewby.js";import{_ as H}from"./help-fab.vue-gtlaa6k2.js";import"./client-c9f80qsp.js";import"./vendor/unocss-3uirpnla.js";import"./vendor/shiki-bnvxb5wv.js";const L={class:"markdown-body"},Q={__name:"virtual-files",setup(h,{expose:r}){return r({frontmatter:{}}),(p,o)=>(i(),c("div",L,o[0]||(o[0]=[a("h1",null,"Virtual Files",-1),a("p",null,"Virtual files are generated on the fly to support the conventions of the framework, and to provide a better developer experience.",-1)])))}},R=["onClick"],T={key:0,"h-full":"","of-hidden":"",flex:"~ col"},Y={border:"b base","flex-none":"",px4:"",py2:"","text-sm":"",op75:""},oe=I({__name:"virtual-files",setup(h){const r=m(""),n=S(),p=B(),o=m();M(()=>{if(!p.value)return;const e=`/_vfs.json/${encodeURIComponent(p.value)}`;fetch(e,{headers:{accept:"application/json"}}).then(t=>t.json()).then(t=>o.value=t.current)});function x(e){if(n.value?.rootDir)return e.startsWith(n.value?.rootDir)?e.slice(n.value.rootDir.length):e}const f=_(()=>n.value?n.value.entries.filter(e=>!e.id.startsWith(`${n.value?.rootDir||""}/.nuxt/`)).sort((e,t)=>e.id.localeCompare(t.id)):[]),b=_(()=>new j(f.value,{keys:["id","path"]})),k=_(()=>r.value?b.value.search(r.value).map(e=>e.item):f.value);return(e,t)=>{const y=V,g=D,C=U,$=E,F=P,N=Q,w=H;return i(),c(d,null,[l(F,{class:"virtual-files","storage-key":"tab-virtual-files"},{left:u(()=>[l(y,{search:r.value,"onUpdate:search":t[0]||(t[0]=s=>r.value=s),"no-padding":"",p3:""},null,8,["search"]),(i(!0),c(d,null,W(k.value,s=>(i(),c(d,{key:s.id},[a("button",{block:"","w-full":"","select-none":"",truncate:"",px2:"",py1:"","text-start":"","text-sm":"","font-mono":"",class:z(s.id===o.value?.id?"text-primary n-bg-active":"text-secondary hover:n-bg-hover"),onClick:q=>p.value=s.id},v(x(s.id)),11,R),t[1]||(t[1]=a("div",{"x-divider":""},null,-1))],64))),128))]),right:u(()=>[o.value?.content?(i(),c("div",T,[a("div",Y,[a("code",null,v(o.value.id),1)]),l(g,{"h-full":"","of-auto":"","text-sm":"",code:o.value.content,lang:"typescript"},null,8,["code"])])):(i(),G($,{key:1},{default:u(()=>[l(C,{px6:"",py2:""},{default:u(()=>t[2]||(t[2]=[a("span",{op75:""},"Select a file to start",-1)])),_:1})]),_:1}))]),_:1}),l(w,null,{default:u(()=>[l(N)]),_:1})],64)}}});export{oe as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.virtual-files .shiki{background:none!important;padding:10px}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{O as re,P as ne,n as Q,Q as $,M as L,N as oe,at as le,s as ae,R as ue,ae as ce,a8 as de,S as M,V as A,W,$ as K,F as fe,ab as he,a7 as q,a1 as me,au as pe,X as ye,Y,a0 as ve}from"./vendor/json-editor-vue-gi2fewby.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)=>($(),L("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 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 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){_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 Z(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):Z(e,{value:s},i)}}function ee(e){var t=e._vue_visibilityState;t&&(t.destroyObserver(),delete e._vue_visibilityState)}var Re={beforeMount:Z,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,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),($(),L(q(i.listTag),{ref:"wrapper",style:ye({[e.direction==="vertical"?"minHeight":"minWidth"]:r.totalSize+"px"}),class:Y(["vue-recycle-scroller__item-wrapper",i.listClass])},{default:K(()=>[($(!0),M(fe,null,he(r.pool,n=>($(),L(q(i.itemTag),me({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}]]},pe(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),ve(u,{onNotify:a.handleResize},null,8,["onNotify"])],34)),[[c,a.handleVisibilityChange]])}ie.render=Ue;ie.__file="src/components/RecycleScroller.vue";export{ie as s};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<!DOCTYPE html><html data-capo=""><head><meta charset="utf-8">
|
|
2
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
3
|
+
<link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.css-nqz5coc9.css" crossorigin>
|
|
4
|
+
<link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue.css-mqq5uooj.css" crossorigin>
|
|
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/b6bfxrb8.js">
|
|
7
|
+
<link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue-gi2fewby.js">
|
|
8
|
+
<link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss-3uirpnla.js">
|
|
9
|
+
<link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/shiki-bnvxb5wv.js">
|
|
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-mk5axw1k.js">
|
|
12
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/full-j8mngb76.js">
|
|
13
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/none-i3w61o4x.js">
|
|
14
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/unocss-runtime-jzfgcoxk.js">
|
|
15
|
+
<link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404.css-b3x40x40.css">
|
|
16
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404-lp8coab3.js">
|
|
17
|
+
<link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500.css-hilpkhd4.css">
|
|
18
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500-d4b6gi3u.js">
|
|
19
|
+
<script type="module" src="/__NUXT_DEVTOOLS_BASE__/_nuxt/b6bfxrb8.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},1736412366357,false]</script>
|
|
20
|
+
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_BASE__/",buildId:"b8bbfd27-5704-4be8-a606-01af93c734ef",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="324" height="324" viewBox="0 0 324 324" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M181.767 270H302.211C306.037 270 309.795 269.003 313.108 267.107C316.421 265.211 319.172 262.484 321.084 259.2C322.996 255.915 324.002 252.19 324 248.399C323.998 244.607 322.989 240.883 321.074 237.601L240.187 98.7439C238.275 95.4607 235.525 92.7342 232.213 90.8385C228.901 88.9429 225.143 87.9449 221.318 87.9449C217.494 87.9449 213.736 88.9429 210.424 90.8385C207.112 92.7342 204.361 95.4607 202.449 98.7439L181.767 134.272L141.329 64.7975C139.416 61.5145 136.664 58.7884 133.351 56.8931C130.038 54.9978 126.28 54 122.454 54C118.629 54 114.871 54.9978 111.558 56.8931C108.245 58.7884 105.493 61.5145 103.58 64.7975L2.92554 237.601C1.01067 240.883 0.00166657 244.607 2.06272e-06 248.399C-0.00166244 252.19 1.00407 255.915 2.91605 259.2C4.82803 262.484 7.57884 265.211 10.8918 267.107C14.2047 269.003 17.963 270 21.7886 270H97.3936C127.349 270 149.44 256.959 164.641 231.517L201.546 168.172L221.313 134.272L280.637 236.1H201.546L181.767 270ZM96.1611 236.065L43.3984 236.054L122.49 100.291L161.953 168.172L135.531 213.543C125.436 230.051 113.968 236.065 96.1611 236.065Z" fill="#00DC82"/>
|
|
3
|
+
</svg>
|
package/dist/dirs.d.mts
ADDED
package/dist/dirs.d.ts
ADDED
package/dist/dirs.mjs
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { resolve } from 'node:path';
|
|
2
|
+
import { fileURLToPath } from 'node:url';
|
|
3
|
+
import isInstalledGlobally from 'is-installed-globally';
|
|
4
|
+
|
|
5
|
+
const packageDir = resolve(fileURLToPath(import.meta.url), "../..");
|
|
6
|
+
const distDir = resolve(fileURLToPath(import.meta.url), "..");
|
|
7
|
+
const runtimeDir = resolve(distDir, "runtime");
|
|
8
|
+
const clientDir = resolve(distDir, "client");
|
|
9
|
+
const globalInstallMatch = [
|
|
10
|
+
"/yarn/global/",
|
|
11
|
+
"/pnpm/global/",
|
|
12
|
+
"/npm/global/",
|
|
13
|
+
"/.nvm/",
|
|
14
|
+
"/.volta/",
|
|
15
|
+
"/.fnm/",
|
|
16
|
+
// On Windows
|
|
17
|
+
"/nvm/versions/",
|
|
18
|
+
"/n/versions/"
|
|
19
|
+
// TODO: More info for other package managers
|
|
20
|
+
];
|
|
21
|
+
function isGlobalInstall() {
|
|
22
|
+
if (isInstalledGlobally === true || isInstalledGlobally.default === true)
|
|
23
|
+
return true;
|
|
24
|
+
const dir = packageDir.replace(/\\/g, "/");
|
|
25
|
+
return globalInstallMatch.some((i) => dir.includes(i));
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export { clientDir, distDir, isGlobalInstall, packageDir, runtimeDir };
|
package/dist/module.cjs
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
|
+
import './shared/devtools-nightly.2a48a9e5.mjs';
|
|
3
|
+
import { ModuleOptions } from '@nuxt/devtools-kit/types';
|
|
4
|
+
export { ModuleOptions } from '@nuxt/devtools-kit/types';
|
|
5
|
+
import 'vite-plugin-vue-inspector';
|
|
6
|
+
|
|
7
|
+
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
8
|
+
|
|
9
|
+
export { _default as default };
|
package/dist/module.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
|
+
import './shared/devtools-nightly.2a48a9e5.js';
|
|
3
|
+
import { ModuleOptions } from '@nuxt/devtools-kit/types';
|
|
4
|
+
export { ModuleOptions } from '@nuxt/devtools-kit/types';
|
|
5
|
+
import 'vite-plugin-vue-inspector';
|
|
6
|
+
|
|
7
|
+
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
8
|
+
|
|
9
|
+
export { _default as default };
|
package/dist/module.json
ADDED
package/dist/module.mjs
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
<head>
|
|
2
|
+
<title>Nuxt DevTools Authorization</title>
|
|
3
|
+
</head>
|
|
4
|
+
|
|
5
|
+
<body>
|
|
6
|
+
<svg viewBox="0 0 566 154" fill="none" xmlns="http://www.w3.org/2000/svg" height="40px">
|
|
7
|
+
<path
|
|
8
|
+
d="M74.2283 119.873H123.414C124.977 119.874 126.511 119.475 127.864 118.717C129.217 117.959 130.341 116.869 131.121 115.557C131.902 114.244 132.313 112.755 132.312 111.24C132.312 109.725 131.899 108.236 131.118 106.924L98.0856 51.4278C97.3048 50.1156 96.1817 49.0259 94.829 48.2683C93.4764 47.5107 91.942 47.1118 90.38 47.1118C88.8181 47.1118 87.2836 47.5107 85.931 48.2683C84.5784 49.0259 83.4552 50.1156 82.6745 51.4278L74.2283 65.6274L57.7148 37.8605C56.9334 36.5484 55.8097 35.4589 54.4567 34.7014C53.1037 33.9439 51.569 33.5451 50.0068 33.5451C48.4446 33.5451 46.9099 33.9439 45.5569 34.7014C44.2039 35.4589 43.0803 36.5484 42.2989 37.8605L1.1947 106.924C0.41273 108.236 0.000680577 109.725 8.42355e-07 111.24C-0.000678893 112.755 0.410035 114.244 1.19083 115.557C1.97163 116.869 3.09498 117.959 4.44789 118.717C5.80081 119.475 7.33558 119.874 8.89785 119.873H39.7727C52.0057 119.873 61.0271 114.661 67.2346 104.493L82.3054 79.1761L90.3776 65.6274L114.604 106.325H82.3054L74.2283 119.873ZM39.2694 106.311L17.7227 106.306L50.0212 52.0462L66.1369 79.1761L55.3468 97.3092C51.2244 103.907 46.5411 106.311 39.2694 106.311Z"
|
|
9
|
+
fill="#00DC82"
|
|
10
|
+
/>
|
|
11
|
+
<path
|
|
12
|
+
d="M152.571 118V46.1333H176.8C183.576 46.1333 189.77 47.468 195.383 50.1373C200.995 52.8067 205.478 56.8449 208.832 62.252C212.186 67.5907 213.863 74.1956 213.863 82.0667C213.863 89.8693 212.186 96.4742 208.832 101.881C205.478 107.288 200.995 111.327 195.383 113.996C189.77 116.665 183.576 118 176.8 118H152.571ZM175.157 104.653C181.796 104.653 187.306 102.874 191.687 99.3147C196.067 95.6871 198.257 89.9378 198.257 82.0667C198.257 74.1956 196.067 68.4462 191.687 64.8187C187.306 61.1911 181.796 59.3773 175.157 59.3773H167.971V104.653H175.157ZM270.18 100.444C269.153 105.988 266.381 110.437 261.864 113.791C257.347 117.144 251.905 118.821 245.54 118.821C239.928 118.821 235.102 117.555 231.064 115.023C227.094 112.422 224.083 109.068 222.029 104.961C219.976 100.855 218.949 96.5427 218.949 92.0253C218.949 87.4396 219.873 83.1276 221.721 79.0893C223.638 75.0511 226.513 71.7658 230.345 69.2333C234.247 66.7009 238.969 65.4347 244.513 65.4347C250.263 65.4347 255.054 66.6667 258.887 69.1307C262.72 71.5947 265.526 74.7431 267.305 78.576C269.153 82.4089 270.077 86.4471 270.077 90.6907C270.077 92.2649 270.009 93.8049 269.872 95.3107H232.707C233.254 99.0067 234.623 101.916 236.813 104.037C239.072 106.091 241.981 107.117 245.54 107.117C248.415 107.117 250.776 106.57 252.624 105.475C254.472 104.311 255.67 102.634 256.217 100.444H270.18ZM244.513 75.9067C241.228 75.9067 238.627 76.7622 236.711 78.4733C234.794 80.116 233.528 82.7169 232.912 86.276H255.807C255.601 83.2644 254.506 80.8004 252.521 78.884C250.537 76.8991 247.867 75.9067 244.513 75.9067ZM302.77 118H289.629L270.738 66.256H285.317L296.2 99.7253L306.98 66.256H321.661L302.77 118ZM359.731 118H344.331V59.3773H323.079V46.1333H380.983V59.3773H359.731V118ZM402.364 118.821C397.163 118.821 392.474 117.692 388.299 115.433C384.124 113.106 380.873 109.924 378.546 105.885C376.219 101.779 375.055 97.1929 375.055 92.128C375.055 87.0631 376.219 82.5116 378.546 78.4733C380.873 74.3667 384.124 71.184 388.299 68.9253C392.474 66.5982 397.163 65.4347 402.364 65.4347C407.566 65.4347 412.255 66.5982 416.43 68.9253C420.605 71.184 423.856 74.3667 426.183 78.4733C428.51 82.5116 429.674 87.0631 429.674 92.128C429.674 97.1929 428.51 101.779 426.183 105.885C423.856 109.924 420.605 113.106 416.43 115.433C412.255 117.692 407.566 118.821 402.364 118.821ZM402.364 106.501C406.197 106.501 409.311 105.167 411.707 102.497C414.103 99.828 415.3 96.3716 415.3 92.128C415.3 87.816 414.103 84.3253 411.707 81.656C409.311 78.9867 406.197 77.652 402.364 77.652C398.531 77.652 395.417 78.9867 393.022 81.656C390.626 84.3253 389.428 87.816 389.428 92.128C389.428 96.3716 390.626 99.828 393.022 102.497C395.417 105.167 398.531 106.501 402.364 106.501ZM462.12 118.821C456.918 118.821 452.229 117.692 448.054 115.433C443.879 113.106 440.628 109.924 438.301 105.885C435.974 101.779 434.81 97.1929 434.81 92.128C434.81 87.0631 435.974 82.5116 438.301 78.4733C440.628 74.3667 443.879 71.184 448.054 68.9253C452.229 66.5982 456.918 65.4347 462.12 65.4347C467.321 65.4347 472.01 66.5982 476.185 68.9253C480.36 71.184 483.611 74.3667 485.938 78.4733C488.265 82.5116 489.429 87.0631 489.429 92.128C489.429 97.1929 488.265 101.779 485.938 105.885C483.611 109.924 480.36 113.106 476.185 115.433C472.01 117.692 467.321 118.821 462.12 118.821ZM462.12 106.501C465.952 106.501 469.067 105.167 471.462 102.497C473.858 99.828 475.056 96.3716 475.056 92.128C475.056 87.816 473.858 84.3253 471.462 81.656C469.067 78.9867 465.952 77.652 462.12 77.652C458.287 77.652 455.172 78.9867 452.777 81.656C450.381 84.3253 449.184 87.816 449.184 92.128C449.184 96.3716 450.381 99.828 452.777 102.497C455.172 105.167 458.287 106.501 462.12 106.501ZM512.327 118H498.056V43.772H512.327V118ZM542.494 118.821C536.129 118.821 530.961 117.179 526.991 113.893C523.09 110.54 521.002 106.091 520.729 100.547H533.049C533.322 102.874 534.281 104.722 535.923 106.091C537.634 107.391 539.825 108.041 542.494 108.041C544.684 108.041 546.464 107.562 547.833 106.604C549.27 105.646 549.989 104.448 549.989 103.011C549.989 101.094 549.167 99.7596 547.525 99.0067C545.882 98.2538 543.281 97.5693 539.722 96.9533C536.026 96.2689 533.014 95.516 530.687 94.6947C528.36 93.8733 526.341 92.4018 524.63 90.28C522.987 88.0898 522.166 85.0098 522.166 81.04C522.166 78.0284 522.953 75.3591 524.527 73.032C526.17 70.6364 528.394 68.7884 531.201 67.488C534.007 66.1191 537.155 65.4347 540.646 65.4347C546.874 65.4347 551.905 66.9747 555.738 70.0547C559.639 73.1347 561.727 77.2071 562.001 82.272H549.578C549.304 80.1502 548.312 78.5076 546.601 77.344C544.958 76.112 543.11 75.496 541.057 75.496C539.003 75.496 537.361 75.9409 536.129 76.8307C534.897 77.7204 534.281 78.9524 534.281 80.5267C534.281 82.4431 535.068 83.7436 536.642 84.428C538.285 85.044 540.851 85.5916 544.342 86.0707C548.106 86.6182 551.186 87.3027 553.582 88.124C556.046 88.8769 558.168 90.3827 559.947 92.6413C561.727 94.9 562.617 98.1853 562.617 102.497C562.617 107.425 560.769 111.395 557.073 114.407C553.445 117.35 548.585 118.821 542.494 118.821Z"
|
|
13
|
+
fill="currentColor"
|
|
14
|
+
/>
|
|
15
|
+
</svg>
|
|
16
|
+
<div id="message">Verifying...</div>
|
|
17
|
+
</body>
|
|
18
|
+
|
|
19
|
+
<style>
|
|
20
|
+
html {
|
|
21
|
+
background: white;
|
|
22
|
+
font-family: sans-serif;
|
|
23
|
+
padding: 1rem;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
body {
|
|
27
|
+
height: 100vh;
|
|
28
|
+
display: flex;
|
|
29
|
+
flex-direction: column;
|
|
30
|
+
justify-content: center;
|
|
31
|
+
align-items: center;
|
|
32
|
+
gap: 0.5rem;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
#message {
|
|
36
|
+
font-size: 1.2rem;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@media (prefers-color-scheme: dark) {
|
|
40
|
+
html {
|
|
41
|
+
background: black;
|
|
42
|
+
color: white;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
</style>
|
|
46
|
+
|
|
47
|
+
<script>
|
|
48
|
+
const query = new URLSearchParams(location.search)
|
|
49
|
+
const token = query.get('token')
|
|
50
|
+
const el = document.getElementById('message')
|
|
51
|
+
|
|
52
|
+
if (!token) {
|
|
53
|
+
el.innerHTML = '⚠️ No token found, please double check your URL.'
|
|
54
|
+
el.style.color = '#df513f'
|
|
55
|
+
} else {
|
|
56
|
+
fetch(`${location.pathname.split(/\//g).slice(0, -1).join('/')}/auth-verify?token=${token}`)
|
|
57
|
+
.then(async (r) => {
|
|
58
|
+
if (r.status !== 200) throw new Error(await r.text())
|
|
59
|
+
|
|
60
|
+
localStorage.setItem('__nuxt_dev_token__', token)
|
|
61
|
+
|
|
62
|
+
const bc = new BroadcastChannel('__nuxt_dev_token__')
|
|
63
|
+
bc.postMessage({
|
|
64
|
+
event: 'new-token',
|
|
65
|
+
data: token,
|
|
66
|
+
})
|
|
67
|
+
|
|
68
|
+
el.innerHTML = '✅ Authorized! You can close this window now.'
|
|
69
|
+
window.close()
|
|
70
|
+
})
|
|
71
|
+
.catch((err) => {
|
|
72
|
+
el.innerHTML = `⚠️ Failed to authorize: ${err.message}`
|
|
73
|
+
el.style.color = '#df513f'
|
|
74
|
+
})
|
|
75
|
+
}
|
|
76
|
+
</script>
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { parse as parseStrackTrace } from "error-stack-parser-es";
|
|
2
|
+
import { markRaw, reactive } from "vue";
|
|
3
|
+
import { useObjectStorage } from "./plugins/view/utils.js";
|
|
4
|
+
const nonLiteralSymbol = Symbol("nuxt-devtools-fn-metrics-non-literal");
|
|
5
|
+
function getStacktrace() {
|
|
6
|
+
return parseStrackTrace(new Error());
|
|
7
|
+
}
|
|
8
|
+
export function initTimelineMetrics() {
|
|
9
|
+
if (import.meta.server)
|
|
10
|
+
return void 0;
|
|
11
|
+
if (window.__NUXT_DEVTOOLS_TIMELINE_METRICS__)
|
|
12
|
+
return window.__NUXT_DEVTOOLS_TIMELINE_METRICS__;
|
|
13
|
+
Object.defineProperty(window, "__NUXT_DEVTOOLS_TIMELINE_METRICS__", {
|
|
14
|
+
value: reactive(
|
|
15
|
+
window.__NUXT_DEVTOOLS_TIMELINE_METRICS__ || {
|
|
16
|
+
events: [],
|
|
17
|
+
nonLiteralSymbol,
|
|
18
|
+
// TODO: sync with server config
|
|
19
|
+
options: useObjectStorage("nuxt-devtools-timeline-metrics-options", {
|
|
20
|
+
enabled: false,
|
|
21
|
+
stacktrace: true,
|
|
22
|
+
arguments: true
|
|
23
|
+
})
|
|
24
|
+
}
|
|
25
|
+
),
|
|
26
|
+
enumerable: false,
|
|
27
|
+
configurable: true
|
|
28
|
+
});
|
|
29
|
+
return window.__NUXT_DEVTOOLS_TIMELINE_METRICS__;
|
|
30
|
+
}
|
|
31
|
+
const wrapperFunctions = /* @__PURE__ */ new WeakMap();
|
|
32
|
+
export function __nuxtTimelineWrap(name, fn) {
|
|
33
|
+
if (import.meta.server)
|
|
34
|
+
return fn;
|
|
35
|
+
if (typeof fn !== "function")
|
|
36
|
+
return fn;
|
|
37
|
+
const metrics = initTimelineMetrics();
|
|
38
|
+
if (wrapperFunctions.has(fn))
|
|
39
|
+
return wrapperFunctions.get(fn);
|
|
40
|
+
const wrappred = function(...args) {
|
|
41
|
+
if (!metrics.options.enabled)
|
|
42
|
+
return fn.apply(this, args);
|
|
43
|
+
const event = {
|
|
44
|
+
type: "function",
|
|
45
|
+
name,
|
|
46
|
+
start: Date.now(),
|
|
47
|
+
args: metrics.options.arguments ? markRaw(args) : void 0,
|
|
48
|
+
stacktrace: metrics.options.stacktrace ? getStacktrace().slice(2) : void 0
|
|
49
|
+
};
|
|
50
|
+
metrics.events.push(event);
|
|
51
|
+
const result = fn.apply(this, args);
|
|
52
|
+
try {
|
|
53
|
+
if (result && typeof result.then === "function") {
|
|
54
|
+
event.isPromise = true;
|
|
55
|
+
result.then((i) => i).finally(() => {
|
|
56
|
+
event.end = Date.now();
|
|
57
|
+
return result;
|
|
58
|
+
});
|
|
59
|
+
return result;
|
|
60
|
+
}
|
|
61
|
+
} catch {
|
|
62
|
+
}
|
|
63
|
+
event.end = Date.now();
|
|
64
|
+
return result;
|
|
65
|
+
};
|
|
66
|
+
Object.defineProperty(wrappred, "length", { value: fn.name || name });
|
|
67
|
+
wrapperFunctions.set(fn, wrappred);
|
|
68
|
+
return wrappred;
|
|
69
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { defineNuxtPlugin, useRouter, useState } from "#imports";
|
|
2
|
+
import { shallowReactive, watchEffect } from "vue";
|
|
3
|
+
import { setupHooksDebug } from "../shared/hooks.js";
|
|
4
|
+
export default defineNuxtPlugin((nuxt) => {
|
|
5
|
+
if (typeof document === "undefined" || typeof window === "undefined")
|
|
6
|
+
return;
|
|
7
|
+
try {
|
|
8
|
+
if (window.__NUXT_DEVTOOLS_DISABLE__ || window.parent?.__NUXT_DEVTOOLS_DISABLE__)
|
|
9
|
+
return;
|
|
10
|
+
if (parent && window.self !== parent) {
|
|
11
|
+
if (parent.__NUXT_DEVTOOLS_VIEW__ || parent.document.querySelector("#nuxt-devtools-container"))
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
} catch (e) {
|
|
15
|
+
console.error("Nuxt DevTools: Failed to check parent window");
|
|
16
|
+
console.error(e);
|
|
17
|
+
}
|
|
18
|
+
const timeMetric = shallowReactive(window.__NUXT_DEVTOOLS_TIME_METRIC__ || {});
|
|
19
|
+
Object.defineProperty(window, "__NUXT_DEVTOOLS_TIME_METRIC__", {
|
|
20
|
+
value: timeMetric,
|
|
21
|
+
enumerable: false,
|
|
22
|
+
configurable: true
|
|
23
|
+
});
|
|
24
|
+
timeMetric.pluginInit = Date.now();
|
|
25
|
+
const clientHooks = setupHooksDebug(nuxt.hooks);
|
|
26
|
+
const router = useRouter();
|
|
27
|
+
nuxt.hook("app:mounted", () => {
|
|
28
|
+
timeMetric.appLoad = Date.now();
|
|
29
|
+
});
|
|
30
|
+
router.beforeEach(() => {
|
|
31
|
+
timeMetric.pageStart = Date.now();
|
|
32
|
+
});
|
|
33
|
+
nuxt.hook("page:finish", () => {
|
|
34
|
+
timeMetric.pageEnd = Date.now();
|
|
35
|
+
});
|
|
36
|
+
const ssrState = useState("__nuxt_devtools__", () => ({}));
|
|
37
|
+
watchEffect(() => {
|
|
38
|
+
if (ssrState.value.timeSsrStart)
|
|
39
|
+
timeMetric.ssrStart = ssrState.value.timeSsrStart;
|
|
40
|
+
});
|
|
41
|
+
import("./view/client.js").then(async ({ setupDevToolsClient }) => {
|
|
42
|
+
await setupDevToolsClient({
|
|
43
|
+
nuxt,
|
|
44
|
+
clientHooks,
|
|
45
|
+
timeMetric,
|
|
46
|
+
router
|
|
47
|
+
});
|
|
48
|
+
const isMac = typeof navigator !== "undefined" && navigator.platform.toLowerCase().includes("mac");
|
|
49
|
+
console.log(
|
|
50
|
+
`\u2728 %cNuxt DevTools %c Press Shift + ${isMac ? "Option" : "Alt"} + D to open DevTools`,
|
|
51
|
+
"color: black; border-radius: 3px 0 0 3px; padding: 2px 2px 1px 10px; background: #00DC82",
|
|
52
|
+
"border-radius: 0 3px 3px 0; padding: 2px 10px 1px 2px; background: #00DC8220",
|
|
53
|
+
""
|
|
54
|
+
);
|
|
55
|
+
});
|
|
56
|
+
});
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { NuxtDevtoolsHostClient } from '@nuxt/devtools/types'
|
|
3
|
+
import { ref, watchEffect } from 'vue'
|
|
4
|
+
import { PANEL_MAX, PANEL_MIN, popupWindow, state } from './state'
|
|
5
|
+
import { useEventListener } from './utils'
|
|
6
|
+
|
|
7
|
+
const props = defineProps<{
|
|
8
|
+
client: NuxtDevtoolsHostClient
|
|
9
|
+
isDragging: boolean
|
|
10
|
+
}>()
|
|
11
|
+
|
|
12
|
+
const container = ref<HTMLElement>()
|
|
13
|
+
const isResizing = ref<false | { top?: boolean, left?: boolean, right?: boolean, bottom?: boolean }>(false)
|
|
14
|
+
|
|
15
|
+
watchEffect(() => {
|
|
16
|
+
if (!container.value)
|
|
17
|
+
return
|
|
18
|
+
|
|
19
|
+
if (state.value.open) {
|
|
20
|
+
const iframe = props.client.getIframe()
|
|
21
|
+
if (!iframe)
|
|
22
|
+
return
|
|
23
|
+
|
|
24
|
+
iframe.style.pointerEvents = (isResizing.value || props.isDragging || props.client.inspector?.isEnabled.value)
|
|
25
|
+
? 'none'
|
|
26
|
+
: 'auto'
|
|
27
|
+
|
|
28
|
+
if (!popupWindow.value) {
|
|
29
|
+
if (Array.from(container.value.children).every(el => el !== iframe))
|
|
30
|
+
container.value.appendChild(iframe)
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
useEventListener(window, 'keydown', (e: KeyboardEvent) => {
|
|
36
|
+
if (e.key === 'Escape' && props.client.inspector?.isEnabled.value) {
|
|
37
|
+
e.preventDefault()
|
|
38
|
+
props.client.inspector?.disable()
|
|
39
|
+
props.client.devtools.close()
|
|
40
|
+
}
|
|
41
|
+
})
|
|
42
|
+
|
|
43
|
+
// Close panel on outside click (when enabled)
|
|
44
|
+
useEventListener(window, 'mousedown', (e: MouseEvent) => {
|
|
45
|
+
if (!state.value.closeOnOutsideClick)
|
|
46
|
+
return
|
|
47
|
+
if (popupWindow.value)
|
|
48
|
+
return
|
|
49
|
+
if (!state.value.open || isResizing.value || props.client.inspector?.isEnabled.value)
|
|
50
|
+
return
|
|
51
|
+
|
|
52
|
+
const matched = e.composedPath().find((_el) => {
|
|
53
|
+
const el = _el as HTMLElement
|
|
54
|
+
return Array.from(el.classList || []).some(c => c.startsWith('nuxt-devtools-'))
|
|
55
|
+
|| el.tagName?.toLowerCase() === 'iframe'
|
|
56
|
+
})
|
|
57
|
+
|
|
58
|
+
if (!matched)
|
|
59
|
+
state.value.open = false
|
|
60
|
+
})
|
|
61
|
+
|
|
62
|
+
function handleResize(e: MouseEvent | TouchEvent) {
|
|
63
|
+
if (!isResizing.value || !state.value.open)
|
|
64
|
+
return
|
|
65
|
+
|
|
66
|
+
const iframe = props.client.getIframe()
|
|
67
|
+
if (!iframe)
|
|
68
|
+
return
|
|
69
|
+
|
|
70
|
+
const box = iframe.getBoundingClientRect()
|
|
71
|
+
|
|
72
|
+
let widthPx: number, heightPx: number
|
|
73
|
+
if (isResizing.value.right) {
|
|
74
|
+
widthPx = Math.abs(e instanceof MouseEvent ? e.clientX : (e.touches[0]?.clientX || 0) - (box?.left || 0))
|
|
75
|
+
state.value.width = Math.min(PANEL_MAX, Math.max(PANEL_MIN, widthPx / window.innerWidth * 100))
|
|
76
|
+
}
|
|
77
|
+
else if (isResizing.value.left) {
|
|
78
|
+
widthPx = Math.abs((box?.right || 0) - (e instanceof MouseEvent ? e.clientX : (e.touches[0]?.clientX || 0)))
|
|
79
|
+
state.value.width = Math.min(PANEL_MAX, Math.max(PANEL_MIN, widthPx / window.innerWidth * 100))
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if (isResizing.value.top) {
|
|
83
|
+
heightPx = Math.abs((box?.bottom || 0) - (e instanceof MouseEvent ? e.clientY : (e.touches[0]?.clientY || 0)))
|
|
84
|
+
state.value.height = Math.min(PANEL_MAX, Math.max(PANEL_MIN, heightPx / window.innerHeight * 100))
|
|
85
|
+
}
|
|
86
|
+
else if (isResizing.value.bottom) {
|
|
87
|
+
heightPx = Math.abs(e instanceof MouseEvent ? e.clientY : (e.touches[0]?.clientY || 0) - (box?.top || 0))
|
|
88
|
+
state.value.height = Math.min(PANEL_MAX, Math.max(PANEL_MIN, heightPx / window.innerHeight * 100))
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
useEventListener(window, 'mousemove', handleResize)
|
|
93
|
+
useEventListener(window, 'touchmove', handleResize)
|
|
94
|
+
useEventListener(window, 'mouseup', () => isResizing.value = false)
|
|
95
|
+
useEventListener(window, 'touchend', () => isResizing.value = false)
|
|
96
|
+
useEventListener(window, 'mouseleave', () => isResizing.value = false)
|
|
97
|
+
</script>
|
|
98
|
+
|
|
99
|
+
<template>
|
|
100
|
+
<div
|
|
101
|
+
v-show="state.open && !client.inspector?.isEnabled.value && !popupWindow"
|
|
102
|
+
ref="container"
|
|
103
|
+
class="nuxt-devtools-frame"
|
|
104
|
+
>
|
|
105
|
+
<!-- Handlers -->
|
|
106
|
+
<div
|
|
107
|
+
v-show="state.position !== 'top'"
|
|
108
|
+
class="nuxt-devtools-resize-handle nuxt-devtools-resize-handle-horizontal"
|
|
109
|
+
:style="{ top: 0 }"
|
|
110
|
+
@mousedown.prevent="isResizing = { top: true }"
|
|
111
|
+
@touchstart.passive="() => isResizing = { top: true }"
|
|
112
|
+
/>
|
|
113
|
+
<div
|
|
114
|
+
v-show="state.position !== 'bottom'"
|
|
115
|
+
class="nuxt-devtools-resize-handle nuxt-devtools-resize-handle-horizontal"
|
|
116
|
+
:style="{ bottom: 0 }"
|
|
117
|
+
@mousedown.prevent="() => isResizing = { bottom: true }"
|
|
118
|
+
@touchstart.passive="() => isResizing = { bottom: true }"
|
|
119
|
+
/>
|
|
120
|
+
<div
|
|
121
|
+
v-show="state.position !== 'left'"
|
|
122
|
+
class="nuxt-devtools-resize-handle nuxt-devtools-resize-handle-vertical"
|
|
123
|
+
:style="{ left: 0 }"
|
|
124
|
+
@mousedown.prevent="() => isResizing = { left: true }"
|
|
125
|
+
@touchstart.passive="() => isResizing = { left: true }"
|
|
126
|
+
/>
|
|
127
|
+
<div
|
|
128
|
+
v-show="state.position !== 'right'"
|
|
129
|
+
class="nuxt-devtools-resize-handle nuxt-devtools-resize-handle-vertical"
|
|
130
|
+
:style="{ right: 0 }"
|
|
131
|
+
@mousedown.prevent="() => isResizing = { right: true }"
|
|
132
|
+
@touchstart.passive="() => isResizing = { right: true }"
|
|
133
|
+
/>
|
|
134
|
+
<div
|
|
135
|
+
v-show="state.position !== 'top' && state.position !== 'left'"
|
|
136
|
+
class="nuxt-devtools-resize-handle nuxt-devtools-resize-handle-corner"
|
|
137
|
+
:style="{ top: 0, left: 0, cursor: 'nwse-resize' }"
|
|
138
|
+
@mousedown.prevent="() => isResizing = { top: true, left: true }"
|
|
139
|
+
@touchstart.passive="() => isResizing = { top: true, left: true }"
|
|
140
|
+
/>
|
|
141
|
+
<div
|
|
142
|
+
v-show="state.position !== 'top' && state.position !== 'right'"
|
|
143
|
+
class="nuxt-devtools-resize-handle nuxt-devtools-resize-handle-corner"
|
|
144
|
+
:style="{ top: 0, right: 0, cursor: 'nesw-resize' }"
|
|
145
|
+
@mousedown.prevent="() => isResizing = { top: true, right: true }"
|
|
146
|
+
@touchstart.passive="() => isResizing = { top: true, right: true }"
|
|
147
|
+
/>
|
|
148
|
+
<div
|
|
149
|
+
v-show="state.position !== 'bottom' && state.position !== 'left'"
|
|
150
|
+
class="nuxt-devtools-resize-handle nuxt-devtools-resize-handle-corner"
|
|
151
|
+
:style="{ bottom: 0, left: 0, cursor: 'nesw-resize' }"
|
|
152
|
+
@mousedown.prevent="() => isResizing = { bottom: true, left: true }"
|
|
153
|
+
@touchstart.passive="() => isResizing = { bottom: true, left: true }"
|
|
154
|
+
/>
|
|
155
|
+
<div
|
|
156
|
+
v-show="state.position !== 'bottom' && state.position !== 'right'"
|
|
157
|
+
class="nuxt-devtools-resize-handle nuxt-devtools-resize-handle-corner"
|
|
158
|
+
:style="{ bottom: 0, right: 0, cursor: 'nwse-resize' }"
|
|
159
|
+
@mousedown.prevent="() => isResizing = { bottom: true, right: true }"
|
|
160
|
+
@touchstart.passive="() => isResizing = { bottom: true, right: true }"
|
|
161
|
+
/>
|
|
162
|
+
</div>
|
|
163
|
+
</template>
|
|
164
|
+
|
|
165
|
+
<style scoped>
|
|
166
|
+
.nuxt-devtools-frame{height:100%;position:fixed;width:100%;z-index:2147483645;-webkit-font-smoothing:antialiased}.nuxt-devtools-frame :deep(iframe){background:var(--nuxt-devtools-widget-bg);border:1px solid hsla(0,0%,49%,.2);border-radius:10px;height:100%;outline:none;width:100%}.nuxt-devtools-resize-handle-horizontal{border-radius:5px;cursor:ns-resize;height:10px;left:6px;margin:-5px 0;position:absolute;right:6px}.nuxt-devtools-resize-handle-vertical{border-radius:5px;bottom:0;cursor:ew-resize;margin:0 -5px;position:absolute;top:6px;width:10px}.nuxt-devtools-resize-handle-corner{border-radius:6px;height:14px;margin:-6px;position:absolute;width:14px}.nuxt-devtools-resize-handle:hover{background:hsla(0,0%,49%,.1)}
|
|
167
|
+
</style>
|