@modern-js/devtools-client 2.58.0 → 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.
Files changed (36) hide show
  1. package/dist/modern.config.json +1 -279
  2. package/dist/public/sw-proxy.js +1 -1
  3. package/dist/routes-manifest.json +45 -45
  4. package/dist/static/html/client/index.html +3 -3
  5. package/dist/static/html/mount/index.html +3 -3
  6. package/dist/static/js/{130.a055ee6f.js → 130.e9fe135b.js} +1 -1
  7. package/dist/static/js/{396.3a03c91e.js → 324.f1f00e24.js} +3 -3
  8. package/dist/static/js/{37.3b6855a6.js → 995.2a85d331.js} +3 -3
  9. package/dist/static/js/async/client_config/(toolkit).(type)/{page.f4f25669.js → page.58295f9e.js} +1 -1
  10. package/dist/static/js/async/client_context/builder/{page.fa63dd48.js → page.ff155bd1.js} +1 -1
  11. package/dist/static/js/async/client_context/framework/{page.1e92d092.js → page.d1293802.js} +1 -1
  12. package/dist/static/js/async/client_doctor/{page.1bce9053.js → page.bf9fec27.js} +1 -1
  13. package/dist/static/js/async/client_headers/editor/page.c918d965.js +1 -0
  14. package/dist/static/js/async/client_overview/{page.8f02d776.js → page.12e213b3.js} +1 -1
  15. package/dist/static/js/async/client_pages/{page.a4020deb.js → page.52e4b55c.js} +1 -1
  16. package/dist/static/js/async/client_react/offscreen/page.cd0548da.js +1 -0
  17. package/dist/static/js/async/client_storage/preset/(id)/{page.d9ba689e.js → page.e03b8590.js} +1 -1
  18. package/dist/static/js/async/client_storage/preset/layout.22c4ff65.js +1 -0
  19. package/dist/static/js/async/client_storage/preset/page.3a7155d7.js +1 -0
  20. package/dist/static/js/{builder-runtime.694bc54b.js → builder-runtime.fa818427.js} +1 -1
  21. package/dist/static/js/{client.28c8f27c.js → client.88d55458.js} +1 -1
  22. package/dist/static/js/components.d4cbe1c4.js +1 -0
  23. package/dist/static/js/lib-polyfill.04944fd7.js +1 -0
  24. package/dist/static/js/mount.049fbc82.js +1 -0
  25. package/package.json +14 -14
  26. package/dist/static/js/async/client_headers/editor/page.4194fbba.js +0 -1
  27. package/dist/static/js/async/client_react/offscreen/page.2511e7a7.js +0 -1
  28. package/dist/static/js/async/client_storage/preset/layout.f6253a54.js +0 -1
  29. package/dist/static/js/async/client_storage/preset/page.4f048c94.js +0 -1
  30. package/dist/static/js/components.75879e60.js +0 -1
  31. package/dist/static/js/lib-polyfill.3df5a348.js +0 -1
  32. package/dist/static/js/mount.02a9d3ac.js +0 -1
  33. /package/dist/static/css/{396.861d0891.css → 324.861d0891.css} +0 -0
  34. /package/dist/static/css/{37.e744b37c.css → 995.e744b37c.css} +0 -0
  35. /package/dist/static/js/{396.3a03c91e.js.LICENSE.txt → 324.f1f00e24.js.LICENSE.txt} +0 -0
  36. /package/dist/static/js/{37.3b6855a6.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.58.0",
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.9",
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
- "flatted": "^3.2.9",
61
- "@modern-js-app/eslint-config": "2.58.0",
62
- "@modern-js/app-tools": "2.58.0",
63
- "@modern-js/eslint-config": "2.58.0",
64
- "@modern-js/devtools-kit": "2.58.0",
65
- "@modern-js/runtime": "2.58.0",
66
- "@modern-js/types": "2.58.0",
67
- "@modern-js/plugin-proxy": "2.58.0",
68
- "@modern-js/tsconfig": "2.58.0",
69
- "@modern-js/utils": "2.58.0",
70
- "@scripts/jest-config": "2.58.0"
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"
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkmodernjsDevtools=self.webpackChunkmodernjsDevtools||[]).push([["730"],{47014:function(e,a,l){l.r(a),l.d(a,{default:()=>C});var s=l("86834"),r=l("52493"),n=l.n(r),i=l("5872"),c=l("12320"),d=l("79197"),t=l("81733"),o=l("55058"),h=l("96575");let u={signal:"signal-L2JPtX"};var x=l("789"),v=l("74679"),j=l("45230"),g=l("7077"),f=l("73824"),k=l("29214"),p=l("2159");let y=e=>{let{$data:a,onDelete:l,onInsert:r,disabled:n,placeholders:i=["Key...","Value..."]}=e,t=(0,d.R)(a);return(0,s.jsxs)(c.xu,{className:p.Z.inputPair,"aria-disabled":n,children:[(0,s.jsx)(c.nv.f,{value:t.key,disabled:n,placeholder:i[0],onChange:e=>a.key=e.currentTarget.value}),(0,s.jsx)(c.xu,{asChild:!0,flexGrow:"1",children:(0,s.jsx)(c.nv.f,{value:t.value,disabled:n,placeholder:i[1],onChange:e=>a.value=e.currentTarget.value})}),(0,s.jsxs)(c.xu,{className:p.Z.actions,children:[(0,s.jsx)(c.hU,{variant:"ghost",color:"gray",onClick:l,children:(0,s.jsx)(k.O$V,{})}),(0,s.jsx)(c.hU,{variant:"ghost",color:"gray",onClick:r,children:(0,s.jsx)(k.PW$,{})})]})]},t.id)},m=e=>{var{$data:a=(0,t.sj)([]),disabled:l,placeholders:r}=e,n=(0,j._)(e,["$data","disabled","placeholders"]);let o=(0,d.R)(a);return(0,i.useEffect)(()=>{o.length<=0&&a.push({id:(0,g.nanoid)(),key:"",value:""})},[o.length]),(0,s.jsx)(c.xu,(0,v._)((0,x._)({className:f.Z.container},n),{children:o.map((e,n)=>(0,s.jsx)(y,{$data:a[n],disabled:l,placeholders:r,onDelete:()=>a.splice(n,1),onInsert:()=>a.splice(n+1,0,{id:(0,g.nanoid)(),key:"",value:""})},e.id))}))},C=()=>{let e=(0,d.R)(h.ok),a=!!e.service.href,l=(0,i.useMemo)(()=>{var a;return(0,t.sj)(null!==(a=n().cloneDeep(e.service.rules))&&void 0!==a?a:[])},[]),r=(0,d.R)(l),x=a?"Active":"Offline",v=async()=>{await (0,h.gM)(r.filter(e=>e.key))},j=async()=>{await (0,h.m)()};return(0,s.jsxs)(c.xu,{className:u.container,children:[(0,s.jsx)(c.X6,{mt:"4",children:"Header Modifier"}),(0,s.jsxs)(c.kC,{align:"center",gap:"1",children:[(0,s.jsx)(c.xu,{className:u.signal,"data-active":a}),(0,s.jsx)(c.xv,{color:"gray",size:"1",children:x}),e.service.href&&(0,s.jsx)(c.rU,{size:"1",href:e.service.href,target:"_blank",children:(0,o.Lk)(e.service.href).pathname})]}),(0,s.jsx)(m,{$data:l,disabled:a,my:"3",placeholders:["Match header field...","Replace by..."]}),(0,s.jsx)(c.kC,{justify:"end",gap:"2",children:a?(0,s.jsx)(c.zx,{color:"red",onClick:j,children:"Unregister"}):(0,s.jsx)(c.zx,{onClick:v,children:"Register"})})]})}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkmodernjsDevtools=self.webpackChunkmodernjsDevtools||[]).push([["752"],{13818:function(e,s,n){n.r(s),n.d(s,{default:function(){return r}});var o=n(86834),l=n(12320);n(5872);let r=()=>(0,o.jsx)(l.xu,{children:(0,o.jsx)(l.xv,{children:"React DevTools is unavailable for offscreen."})})}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkmodernjsDevtools=self.webpackChunkmodernjsDevtools||[]).push([["470"],{2242:function(e,t,l){l.d(t,{Z:function(){return r}});let r={container:"container-ewltyx","side-panel":"side-panel-bdvL2J",sidePanel:"side-panel-bdvL2J","overflow-badge":"overflow-badge-jy83Ta",overflowBadge:"overflow-badge-jy83Ta","preview-badge-list":"preview-badge-list-gW0J6X",previewBadgeList:"preview-badge-list-gW0J6X","btn-create-preset":"btn-create-preset-hoeILU",btnCreatePreset:"btn-create-preset-hoeILU",divider:"divider-lbRk1F","text-ellipsis":"text-ellipsis-F0lpeD",textEllipsis:"text-ellipsis-F0lpeD",badge:"badge-V1CqD5",scrollable:"scrollable-HHlcgf"}},88640:function(e,t,l){l.d(t,{Z:function(){return r}});let r=function(){for(var e,t,l=0,r="";l<arguments.length;)(e=arguments[l++])&&(t=function e(t){var l,r,a="";if("string"==typeof t||"number"==typeof t)a+=t;else if("object"==typeof t){if(Array.isArray(t))for(l=0;l<t.length;l++)t[l]&&(r=e(t[l]))&&(a&&(a+=" "),a+=r);else for(l in t)t[l]&&(a&&(a+=" "),a+=l)}return a}(e))&&(r&&(r+=" "),r+=t);return r}},9197:function(e,t,l){l.d(t,{Z:()=>d,x:()=>h});var r=l("789"),a=l("74679"),s=l("45230"),i=l("86834"),n=l("88640"),o=l("12320"),c=l("74922");let d=e=>{let{children:t,className:l,variant:d,clickable:h=!1,selected:u=!1,inset:g=!1}=e,p=(0,s._)(e,["children","className","variant","clickable","selected","inset"]);return(0,i.jsx)(o.xu,(0,a._)((0,r._)({},p),{"data-variant":null!=d?d:"","data-clickable":h,"data-selected":u,"data-inset":g,className:(0,n.Z)(c.Z.card,l),children:t}))},h=e=>(0,i.jsx)(o.kC,(0,r._)({gap:"2",height:"100%",justify:"center",direction:"column",align:"start"},e))},60451:function(e,t,l){let r,a;l.r(t),l.d(t,{default:()=>w});var s=l("789"),i=l("74679"),n=l("45230"),o=l("86834"),c=l("58654"),d=l("12320"),h=l("52493"),u=l.n(h),g=l("29214"),p=l("79197"),f=l("81733");Symbol();let x=new WeakMap,v=e=>"object"==typeof e&&null!==e;var j=l("2242"),m=l("33049"),b=l("95197"),k=l("9197");let y=e=>{let{selected:t,to:l}=e,r=(0,n._)(e,["selected","to"]),a=(0,c.s0)(),i=(0,c.bS)(null!=l?l:"");return(0,o.jsx)(k.Z,{variant:"small",selected:null!=t?t:!!i,clickable:!0,asChild:!0,onClick:()=>l&&a(l),children:(0,o.jsx)(d.kC,(0,s._)({},r))})},C=e=>{let{preset:t,highlight:l}=e,r=(0,n._)(e,["preset","highlight"]),a=!t.filename.match(/[/\\]node_modules[/\\]/),c=null;return l&&(c=(0,o.jsx)(d.xv,{size:"1",color:"red",asChild:!0,children:(0,o.jsx)(g.XC2,{})})),(0,o.jsxs)(y,(0,i._)((0,s._)({direction:"column"},r),{children:[(0,o.jsxs)(d.xv,{size:"1",weight:"bold",as:"p",mb:"2",children:[t.name," ",a||(0,o.jsx)(d.xv,{size:"1",color:"gray",children:"*"}),c]}),(0,o.jsx)(d.kC,{align:"center",children:(0,o.jsxs)(d.kC,{className:j.Z.previewBadgeList,children:[0===t.items.length&&(0,o.jsx)(d.Ct,{color:"gray",children:"Empty"}),t.items.map(e=>(0,o.jsxs)(d.Ct,{color:m.xq[e.type],children:[e.key,": ",e.value]},e.id))]})})]}))},w=()=>{let e=(0,b.k)(),{server:t}=e,{storagePresets:l}=(0,p.R)(e).context,a=(0,c.f_)(),n={cookie:(0,s._)({},a.cookie.client,a.cookie.server),localStorage:a.localStorage,sessionStorage:a.sessionStorage},h=(0,c.s0)(),x={cookie:u()(l).flatMap(e=>u().keys(e.cookie)).countBy().value(),localStorage:u()(l).flatMap(e=>u().keys(e.localStorage)).countBy().value(),sessionStorage:u()(l).flatMap(e=>u().keys(e.sessionStorage)).countBy().value()},v=l.map(e=>(0,i._)((0,s._)({},e),{items:u()((0,m.f)(e)).sortBy(e=>{var t;return null!==(t=x[e.type][e.key])&&void 0!==t?t:0}).reverse().value()})),k=async()=>{if(!t)return;let{id:l}=await t.remote.createTemporaryStoragePreset(),a=function(e,t){let l=!0,a=new Set,s=new Map,i=()=>{l&&(l=!1,a.forEach(e=>e()),a.clear(),s.forEach(e=>e()),s.clear())},n=()=>{if(!l)return;a.forEach(e=>e()),a.clear();let t=new Set,i=r;r=a;try{let l=e(e=>(t.add(e),e));l&&a.add(l)}finally{r=i}s.forEach((e,l)=>{t.has(l)?t.delete(l):(s.delete(l),e())}),t.forEach(e=>{let t=(0,f.Ld)(e,n,void 0);s.set(e,t)})};return r&&r.add(i),n(),i}(t=>{let{storagePresets:r}=(0,f.CO)(t(e)).context;u().find(r,{id:l})&&(a(),h("/storage/preset/".concat(l)))})};return(0,o.jsxs)(d.kC,{width:"100%",pt:"4",className:j.Z.container,children:[(0,o.jsxs)(d.kC,{direction:"column",className:j.Z.sidePanel,children:[(0,o.jsxs)(y,{to:"/storage/preset",m:"2",align:"center",gap:"1",children:[(0,o.jsx)(d.xv,{size:"1",weight:"bold",children:"Current Storage"}),(0,o.jsx)(d.xv,{size:"1",color:"red",asChild:!0,children:(0,o.jsx)(g.XC2,{})})]}),(0,o.jsx)(d.xu,{mx:"2",className:j.Z.divider}),(0,o.jsxs)(d.kC,{p:"2",direction:"column",gap:"2",className:j.Z.scrollable,children:[v.map(e=>(0,o.jsx)(C,{to:"/storage/preset/".concat(e.id),preset:e,highlight:e.items.length>0&&u().isMatch(n,u().pick(e,["cookie","localStorage","sessionStorage"]))},e.id)),(0,o.jsx)(y,{justify:"center",align:"center",onClick:k,className:j.Z.btnCreatePreset,children:(0,o.jsx)(g.b9W,{})})]})]}),(0,o.jsx)(d.xu,{width:"0",flexGrow:"1",height:"100%",flexShrink:"1",pt:"2",children:(0,o.jsx)(c.j3,{})})]})}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkmodernjsDevtools=self.webpackChunkmodernjsDevtools||[]).push([["146"],{2242:function(e,r,l){l.d(r,{Z:function(){return t}});let t={container:"container-ewltyx","side-panel":"side-panel-bdvL2J",sidePanel:"side-panel-bdvL2J","overflow-badge":"overflow-badge-jy83Ta",overflowBadge:"overflow-badge-jy83Ta","preview-badge-list":"preview-badge-list-gW0J6X",previewBadgeList:"preview-badge-list-gW0J6X","btn-create-preset":"btn-create-preset-hoeILU",btnCreatePreset:"btn-create-preset-hoeILU",divider:"divider-lbRk1F","text-ellipsis":"text-ellipsis-F0lpeD",textEllipsis:"text-ellipsis-F0lpeD",badge:"badge-V1CqD5",scrollable:"scrollable-HHlcgf"}},88640:function(e,r,l){l.d(r,{Z:function(){return t}});let t=function(){for(var e,r,l=0,t="";l<arguments.length;)(e=arguments[l++])&&(r=function e(r){var l,t,i="";if("string"==typeof r||"number"==typeof r)i+=r;else if("object"==typeof r){if(Array.isArray(r))for(l=0;l<r.length;l++)r[l]&&(t=e(r[l]))&&(i&&(i+=" "),i+=t);else for(l in r)r[l]&&(i&&(i+=" "),i+=l)}return i}(e))&&(t&&(t+=" "),t+=r);return t}},9197:function(e,r,l){l.d(r,{Z:()=>d,x:()=>p});var t=l("789"),i=l("74679"),s=l("45230"),n=l("86834"),a=l("88640"),o=l("12320"),c=l("74922");let d=e=>{let{children:r,className:l,variant:d,clickable:p=!1,selected:g=!1,inset:u=!1}=e,x=(0,s._)(e,["children","className","variant","clickable","selected","inset"]);return(0,n.jsx)(o.xu,(0,i._)((0,t._)({},x),{"data-variant":null!=d?d:"","data-clickable":p,"data-selected":g,"data-inset":u,className:(0,a.Z)(c.Z.card,l),children:r}))},p=e=>(0,n.jsx)(o.kC,(0,t._)({gap:"2",height:"100%",justify:"center",direction:"column",align:"start"},e))},65459:function(e,r,l){l.r(r),l.d(r,{default:function(){return x}});var t=l(789),i=l(74679),s=l(45230),n=l(86834),a=l(12320),o=l(52493),c=l.n(o),d=l(58654),p=l(2242),g=l(9197);let u=e=>{let{title:r,records:l,color:o}=e,c=(0,s._)(e,["title","records","color"]);return(0,n.jsx)(g.Z,(0,i._)((0,t._)({asChild:!0},c),{children:(0,n.jsxs)(a.kC,{direction:"column",gap:"2",children:[(0,n.jsx)(a.xv,{size:"1",weight:"bold",children:r}),(0,n.jsxs)(a.kC,{width:"100%",wrap:"wrap",align:"start",gap:"2",children:[0===l.length&&(0,n.jsx)(a.Ct,{color:"gray",children:"Empty"}),l.map(e=>(0,n.jsxs)(a.Ct,{color:o,className:p.Z.badge,children:[e.key,": ",e.value]},e.id))]})]})}))},x=()=>{let e=(0,d.f_)(),r=c().map(e.cookie.client,(e,r)=>({key:r,value:e,id:r})),l=c().map(e.cookie.server,(e,r)=>({key:r,value:e,id:r})),t=c().map(e.localStorage,(e,r)=>({key:r,value:e,id:r})),i=c().map(e.sessionStorage,(e,r)=>({key:r,value:e,id:r}));return(0,n.jsxs)(a.kC,{direction:"column",gap:"2",height:"100%",flexShrink:"1",children:[(0,n.jsx)(a.kC,{flexGrow:"0",px:"2",gap:"2",justify:"between",align:"center",width:"100%",children:(0,n.jsx)(a.xu,{flexShrink:"0",className:p.Z.textEllipsis,children:(0,n.jsx)(a.xv,{size:"1",weight:"bold",color:"gray",children:"Current Storage"})})}),(0,n.jsx)(a.xu,{flexGrow:"1",pb:"2",pr:"2",className:p.Z.scrollable,children:(0,n.jsxs)(a.kC,{direction:"column",gap:"2",children:[(0,n.jsx)(u,{title:"Cookie",records:r,color:"yellow"}),(0,n.jsx)(u,{title:"Cookie (HTTP Only)",records:l,color:"yellow"}),(0,n.jsx)(u,{title:"Local Storage",records:t,color:"green"}),(0,n.jsx)(u,{title:"Session Storage",records:i,color:"blue"})]})})]})}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkmodernjsDevtools=self.webpackChunkmodernjsDevtools||[]).push([["567"],{35452:function(n,t,e){e.d(t,{Z:function(){return o}});let o={link:"link-znMYnO",connector:"connector-BqtwBd"}},74922:function(n,t,e){e.d(t,{Z:function(){return o}});let o={card:"card-If0911"}},68234:function(n,t,e){e.d(t,{Z:function(){return o}});let o={container:"container-WHe0d3"}},967:function(n,t,e){e.d(t,{Z:function(){return o}});let o={container:"container-tsQk3U",fab:"fab-_shO90",slideInFromRight:"slideInFromRight-cmflGC",logo:"logo-nXXNIB"}},38645:function(n,t,e){e.d(t,{Z:function(){return o}});let o={container:"container-tcM8fB","close-button":"close-button-weoXpd",closeButton:"close-button-weoXpd",frame:"frame-PSYQgj",backdrop:"backdrop-SWoFLh"}},35066:function(n,t,e){e.d(t,{Z:function(){return o}});let o={container:"container-uSZ85N",children:"children-cVMy6R"}},69286:function(n,t,e){e.d(t,{Z:function(){return o}});let o={loading:"loading-HrjYdW",rotate:"rotate-CPIjfB"}},96444:function(n,t,e){e.d(t,{Z:function(){return o}});let o={container:"container-COzu4H"}},83773:function(n,t,e){e.d(t,{Z:function(){return o}});let o={container:"container-SkRv4t"}},73824:function(n,t,e){e.d(t,{Z:function(){return o}});let o={container:"container-e3dQes"}},2159:function(n,t,e){e.d(t,{Z:function(){return o}});let o={"input-pair":"input-pair-rQmmCj",inputPair:"input-pair-rQmmCj",actions:"actions-AIkunB"}},69435:function(n,t,e){e.d(t,{Z:function(){return o}});let o={container:"container-e74VUa",trigger:"trigger-THjT7j",content:"content-Qso8ca",slideDown:"slideDown-Z9IIi_",slideUp:"slideUp-H_SR0p","url-text":"url-text-OqB5_M",urlText:"url-text-OqB5_M",mark:"mark-cUxPxy"}},33366:function(n,t,e){e.d(t,{Z:function(){return o}});let o={"endpoint-tag":"endpoint-tag-y0SEjj",endpointTag:"endpoint-tag-y0SEjj","shy-link":"shy-link-Xazm8H",shyLink:"shy-link-Xazm8H","endpoint-container":"endpoint-container-XVJeZy",endpointContainer:"endpoint-container-XVJeZy"}},22947:function(n,t,e){e.d(t,{Z:function(){return o}});let o={stats:"stats-cb58Fz"}},84864:function(n,t,e){e.d(t,{Z:function(){return o}});let o={container:"container-dWGOkz",slideIn:"slideIn-AQnKGk",hide:"hide-LUv_Hv",swipeOut:"swipeOut-ZTbSGG",viewport:"viewport-Owdzo8",close:"close-i8MeRu"}}}]);