@nuxt/devtools-nightly 2.4.0-29119087.161e847 → 2.5.0-beta.1-29150232.af7da96

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/dist/chunks/module-main.mjs +16 -54
  2. package/dist/chunks/vscode.mjs +1 -1
  3. package/dist/client/200.html +23 -23
  4. package/dist/client/404.html +23 -23
  5. package/dist/client/_nuxt/__blank-mumgdw29.js +1 -0
  6. package/dist/client/_nuxt/analyze-build-j0wfoyxs.js +1 -0
  7. package/dist/client/_nuxt/assets-f2bunux0.js +16 -0
  8. package/dist/client/_nuxt/builds/latest.json +1 -1
  9. package/dist/client/_nuxt/builds/meta/2c25b256-29c6-425a-bf76-621027b877a5.json +1 -0
  10. package/dist/client/_nuxt/{client-jvnhv8ra.js → client-jlcyzfwz.js} +1 -1
  11. package/dist/client/_nuxt/code-diff.vue-hj7e3t5c.js +8 -0
  12. package/dist/client/_nuxt/code-snippets.vue-jjmq0acf.js +1 -0
  13. package/dist/client/_nuxt/components-c6gzzmvo.js +1 -0
  14. package/dist/client/_nuxt/composable-item.vue-kl41e968.js +1 -0
  15. package/dist/client/_nuxt/{custom-_name_-ofn5ocun.js → custom-_name_-kwo3vonv.js} +1 -1
  16. package/dist/client/_nuxt/data-schema-button.vue-jmetjfac.js +1 -0
  17. package/dist/client/_nuxt/{data-schema-drawer-jzbg0sti.js → data-schema-drawer-l6mz652d.js} +2 -2
  18. package/dist/client/_nuxt/debug-fgttm1no.js +1 -0
  19. package/dist/client/_nuxt/{default-cqdp29y7.js → default-dhaai45p.js} +1 -1
  20. package/dist/client/_nuxt/{duration-display.vue-hy8s2ai6.js → duration-display.vue-l7hutejt.js} +1 -1
  21. package/dist/client/_nuxt/entry.css-gmgc8zz6.css +1 -0
  22. package/dist/client/_nuxt/{error-404-d24rglqw.js → error-404-nf9bohnx.js} +1 -1
  23. package/dist/client/_nuxt/error-404.css-elh6uwdu.css +1 -0
  24. package/dist/client/_nuxt/{error-500-f8x6klpm.js → error-500-fresoenl.js} +1 -1
  25. package/dist/client/_nuxt/error-500.css-bxkdntg7.css +1 -0
  26. package/dist/client/_nuxt/{error-gqxqb2bl.js → error-exr6hsif.js} +5 -5
  27. package/dist/client/_nuxt/{filepath-item.vue-es4nd5ah.js → filepath-item.vue-e3e8lc21.js} +1 -1
  28. package/dist/client/_nuxt/fjteu286.js +15 -0
  29. package/dist/client/_nuxt/full-j15nryr5.js +1 -0
  30. package/dist/client/_nuxt/{help-fab.vue-np1qjy19.js → help-fab.vue-bs6lnv4o.js} +1 -1
  31. package/dist/client/_nuxt/hooks-fn6cgaow.js +1 -0
  32. package/dist/client/_nuxt/{imports-dxtru5qm.js → imports-d8g6axx0.js} +1 -1
  33. package/dist/client/_nuxt/index-md0rh7cv.js +1 -0
  34. package/dist/client/_nuxt/launch-page.vue-km22gdvy.js +1 -0
  35. package/dist/client/_nuxt/modules-f5pax97e.js +1 -0
  36. package/dist/client/_nuxt/nbadge-hqyt05iy.js +1 -0
  37. package/dist/client/_nuxt/ncheckbox.vue-gj0kx6a4.js +1 -0
  38. package/dist/client/_nuxt/{ncode-block.vue-8qivpy1q.js → ncode-block.vue-lge6rogf.js} +1 -1
  39. package/dist/client/_nuxt/{ndrawer.vue-inh3ku0x.js → ndrawer.vue-ddajx96d.js} +1 -1
  40. package/dist/client/_nuxt/ndropdown.vue-f7ef4m62.js +1 -0
  41. package/dist/client/_nuxt/nicon-title.vue-d27ih16g.js +1 -0
  42. package/dist/client/_nuxt/{nlink.vue-m5q8gcph.js → nlink.vue-k2cnmdqj.js} +1 -1
  43. package/dist/client/_nuxt/nmarkdown.vue-isat7p33.js +1 -0
  44. package/dist/client/_nuxt/{nnavbar.vue-yxq5vgdd.js → nnavbar.vue-cntb7jtz.js} +1 -1
  45. package/dist/client/_nuxt/none-eh8hc9e6.js +1 -0
  46. package/dist/client/_nuxt/nsection-block-ngi8459h.js +1 -0
  47. package/dist/client/_nuxt/nselect-tabs.vue-hs2i1hpf.js +1 -0
  48. package/dist/client/_nuxt/{nselect.vue-oss0jirl.js → nselect.vue-nlnlb2ys.js} +1 -1
  49. package/dist/client/_nuxt/{nswitch.vue-n63sh5rf.js → nswitch.vue-f07mzo8x.js} +1 -1
  50. package/dist/client/_nuxt/open-graph-b3edvyuu.js +3 -0
  51. package/dist/client/_nuxt/overview-knttopqz.js +1 -0
  52. package/dist/client/_nuxt/pages-l14g5nzp.js +1 -0
  53. package/dist/client/_nuxt/payload-kgp1vtk1.js +1 -0
  54. package/dist/client/_nuxt/pinia-i4vpuxo0.js +1 -0
  55. package/dist/client/_nuxt/plugins-ei8a4gwh.js +1 -0
  56. package/dist/client/_nuxt/render-tree-jaw4w13c.js +1 -0
  57. package/dist/client/_nuxt/{runtime-configs-oh4k84k2.js → runtime-configs-h1uncakq.js} +1 -1
  58. package/dist/client/_nuxt/{server-discovery-jaawdsj9.js → server-discovery-i4b0arzv.js} +1 -1
  59. package/dist/client/_nuxt/{server-route-inputs.vue-fu0w0hjx.js → server-route-inputs.vue-n4w96mn8.js} +1 -1
  60. package/dist/client/_nuxt/{server-routes-orf48vz1.js → server-routes-ozf5e5sy.js} +2 -2
  61. package/dist/client/_nuxt/server-tasks-gnhguq20.js +1 -0
  62. package/dist/client/_nuxt/settings-kadfhy6q.js +1 -0
  63. package/dist/client/_nuxt/{stacktrace-list.vue-diakeg9o.js → stacktrace-list.vue-mh6wzuwj.js} +1 -1
  64. package/dist/client/_nuxt/{state-components-dw3sauyf.js → state-components-km9k1k2j.js} +1 -1
  65. package/dist/client/_nuxt/state-editor.vue-novkwx2d.js +1 -0
  66. package/dist/client/_nuxt/state-modules-ccot1z8v.js +1 -0
  67. package/dist/client/_nuxt/storage-kookwd8h.js +1 -0
  68. package/dist/client/_nuxt/terminals-opuzmx1u.js +1 -0
  69. package/dist/client/_nuxt/{timeline-bljopo1k.js → timeline-o22pyt14.js} +2 -2
  70. package/dist/client/_nuxt/{unocss-runtime-kct8zzpi.js → unocss-runtime-n76zvjc0.js} +1 -1
  71. package/dist/client/_nuxt/vendor/json-editor-vue-pb6xqf2y.js +3857 -0
  72. package/dist/client/_nuxt/vendor/{quicktype-core-d6crrn92.js → quicktype-core-lhaz4hgj.js} +57 -57
  73. package/dist/client/_nuxt/vendor/shiki-hjqm7vcp.js +152 -0
  74. package/dist/client/_nuxt/vendor/unocss-k776m6tm.js +2 -0
  75. package/dist/client/_nuxt/vendor/{vis-fth2qiu5.js → vis-gqe7ml2e.js} +2 -2
  76. package/dist/client/_nuxt/{virtual-files-nc41y6b5.js → virtual-files-kvzdkk80.js} +1 -1
  77. package/dist/client/_nuxt/vue-devtools-cjz7ko6t.js +2 -0
  78. package/dist/client/_nuxt/{vue-virtual-scroller.esm-iodr444e.js → vue-virtual-scroller.esm-nuoya9vo.js} +2 -2
  79. package/dist/client/index.html +23 -23
  80. package/dist/module.d.mts +1 -1
  81. package/dist/module.json +2 -2
  82. package/dist/module.mjs +1 -1
  83. package/dist/runtime/plugins/view/client.d.ts +2 -1
  84. package/dist/runtime/plugins/view/client.js +57 -28
  85. package/dist/runtime/plugins/view/state.d.ts +1 -3
  86. package/dist/runtime/plugins/view/state.js +0 -3
  87. package/dist/runtime/plugins/view/utils.d.ts +0 -28
  88. package/dist/runtime/plugins/view/utils.js +1 -125
  89. package/dist/runtime/shared/hooks.d.ts +1 -0
  90. package/dist/shared/{devtools-nightly.c069f83f.mjs → devtools-nightly.Dlu0WIXO.mjs} +1 -1
  91. package/dist/types.d.mts +1 -1
  92. package/dist/webcomponents/index.d.mts +20 -0
  93. package/dist/webcomponents/index.mjs +1543 -0
  94. package/package.json +46 -38
  95. package/types.d.ts +1 -1
  96. package/dist/client/_nuxt/__blank-catci4by.js +0 -1
  97. package/dist/client/_nuxt/analyze-build-opipk7q9.js +0 -1
  98. package/dist/client/_nuxt/assets-jv7irxil.js +0 -16
  99. package/dist/client/_nuxt/builds/meta/e9711a2d-ecdf-479b-94de-c1f2312a5b46.json +0 -1
  100. package/dist/client/_nuxt/code-diff.vue-h3z2bs0y.js +0 -8
  101. package/dist/client/_nuxt/code-snippets.vue-ozwaaqi4.js +0 -1
  102. package/dist/client/_nuxt/components-d8htfuj5.js +0 -1
  103. package/dist/client/_nuxt/composable-item.vue-o7shr77p.js +0 -1
  104. package/dist/client/_nuxt/data-schema-button.vue-bobjn36y.js +0 -1
  105. package/dist/client/_nuxt/debug-e73ob7jx.js +0 -1
  106. package/dist/client/_nuxt/entry.css-kd26hpr1.css +0 -1
  107. package/dist/client/_nuxt/error-404.css-itl1ee4a.css +0 -1
  108. package/dist/client/_nuxt/error-500.css-biq96mi6.css +0 -1
  109. package/dist/client/_nuxt/full-okfa2pgg.js +0 -1
  110. package/dist/client/_nuxt/hooks-epk49zwi.js +0 -1
  111. package/dist/client/_nuxt/index-g2ifuy9r.js +0 -1
  112. package/dist/client/_nuxt/k3zrtz5x.js +0 -15
  113. package/dist/client/_nuxt/launch-page.vue-myk75wop.js +0 -1
  114. package/dist/client/_nuxt/modules-inb11uuc.js +0 -1
  115. package/dist/client/_nuxt/nbadge-c7f9e02e.js +0 -1
  116. package/dist/client/_nuxt/ncheckbox.vue-owe6hu8z.js +0 -1
  117. package/dist/client/_nuxt/ndropdown.vue-i1smzpn0.js +0 -1
  118. package/dist/client/_nuxt/nicon-title.vue-m2ftlsrz.js +0 -1
  119. package/dist/client/_nuxt/nmarkdown.vue-hrdikzmp.js +0 -1
  120. package/dist/client/_nuxt/none-mblzlj9f.js +0 -1
  121. package/dist/client/_nuxt/nsection-block-jgcddzy2.js +0 -1
  122. package/dist/client/_nuxt/nselect-tabs.vue-m4lmg5qf.js +0 -1
  123. package/dist/client/_nuxt/open-graph-ku5utn4c.js +0 -3
  124. package/dist/client/_nuxt/overview-mv4ijnuv.js +0 -1
  125. package/dist/client/_nuxt/pages-mg7gm878.js +0 -1
  126. package/dist/client/_nuxt/payload-gv103ld5.js +0 -1
  127. package/dist/client/_nuxt/pinia-maypxdhg.js +0 -1
  128. package/dist/client/_nuxt/plugins-njalbz82.js +0 -1
  129. package/dist/client/_nuxt/render-tree-xz64vb7c.js +0 -1
  130. package/dist/client/_nuxt/server-tasks-nklqi5ly.js +0 -1
  131. package/dist/client/_nuxt/settings-hs7hhsy9.js +0 -1
  132. package/dist/client/_nuxt/state-editor.vue-gp2qshlr.js +0 -1
  133. package/dist/client/_nuxt/state-modules-f1v1j4h2.js +0 -1
  134. package/dist/client/_nuxt/storage-orafpl6t.js +0 -1
  135. package/dist/client/_nuxt/terminals-c4krx6y2.js +0 -1
  136. package/dist/client/_nuxt/vendor/json-editor-vue-exjsfanq.js +0 -3872
  137. package/dist/client/_nuxt/vendor/shiki-hjrnbayr.js +0 -289
  138. package/dist/client/_nuxt/vendor/unocss-n30bmhn8.js +0 -2
  139. package/dist/client/_nuxt/vue-devtools-cl1t0gip.js +0 -2
  140. package/dist/dirs.d.ts +0 -7
  141. package/dist/module.cjs +0 -5
  142. package/dist/module.d.ts +0 -8
  143. package/dist/runtime/plugins/view/FrameBox.vue +0 -167
  144. package/dist/runtime/plugins/view/Main.vue +0 -432
  145. package/dist/shared/devtools-nightly.427ec2e8.d.ts +0 -57
  146. package/dist/types.d.ts +0 -41
  147. /package/dist/shared/{devtools-nightly.427ec2e8.d.mts → devtools-nightly.C1a10l_c.d.mts} +0 -0
