@modern-js/devtools-client 2.57.1 → 2.58.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.
- package/dist/modern.config.json +1 -279
- package/dist/public/sw-proxy.js +1 -1
- package/dist/routes-manifest.json +49 -49
- package/dist/static/html/client/index.html +3 -3
- package/dist/static/html/mount/index.html +3 -3
- package/dist/static/js/{130.1d2ae66a.js → 130.e9fe135b.js} +1 -1
- package/dist/static/js/324.f1f00e24.js +18 -0
- package/dist/static/js/{991.e814d674.js → 991.3248741e.js} +1 -1
- package/dist/static/js/{102.6fb7a80d.js → 995.2a85d331.js} +3 -3
- package/dist/static/js/async/{474.e3ea960e.js → 474.a626e358.js} +1 -1
- package/dist/static/js/async/883.5c805240.js +1 -0
- package/dist/static/js/async/client_config/(toolkit).(type)/{page.72fc872c.js → page.58295f9e.js} +1 -1
- package/dist/static/js/async/client_context/builder/{page.c389fea4.js → page.ff155bd1.js} +1 -1
- package/dist/static/js/async/client_context/framework/{page.86e4d0c6.js → page.d1293802.js} +1 -1
- package/dist/static/js/async/client_doctor/page.bf9fec27.js +1 -0
- package/dist/static/js/async/client_headers/editor/page.c918d965.js +1 -0
- package/dist/static/js/async/client_overview/page.12e213b3.js +1 -0
- package/dist/static/js/async/client_pages/page.52e4b55c.js +1 -0
- package/dist/static/js/async/client_react/offscreen/page.cd0548da.js +1 -0
- package/dist/static/js/async/client_storage/preset/(id)/page.e03b8590.js +1 -0
- package/dist/static/js/async/client_storage/preset/layout.22c4ff65.js +1 -0
- package/dist/static/js/async/client_storage/preset/page.3a7155d7.js +1 -0
- package/dist/static/js/{builder-runtime.535e59b8.js → builder-runtime.fa818427.js} +1 -1
- package/dist/static/js/client.88d55458.js +1 -0
- package/dist/static/js/components.d4cbe1c4.js +1 -0
- package/dist/static/js/lib-polyfill.04944fd7.js +1 -0
- package/dist/static/js/mount.049fbc82.js +1 -0
- package/package.json +14 -14
- package/dist/static/js/675.e56cac26.js +0 -18
- package/dist/static/js/async/883.3a7782d0.js +0 -1
- package/dist/static/js/async/client_doctor/page.345de4e6.js +0 -1
- package/dist/static/js/async/client_headers/editor/page.8220176d.js +0 -1
- package/dist/static/js/async/client_overview/page.3d5aa6c0.js +0 -1
- package/dist/static/js/async/client_pages/page.7b871c21.js +0 -1
- package/dist/static/js/async/client_react/offscreen/page.2511e7a7.js +0 -1
- package/dist/static/js/async/client_storage/preset/(id)/page.83fe1387.js +0 -1
- package/dist/static/js/async/client_storage/preset/layout.6950097c.js +0 -1
- package/dist/static/js/async/client_storage/preset/page.0fc1178b.js +0 -1
- package/dist/static/js/client.b8813540.js +0 -1
- package/dist/static/js/components.b9474b8d.js +0 -1
- package/dist/static/js/lib-polyfill.e9c6441c.js +0 -1
- package/dist/static/js/mount.3dc4393f.js +0 -1
- /package/dist/static/css/{675.861d0891.css → 324.861d0891.css} +0 -0
- /package/dist/static/css/{102.e744b37c.css → 995.e744b37c.css} +0 -0
- /package/dist/static/js/{675.e56cac26.js.LICENSE.txt → 324.f1f00e24.js.LICENSE.txt} +0 -0
- /package/dist/static/js/{102.6fb7a80d.js.LICENSE.txt → 995.2a85d331.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkmodernjsDevtools=self.webpackChunkmodernjsDevtools||[]).push([["400"],{96747:function(e,t,o){var 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"),v=o("52493"),h=o.n(v),p=o("64542");let 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=h().omit(n,Object.keys(r));return{client:r,server:i}},localStorage:async e=>(h().each(e,(e,t)=>{window.localStorage.setItem(t,e)}),(0,l._)({},window.localStorage)),sessionStorage:async e=>(h().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()})});var _=o("60182");let j="container-bYVevn";var x=o("12320"),C=o("5872"),E=o("56573"),Z=o("71161"),N=o("36339"),R=o("29214");let 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};var D=o("13897"),P=o("45230"),T=o("79197"),H=o("9768"),Y=o("85272");let 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,{})})]}))};var I=o("43730"),L=o("40052");let 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,v,...h]=u,{style:p}=l.el;p.transition="",p[m.key]=m.value,p[v.key]=v.value,p[h[0].key]="auto",p[h[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)});var M=o("97137");let 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","324","567","58","707","991"],function(){return t("5256"),t("75373"),t("72048"),t("28651"),t("96747")}),e.O()}]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modern-js/devtools-client",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.58.1",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=14.0.0"
|
|
6
6
|
},
|
|
@@ -21,8 +21,9 @@
|
|
|
21
21
|
"@radix-ui/react-icons": "^1.3.0",
|
|
22
22
|
"@radix-ui/react-popover": "^1.0.7",
|
|
23
23
|
"@radix-ui/react-tabs": "^1.0.4",
|
|
24
|
+
"@radix-ui/react-toast": "^1.1.5",
|
|
24
25
|
"@radix-ui/themes": "^3.0.5",
|
|
25
|
-
"@rsbuild/core": "1.0.1-beta.
|
|
26
|
+
"@rsbuild/core": "1.0.1-beta.13",
|
|
26
27
|
"@types/jest": "^29",
|
|
27
28
|
"@types/lodash": "^4.14.202",
|
|
28
29
|
"@types/node": "~16.11.7",
|
|
@@ -31,6 +32,7 @@
|
|
|
31
32
|
"@types/react-dom": "^18",
|
|
32
33
|
"birpc": "0.2.13",
|
|
33
34
|
"clsx": "^1.2.1",
|
|
35
|
+
"flatted": "^3.2.9",
|
|
34
36
|
"hookable": "^5.5.3",
|
|
35
37
|
"jest": "^29",
|
|
36
38
|
"lodash": "^4.17.21",
|
|
@@ -55,19 +57,17 @@
|
|
|
55
57
|
"type-fest": "^4.1.0",
|
|
56
58
|
"typescript": "~5.0.4",
|
|
57
59
|
"ufo": "^1.3.0",
|
|
58
|
-
"@radix-ui/react-toast": "^1.1.5",
|
|
59
60
|
"valtio": "^1.11.1",
|
|
60
|
-
"
|
|
61
|
-
"@modern-js
|
|
62
|
-
"@modern-js/app-tools": "2.
|
|
63
|
-
"@modern-js/
|
|
64
|
-
"@modern-js/
|
|
65
|
-
"@modern-js/
|
|
66
|
-
"@modern-js/
|
|
67
|
-
"@modern-js/
|
|
68
|
-
"@
|
|
69
|
-
"@modern-js/utils": "2.
|
|
70
|
-
"@scripts/jest-config": "2.57.1"
|
|
61
|
+
"@modern-js-app/eslint-config": "2.58.1",
|
|
62
|
+
"@modern-js/devtools-kit": "2.58.1",
|
|
63
|
+
"@modern-js/app-tools": "2.58.1",
|
|
64
|
+
"@modern-js/eslint-config": "2.58.1",
|
|
65
|
+
"@modern-js/plugin-proxy": "2.58.1",
|
|
66
|
+
"@modern-js/tsconfig": "2.58.1",
|
|
67
|
+
"@modern-js/types": "2.58.1",
|
|
68
|
+
"@modern-js/runtime": "2.58.1",
|
|
69
|
+
"@scripts/jest-config": "2.58.1",
|
|
70
|
+
"@modern-js/utils": "2.58.1"
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
73
|
"cookie-es": "^1.0.0"
|