@modern-js/devtools-client 2.70.2 → 2.70.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.
- package/dist/modern.config.json +1 -1
- package/dist/public/sw-proxy.js +1 -1
- package/dist/routes-manifest.json +34 -34
- package/dist/static/html/client/index.html +3 -3
- package/dist/static/html/mount/index.html +3 -3
- package/dist/static/js/{184.d6fb9bbf.js → 142.5a23e94d.js} +2 -2
- package/dist/static/js/{422.83f838f9.js → 422.f165135e.js} +1 -1
- package/dist/static/js/async/client_config/(toolkit).(type)/{page.66b7495b.js → page.88123c0b.js} +1 -1
- package/dist/static/js/async/client_context/builder/{page.b15a5956.js → page.39a7ed44.js} +1 -1
- package/dist/static/js/async/client_context/framework/{page.8d0a8157.js → page.aea88daa.js} +1 -1
- package/dist/static/js/async/client_doctor/{page.a076d23e.js → page.bb324cc3.js} +1 -1
- package/dist/static/js/async/client_headers/editor/{page.29f69f31.js → page.ca48eff2.js} +1 -1
- package/dist/static/js/async/client_overview/{page.13507b7e.js → page.b7b92521.js} +1 -1
- package/dist/static/js/async/client_pages/{page.0bc825a2.js → page.2f74c589.js} +1 -1
- package/dist/static/js/async/client_storage/preset/(id)/{page.b444ed06.js → page.a6b827d9.js} +1 -1
- package/dist/static/js/async/client_storage/preset/{layout.a3975519.js → layout.86f4ce8a.js} +1 -1
- package/dist/static/js/async/client_storage/preset/{page.6e3ac709.js → page.4b36b71a.js} +1 -1
- package/dist/static/js/{builder-runtime.d3dfccf2.js → builder-runtime.f80f8283.js} +1 -1
- package/dist/static/js/{client.c32e3e7f.js → client.b1839f4f.js} +1 -1
- package/dist/static/js/components.fba4e337.js +1 -0
- package/dist/static/js/mount.a28a7779.js +1 -0
- package/package.json +8 -8
- package/dist/static/js/components.d8fed013.js +0 -1
- package/dist/static/js/mount.8998141a.js +0 -1
- /package/dist/static/css/{184.bd57b9e5.css → 142.bd57b9e5.css} +0 -0
- /package/dist/static/js/{184.d6fb9bbf.js.LICENSE.txt → 142.5a23e94d.js.LICENSE.txt} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkmodernjsDevtools=self.webpackChunkmodernjsDevtools||[]).push([["491"],{99240(e,t,o){var n=o(30255),l=o(96816),r=o(43189),s=o(20134),i=o(55499),a=o(19512),c=o(73385),d=o(19461),u=o.n(d),m=o(48630),h=o.n(m),v=o(30198),p=o(86891);let y=i.MessagePortChannel.wait(window,"channel:connect:client"),f=new s.s,g=(0,v.createBridge)(window,f),w=y.then(e=>{let t=(0,c.FF)();return{remote:(0,a.L4)({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("852").then(o.bind(o,23343)),r=l(document.cookie),s=u().omit(n,Object.keys(r));return{client:r,server:s}},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.BX)({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(38987),j=o(73271),x=o(62729);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!=(n=null==(l=({top:["left","right"],bottom:["left","right"],left:["top","bottom"],right:["top","bottom"]})[o])?void 0:l.includes(r))&&n}),[l]=o.splice(n,1);return[t,l,o[0],o[1]]},A=(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 E=o(25177),S=o(63221),N=o(13836),R=o(83008),D=o(57773),P=o(95329);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 B=o(64279),L=o(97421);let X=e=>{var t;let[o,l]=(0,B.A)(()=>Promise.resolve(e.onClick()),[]);return(0,n.jsx)("button",{className:L.A.container,onClick:l,"data-type":null!=(t=e.type)?t:"default",disabled:o.loading,children:e.children})};var Y=o(334),H=o(57404),I=o(89637),O=o(63171),F=o(64921),U=o(12939);let W=e=>{let{src:t,onClose:o}=e,s=(0,H._)(e,["src","onClose"]),{loaded:i}=(0,O.s)(k);return(0,n.jsxs)(I.a,(0,r._)((0,l._)({className:U.A.container},s),{children:[(0,n.jsx)("iframe",{className:U.A.frame,src:t}),(0,n.jsx)(R.y1J,{className:U.A.closeButton,onClick:o}),(0,n.jsx)("div",{className:U.A.backdrop,style:{display:i?"none":void 0},children:(0,n.jsx)(F.R,{})})]}))},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,s]=(0,D.A)(!!t),[i,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)(),s=()=>{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})},i=t=>{let o="touches"in t?t.touches[0]:t;if(!(null==l?void 0:l.moveable))return;let{startX:r,startY:s}=l;(r-o.clientX)**2+(s-o.clientY)**2>9&&(l.clickable=!1);let{width:i,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-i}).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-i;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.A)("blur",s),(0,x.A)("mouseup",s),(0,x.A)("touchend",s),(0,x.A)("mousemove",i),(0,x.A)("touchmove",i);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,E.B)();(0,x.A)("keydown",e=>{e.shiftKey&&e.altKey&&"KeyD"===e.code&&s()}),(0,j.useEffect)(()=>{f.hook("receive",e=>{"startInspectingNative"===e.event&&(s(!1),document.documentElement.style.setProperty("cursor","cell"))});let e=e=>{"stopInspectingNative"===e.event&&(s(!0),document.documentElement.style.removeProperty("cursor"))};return f.hook("send",e),()=>{f.removeHook("send",e)}},[]);let u=async()=>{document.documentElement.style.setProperty("cursor","wait"),s(!1),a(!0);try{(await A(w,1e4)).remote.pullUp("/react/components#inspecting")}catch(e){console.error(e),document.documentElement.style.removeProperty("cursor")}};return(0,P.A)(async()=>{t&&(await A(w,1e4)).remote.pullUp(t)},[]),(0,n.jsxs)(S.Sx,{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:i,children:(0,n.jsx)("div",{className:Y.A.container,children:(0,n.jsx)(W,{src:e.src,onClose:()=>s(!1),style:{pointerEvents:c.isDragging?"none":"auto"}})})}),(0,n.jsxs)(N.s,(0,r._)((0,l._)({className:Y.A.fab},c.props),{align:"center",children:[(0,n.jsx)(X,{type:"primary",onClick:s,children:(0,n.jsx)("img",{className:Y.A.logo,src:e.logo})}),(0,n.jsx)(X,{onClick:u,children:(0,n.jsx)(R.SbD,{})})]}))]})},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)(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)(J,{}))};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",q):q()}},function(e){var t=function(t){return e(e.s=t)};e.O(0,["422","493","514","648","783","792"],function(){return t(93125),t(89801),t(25953),t(50054),t(99240)}),e.O()}]);
|
|
File without changes
|
|
File without changes
|