@@ -1,2 +1,2 @@
1
- import{z as Z,Z as re,$ as ne,a0 as oe,S as L,a1 as $,ay as le,s as ae,Y as ue,ag as ce,aa as de,P as M,R as W,a3 as fe,U as A,a2 as K,F as he,ae as me,ad as q,a4 as pe,az as ye,X as Y,V as ve}from"./vendor/json-editor-vue-exjsfanq.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(),Z(()=>{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 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 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),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,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: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{z as J,a0 as re,a1 as ne,a2 as oe,V as P,a3 as $,aA as le,s as ae,$ as ue,ai as ce,ac as de,J as M,U as W,a5 as fe,W as A,a4 as K,F as he,ag as me,af as q,a6 as pe,aB as ye,Z as X,X as ve}from"./vendor/json-editor-vue-pb6xqf2y.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(),J(()=>{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 Y(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(Y(a))),r=n,clearTimeout(s),s=setTimeout(function(){e.apply(void 0,[n].concat(Y(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),J(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(!Z(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 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 B(e){"@babel/helpers - typeof";return B=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},B(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&&B(this.items[0])!=="object"}var j=!1;if(typeof window<"u"){j=!1;try{var Be=Object.defineProperty({},"passive",{get:function(){j=!0}});window.addEventListener("test",null,Be)}catch{}}let je=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:je++,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,j?{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:X(["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:X(["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};
@@ -1,29 +1,29 @@
1
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-kd26hpr1.css" crossorigin>
3
+ <link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.css-gmgc8zz6.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/k3zrtz5x.js">
7
- <link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue-exjsfanq.js">
8
- <link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss-n30bmhn8.js">
9
- <link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/shiki-hjrnbayr.js">
6
+ <link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/fjteu286.js">
7
+ <link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue-pb6xqf2y.js">
8
+ <link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss-k776m6tm.js">
9
+ <link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/shiki-hjqm7vcp.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-cqdp29y7.js">
12
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/full-okfa2pgg.js">
13
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/none-mblzlj9f.js">
11
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/default-dhaai45p.js">
12
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/full-j15nryr5.js">
13
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/none-eh8hc9e6.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-jzbg0sti.js">
16
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nselect.vue-oss0jirl.js">
17
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nswitch.vue-n63sh5rf.js">
18
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndropdown.vue-i1smzpn0.js">
19
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ncode-block.vue-8qivpy1q.js">
20
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/client-jvnhv8ra.js">
21
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndrawer.vue-inh3ku0x.js">
22
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/quicktype-core-d6crrn92.js">
23
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/unocss-runtime-kct8zzpi.js">
24
- <link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404.css-itl1ee4a.css">
25
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404-d24rglqw.js">
26
- <link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500.css-biq96mi6.css">
27
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500-f8x6klpm.js">
28
- <script type="module" src="/__NUXT_DEVTOOLS_BASE__/_nuxt/k3zrtz5x.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},1747145265430,false]</script>
29
- <script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_BASE__/",buildId:"e9711a2d-ecdf-479b-94de-c1f2312a5b46",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
15
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/data-schema-drawer-l6mz652d.js">
16
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nselect.vue-nlnlb2ys.js">
17
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nswitch.vue-f07mzo8x.js">
18
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndropdown.vue-f7ef4m62.js">
19
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ncode-block.vue-lge6rogf.js">
20
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/client-jlcyzfwz.js">
21
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndrawer.vue-ddajx96d.js">
22
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/quicktype-core-lhaz4hgj.js">
23
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/unocss-runtime-n76zvjc0.js">
24
+ <link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404.css-elh6uwdu.css">
25
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404-nf9bohnx.js">
26
+ <link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500.css-bxkdntg7.css">
27
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500-fresoenl.js">
28
+ <script type="module" src="/__NUXT_DEVTOOLS_BASE__/_nuxt/fjteu286.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},1749013951914,false]</script>
29
+ <script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_BASE__/",buildId:"2c25b256-29c6-425a-bf76-621027b877a5",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
package/dist/module.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _nuxt_schema from '@nuxt/schema';
2
- import './shared/devtools-nightly.427ec2e8.mjs';
2
+ import './shared/devtools-nightly.C1a10l_c.mjs';
3
3
  import { ModuleOptions } from '@nuxt/devtools-kit/types';
4
4
  export { ModuleOptions } from '@nuxt/devtools-kit/types';
5
5
 
package/dist/module.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@nuxt/devtools",
3
3
  "configKey": "devtools",
4
- "version": "2.4.0-29119087.161e847",
4
+ "version": "2.5.0-beta.1-29150232.af7da96",
5
5
  "builder": {
6
- "@nuxt/module-builder": "0.8.4",
6
+ "@nuxt/module-builder": "1.0.1",
7
7
  "unbuild": "3.5.0"
8
8
  }
9
9
  }
package/dist/module.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import '@nuxt/kit';
2
- export { m as default } from './shared/devtools-nightly.c069f83f.mjs';
2
+ export { m as default } from './shared/devtools-nightly.Dlu0WIXO.mjs';
3
3
  import './dirs.mjs';
4
4
  import 'node:path';
5
5
  import 'node:url';
@@ -1,6 +1,7 @@
1
+ import type { NuxtDevtoolsHostClient } from '@nuxt/devtools/types';
1
2
  import type { Ref } from 'vue';
2
3
  import type { Router } from 'vue-router';
3
- declare const clientRef: import("vue").ShallowRef<any, any>;
4
+ declare const clientRef: import("vue").ShallowRef<NuxtDevtoolsHostClient | undefined, NuxtDevtoolsHostClient | undefined>;
4
5
  export { clientRef as client };
5
6
  export type ColorScheme = 'dark' | 'light';
6
7
  export declare function setupDevToolsClient({ nuxt, clientHooks, timeMetric, router, }: {
@@ -1,11 +1,12 @@
1
1
  import { useAppConfig, useRuntimeConfig } from "#imports";
2
+ import { NuxtDevtoolsFrame, NuxtDevtoolsInspectPanel } from "@nuxt/devtools/webcomponents";
2
3
  import { setIframeServerContext } from "@vue/devtools-kit";
3
4
  import { createHooks } from "hookable";
4
5
  import { debounce } from "perfect-debounce";
5
6
  import { events as inspectorEvents, hasData as inspectorHasData, state as inspectorState } from "vite-plugin-vue-tracer/client/overlay";
6
- import { computed, createApp, h, markRaw, ref, shallowReactive, shallowRef, toRef, watch } from "vue";
7
+ import { computed, markRaw, reactive, ref, shallowReactive, shallowRef, toRef, watch } from "vue";
7
8
  import { initTimelineMetrics } from "../../function-metrics-helpers.js";
8
- import Main from "./Main.vue";
9
+ import { settings } from "../../settings.js";
9
10
  import { popupWindow, state } from "./state.js";
10
11
  const clientRef = shallowRef();
11
12
  export { clientRef as client };
@@ -15,6 +16,8 @@ export async function setupDevToolsClient({
15
16
  timeMetric,
16
17
  router
17
18
  }) {
19
+ let iframe;
20
+ let inspector;
18
21
  const colorMode = useClientColorMode();
19
22
  const timeline = initTimelineMetrics();
20
23
  const client = shallowReactive({
@@ -80,7 +83,6 @@ export async function setupDevToolsClient({
80
83
  revision: ref(0)
81
84
  });
82
85
  window.__NUXT_DEVTOOLS_HOST__ = client;
83
- let iframe;
84
86
  function syncClient() {
85
87
  if (!client.inspector)
86
88
  client.inspector = getInspectorInstance();
@@ -139,30 +141,57 @@ export async function setupDevToolsClient({
139
141
  });
140
142
  }
141
143
  function getInspectorInstance() {
144
+ if (inspector)
145
+ return inspector;
146
+ const props = reactive({
147
+ mouse: { x: 0, y: 0 },
148
+ matched: void 0
149
+ });
150
+ const component = new NuxtDevtoolsInspectPanel(reactive({ props }));
151
+ document.body.appendChild(component);
152
+ Object.assign(component.style, {
153
+ zIndex: 999999,
154
+ position: "fixed"
155
+ });
156
+ component.addEventListener("close", () => {
157
+ props.matched = void 0;
158
+ inspectorState.isEnabled = false;
159
+ });
160
+ component.addEventListener("selectParent", () => {
161
+ const parent = inspectorState.main?.getParent();
162
+ if (parent) {
163
+ inspectorState.main = parent;
164
+ props.matched = parent;
165
+ }
166
+ });
167
+ component.addEventListener("openInEditor", (e) => {
168
+ const url = e?.detail?.[0];
169
+ if (url)
170
+ client.hooks.callHook("host:inspector:click", url);
171
+ });
172
+ inspectorEvents.on("hover", () => {
173
+ inspectorState.isFocused = false;
174
+ });
175
+ inspectorEvents.on("disabled", () => {
176
+ inspectorState.isVisible = false;
177
+ client?.hooks.callHook("host:inspector:close");
178
+ });
179
+ inspectorEvents.on("enabled", () => {
180
+ inspectorState.isVisible = true;
181
+ });
182
+ inspectorEvents.on("click", async (info, e) => {
183
+ inspectorState.isFocused = true;
184
+ inspectorState.isVisible = true;
185
+ props.matched = info;
186
+ props.mouse = { x: e.clientX, y: e.clientY };
187
+ });
142
188
  const isAvailable = ref(inspectorHasData());
143
- if (!inspectorEvents.events.disabled?.length) {
144
- inspectorEvents.on("disabled", () => {
145
- inspectorState.isVisible = false;
146
- client?.hooks.callHook("host:inspector:close");
147
- });
148
- }
149
- if (!inspectorEvents.events.enabled?.length) {
150
- inspectorEvents.on("enabled", () => {
151
- inspectorState.isVisible = true;
152
- });
153
- }
154
- if (!inspectorEvents.events.click?.length) {
155
- inspectorEvents.on("click", async (info) => {
156
- inspectorState.isEnabled = false;
157
- await client.hooks.callHook("host:inspector:click", info.fullpath);
158
- });
159
- }
160
189
  if (!isAvailable.value) {
161
190
  inspectorEvents.on("hover", async () => {
162
191
  isAvailable.value = inspectorHasData();
163
192
  });
164
193
  }
165
- return markRaw({
194
+ return inspector = markRaw({
166
195
  isAvailable,
167
196
  isEnabled: toRef(inspectorState, "isEnabled"),
168
197
  enable: () => {
@@ -226,13 +255,13 @@ export async function setupDevToolsClient({
226
255
  if (e.code === "KeyD" && e.altKey && e.shiftKey)
227
256
  client.devtools.toggle();
228
257
  });
229
- const app = createApp({
230
- render: () => h(Main, { client }),
231
- devtools: {
232
- hide: true
233
- }
234
- });
235
- app.mount(holder);
258
+ const frame = new NuxtDevtoolsFrame(reactive({
259
+ client,
260
+ settings,
261
+ state,
262
+ popupWindow
263
+ }));
264
+ holder.appendChild(frame);
236
265
  }
237
266
  export function useClientColorMode() {
238
267
  const explicitColor = ref();
@@ -1,5 +1,3 @@
1
- export declare const PANEL_PADDING = 10;
2
- export declare const PANEL_MIN = 20;
3
- export declare const PANEL_MAX = 100;
1
+ import type { DevToolsFrameState } from '@nuxt/devtools/types';
4
2
  export declare const popupWindow: import("vue").ShallowRef<Window | null, Window | null>;
5
3
  export declare const state: import("vue").Ref<DevToolsFrameState, DevToolsFrameState>;
@@ -1,8 +1,5 @@
1
1
  import { shallowRef } from "vue";
2
2
  import { useObjectStorage } from "./utils.js";
3
- export const PANEL_PADDING = 10;
4
- export const PANEL_MIN = 20;
5
- export const PANEL_MAX = 100;
6
3
  export const popupWindow = shallowRef(null);
7
4
  export const state = useObjectStorage("nuxt-devtools-frame-state", {
8
5
  width: 80,
@@ -1,31 +1,3 @@
1
1
  import type { Ref } from 'vue';
2
2
  export declare function useObjectStorage<T>(key: string, initial: T, listenToStorage?: boolean): Ref<T>;
3
- export declare function useTransform<F, T>(data: Ref<F>, to: (data: F) => T, from: (data: T) => F): Ref<T>;
4
3
  export declare function useEventListener(target: EventTarget, type: string, listener: any, options?: boolean | AddEventListenerOptions): void;
5
- /**
6
- * @see https://vueuse.org/useElementBounding
7
- */
8
- export declare function useElementBounding(target: Ref<HTMLElement | null | undefined>): {
9
- height: Ref<number, number>;
10
- bottom: Ref<number, number>;
11
- left: Ref<number, number>;
12
- right: Ref<number, number>;
13
- top: Ref<number, number>;
14
- width: Ref<number, number>;
15
- x: Ref<number, number>;
16
- y: Ref<number, number>;
17
- update: () => void;
18
- };
19
- export declare function millisecondToHumanreadable(ms: number): [number, string];
20
- /**
21
- * Reactive `env(safe-area-inset-*)`
22
- *
23
- * @see https://vueuse.org/useScreenSafeArea
24
- */
25
- export declare function useScreenSafeArea(): {
26
- top: Ref<number, number>;
27
- right: Ref<number, number>;
28
- bottom: Ref<number, number>;
29
- left: Ref<number, number>;
30
- update: () => void;
31
- };
@@ -1,4 +1,4 @@
1
- import { computed, getCurrentInstance, getCurrentScope, onMounted, onScopeDispose, ref, toValue, watch } from "vue";
1
+ import { getCurrentScope, onScopeDispose, ref, watch } from "vue";
2
2
  export function useObjectStorage(key, initial, listenToStorage = true) {
3
3
  const raw = localStorage.getItem(key);
4
4
  const data = ref(raw ? JSON.parse(raw) : initial);
@@ -25,132 +25,8 @@ export function useObjectStorage(key, initial, listenToStorage = true) {
25
25
  }
26
26
  return data;
27
27
  }
28
- export function useTransform(data, to, from) {
29
- return computed({
30
- get() {
31
- return to(data.value);
32
- },
33
- set(value) {
34
- data.value = from(value);
35
- }
36
- });
37
- }
38
28
  export function useEventListener(target, type, listener, options) {
39
29
  target.addEventListener(type, listener, options);
40
30
  if (getCurrentScope())
41
31
  onScopeDispose(() => target.removeEventListener(type, listener, options));
42
32
  }
43
- export function useElementBounding(target) {
44
- const height = ref(0);
45
- const bottom = ref(0);
46
- const left = ref(0);
47
- const right = ref(0);
48
- const top = ref(0);
49
- const width = ref(0);
50
- const x = ref(0);
51
- const y = ref(0);
52
- function update() {
53
- const el = toValue(target);
54
- if (!el) {
55
- height.value = 0;
56
- bottom.value = 0;
57
- left.value = 0;
58
- right.value = 0;
59
- top.value = 0;
60
- width.value = 0;
61
- x.value = 0;
62
- y.value = 0;
63
- return;
64
- }
65
- const rect = el.getBoundingClientRect();
66
- height.value = rect.height;
67
- bottom.value = rect.bottom;
68
- left.value = rect.left;
69
- right.value = rect.right;
70
- top.value = rect.top;
71
- width.value = rect.width;
72
- x.value = rect.x;
73
- y.value = rect.y;
74
- }
75
- watch(() => toValue(target), update);
76
- useEventListener(window, "resize", update);
77
- if (getCurrentInstance())
78
- onMounted(() => update());
79
- let observer;
80
- const cleanup = () => {
81
- if (observer) {
82
- observer.disconnect();
83
- observer = void 0;
84
- }
85
- };
86
- const stopWatch = watch(
87
- () => toValue(target),
88
- (el) => {
89
- cleanup();
90
- if (window) {
91
- observer = new ResizeObserver(update);
92
- if (el)
93
- observer.observe(el);
94
- }
95
- },
96
- { immediate: true, flush: "post", deep: true }
97
- );
98
- if (getCurrentScope()) {
99
- onScopeDispose(() => {
100
- cleanup();
101
- stopWatch();
102
- });
103
- }
104
- return {
105
- height,
106
- bottom,
107
- left,
108
- right,
109
- top,
110
- width,
111
- x,
112
- y,
113
- update
114
- };
115
- }
116
- export function millisecondToHumanreadable(ms) {
117
- if (ms < 1e3)
118
- return [+ms.toFixed(0), "ms"];
119
- if (ms < 1e3 * 60)
120
- return [+(ms / 1e3).toFixed(1), "s"];
121
- if (ms < 1e3 * 60 * 60)
122
- return [+(ms / 1e3 / 60).toFixed(1), "min"];
123
- return [+(ms / 1e3 / 60 / 60).toFixed(1), "hour"];
124
- }
125
- const topVarName = "--nuxt-devtools-safe-area-top";
126
- const rightVarName = "--nuxt-devtools-safe-area-right";
127
- const bottomVarName = "--nuxt-devtools-safe-area-bottom";
128
- const leftVarName = "--nuxt-devtools-safe-area-left";
129
- export function useScreenSafeArea() {
130
- const top = ref(0);
131
- const right = ref(0);
132
- const bottom = ref(0);
133
- const left = ref(0);
134
- document.documentElement.style.setProperty(topVarName, "env(safe-area-inset-top, 0px)");
135
- document.documentElement.style.setProperty(rightVarName, "env(safe-area-inset-right, 0px)");
136
- document.documentElement.style.setProperty(bottomVarName, "env(safe-area-inset-bottom, 0px)");
137
- document.documentElement.style.setProperty(leftVarName, "env(safe-area-inset-left, 0px)");
138
- update();
139
- useEventListener(window, "resize", update);
140
- function getValue(position) {
141
- return Number.parseFloat(getComputedStyle(document.documentElement).getPropertyValue(position)) || 0;
142
- }
143
- function update() {
144
- top.value = getValue(topVarName);
145
- right.value = getValue(rightVarName);
146
- bottom.value = getValue(bottomVarName);
147
- left.value = getValue(leftVarName);
148
- }
149
- return {
150
- top,
151
- right,
152
- bottom,
153
- left,
154
- update
155
- };
156
- }
@@ -1,2 +1,3 @@
1
+ import type { HookInfo } from '@nuxt/devtools/types';
1
2
  import type { Hookable } from 'hookable';
2
3
  export declare function setupHooksDebug<T extends Hookable<any>>(hooks: T): Record<string, HookInfo>;
@@ -1,7 +1,7 @@
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),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||"";
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(true);return B[s]=E,true},deleteProperty(e,s){if(!s)return false;const E=i(true);return delete E[s],true},ownKeys(){const e=i(true);return Object.keys(e)}}),t=typeof process<"u"&&process.env&&process.env.NODE_ENV||"",f=[["APPVEYOR"],["AWS_AMPLIFY","AWS_APP_ID",{ci:true}],["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:true}],["CLOUDFLARE_WORKERS","WORKERS_CI",{ci:true}],["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:false}],["NEVERCODE"],["RENDER"],["SAIL","SAILCI"],["SEMAPHORE"],["SCREWDRIVER"],["SHIPPABLE"],["SOLANO","TDDIUM"],["STRIDER"],["TEAMCITY","TEAMCITY_VERSION"],["TRAVIS"],["VERCEL","NOW_BUILDER"],["VERCEL","VERCEL",{ci:false}],["VERCEL","VERCEL_ENV",{ci:false}],["APPCENTER","APPCENTER_BUILD_ID"],["CODESANDBOX","CODESANDBOX_SSE",{ci:false}],["CODESANDBOX","CODESANDBOX_HOST",{ci:false}],["STACKBLITZ"],["STORMKIT"],["CLEAVR"],["ZEABUR"],["CODESPHERE","CODESPHERE_APP_ID",{ci:true}],["RAILWAY","RAILWAY_PROJECT_ID"],["RAILWAY","RAILWAY_SERVICE_ID"],["DENO-DEPLOY","DENO_DEPLOYMENT_ID"],["FIREBASE_APP_HOSTING","FIREBASE_APP_HOSTING",{ci:true}]];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:false}:{name:"",ci:false}}const l=b(),p=l.name;function n(e){return e?e!=="false":false}const I=globalThis.process?.platform||"",T=n(o.CI)||l.ci!==false,R=n(globalThis.process?.stdout&&globalThis.process?.stdout.isTTY);n(o.DEBUG);const a=t==="test"||n(o.TEST);n(o.MINIMAL)||T||a||!R;const A=/^win/i.test(I);!n(o.NO_COLOR)&&(n(o.FORCE_COLOR)||(R||A)&&o.TERM!=="dumb"||T);const C=(globalThis.process?.versions?.node||"").replace(/^v/,"")||null;Number(C?.split(".")[0])||null;const W=globalThis.process||Object.create(null),_={versions:{}};new Proxy(W,{get(e,s){if(s==="env")return o;if(s in e)return e[s];if(s in _)return _[s]}});const O=globalThis.process?.release?.name==="node",c=!!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"],[c,"bun"],[O,"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
7
  const isSandboxed = p === "stackblitz" || p === "codesandbox";
package/dist/types.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import './shared/devtools-nightly.427ec2e8.mjs';
1
+ import './shared/devtools-nightly.C1a10l_c.mjs';
2
2
  import { ModuleStaticInfo } from '@nuxt/devtools-kit/types';
3
3
  export * from '@nuxt/devtools-kit/types';
4
4
 
@@ -0,0 +1,20 @@
1
+ import { VueElementConstructor } from 'vue';
2
+ import { ElementTraceInfo } from 'vite-plugin-vue-tracer/client/record';
3
+
4
+ interface NuxtDevToolsInspectorProps {
5
+ matched?: ElementTraceInfo;
6
+ mouse: {
7
+ x: number;
8
+ y: number;
9
+ };
10
+ }
11
+
12
+ declare const NuxtDevtoolsFrame: VueElementConstructor<{
13
+ props: NuxtDevToolsInspectorProps;
14
+ }>;
15
+
16
+ declare const NuxtDevtoolsInspectPanel: VueElementConstructor<{
17
+ props: NuxtDevToolsInspectorProps;
18
+ }>;
19
+
20
+ export { type NuxtDevToolsInspectorProps, NuxtDevtoolsFrame, NuxtDevtoolsInspectPanel };