@modern-js/devtools-client 2.57.1 → 2.58.0

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 (44) hide show
  1. package/dist/modern.config.json +7 -7
  2. package/dist/public/sw-proxy.js +1 -1
  3. package/dist/routes-manifest.json +48 -48
  4. package/dist/static/html/client/index.html +3 -3
  5. package/dist/static/html/mount/index.html +3 -3
  6. package/dist/static/js/{130.1d2ae66a.js → 130.a055ee6f.js} +1 -1
  7. package/dist/static/js/{102.6fb7a80d.js → 37.3b6855a6.js} +3 -3
  8. package/dist/static/js/396.3a03c91e.js +18 -0
  9. package/dist/static/js/{991.e814d674.js → 991.3248741e.js} +1 -1
  10. package/dist/static/js/async/{474.e3ea960e.js → 474.a626e358.js} +1 -1
  11. package/dist/static/js/async/883.5c805240.js +1 -0
  12. package/dist/static/js/async/client_config/(toolkit).(type)/{page.72fc872c.js → page.f4f25669.js} +1 -1
  13. package/dist/static/js/async/client_context/builder/{page.c389fea4.js → page.fa63dd48.js} +1 -1
  14. package/dist/static/js/async/client_context/framework/{page.86e4d0c6.js → page.1e92d092.js} +1 -1
  15. package/dist/static/js/async/client_doctor/page.1bce9053.js +1 -0
  16. package/dist/static/js/async/client_headers/editor/page.4194fbba.js +1 -0
  17. package/dist/static/js/async/client_overview/page.8f02d776.js +1 -0
  18. package/dist/static/js/async/client_pages/page.a4020deb.js +1 -0
  19. package/dist/static/js/async/client_storage/preset/(id)/page.d9ba689e.js +1 -0
  20. package/dist/static/js/async/client_storage/preset/layout.f6253a54.js +1 -0
  21. package/dist/static/js/async/client_storage/preset/page.4f048c94.js +1 -0
  22. package/dist/static/js/{builder-runtime.535e59b8.js → builder-runtime.694bc54b.js} +1 -1
  23. package/dist/static/js/client.28c8f27c.js +1 -0
  24. package/dist/static/js/components.75879e60.js +1 -0
  25. package/dist/static/js/lib-polyfill.3df5a348.js +1 -0
  26. package/dist/static/js/mount.02a9d3ac.js +1 -0
  27. package/package.json +12 -12
  28. package/dist/static/js/675.e56cac26.js +0 -18
  29. package/dist/static/js/async/883.3a7782d0.js +0 -1
  30. package/dist/static/js/async/client_doctor/page.345de4e6.js +0 -1
  31. package/dist/static/js/async/client_headers/editor/page.8220176d.js +0 -1
  32. package/dist/static/js/async/client_overview/page.3d5aa6c0.js +0 -1
  33. package/dist/static/js/async/client_pages/page.7b871c21.js +0 -1
  34. package/dist/static/js/async/client_storage/preset/(id)/page.83fe1387.js +0 -1
  35. package/dist/static/js/async/client_storage/preset/layout.6950097c.js +0 -1
  36. package/dist/static/js/async/client_storage/preset/page.0fc1178b.js +0 -1
  37. package/dist/static/js/client.b8813540.js +0 -1
  38. package/dist/static/js/components.b9474b8d.js +0 -1
  39. package/dist/static/js/lib-polyfill.e9c6441c.js +0 -1
  40. package/dist/static/js/mount.3dc4393f.js +0 -1
  41. /package/dist/static/css/{102.e744b37c.css → 37.e744b37c.css} +0 -0
  42. /package/dist/static/css/{675.861d0891.css → 396.861d0891.css} +0 -0
  43. /package/dist/static/js/{102.6fb7a80d.js.LICENSE.txt → 37.3b6855a6.js.LICENSE.txt} +0 -0
  44. /package/dist/static/js/{675.e56cac26.js.LICENSE.txt → 396.3a03c91e.js.LICENSE.txt} +0 -0
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkmodernjsDevtools=self.webpackChunkmodernjsDevtools||[]).push([["400"],{96747:function(e,t,o){let n=o("86834"),l=o("789"),r=o("74679"),i=o("10487"),s=o("88739"),a=o("65872"),c=o("9880"),d=o.n(c),u=o("81733"),m=o("57662"),h=o("52493"),v=o.n(h),p=o("64542"),y=i.MessagePortChannel.wait(window,"channel:connect:client"),f=new p.S,g=(0,m.createBridge)(window,f),w=y.then(e=>{let t=(0,a.Hu)();return{remote:(0,s.Fu)({async activateReactDevtools(){(0,m.activate)(window,{bridge:g})},async onFinishRender(){await t.callHook("onFinishRender")},async cookies(e){let t=await fetch("/__devtools/api/cookies",{method:"POST",body:JSON.stringify({setCookies:e})}),{cookies:n}=await t.json();if(!n||"object"!=typeof n)throw TypeError("No cookies returned from server");let{parse:l}=await o.e("883").then(o.bind(o,10851)),r=l(document.cookie),i=v().omit(n,Object.keys(r));return{client:r,server:i}},localStorage:async e=>(v().each(e,(e,t)=>{window.localStorage.setItem(t,e)}),(0,l._)({},window.localStorage)),sessionStorage:async e=>(v().each(e,(e,t)=>{window.sessionStorage.setItem(t,e)}),(0,l._)({},window.sessionStorage))},(0,r._)((0,l._)({},e.handlers),{timeout:500})),hooks:t}}),k=(0,u.sj)({loaded:!1}),b=d()();w.then(e=>{let{remote:t,hooks:o}=e;f.bindRemote(t,"sendReactDevtoolsData"),o.hook("onFinishRender",async()=>{k.loaded=!0,b.resolve()})});let _=o("60182"),j="container-bYVevn",x=o("12320"),C=o("5872"),E=o("56573"),Z=o("71161"),N=o("36339"),R=o("29214"),S=e=>{var t;let o=null===(t=e.keepAlive)||void 0===t||t,{when:l}=e,r=(0,C.useRef)(!1);l&&(r.current=!0);let i=e.load||(o?r.current:l);return i?(0,n.jsx)("div",{style:{display:!o||l?"unset":"none"},children:e.children}):null},D=o("22675"),P=o("45230"),T=o("79197"),H=o("9768"),Y=o("45319"),B=e=>{var{src:t,onClose:o}=e,i=(0,P._)(e,["src","onClose"]);let{loaded:s}=(0,T.R)(k);return(0,n.jsxs)(x.xu,(0,r._)((0,l._)({className:Y.Z.container},i),{children:[(0,n.jsx)("iframe",{className:Y.Z.frame,src:t}),(0,n.jsx)(R.cu3,{className:Y.Z.closeButton,onClick:o}),(0,n.jsx)("div",{className:Y.Z.backdrop,style:{display:s?"none":void 0},children:(0,n.jsx)(H.g,{})})]}))},I=o("43730"),L=o("97639"),O=e=>{var t;let[o,l]=(0,I.Z)(()=>Promise.resolve(e.onClick()),[]);return(0,n.jsx)("button",{className:L.Z.container,onClick:l,"data-type":null!==(t=e.type)&&void 0!==t?t:"default",disabled:o.loading,children:e.children})},X=(e,t)=>{var o,n;return null!==(n=null===(o=({top:["left","right"],bottom:["left","right"],left:["top","bottom"],right:["top","bottom"]})[e])||void 0===o?void 0:o.includes(t))&&void 0!==n&&n},U=e=>{let[t,...o]=[{key:"top",value:e.top},{key:"bottom",value:e.bottom},{key:"left",value:e.left},{key:"right",value:e.right}].sort((e,t)=>e.value-t.value),n=o.findIndex(e=>{let{key:o}=e;return X(t.key,o)}),[l]=o.splice(n,1);return[t,l,o[0],o[1]]},F=e=>{let{top:t,left:o,height:n,width:l}=e.getBoundingClientRect();return{top:t,left:o,bottom:window.innerHeight-t-n,right:window.innerWidth-o-l}},W=e=>{var t;let o=null!==(t=null==e?void 0:e.margin)&&void 0!==t?t:"10px",n="number"==typeof o?"".concat(o,"px"):o,[l,r]=(0,C.useState)(),i=()=>{if(!l)return;l.moveable=!1;let{el:e}=l,[t]=U(F(e));e.style.transition="".concat(t.key," 200ms"),requestIdleCallback(()=>{r(void 0),e.style[t.key]=n}),e.addEventListener("transitionend",()=>e.style.transition="",{once:!0})},s=t=>{let o="touches"in t?t.touches[0]:t;if(!(null==l?void 0:l.moveable))return;let{startX:r,startY:i}=l;(r-o.clientX)**2+(i-o.clientY)**2>9&&(l.clickable=!1);let{width:s,height:a}=l.el.getBoundingClientRect(),c=o.clientY-l.offsetY,d=o.clientX-l.offsetX,u=U({top:c,left:d,bottom:window.innerHeight-c-a,right:window.innerWidth-d-s}).map(e=>{let{key:t,value:o}=e;return{key:t,value:"".concat(o,"px")}});if(null==e?void 0:e.clamp)for(let e of u){let t=["top","bottom"].includes(e.key)?window.innerHeight-a:window.innerWidth-s;e.value="clamp(".concat(n,", ").concat(e.value,", ").concat(t,"px)")}let[m,h,...v]=u,{style:p}=l.el;p.transition="",p[m.key]=m.value,p[h.key]=h.value,p[v[0].key]="auto",p[v[1].key]="auto"};(0,Z.Z)("blur",i),(0,Z.Z)("mouseup",i),(0,Z.Z)("touchend",i),(0,Z.Z)("mousemove",s),(0,Z.Z)("touchmove",s);let a=e=>{let t="touches"in e?e.touches[0]:e,o=e.currentTarget,n=o.getBoundingClientRect(),l=t.clientX-n.left;r({el:o,clickable:!0,moveable:!0,offsetX:l,offsetY:t.clientY-n.top,startX:t.clientX,startY:t.clientY})};return{isDragging:!!l,props:{onMouseDown:a,onTouchStart:a,onClickCapture:e=>{(null==l?void 0:l.clickable)||e.stopPropagation()}}}},K=(e,t)=>new Promise((o,n)=>{let l=!0,r=setTimeout(()=>{l=!1,n(Error("Promise Timeout"))},t);e.then(e=>{l&&o(e),clearTimeout(r)}),e.catch(n)}),M=o("97137"),A=function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location,{hash:o}=t,n=null===(e=o.match(/^#\/__devtools(.*)/))||void 0===e?void 0:e[1];return"string"!=typeof n?null:""===n?"/":n},q=e=>{let t=A(),[o,i]=(0,E.Z)(!!t),[s,a]=(0,C.useState)(!1),c=W({clamp:!0}),[d]=(0,M.U)();(0,Z.Z)("keydown",e=>{e.shiftKey&&e.altKey&&"KeyD"===e.code&&i()}),(0,C.useEffect)(()=>{f.hook("receive",e=>{"startInspectingNative"===e.event&&(i(!1),document.documentElement.style.setProperty("cursor","cell"))});let e=e=>{"stopInspectingNative"===e.event&&(i(!0),document.documentElement.style.removeProperty("cursor"))};return f.hook("send",e),()=>{f.removeHook("send",e)}},[]);let u=async()=>{document.documentElement.style.setProperty("cursor","wait"),i(!1),a(!0);try{(await K(w,1e4)).remote.pullUp("/react/components#inspecting")}catch(e){console.error(e),document.documentElement.style.removeProperty("cursor")}};return(0,N.Z)(async()=>{if(!!t)(await K(w,1e4)).remote.pullUp(t)},[]),(0,n.jsxs)(x.Q2,{appearance:d,className:d,hasBackground:!1,style:{height:0,width:0,minHeight:0,minWidth:0},children:[(0,n.jsx)(S,{when:o,keepAlive:!0,load:s,children:(0,n.jsx)("div",{className:D.Z.container,children:(0,n.jsx)(B,{src:e.src,onClose:()=>i(!1),style:{pointerEvents:c.isDragging?"none":"auto"}})})}),(0,n.jsxs)(x.kC,(0,r._)((0,l._)({className:D.Z.fab},c.props),{align:"center",children:[(0,n.jsx)(O,{type:"primary",onClick:i,children:(0,n.jsx)("img",{className:D.Z.logo,src:e.logo})}),(0,n.jsx)(O,{onClick:u,children:(0,n.jsx)(R.aur,{})})]}))]})},J=()=>{let e=window.__modern_js_devtools_manifest;if(!e)throw TypeError("Devtools manifest is not found");let t=e.client;if(!t)throw TypeError("Devtools client source is not found");let o=e.source,l=new URL(t,location.href);if(o){let e=new URL(o,location.href);l.searchParams.set("src",e.href)}return(0,n.jsx)(q,{logo:e.context.def.assets.logo,src:l.href})},Q=()=>{let e=document.createElement("div");e.className="_modern_js_devtools_container",document.body.appendChild(e);let t=e.attachShadow({mode:"closed"}),o=document.getElementById("_modern_js_devtools_styles");if(!(o instanceof HTMLTemplateElement))throw Error("template not found");t.appendChild(o.content);let l=document.createElement("div");l.classList.add("_modern_js_devtools_mountpoint","theme-register",j),t.appendChild(l),(0,_.createRoot)(l).render((0,n.jsx)(J,{}))};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",Q):Q()}},function(e){var t=function(t){return e(e.s=t)};e.O(0,["126","130","567","58","675","707","991"],function(){return t("5256"),t("74749"),t("49741"),t("28651"),t("96747")}),e.O()}]);