@modern-js/devtools-client 2.53.0 → 2.54.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/dist/html/client/index.html +3 -3
  2. package/dist/html/mount/index.html +3 -3
  3. package/dist/modern.config.json +7 -4
  4. package/dist/nestedRoutes.json +1 -1
  5. package/dist/public/sw-proxy.js +1 -1
  6. package/dist/routes-manifest.json +58 -58
  7. package/dist/static/css/{client.c5a19da5.css → client.13303fab.css} +1 -1
  8. package/dist/static/js/277.f98a8ebc.js +1 -0
  9. package/dist/static/js/{596.fadaa74e.js → 403.119e6514.js} +4 -4
  10. package/dist/static/js/768.d8c648da.js +2 -0
  11. package/dist/static/js/async/851.32405bb9.js +107 -0
  12. package/dist/static/js/async/client_config/(toolkit).(type)/page.3d5baedb.js +1 -0
  13. package/dist/static/js/async/client_context/builder/{page.7a1954eb.js → page.639e2f59.js} +1 -1
  14. package/dist/static/js/async/client_context/framework/{page.af85a044.js → page.c369fd05.js} +1 -1
  15. package/dist/static/js/async/client_doctor/page.328cec39.js +1 -0
  16. package/dist/static/js/async/client_external/$.df5499f5.js +1 -0
  17. package/dist/static/js/async/client_headers/editor/page.ddbf0a83.js +1 -0
  18. package/dist/static/js/async/client_overview/page.e7acf8dc.js +1 -0
  19. package/dist/static/js/async/client_pages/page.86d7cc30.js +1 -0
  20. package/dist/static/js/async/client_react/(tab)/page.62695646.js +1 -0
  21. package/dist/static/js/async/client_storage/preset/(id)/page.154962d4.js +1 -0
  22. package/dist/static/js/async/client_storage/preset/layout.29b58b12.js +1 -0
  23. package/dist/static/js/async/client_storage/preset/{page.2008d22e.js → page.e1c4db6f.js} +1 -1
  24. package/dist/static/js/{builder-runtime.49f949e1.js → builder-runtime.491cae93.js} +1 -1
  25. package/dist/static/js/client.549d6d7e.js +1 -0
  26. package/dist/static/js/components.92888001.js +1 -0
  27. package/dist/static/js/lib-lodash.4ab7d73a.js +2 -0
  28. package/dist/static/js/lib-polyfill.a0b0c08b.js +1 -0
  29. package/dist/static/js/{lib-react.1704e483.js → lib-react.be245967.js} +2 -2
  30. package/dist/static/js/mount.c2880dc2.js +1 -0
  31. package/package.json +13 -12
  32. package/dist/static/js/277.3acf3f54.js +0 -1
  33. package/dist/static/js/288.21819f4e.js +0 -2
  34. package/dist/static/js/async/851.aa0bda06.js +0 -107
  35. package/dist/static/js/async/client_config/(toolkit).(type)/page.3d1573c2.js +0 -1
  36. package/dist/static/js/async/client_doctor/page.30dd5ee4.js +0 -1
  37. package/dist/static/js/async/client_external/$.174b0f9f.js +0 -1
  38. package/dist/static/js/async/client_headers/editor/page.affacaac.js +0 -1
  39. package/dist/static/js/async/client_overview/page.7fb01433.js +0 -1
  40. package/dist/static/js/async/client_pages/page.bd7e24be.js +0 -1
  41. package/dist/static/js/async/client_react/(tab)/page.8d9b8421.js +0 -1
  42. package/dist/static/js/async/client_storage/preset/(id)/page.86794ce9.js +0 -1
  43. package/dist/static/js/async/client_storage/preset/layout.9ee55a12.js +0 -1
  44. package/dist/static/js/client.dc9bb009.js +0 -1
  45. package/dist/static/js/components.2544b959.js +0 -1
  46. package/dist/static/js/lib-lodash.ec0da5bc.js +0 -2
  47. package/dist/static/js/lib-polyfill.9c911538.js +0 -1
  48. package/dist/static/js/mount.e92400bb.js +0 -1
  49. /package/dist/static/css/{596.861d0891.css → 403.861d0891.css} +0 -0
  50. /package/dist/static/css/{288.e744b37c.css → 768.e744b37c.css} +0 -0
  51. /package/dist/static/js/{596.fadaa74e.js.LICENSE.txt → 403.119e6514.js.LICENSE.txt} +0 -0
  52. /package/dist/static/js/{288.21819f4e.js.LICENSE.txt → 768.d8c648da.js.LICENSE.txt} +0 -0
  53. /package/dist/static/js/async/{851.aa0bda06.js.LICENSE.txt → 851.32405bb9.js.LICENSE.txt} +0 -0
  54. /package/dist/static/js/{lib-lodash.ec0da5bc.js.LICENSE.txt → lib-lodash.4ab7d73a.js.LICENSE.txt} +0 -0
  55. /package/dist/static/js/{lib-react.1704e483.js.LICENSE.txt → lib-react.be245967.js.LICENSE.txt} +0 -0
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkmodernjsDevtools=self.webpackChunkmodernjsDevtools||[]).push([["400"],{48651:function(e,t){t.Z={container:"container-bYVevn"}},51397:function(e,t,n){n.d(t,{T:function(){return l}});var o=n(86834);n(5872);var r=n(42666),i=n(84993);let l=e=>{var t;let[n,l]=(0,r.Z)(()=>Promise.resolve(e.onClick()),[]);return(0,o.jsx)("button",{className:i.Z.container,onClick:l,"data-type":null!==(t=e.type)&&void 0!==t?t:"default",disabled:n.loading,children:e.children})}},19333:function(e,t,n){n.d(t,{t:function(){return b}});var o=n(90247),r=n(55709),i=n(86834),l=n(99231),s=n(5872),c=n(56573),a=n(71161),d=n(36339),u=n(29214),v=n(55058),m=n(38774),h=n(91085),p=n(44585),f=n(51397),w=n(68574),y=n(93108),_=n(3846),g=n(97137);let k=function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location,{hash:n}=t,o=null===(e=n.match(/^#\/__devtools(.*)/))||void 0===e?void 0:e[1];return"string"!=typeof o?null:""===o?"/":o},b=e=>{let t=e.def.assets.logo,n=k(),[b,j]=(0,c.Z)(!!n),[C,O]=(0,s.useState)(!1),x=(0,v.jb)(e.endpoint,{src:e.dataSource}),E=(0,w.d)({clamp:!0}),[S]=(0,g.U)();(0,a.Z)("keydown",e=>{e.shiftKey&&e.altKey&&"KeyD"===e.code&&j()}),(0,s.useEffect)(()=>{y.QB.hook("receive",e=>{"startInspectingNative"===e.event&&(j(!1),document.documentElement.style.setProperty("cursor","cell"))});let e=e=>{"stopInspectingNative"===e.event&&(j(!0),document.documentElement.style.removeProperty("cursor"))};return y.QB.hook("send",e),()=>{y.QB.removeHook("send",e)}},[]);let T=async()=>{document.documentElement.style.setProperty("cursor","wait"),j(!1),O(!0);try{(await (0,_.F)(y.mp,1e4)).remote.pullUp("/react/components#inspecting")}catch(e){console.error(e),document.documentElement.style.removeProperty("cursor")}};return(0,d.Z)(async()=>{if(!!n)(await (0,_.F)(y.mp,1e4)).remote.pullUp(n)},[]),(0,i.jsxs)(l.Q2,{appearance:S,className:S,hasBackground:!1,style:{height:0,width:0,minHeight:0,minWidth:0},children:[(0,i.jsx)(m.Z,{when:b,keepAlive:!0,load:C,children:(0,i.jsx)("div",{className:h.Z.container,children:(0,i.jsx)(p.s,{src:x,onClose:()=>j(!1),style:{pointerEvents:E.isDragging?"none":"auto"}})})}),(0,i.jsxs)(l.kC,(0,r._)((0,o._)({className:h.Z.fab},E.props),{align:"center",children:[(0,i.jsx)(f.T,{type:"primary",onClick:j,children:(0,i.jsx)("img",{className:h.Z.logo,src:t})}),(0,i.jsx)(f.T,{onClick:T,children:(0,i.jsx)(u.aur,{})})]}))]})}},44585:function(e,t,n){n.d(t,{s:function(){return m}});var o=n(90247),r=n(55709),i=n(16170),l=n(86834),s=n(99231);n(5872);var c=n(29214),a=n(79197),d=n(80936),u=n(67058),v=n(93108);let m=e=>{var{src:t,onClose:n}=e,m=(0,i._)(e,["src","onClose"]);let{loaded:h}=(0,a.R)(v.Cl);return(0,l.jsxs)(s.xu,(0,r._)((0,o._)({className:u.Z.container},m),{children:[(0,l.jsx)("iframe",{className:u.Z.frame,src:t}),(0,l.jsx)(c.cu3,{className:u.Z.closeButton,onClick:n}),(0,l.jsx)("div",{className:u.Z.backdrop,style:{display:h?"none":void 0},children:(0,l.jsx)(d.g,{})})]}))}},38774:function(e,t,n){var o=n(86834),r=n(5872);t.Z=e=>{var t;let n=null===(t=e.keepAlive)||void 0===t||t,{when:i}=e,l=(0,r.useRef)(!1);i&&(l.current=!0);let s=e.load||(n?l.current:i);return s?(0,o.jsx)("div",{style:{display:!n||i?"unset":"none"},children:e.children}):null}},94199:function(e,t,n){var o=n(90247),r=n(86834);n(24898),n(93108);var i=n(60182),l=n(48651),s=n(19333);document.addEventListener("DOMContentLoaded",()=>{let e=document.createElement("div");e.className="_modern_js_devtools_container",document.body.appendChild(e);let t=e.attachShadow({mode:"closed"}),n=document.getElementById("_modern_js_devtools_styles");if(!(n instanceof HTMLTemplateElement))throw Error("template not found");t.appendChild(n.content);let c=document.createElement("div");c.classList.add("_modern_js_devtools_mountpoint","theme-register",l.Z.container),t.appendChild(c);let a=window.__MODERN_JS_DEVTOOLS_OPTIONS__;(0,i.createRoot)(c).render((0,r.jsx)(s.t,(0,o._)({},a)))})},24898:function(e,t,n){var o=n(57662);if(!window.opener)try{try{delete window.__REACT_DEVTOOLS_GLOBAL_HOOK__}catch(e){}(0,o.initialize)(window);let e=window.__REACT_DEVTOOLS_GLOBAL_HOOK__.sub;window.__REACT_DEVTOOLS_GLOBAL_HOOK__.sub=(t,n)=>{if("devtools-backend-installed"!==t)return e(t,n)}}catch(t){let e=Error("Failed to inject React DevTools backend.");e.cause=t,console.error(e)}},93108:function(e,t,n){n.d(t,{Cl:function(){return _},QB:function(){return f},mp:function(){return y}});var o=n(90247),r=n(55709),i=n(10487),l=n(88739),s=n(65872),c=n(9880),a=n.n(c),d=n(81733),u=n(57662),v=n(52493),m=n.n(v),h=n(64542);let p=i.MessagePortChannel.wait(window,"channel:connect:client"),f=new h.S,w=(0,u.createBridge)(window,f),y=p.then(e=>{let t=(0,s.Hu)();return{remote:(0,l.Fu)({async activateReactDevtools(){(0,u.activate)(window,{bridge:w})},async onFinishRender(){await t.callHook("onFinishRender")},async cookies(e){let t=await fetch("/__devtools/api/cookies",{method:"POST",body:JSON.stringify({setCookies:e})}),{cookies:o}=await t.json();if(!o||"object"!=typeof o)throw TypeError("No cookies returned from server");let{parse:r}=await n.e("883").then(n.bind(n,10851)),i=r(document.cookie),l=m().omit(o,Object.keys(i));return{client:i,server:l}},localStorage:async e=>(m().each(e,(e,t)=>{window.localStorage.setItem(t,e)}),(0,o._)({},window.localStorage)),sessionStorage:async e=>(m().each(e,(e,t)=>{window.sessionStorage.setItem(t,e)}),(0,o._)({},window.sessionStorage))},(0,r._)((0,o._)({},e.handlers),{timeout:500})),hooks:t}}),_=(0,d.sj)({loaded:!1}),g=a()();y.then(e=>{let{remote:t,hooks:n}=e;f.bindRemote(t,"sendReactDevtoolsData"),n.hook("onFinishRender",async()=>{_.loaded=!0,g.resolve()})})},68574:function(e,t,n){n.d(t,{d:function(){return c}});var o=n(5872),r=n(71161);let i=(e,t)=>{var n,o;return null!==(o=null===(n=({top:["left","right"],bottom:["left","right"],left:["top","bottom"],right:["top","bottom"]})[e])||void 0===n?void 0:n.includes(t))&&void 0!==o&&o},l=e=>{let[t,...n]=[{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),o=n.findIndex(e=>{let{key:n}=e;return i(t.key,n)}),[r]=n.splice(o,1);return[t,r,n[0],n[1]]},s=e=>{let{top:t,left:n,height:o,width:r}=e.getBoundingClientRect();return{top:t,left:n,bottom:window.innerHeight-t-o,right:window.innerWidth-n-r}},c=e=>{var t;let n=null!==(t=null==e?void 0:e.margin)&&void 0!==t?t:"10px",i="number"==typeof n?"".concat(n,"px"):n,[c,a]=(0,o.useState)(),d=()=>{if(!c)return;c.moveable=!1;let{el:e}=c,[t]=l(s(e));e.style.transition="".concat(t.key," 200ms"),requestIdleCallback(()=>{a(void 0),e.style[t.key]=i}),e.addEventListener("transitionend",()=>e.style.transition="",{once:!0})},u=t=>{let n="touches"in t?t.touches[0]:t;if(!(null==c?void 0:c.moveable))return;let{startX:o,startY:r}=c;(o-n.clientX)**2+(r-n.clientY)**2>9&&(c.clickable=!1);let{width:s,height:a}=c.el.getBoundingClientRect(),d=n.clientY-c.offsetY,u=n.clientX-c.offsetX,v=l({top:d,left:u,bottom:window.innerHeight-d-a,right:window.innerWidth-u-s}).map(e=>{let{key:t,value:n}=e;return{key:t,value:"".concat(n,"px")}});if(null==e?void 0:e.clamp)for(let e of v){let t=["top","bottom"].includes(e.key)?window.innerHeight-a:window.innerWidth-s;e.value="clamp(".concat(i,", ").concat(e.value,", ").concat(t,"px)")}let[m,h,...p]=v,{style:f}=c.el;f.transition="",f[m.key]=m.value,f[h.key]=h.value,f[p[0].key]="auto",f[p[1].key]="auto"};(0,r.Z)("blur",d),(0,r.Z)("mouseup",d),(0,r.Z)("touchend",d),(0,r.Z)("mousemove",u),(0,r.Z)("touchmove",u);let v=e=>{let t="touches"in e?e.touches[0]:e,n=e.currentTarget,o=n.getBoundingClientRect(),r=t.clientX-o.left;a({el:n,clickable:!0,moveable:!0,offsetX:r,offsetY:t.clientY-o.top,startX:t.clientX,startY:t.clientY})};return{isDragging:!!c,props:{onMouseDown:v,onTouchStart:v,onClickCapture:e=>{(null==c?void 0:c.clickable)||e.stopPropagation()}}}}},3846:function(e,t,n){n.d(t,{F:function(){return o}});let o=(e,t)=>new Promise((n,o)=>{let r=!0,i=setTimeout(()=>{r=!1,o(Error("Promise Timeout"))},t);e.then(e=>{r&&n(e),clearTimeout(i)}),e.catch(o)})},64542:function(e,t,n){n.d(t,{S:function(){return r}});var o=n(65872);class r extends o.gl{listen(e){return this.hook("receive",e),e}send(e,t,n){this.callHook("send",{event:e,payload:t,transferable:n})}bindRemote(e,t){var n=this;return e.$functions[t]=function(e){for(var t=arguments.length,o=Array(t>1?t-1:0),r=1;r<t;r++)o[r-1]=arguments[r];n.callHook("receive",e,...o)},this.hook("send",function(){for(var n=arguments.length,o=Array(n),r=0;r<n;r++)o[r]=arguments[r];e[t](...o)}),this}constructor(){super(),this.status="close";let e=e=>{this.status!==e&&(this.status=e,this.callHook(e))};this.hook("send",t=>{"shutdown"===t.event&&e("close")}),this.hook("receive",t=>{"shutdown"===t.event?e("close"):"operations"===t.event?e("active"):e("open")})}}}},function(e){var t=function(t){return e(e.s=t)};e.O(0,["126","277","567","58","596","707","991"],function(){return t("44541"),t("99855"),t("34290"),t("28651"),t("94199")}),e.O()}]);