@modern-js/devtools-client 0.0.0-nightly-20240219170634 → 0.0.0-nightly-20240220170629
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/html/client/index.html +3 -3
- package/dist/html/mount/index.html +3 -3
- package/dist/modern.config.json +1 -1
- package/dist/routes-manifest.json +43 -43
- package/dist/static/js/{434.aad695a1.js → 434.5c9bd3fe.js} +2 -2
- package/dist/static/js/{140.5f05bc3e.js → 820.8fc4295f.js} +3 -3
- package/dist/static/js/async/{447.a5613a18.js → 447.76cb4efa.js} +2 -2
- package/dist/static/js/async/client_context/builder/{page.2fc0cb43.js → page.4b1a15e3.js} +2 -2
- package/dist/static/js/async/client_context/framework/{page.166b09d7.js → page.b9144ac0.js} +2 -2
- package/dist/static/js/async/client_headers/editor/{page.cb821897.js → page.2436112e.js} +2 -2
- package/dist/static/js/async/client_headers/{layout.63872d71.js → layout.0f8eb6f9.js} +2 -2
- package/dist/static/js/async/client_overview/{page.81b17041.js → page.f7a2534c.js} +2 -2
- package/dist/static/js/async/client_pages/{layout.b211be51.js → layout.3498bfe7.js} +2 -2
- package/dist/static/js/async/client_pages/{page.f89222bd.js → page.c2953973.js} +2 -2
- package/dist/static/js/{builder-runtime.1a7c378c.js → builder-runtime.2216cd11.js} +1 -1
- package/dist/static/js/{client.3eaa8ce1.js → client.b64a2288.js} +2 -2
- package/dist/static/js/mount.7efd007c.js +2 -0
- package/dist/static/js/{mount.f6c9ca6f.js.LICENSE.txt → mount.7efd007c.js.LICENSE.txt} +40 -40
- package/package.json +12 -12
- package/dist/static/js/mount.f6c9ca6f.js +0 -2
- /package/dist/static/css/{434.5c8e78d3.css → 434.6deac480.css} +0 -0
- /package/dist/static/css/{140.15b19512.css → 820.e0b6557d.css} +0 -0
- /package/dist/static/css/async/{447.462c1f59.css → 447.4130ef05.css} +0 -0
- /package/dist/static/css/async/client_context/builder/{page.462c1f59.css → page.4130ef05.css} +0 -0
- /package/dist/static/css/async/client_context/framework/{page.462c1f59.css → page.4130ef05.css} +0 -0
- /package/dist/static/css/async/client_headers/editor/{page.e5b9dcd6.css → page.1a5c10cb.css} +0 -0
- /package/dist/static/css/async/client_headers/{layout.37d9c53e.css → layout.15850da7.css} +0 -0
- /package/dist/static/css/async/client_overview/{page.deb5f752.css → page.6bfcb254.css} +0 -0
- /package/dist/static/css/async/client_pages/{layout.e7ebb74a.css → layout.d0dfd54d.css} +0 -0
- /package/dist/static/css/async/client_pages/{page.a257301d.css → page.6a7c16c6.css} +0 -0
- /package/dist/static/css/{client.3c53a5b8.css → client.a04c473e.css} +0 -0
- /package/dist/static/css/{mount.18b7c989.css → mount.af5c9c3f.css} +0 -0
- /package/dist/static/js/{434.aad695a1.js.LICENSE.txt → 434.5c9bd3fe.js.LICENSE.txt} +0 -0
- /package/dist/static/js/{140.5f05bc3e.js.LICENSE.txt → 820.8fc4295f.js.LICENSE.txt} +0 -0
- /package/dist/static/js/async/{447.a5613a18.js.LICENSE.txt → 447.76cb4efa.js.LICENSE.txt} +0 -0
- /package/dist/static/js/async/client_context/builder/{page.2fc0cb43.js.LICENSE.txt → page.4b1a15e3.js.LICENSE.txt} +0 -0
- /package/dist/static/js/async/client_context/framework/{page.166b09d7.js.LICENSE.txt → page.b9144ac0.js.LICENSE.txt} +0 -0
- /package/dist/static/js/async/client_headers/editor/{page.cb821897.js.LICENSE.txt → page.2436112e.js.LICENSE.txt} +0 -0
- /package/dist/static/js/async/client_headers/{layout.63872d71.js.LICENSE.txt → layout.0f8eb6f9.js.LICENSE.txt} +0 -0
- /package/dist/static/js/async/client_overview/{page.81b17041.js.LICENSE.txt → page.f7a2534c.js.LICENSE.txt} +0 -0
- /package/dist/static/js/async/client_pages/{layout.b211be51.js.LICENSE.txt → layout.3498bfe7.js.LICENSE.txt} +0 -0
- /package/dist/static/js/async/client_pages/{page.f89222bd.js.LICENSE.txt → page.c2953973.js.LICENSE.txt} +0 -0
- /package/dist/static/js/{client.3eaa8ce1.js.LICENSE.txt → client.b64a2288.js.LICENSE.txt} +0 -0
|
@@ -1,41 +1,3 @@
|
|
|
1
|
-
/*! ./state */
|
|
2
|
-
|
|
3
|
-
/*! react */
|
|
4
|
-
|
|
5
|
-
/*! @/entries/mount/state */
|
|
6
|
-
|
|
7
|
-
/*! ./Button.module.scss */
|
|
8
|
-
|
|
9
|
-
/*! @radix-ui/themes */
|
|
10
|
-
|
|
11
|
-
/*! react-icons/hi2 */
|
|
12
|
-
|
|
13
|
-
/*! ./FrameBox */
|
|
14
|
-
|
|
15
|
-
/*! @swc/helpers/_/_object_spread */
|
|
16
|
-
|
|
17
|
-
/*! react-icons/hi2 */
|
|
18
|
-
|
|
19
|
-
/*! react */
|
|
20
|
-
|
|
21
|
-
/*! react/jsx-runtime */
|
|
22
|
-
|
|
23
|
-
/*! ./react-devtools-backend */
|
|
24
|
-
|
|
25
|
-
/*! valtio */
|
|
26
|
-
|
|
27
|
-
/*! @swc/helpers/_/_object_spread */
|
|
28
|
-
|
|
29
|
-
/*! react-use */
|
|
30
|
-
|
|
31
|
-
/*! @swc/helpers/_/_object_spread_props */
|
|
32
|
-
|
|
33
|
-
/*! react */
|
|
34
|
-
|
|
35
|
-
/*! react/jsx-runtime */
|
|
36
|
-
|
|
37
|
-
/*! hookable */
|
|
38
|
-
|
|
39
1
|
/*! ./index.module.scss */
|
|
40
2
|
|
|
41
3
|
/*! react */
|
|
@@ -60,6 +22,8 @@
|
|
|
60
22
|
|
|
61
23
|
/*! react */
|
|
62
24
|
|
|
25
|
+
/*! ./Button.module.scss */
|
|
26
|
+
|
|
63
27
|
/*! @/utils/draggable */
|
|
64
28
|
|
|
65
29
|
/*! valtio */
|
|
@@ -72,16 +36,22 @@
|
|
|
72
36
|
|
|
73
37
|
/*! @modern-js/devtools-kit/runtime */
|
|
74
38
|
|
|
75
|
-
/*!
|
|
39
|
+
/*! react */
|
|
76
40
|
|
|
77
41
|
/*! ./Button */
|
|
78
42
|
|
|
43
|
+
/*! p-defer */
|
|
44
|
+
|
|
45
|
+
/*! react/jsx-runtime */
|
|
46
|
+
|
|
79
47
|
/*! @/components/Devtools/Capsule */
|
|
80
48
|
|
|
81
49
|
/*! react-dom/client */
|
|
82
50
|
|
|
83
51
|
/*! @/utils/promise */
|
|
84
52
|
|
|
53
|
+
/*! react-use */
|
|
54
|
+
|
|
85
55
|
/*! react/jsx-runtime */
|
|
86
56
|
|
|
87
57
|
/*! @swc/helpers/_/_object_spread */
|
|
@@ -98,4 +68,34 @@
|
|
|
98
68
|
|
|
99
69
|
/*! ../Loading */
|
|
100
70
|
|
|
101
|
-
/*! birpc */
|
|
71
|
+
/*! birpc */
|
|
72
|
+
|
|
73
|
+
/*! ./state */
|
|
74
|
+
|
|
75
|
+
/*! react */
|
|
76
|
+
|
|
77
|
+
/*! @/entries/mount/state */
|
|
78
|
+
|
|
79
|
+
/*! @radix-ui/themes */
|
|
80
|
+
|
|
81
|
+
/*! react-icons/hi2 */
|
|
82
|
+
|
|
83
|
+
/*! ./FrameBox */
|
|
84
|
+
|
|
85
|
+
/*! @swc/helpers/_/_object_spread */
|
|
86
|
+
|
|
87
|
+
/*! react-icons/hi2 */
|
|
88
|
+
|
|
89
|
+
/*! ./react-devtools-backend */
|
|
90
|
+
|
|
91
|
+
/*! valtio */
|
|
92
|
+
|
|
93
|
+
/*! @swc/helpers/_/_object_spread */
|
|
94
|
+
|
|
95
|
+
/*! @swc/helpers/_/_object_spread_props */
|
|
96
|
+
|
|
97
|
+
/*! react */
|
|
98
|
+
|
|
99
|
+
/*! react/jsx-runtime */
|
|
100
|
+
|
|
101
|
+
/*! hookable */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modern-js/devtools-client",
|
|
3
|
-
"version": "0.0.0-nightly-
|
|
3
|
+
"version": "0.0.0-nightly-20240220170629",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=14.0.0"
|
|
6
6
|
},
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"@radix-ui/react-popover": "^1.0.7",
|
|
23
23
|
"@radix-ui/react-tabs": "^1.0.4",
|
|
24
24
|
"@radix-ui/themes": "^2.0.0",
|
|
25
|
-
"@rsbuild/core": "0.4.
|
|
25
|
+
"@rsbuild/core": "0.4.4",
|
|
26
26
|
"@types/jest": "^29",
|
|
27
27
|
"@types/lodash": "^4.14.202",
|
|
28
28
|
"@types/node": "~16.11.7",
|
|
@@ -56,16 +56,16 @@
|
|
|
56
56
|
"ufo": "^1.3.0",
|
|
57
57
|
"valtio": "^1.11.1",
|
|
58
58
|
"jest": "^29",
|
|
59
|
-
"@modern-js-app/eslint-config": "0.0.0-nightly-
|
|
60
|
-
"@modern-js/app-tools": "0.0.0-nightly-
|
|
61
|
-
"@modern-js/devtools-kit": "0.0.0-nightly-
|
|
62
|
-
"@modern-js/
|
|
63
|
-
"@modern-js/
|
|
64
|
-
"@modern-js/runtime": "0.0.0-nightly-
|
|
65
|
-
"@modern-js/
|
|
66
|
-
"@modern-js/
|
|
67
|
-
"@scripts/jest-config": "0.0.0-nightly-
|
|
68
|
-
"@modern-js/
|
|
59
|
+
"@modern-js-app/eslint-config": "0.0.0-nightly-20240220170629",
|
|
60
|
+
"@modern-js/app-tools": "0.0.0-nightly-20240220170629",
|
|
61
|
+
"@modern-js/devtools-kit": "0.0.0-nightly-20240220170629",
|
|
62
|
+
"@modern-js/eslint-config": "0.0.0-nightly-20240220170629",
|
|
63
|
+
"@modern-js/plugin-proxy": "0.0.0-nightly-20240220170629",
|
|
64
|
+
"@modern-js/runtime": "0.0.0-nightly-20240220170629",
|
|
65
|
+
"@modern-js/tsconfig": "0.0.0-nightly-20240220170629",
|
|
66
|
+
"@modern-js/types": "0.0.0-nightly-20240220170629",
|
|
67
|
+
"@scripts/jest-config": "0.0.0-nightly-20240220170629",
|
|
68
|
+
"@modern-js/utils": "0.0.0-nightly-20240220170629"
|
|
69
69
|
},
|
|
70
70
|
"scripts": {
|
|
71
71
|
"reset": "npx rimraf ./**/node_modules",
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see mount.f6c9ca6f.js.LICENSE.txt */
|
|
2
|
-
(self.webpackChunkmodernjsDevtools=self.webpackChunkmodernjsDevtools||[]).push([["400"],{74709:function(e,t,n){"use strict";n.r(t),n.d(t,{DevtoolsCapsuleButton:function(){return i}});var o=n("86834");n("5872");var r=n("20421"),l=n("1065");let i=e=>{var t;let[n,i]=(0,r.useAsyncFn)(()=>Promise.resolve(e.onClick()),[]);return(0,o.jsx)("button",{className:l.container,onClick:i,"data-type":(t=e.type)!==null&&void 0!==t?t:"default",disabled:n.loading,children:e.children})}},62325:function(e,t,n){"use strict";n.r(t),n.d(t,{DevtoolsCapsule:function(){return g}});var o=n("90247"),r=n("55709"),l=n("86834"),i=n("83982"),a=n("5872"),s=n("20421"),c=n("29214"),u=n("55058"),d=n("45967"),m=n("28037"),v=n("10734"),p=n("74709"),f=n("94258"),h=n("28391"),_=n("51879");let g=e=>{let t=e.def.assets.logo,[n,g]=(0,s.useToggle)(!1),[y,w]=(0,a.useState)(!1),k=(0,u.withQuery)(e.endpoint,{src:e.dataSource}),b=(0,f.useStickyDraggable)({clamp:!0}),[x,E]=(0,a.useState)(()=>{var e;let t=(e=localStorage.getItem("__modern_js_devtools_appearance"))!==null&&void 0!==e?e:"light";return localStorage.setItem("__modern_js_devtools_appearance",t),t});(0,s.useEvent)("storage",e=>{"__modern_js_devtools_appearance"===e.key&&E(e.newValue||void 0)}),(0,s.useEvent)("keydown",e=>{e.shiftKey&&e.altKey&&"KeyD"===e.code&&g()}),(0,a.useEffect)(()=>{h.wallAgent.hook("receive",e=>{"startInspectingNative"===e.event&&(g(!1),document.documentElement.style.setProperty("cursor","cell"))});let e=e=>{"stopInspectingNative"===e.event&&(g(!0),document.documentElement.style.removeProperty("cursor"))};return h.wallAgent.hook("send",e),()=>{h.wallAgent.removeHook("send",e)}},[]);let C=async()=>{document.documentElement.style.setProperty("cursor","wait"),g(!1),w(!0);try{(await (0,_.pTimeout)(h.$client,1e4)).remote.pullUpReactInspector()}catch(e){console.error(e),document.documentElement.style.removeProperty("cursor")}};return(0,l.jsxs)(i.Theme,{appearance:x,className:x,children:[(0,l.jsx)(d.default,{when:n,keepAlive:!0,load:y,children:(0,l.jsx)("div",{className:m.container,children:(0,l.jsx)(v.FrameBox,{src:k,onClose:()=>g(!1),style:{pointerEvents:b.isDragging?"none":"auto"}})})}),(0,l.jsxs)(i.Flex,(0,r._)((0,o._)({className:m.fab},b.props),{align:"center",children:[(0,l.jsx)(p.DevtoolsCapsuleButton,{type:"primary",onClick:g,children:(0,l.jsx)("img",{className:m.logo,src:t})}),(0,l.jsx)(p.DevtoolsCapsuleButton,{onClick:C,children:(0,l.jsx)(c.HiMiniCursorArrowRipple,{})})]}))]})}},10734:function(e,t,n){"use strict";n.r(t),n.d(t,{FrameBox:function(){return v}});var o=n("90247"),r=n("55709"),l=n("16170"),i=n("86834"),a=n("83982");n("5872");var s=n("29214"),c=n("42700"),u=n("428"),d=n("93359"),m=n("28391");let v=e=>{var{src:t,onClose:n}=e,v=(0,l._)(e,["src","onClose"]);let{loaded:p}=(0,c.useSnapshot)(m.$inner);return(0,i.jsxs)(a.Box,(0,r._)((0,o._)({className:d.container},v),{children:[(0,i.jsx)("iframe",{className:d.frame,src:t}),(0,i.jsx)(s.HiMiniXMark,{className:d.closeButton,onClick:n}),(0,i.jsx)("div",{className:d.backdrop,style:{display:p?"none":void 0},children:(0,i.jsx)(u.Loading,{})})]}))}},45967:function(e,t,n){"use strict";n.r(t);var o=n("86834"),r=n("5872");t.default=e=>{var t;let n=(t=e.keepAlive)===null||void 0===t||t,{when:l}=e,i=(0,r.useRef)(!1);l&&(i.current=!0);let a=e.load||(n?i.current:l);return a?(0,o.jsx)("div",{style:{display:!n||l?"unset":"none"},children:e.children}):null}},80295:function(e,t,n){"use strict";n.r(t);var o=n("90247"),r=n("86834");n("82231"),n("28391");var l=n("60182"),i=n("63963"),a=n("62325");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 s=document.createElement("div");s.classList.add("_modern_js_devtools_mountpoint","theme-register",i.container),t.appendChild(s);let c=window.__MODERN_JS_DEVTOOLS_OPTIONS__;(0,l.createRoot)(s).render((0,r.jsx)(a.DevtoolsCapsule,(0,o._)({},c)))})},82231:function(e,t,n){"use strict";n.r(t);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)}},28391:function(e,t,n){"use strict";n.r(t),n.d(t,{$client:function(){return h},$inner:function(){return _},wallAgent:function(){return p}});var o=n("90247"),r=n("55709"),l=n("10487"),i=n("88739"),a=n("65872"),s=n("9880"),c=n.n(s),u=n("42700"),d=n("57662"),m=n("24933");let v=l.MessagePortChannel.wait(window,"channel:connect:client"),p=new m.WallAgent,f=(0,d.createBridge)(window,p),h=v.then(e=>{let t=(0,a.createHooks)();return{remote:(0,i.createBirpc)({async activateReactDevtools(){(0,d.activate)(window,{bridge:f})},async onFinishRender(){await t.callHook("onFinishRender")}},(0,r._)((0,o._)({},e.handlers),{timeout:500})),hooks:t}}),_=(0,u.proxy)({loaded:!1}),g=c()();h.then(e=>{let{remote:t,hooks:n}=e;p.bindRemote(t,"sendReactDevtoolsData"),n.hook("onFinishRender",async()=>{_.loaded=!0,g.resolve()})})},94258:function(e,t,n){"use strict";n.r(t),n.d(t,{useStickyDraggable:function(){return s}});var o=n("5872"),r=n("20421");let l=(e,t)=>{var n,o;return(o=(n=({top:["left","right"],bottom:["left","right"],left:["top","bottom"],right:["top","bottom"]})[e])===null||void 0===n?void 0:n.includes(t))!==null&&void 0!==o&&o},i=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 l(t.key,n)}),[r]=n.splice(o,1);return[t,r,n[0],n[1]]},a=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}},s=e=>{var t;let n=(t=null==e?void 0:e.margin)!==null&&void 0!==t?t:"10px",l="number"==typeof n?"".concat(n,"px"):n,[s,c]=(0,o.useState)(),u=()=>{if(!s)return;s.moveable=!1;let{el:e}=s,[t]=i(a(e));e.style.transition="".concat(t.key," 200ms"),requestIdleCallback(()=>{c(void 0),e.style[t.key]=l}),e.addEventListener("transitionend",()=>e.style.transition="",{once:!0})},d=t=>{let n="touches"in t?t.touches[0]:t;if(!(null==s?void 0:s.moveable))return;let{startX:o,startY:r}=s;(o-n.clientX)**2+(r-n.clientY)**2>9&&(s.clickable=!1);let{width:a,height:c}=s.el.getBoundingClientRect(),u=n.clientY-s.offsetY,d=n.clientX-s.offsetX,m=i({top:u,left:d,bottom:window.innerHeight-u-c,right:window.innerWidth-d-a}).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 m){let t=["top","bottom"].includes(e.key)?window.innerHeight-c:window.innerWidth-a;e.value="clamp(".concat(l,", ").concat(e.value,", ").concat(t,"px)")}let[v,p,...f]=m,{style:h}=s.el;h.transition="",h[v.key]=v.value,h[p.key]=p.value,h[f[0].key]="auto",h[f[1].key]="auto"};(0,r.useEvent)("blur",u),(0,r.useEvent)("mouseup",u),(0,r.useEvent)("touchend",u),(0,r.useEvent)("mousemove",d),(0,r.useEvent)("touchmove",d);let m=e=>{let t="touches"in e?e.touches[0]:e,n=e.currentTarget,o=n.getBoundingClientRect(),r=t.clientX-o.left;c({el:n,clickable:!0,moveable:!0,offsetX:r,offsetY:t.clientY-o.top,startX:t.clientX,startY:t.clientY})};return{isDragging:!!s,props:{onMouseDown:m,onTouchStart:m,onClickCapture:e=>{(null==s?void 0:s.clickable)||e.stopPropagation()}}}}},51879:function(e,t,n){"use strict";n.r(t),n.d(t,{pTimeout:function(){return o}});let o=(e,t)=>new Promise((n,o)=>{let r=!0,l=setTimeout(()=>{r=!1,o(Error("Promise Timeout"))},t);e.then(e=>{r&&n(e),clearTimeout(l)}),e.catch(o)})},1065:function(e){"use strict";e.exports={container:"container-a41eae"}},28037:function(e){"use strict";e.exports={container:"container-c37ff8",fab:"fab-b17740",logo:"logo-c7a29e",slideInFromRight:"slideInFromRight-e1026d"}},93359:function(e){"use strict";e.exports={backdrop:"backdrop-_51706","close-button":"close-button-c3742a",closeButton:"close-button-c3742a",container:"container-fb8255",frame:"frame-_5d7ff"}},63963:function(e){"use strict";e.exports={container:"container-d972e2"}}},function(e){var t=function(t){return e(e.s=t)};e.O(0,["126","140","434","58","768"],function(){return t("90915"),t("58571"),t("66828"),t("19449"),t("80295")}),e.O()}]);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/static/css/async/client_context/builder/{page.462c1f59.css → page.4130ef05.css}
RENAMED
|
File without changes
|
/package/dist/static/css/async/client_context/framework/{page.462c1f59.css → page.4130ef05.css}
RENAMED
|
File without changes
|
/package/dist/static/css/async/client_headers/editor/{page.e5b9dcd6.css → page.1a5c10cb.css}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|