@modern-js/devtools-client 2.67.2 → 2.67.4
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 +53 -53
- package/dist/static/html/client/index.html +3 -3
- package/dist/static/html/mount/index.html +3 -3
- package/dist/static/js/117.63b3f491.js +107 -0
- package/dist/static/js/443.d67d0f7e.js +2 -0
- package/dist/static/js/{746.1ddb52a3.js → 746.34eaa838.js} +1 -1
- package/dist/static/js/async/client_config/(toolkit).(type)/{page.dc72aff2.js → page.cf229314.js} +1 -1
- package/dist/static/js/async/client_config/{layout.4671e440.js → layout.f5a9e1a7.js} +1 -1
- package/dist/static/js/async/client_context/builder/{page.74ed8743.js → page.39618f8d.js} +1 -1
- package/dist/static/js/async/client_context/framework/{page.30796edc.js → page.0d3fa253.js} +1 -1
- package/dist/static/js/async/client_context/{layout.e036c18d.js → layout.52e0cd66.js} +1 -1
- package/dist/static/js/async/client_doctor/{page.d9465cf9.js → page.e9f582f0.js} +1 -1
- package/dist/static/js/async/client_headers/editor/{page.81e851f3.js → page.94065f95.js} +1 -1
- package/dist/static/js/async/client_headers/{layout.7ff56cc2.js → layout.12d4c7ff.js} +1 -1
- package/dist/static/js/async/client_headers/welcome/{page.899985d2.js → page.2fd1bcc1.js} +1 -1
- package/dist/static/js/async/client_overview/{layout.d5ca65ed.js → layout.c6496188.js} +1 -1
- package/dist/static/js/async/client_overview/{page.6827e354.js → page.7adffd0b.js} +1 -1
- package/dist/static/js/async/client_pages/{layout.865f0c34.js → layout.76f4fe9b.js} +1 -1
- package/dist/static/js/async/client_pages/page.fe5b1a16.js +4 -0
- package/dist/static/js/async/client_react/(tab)/{page.6fa6ede3.js → page.ef7a9a8c.js} +1 -1
- package/dist/static/js/async/client_react/offscreen/{page.038e1c85.js → page.5d13515c.js} +1 -1
- package/dist/static/js/async/client_storage/preset/(id)/{page.84b97475.js → page.3c921dac.js} +1 -1
- package/dist/static/js/async/client_storage/preset/{layout.2db49726.js → layout.df2dbaa7.js} +1 -1
- package/dist/static/js/async/client_storage/preset/{page.67b47687.js → page.43868fca.js} +1 -1
- package/dist/static/js/{builder-runtime.82646e44.js → builder-runtime.1b35c44c.js} +1 -1
- package/dist/static/js/client.92d78b5a.js +1 -0
- package/dist/static/js/components.43b0dac4.js +1 -0
- package/dist/static/js/lib-polyfill.60d469fa.js +1 -0
- package/dist/static/js/{mount.f39d4f5e.js → mount.de33780c.js} +1 -1
- package/package.json +20 -20
- package/dist/static/js/197.3798e8d7.js +0 -107
- package/dist/static/js/654.a520a94b.js +0 -2
- package/dist/static/js/async/client_pages/page.ae5be061.js +0 -4
- package/dist/static/js/client.9e244cc0.js +0 -1
- package/dist/static/js/components.d1ec05ef.js +0 -1
- package/dist/static/js/lib-polyfill.fe681bc7.js +0 -1
- /package/dist/static/css/{197.f5c7162b.css → 117.f5c7162b.css} +0 -0
- /package/dist/static/css/{654.649dd1fe.css → 443.649dd1fe.css} +0 -0
- /package/dist/static/js/{197.3798e8d7.js.LICENSE.txt → 117.63b3f491.js.LICENSE.txt} +0 -0
- /package/dist/static/js/{654.a520a94b.js.LICENSE.txt → 443.d67d0f7e.js.LICENSE.txt} +0 -0
|
@@ -1 +1 @@
|
|
|
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(10487),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,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.includes(t))&&n},E=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 C(t.key,o)}),[l]=o.splice(n,1);return[t,l,o[0],o[1]]},Z=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}},N=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]=E(Z(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=E({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()}}}},R=(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 S=o(42764),D=o(87420),P=o(49497),T=o(13190),H=o(86209),Y=o(42226);let B=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 I=o(38651),L=o(
|
|
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(10487),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,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.includes(t))&&n},E=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 C(t.key,o)}),[l]=o.splice(n,1);return[t,l,o[0],o[1]]},Z=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}},N=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]=E(Z(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=E({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()}}}},R=(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 S=o(42764),D=o(87420),P=o(49497),T=o(13190),H=o(86209),Y=o(42226);let B=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 I=o(38651),L=o(52284);let X=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)?t:"default",disabled:o.loading,children:e.children})};var O=o(61892),U=o(30309),F=o(46722),W=o(20610),K=o(72235),M=o(68233);let A=e=>{var{src:t,onClose:o}=e,i=(0,U._)(e,["src","onClose"]);let{loaded:s}=(0,W.R)(k);return(0,n.jsxs)(F.x,(0,r._)((0,l._)({className:M.Z.container},i),{children:[(0,n.jsx)("iframe",{className:M.Z.frame,src:t}),(0,n.jsx)(T.cu3,{className:M.Z.closeButton,onClick:o}),(0,n.jsx)("div",{className:M.Z.backdrop,style:{display:s?"none":void 0},children:(0,n.jsx)(K.g,{})})]}))},q=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},J=e=>{let t=q(),[o,i]=(0,H.Z)(!!t),[s,a]=(0,j.useState)(!1),c=N({clamp:!0}),[d]=(0,S.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 R(w,1e4)).remote.pullUp("/react/components#inspecting")}catch(e){console.error(e),document.documentElement.style.removeProperty("cursor")}};return(0,Y.Z)(async()=>{t&&(await R(w,1e4)).remote.pullUp(t)},[]),(0,n.jsxs)(D.Q2,{appearance:d,className:d,hasBackground:!1,style:{height:0,width:0,minHeight:0,minWidth:0},children:[(0,n.jsx)(B,{when:o,keepAlive:!0,load:s,children:(0,n.jsx)("div",{className:O.Z.container,children:(0,n.jsx)(A,{src:e.src,onClose:()=>i(!1),style:{pointerEvents:c.isDragging?"none":"auto"}})})}),(0,n.jsxs)(P.k,(0,r._)((0,l._)({className:O.Z.fab},c.props),{align:"center",children:[(0,n.jsx)(X,{type:"primary",onClick:i,children:(0,n.jsx)("img",{className:O.Z.logo,src:e.logo})}),(0,n.jsx)(X,{onClick:u,children:(0,n.jsx)(T.aur,{})})]}))]})},Q=()=>{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)(J,{logo:e.context.def.assets.logo,src:l.href})},V=()=>{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)(Q,{}))};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",V):V()}},function(e){var t=function(t){return e(e.s=t)};e.O(0,["126","443","567","58","746","94"],function(){return t(50803),t(17939),t(86745),t(76762),t(15501)}),e.O()}]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modern-js/devtools-client",
|
|
3
|
-
"version": "2.67.
|
|
3
|
+
"version": "2.67.4",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=14.0.0"
|
|
6
6
|
},
|
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
},
|
|
18
18
|
"license": "MIT",
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@radix-ui/react-collapsible": "^1.
|
|
21
|
-
"@radix-ui/react-icons": "^1.3.
|
|
22
|
-
"@radix-ui/react-popover": "^1.
|
|
23
|
-
"@radix-ui/react-tabs": "^1.
|
|
24
|
-
"@radix-ui/react-toast": "^1.
|
|
25
|
-
"@radix-ui/themes": "^3.
|
|
26
|
-
"@rsbuild/core": "1.3.
|
|
20
|
+
"@radix-ui/react-collapsible": "^1.1.7",
|
|
21
|
+
"@radix-ui/react-icons": "^1.3.2",
|
|
22
|
+
"@radix-ui/react-popover": "^1.1.10",
|
|
23
|
+
"@radix-ui/react-tabs": "^1.1.7",
|
|
24
|
+
"@radix-ui/react-toast": "^1.2.10",
|
|
25
|
+
"@radix-ui/themes": "^3.2.1",
|
|
26
|
+
"@rsbuild/core": "1.3.16",
|
|
27
27
|
"@types/jest": "^29",
|
|
28
28
|
"@types/lodash": "^4.14.202",
|
|
29
29
|
"@types/node": "~16.11.7",
|
|
@@ -38,33 +38,33 @@
|
|
|
38
38
|
"lodash": "^4.17.21",
|
|
39
39
|
"nanoid": "3.3.11",
|
|
40
40
|
"p-defer": "^3.0.0",
|
|
41
|
-
"postcss-custom-media": "^10.0.
|
|
41
|
+
"postcss-custom-media": "^10.0.8",
|
|
42
42
|
"react": "^18.3.1",
|
|
43
43
|
"react-base16-styling": "^0.10.0",
|
|
44
44
|
"react-devtools-inline": "^4.28.5",
|
|
45
45
|
"react-dom": "^18.3.1",
|
|
46
46
|
"react-dom-exp": "npm:react-dom@0.0.0-experimental-51ffd3564-20231025",
|
|
47
|
-
"react-error-boundary": "^4.
|
|
47
|
+
"react-error-boundary": "^4.1.2",
|
|
48
48
|
"react-exp": "npm:react@0.0.0-experimental-51ffd3564-20231025",
|
|
49
|
-
"react-icons": "^4.
|
|
49
|
+
"react-icons": "^4.12.0",
|
|
50
50
|
"react-is": "^18",
|
|
51
51
|
"react-json-tree": "^0.20.0",
|
|
52
52
|
"react-json-view": "^1.21.3",
|
|
53
|
-
"react-use": "^17.
|
|
53
|
+
"react-use": "^17.6.0",
|
|
54
54
|
"scheduler": "^0.23.0",
|
|
55
55
|
"suspend-react": "^0.1.3",
|
|
56
56
|
"type-fest": "^4.1.0",
|
|
57
57
|
"typescript": "~5.0.4",
|
|
58
58
|
"ufo": "^1.3.0",
|
|
59
59
|
"valtio": "^1.11.1",
|
|
60
|
-
"@modern-js/app-tools": "2.67.
|
|
61
|
-
"@modern-js/devtools-kit": "2.67.
|
|
62
|
-
"@modern-js/plugin-proxy": "2.67.
|
|
63
|
-
"@modern-js/runtime": "2.67.
|
|
64
|
-
"@modern-js/tsconfig": "2.67.
|
|
65
|
-
"@modern-js/types": "2.67.
|
|
66
|
-
"@
|
|
67
|
-
"@
|
|
60
|
+
"@modern-js/app-tools": "2.67.4",
|
|
61
|
+
"@modern-js/devtools-kit": "2.67.4",
|
|
62
|
+
"@modern-js/plugin-proxy": "2.67.4",
|
|
63
|
+
"@modern-js/runtime": "2.67.4",
|
|
64
|
+
"@modern-js/tsconfig": "2.67.4",
|
|
65
|
+
"@modern-js/types": "2.67.4",
|
|
66
|
+
"@scripts/jest-config": "2.66.0",
|
|
67
|
+
"@modern-js/utils": "2.67.4"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
70
|
"cookie-es": "^1.0.0"
|