@modern-js/devtools-client 2.68.1 → 2.68.3

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 (41) hide show
  1. package/dist/modern.config.json +1 -1
  2. package/dist/public/sw-proxy.js +1 -1
  3. package/dist/routes-manifest.json +54 -54
  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/151.d11aed7a.js +1 -0
  7. package/dist/static/js/423.8d847450.js +107 -0
  8. package/dist/static/js/{94.b4a5d9d3.js → 94.15bd0d9a.js} +2 -2
  9. package/dist/static/js/957.e7b0c1b0.js +2 -0
  10. package/dist/static/js/async/{417.e3cde792.js → 417.d1fc0907.js} +1 -1
  11. package/dist/static/js/async/client_config/(toolkit).(type)/{page.338ef197.js → page.8bfd8a62.js} +1 -1
  12. package/dist/static/js/async/client_context/builder/{page.04e54154.js → page.aea43c05.js} +1 -1
  13. package/dist/static/js/async/client_context/framework/{page.f922c40c.js → page.91f3732f.js} +1 -1
  14. package/dist/static/js/async/client_doctor/{page.b589589a.js → page.61dad4ee.js} +1 -1
  15. package/dist/static/js/async/client_headers/editor/page.1b9b787b.js +4 -0
  16. package/dist/static/js/async/client_overview/{page.8ec8a103.js → page.92bcc049.js} +1 -1
  17. package/dist/static/js/async/client_pages/{page.26e535e6.js → page.29c55ec3.js} +1 -1
  18. package/dist/static/js/async/client_storage/preset/(id)/{page.39423f46.js → page.52a2ce1a.js} +1 -1
  19. package/dist/static/js/async/client_storage/preset/{layout.719aa041.js → layout.f86d1f7f.js} +1 -1
  20. package/dist/static/js/async/client_storage/preset/{page.b8e5bea2.js → page.22357c02.js} +1 -1
  21. package/dist/static/js/builder-runtime.27e38f2b.js +1 -0
  22. package/dist/static/js/{client.644447fe.js → client.334c5f4d.js} +2 -2
  23. package/dist/static/js/components.fa9b974f.js +1 -0
  24. package/dist/static/js/lib-polyfill.d80690ab.js +1 -0
  25. package/dist/static/js/{lib-react.fb77d762.js → lib-react.5297537a.js} +2 -2
  26. package/dist/static/js/mount.1d00b1a3.js +1 -0
  27. package/package.json +9 -9
  28. package/dist/static/js/151.10b9ab2d.js +0 -1
  29. package/dist/static/js/235.f658ead2.js +0 -107
  30. package/dist/static/js/374.bbca41ee.js +0 -2
  31. package/dist/static/js/async/client_headers/editor/page.c273f350.js +0 -4
  32. package/dist/static/js/builder-runtime.6e19444f.js +0 -1
  33. package/dist/static/js/components.929c8101.js +0 -1
  34. package/dist/static/js/lib-polyfill.5647ba21.js +0 -1
  35. package/dist/static/js/mount.1feda02a.js +0 -1
  36. /package/dist/static/css/{235.f5c7162b.css → 423.f5c7162b.css} +0 -0
  37. /package/dist/static/css/{374.649dd1fe.css → 957.649dd1fe.css} +0 -0
  38. /package/dist/static/js/{235.f658ead2.js.LICENSE.txt → 423.8d847450.js.LICENSE.txt} +0 -0
  39. /package/dist/static/js/{374.bbca41ee.js.LICENSE.txt → 957.e7b0c1b0.js.LICENSE.txt} +0 -0
  40. /package/dist/static/js/{client.644447fe.js.LICENSE.txt → client.334c5f4d.js.LICENSE.txt} +0 -0
  41. /package/dist/static/js/{lib-react.fb77d762.js.LICENSE.txt → lib-react.5297537a.js.LICENSE.txt} +0 -0
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkmodernjsDevtools=self.webpackChunkmodernjsDevtools||[]).push([["400"],{15501:function(e,t,o){var n=o(86834),l=o(34202),r=o(25176),i=o(75943),s=o(1217),a=o(7459),c=o(65872),d=o(52493),u=o.n(d),m=o(9880),h=o.n(m),v=o(57662),p=o(41839);let y=s.MessagePortChannel.wait(window,"channel:connect:client"),f=new i.S,g=(0,v.createBridge)(window,f),w=y.then(e=>{let t=(0,c.Hu)();return{remote:(0,a.Fu)({async activateReactDevtools(){(0,v.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=u().omit(n,Object.keys(r));return{client:r,server:i}},localStorage:async e=>(u().each(e,(e,t)=>{window.localStorage.setItem(t,e)}),(0,l._)({},window.localStorage)),sessionStorage:async e=>(u().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,p.sj)({loaded:!1}),b=h()();w.then(e=>{let{remote:t,hooks:o}=e;f.bindRemote(t,"sendReactDevtoolsData"),o.hook("onFinishRender",async()=>{k.loaded=!0,b.resolve()})});var _=o(41035),j=o(5872),x=o(28962);let C=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=>{var o,n,l;let{key:r}=e;return o=t.key,null!=(l=null==(n=({top:["left","right"],bottom:["left","right"],left:["top","bottom"],right:["top","bottom"]})[o])?void 0:n.includes(r))&&l}),[l]=o.splice(n,1);return[t,l,o[0],o[1]]},E=(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)});var Z=o(42764),N=o(87420),R=o(49497),S=o(13190),D=o(86209),P=o(42226);let T=e=>{var t;let o=null==(t=e.keepAlive)||t,{when:l}=e,r=(0,j.useRef)(!1);return l&&(r.current=!0),e.load||(o?r.current:l)?(0,n.jsx)("div",{style:{display:!o||l?"unset":"none"},children:e.children}):null};var H=o(38651),Y=o(56015);let B=e=>{var t;let[o,l]=(0,H.Z)(()=>Promise.resolve(e.onClick()),[]);return(0,n.jsx)("button",{className:Y.Z.container,onClick:l,"data-type":null!=(t=e.type)?t:"default",disabled:o.loading,children:e.children})};var I=o(95403),L=o(30309),X=o(46722),O=o(20610),U=o(72235),F=o(10638);let W=e=>{var{src:t,onClose:o}=e,i=(0,L._)(e,["src","onClose"]);let{loaded:s}=(0,O.R)(k);return(0,n.jsxs)(X.x,(0,r._)((0,l._)({className:F.Z.container},i),{children:[(0,n.jsx)("iframe",{className:F.Z.frame,src:t}),(0,n.jsx)(S.cu3,{className:F.Z.closeButton,onClick:o}),(0,n.jsx)("div",{className:F.Z.backdrop,style:{display:s?"none":void 0},children:(0,n.jsx)(U.g,{})})]}))},K=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[1];return"string"!=typeof n?null:""===n?"/":n},M=e=>{let t=K(),[o,i]=(0,D.Z)(!!t),[s,a]=(0,j.useState)(!1),c=(e=>{var t;let o=null!=(t=null==e?void 0:e.margin)?t:"10px",n="number"==typeof o?"".concat(o,"px"):o,[l,r]=(0,j.useState)(),i=()=>{if(!l)return;l.moveable=!1;let{el:e}=l,[t]=C((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}})(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=C({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,x.Z)("blur",i),(0,x.Z)("mouseup",i),(0,x.Z)("touchend",i),(0,x.Z)("mousemove",s),(0,x.Z)("touchmove",s);let a=e=>{let t="touches"in e?e.touches[0]:e,o=e.currentTarget,n=o.getBoundingClientRect();r({el:o,clickable:!0,moveable:!0,offsetX:t.clientX-n.left,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()}}}})({clamp:!0}),[d]=(0,Z.U)();(0,x.Z)("keydown",e=>{e.shiftKey&&e.altKey&&"KeyD"===e.code&&i()}),(0,j.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 E(w,1e4)).remote.pullUp("/react/components#inspecting")}catch(e){console.error(e),document.documentElement.style.removeProperty("cursor")}};return(0,P.Z)(async()=>{t&&(await E(w,1e4)).remote.pullUp(t)},[]),(0,n.jsxs)(N.Q2,{appearance:d,className:d,hasBackground:!1,style:{height:0,width:0,minHeight:0,minWidth:0},children:[(0,n.jsx)(T,{when:o,keepAlive:!0,load:s,children:(0,n.jsx)("div",{className:I.Z.container,children:(0,n.jsx)(W,{src:e.src,onClose:()=>i(!1),style:{pointerEvents:c.isDragging?"none":"auto"}})})}),(0,n.jsxs)(R.k,(0,r._)((0,l._)({className:I.Z.fab},c.props),{align:"center",children:[(0,n.jsx)(B,{type:"primary",onClick:i,children:(0,n.jsx)("img",{className:I.Z.logo,src:e.logo})}),(0,n.jsx)(B,{onClick:u,children:(0,n.jsx)(S.aur,{})})]}))]})},A=()=>{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)(M,{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","container-bYVevn"),t.appendChild(l),(0,_.createRoot)(l).render((0,n.jsx)(A,{}))};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",q):q()}},function(e){var t=function(t){return e(e.s=t)};e.O(0,["126","151","374","567","58","94"],function(){return t(81576),t(99761),t(68843),t(12670),t(15501)}),e.O()}]);