From a7202dbaea3831544ecfd43113a1ce291c92c432 Mon Sep 17 00:00:00 2001 From: MrWangJustToDo Date: Wed, 13 Nov 2024 11:39:42 +0000 Subject: [PATCH] deploy: 56baad503b89297882084a498486a0c2e56139be --- 404.html | 2 +- .../_buildManifest.js | 2 +- .../_ssgManifest.js | 0 _next/static/chunks/pages/devTool-29a75adf54450719.js | 1 - _next/static/chunks/pages/devTool-ebbcd20da26671a2.js | 1 + devTool.html | 2 +- disablePopup.html | 2 +- enablePopup.html | 2 +- index.html | 2 +- 9 files changed, 7 insertions(+), 7 deletions(-) rename _next/static/{ZTToaSQ-tAUQrCsq-0l1X => 7_PClYsDKgyJbwQhzz7MG}/_buildManifest.js (88%) rename _next/static/{ZTToaSQ-tAUQrCsq-0l1X => 7_PClYsDKgyJbwQhzz7MG}/_ssgManifest.js (100%) delete mode 100644 _next/static/chunks/pages/devTool-29a75adf54450719.js create mode 100644 _next/static/chunks/pages/devTool-ebbcd20da26671a2.js diff --git a/404.html b/404.html index 600acc2..7451e47 100644 --- a/404.html +++ b/404.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/_next/static/ZTToaSQ-tAUQrCsq-0l1X/_buildManifest.js b/_next/static/7_PClYsDKgyJbwQhzz7MG/_buildManifest.js similarity index 88% rename from _next/static/ZTToaSQ-tAUQrCsq-0l1X/_buildManifest.js rename to _next/static/7_PClYsDKgyJbwQhzz7MG/_buildManifest.js index 18bb15e..33df0e2 100644 --- a/_next/static/ZTToaSQ-tAUQrCsq-0l1X/_buildManifest.js +++ b/_next/static/7_PClYsDKgyJbwQhzz7MG/_buildManifest.js @@ -1 +1 @@ -self.__BUILD_MANIFEST={__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},"/":["static/chunks/pages/index-9b53bcf327468799.js"],"/_error":["static/chunks/pages/_error-99007ea416ced0f3.js"],"/devTool":["static/chunks/44-4fe9fef5d2c1360e.js","static/chunks/pages/devTool-29a75adf54450719.js"],"/disablePopup":["static/chunks/pages/disablePopup-83a2971861dfa49f.js"],"/enablePopup":["static/chunks/pages/enablePopup-7a32dd45cc6efb9d.js"],sortedPages:["/","/_app","/_error","/devTool","/disablePopup","/enablePopup"]},self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file +self.__BUILD_MANIFEST={__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},"/":["static/chunks/pages/index-9b53bcf327468799.js"],"/_error":["static/chunks/pages/_error-99007ea416ced0f3.js"],"/devTool":["static/chunks/44-4fe9fef5d2c1360e.js","static/chunks/pages/devTool-ebbcd20da26671a2.js"],"/disablePopup":["static/chunks/pages/disablePopup-83a2971861dfa49f.js"],"/enablePopup":["static/chunks/pages/enablePopup-7a32dd45cc6efb9d.js"],sortedPages:["/","/_app","/_error","/devTool","/disablePopup","/enablePopup"]},self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file diff --git a/_next/static/ZTToaSQ-tAUQrCsq-0l1X/_ssgManifest.js b/_next/static/7_PClYsDKgyJbwQhzz7MG/_ssgManifest.js similarity index 100% rename from _next/static/ZTToaSQ-tAUQrCsq-0l1X/_ssgManifest.js rename to _next/static/7_PClYsDKgyJbwQhzz7MG/_ssgManifest.js diff --git a/_next/static/chunks/pages/devTool-29a75adf54450719.js b/_next/static/chunks/pages/devTool-29a75adf54450719.js deleted file mode 100644 index f10445f..0000000 --- a/_next/static/chunks/pages/devTool-29a75adf54450719.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[374],{5834:function(e,l,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/devTool",function(){return t(8231)}])},8231:function(e,l,t){"use strict";t.r(l),t.d(l,{default:function(){return eF}});var n,s,i=t(4746),r=t(2700),a=t.n(r),o=t(2551),c=t(4177),d=t(4153),x=t(6139),u=t(1026),h=t(7960);let m=e=>{let{left:l,right:t}=e;return(0,i.jsx)(x.w,{className:"w-full",radius:"sm",children:(0,i.jsx)(u.G,{className:"w-full p-0",children:(0,i.jsxs)(h.oL,{children:[l,t]})})})};var v=t(7954),j=t(3105),p=t(6734),f=t(6388),g=t(3799),w=t(3498),N=t(6721),y=t(1773),b=t(5316);(n=s||(s={})).sm="sm",n.md="md",n.lg="lg";let S=(0,b.eK)(()=>({state:"sm"}),{withActions:e=>({setUISize:l=>e.state=l}),withDeepSelector:!1}),k=e=>{let l=null==e?void 0:e.v,t=null==e?void 0:e.t;if("Element"===t||"Date"===t||"Boolean"===t||"Error"===t||"Number"===t||"Symbol"===t)return l;if((null==e?void 0:e.l)===!1)return"Array"===e.t||"Set"===e.t?"[…]":"Map"===e.t||"Object"===e.t?"{…}":"…";if(null!==l&&"object"==typeof l&&!Array.isArray(l)&&"function"==typeof l[window.Symbol.iterator])return"(…)";if(Array.isArray(l))return l.length>0?"[…]":"[]";if("Null"===t)return"null";if("Undefined"===t)return"undef";if("object"==typeof l)return Object.keys(l).length>0?"{…}":"{}";if("Function"===t)return"".concat(l.substr(0,10)+(l.length>10?"…":""));if("string"==typeof l)return'"'.concat(l.substr(0,10)+(l.length>10?"…":""),'"');else return l};function C(e,l){if("Object"===e){let e=Object.keys(l),t=e.slice(0,3).map(e=>"".concat(e,": ").concat(k(l[e]))).concat(e.length>3?["…"]:[]).join(", ");return"{ ".concat(t," }")}if("Array"!==e)return e;{let e=l.slice(0,4).map(e=>k(e)).concat(l.length>4?["…"]:[]).join(", ");return"[".concat(e,"]")}}let A=e=>{var l;let{item:t}=e,[n,s]=(0,c.useState)(!1),r=t.h,a=n?(0,i.jsx)(w.AS7,{width:"16",height:"16"}):(0,i.jsx)(w.VZf,{width:"16",height:"16"});return r?(0,i.jsx)(z,{name:t.n,item:t.v,prefix:(0,i.jsx)(p.z,{classNames:{content:"p-0"},size:"sm",className:"rounded-sm text-center mr-1 flex-shrink-0 font-[300] !px-1 text-gray-800 dark:text-gray-200 !h-[1.4em] !max-w-[initial] !min-w-[initial]",children:t.i})}):(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("div",{className:"hook-stack-view",children:[(0,i.jsxs)("div",{className:"flex w-full my-0.5",children:[(0,i.jsx)("span",{className:"text-gray-400 hover:text-gray-700",onClick:()=>s(!n),children:a}),(0,i.jsxs)("div",{className:"max-w-full line-clamp-1",children:[t.n,":"]})]}),(0,i.jsx)("div",{className:"".concat(n?"block":"hidden"," ml-4 my-0.5"),children:null===(l=t.c)||void 0===l?void 0:l.map((e,l)=>(0,i.jsx)(A,{item:e},e.n+"-"+l))})]})})},z=e=>{var l,t,n,s;let{name:r,item:a,prefix:o}=e,[d,x]=(0,c.useState)(!1),u=N.F.useShallowStableSelector(e=>{var l,t;return null===(t=e.data)||void 0===t?void 0:null===(l=t[(null==a?void 0:a.i)||""])||void 0===l?void 0:l.loaded}),h=null!==(l=null==u?void 0:u.v)&&void 0!==l?l:null==a?void 0:a.v,m=null!==(t=null==u?void 0:u.n)&&void 0!==t?t:null==a?void 0:a.n,j=null!==(n=null==u?void 0:u.t)&&void 0!==n?n:null==a?void 0:a.t,p=null!==(s=null==u?void 0:u.c)&&void 0!==s?s:null==a?void 0:a.c,f=(0,c.useMemo)(()=>{if(m)return m;if("Array"===j||"Set"===j||"Map"===j){let e=C("Array",null!=h?h:[]);return"Set"===j||"Map"===j?"".concat(j,"(").concat(e,")"):e}if("Iterable"===j||"Object"===j)return C("Object",null!=h?h:{})},[j,m,h]);if((0,c.useEffect)(()=>{d&&(null==a?void 0:a.l)===!1&&a.i&&!u&&N.F.getActions().setLoading(a.i)},[u,d,null==a?void 0:a.i,null==a?void 0:a.l]),!a)return null;let g=a.e,y=d?(0,i.jsx)(w.AS7,{width:"16",height:"16"}):(0,i.jsx)(w.VZf,{width:"16",height:"16"});if(g)return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("div",{className:"hook-value-view",children:[(0,i.jsxs)("div",{className:"flex w-full my-0.5 items-center",children:[(0,i.jsx)("span",{className:"text-gray-400 hover:text-gray-700",onClick:()=>x(!d),children:y}),o,(0,i.jsxs)("div",{className:"max-w-full line-clamp-1 break-all",children:[r,": ",(0,i.jsx)("span",{className:"hook-value-placeholder",children:h?f:(0,i.jsx)(w.nWS,{className:"inline-block"})})]})]}),(!p||d)&&(0,i.jsx)("div",{className:"".concat(d?"block":"hidden"," ml-6 my-0.5"),children:h?Array.isArray(h)?(0,i.jsx)(i.Fragment,{children:h.map((e,l)=>(0,i.jsx)(z,{name:l.toString(),item:e},l))}):(0,i.jsx)(i.Fragment,{children:Object.keys(h).map(e=>(0,i.jsx)(z,{name:e,item:h[e]},e))}):(0,i.jsx)(v.c,{size:"sm"})})]})});{let e=(0,i.jsx)("span",{className:"hook-".concat(a.t),children:String(a.v)});return(0,i.jsx)("div",{className:"hook-value-view",children:(0,i.jsxs)("div",{className:"flex w-full my-0.5 items-center",children:[(0,i.jsx)("span",{className:"text-transparent",children:y}),o,(0,i.jsxs)("div",{className:"max-w-full line-clamp-1 break-all",children:[r,": ",(0,i.jsx)("span",{className:"hook-value-placeholder",children:e})]})]})})}},O=()=>{let e=(0,y.O)(e=>e.select),l=(0,j.K)(e=>e.nodes),t=S.useShallowStableSelector(e=>e.state),n=l.find(l=>l.i===e),s=null==n?void 0:n.i,r=(null==n?void 0:n._h)||[];return r.length>0?(0,i.jsxs)("div",{className:"p-2",children:[(0,i.jsx)("div",{className:"flex items-center justify-between",children:(0,i.jsx)("span",{children:"hooks"})}),(0,i.jsx)(f.q,{y:1}),(0,i.jsx)("div",{className:"w-full ".concat("sm"===t?"text-[11px]":"md"===t?"text-[12px]":"text-[13px]"," tree-wrapper"),children:r.map((e,l)=>(0,i.jsx)(A,{item:e},s+"-"+l))}),(0,i.jsx)(g.j,{})]}):null};var M=t(154),R=t(418),F=t(715),T=t(1463),_=t(4688),E=t(2825);let q=(0,b.eK)(()=>({state:{}}),{withActions:e=>({highlightNode:(l,t)=>{e.state[l]=t,setTimeout(()=>{delete e.state[l]},3e3)}})});E.s||(window.useHighlightNode=q);var K=t(5720),I=t(5993),V=t(4736),L=t(872);let{setSelect:D,setClose:B,setHover:U}=y.O.getActions(),{add:P,remove:W}=T.M.getActions(),H=(0,c.memo)(e=>{let{node:l}=e,t=(0,F.getFiberTag)(l.t);return(null==t?void 0:t.length)?(0,i.jsx)("div",{className:" gap-x-[2px] flex items-center",children:t.map(e=>(0,i.jsx)(p.z,{size:"sm",radius:"none",className:"rounded-md capitalize text-[8px] h-[14px]",children:e},e))}):null});H.displayName="RenderTag";let Z=(0,c.memo)(e=>{let{node:l,isScrolling:t}=e,n=(0,I.i)((0,c.useCallback)(e=>{var t;return null===(t=e.map)||void 0===t?void 0:t[l.k]},[l.k]));return(0,i.jsxs)("div",{"data-key":!0,className:"flex items-center gap-x-[1px] text-[12px]",children:[(0,i.jsx)("div",{className:" text-[#40af2c]",children:"key"}),(0,i.jsx)("div",{className:" text-gray-400",children:"="}),(0,i.jsxs)("div",{className:"flex",children:['"',t?(0,i.jsx)("div",{className:"text-gray-600 max-w-[200px] text-ellipsis overflow-hidden whitespace-nowrap",children:n}):(0,i.jsx)(M.e,{content:n,delay:800,showArrow:!0,color:"foreground",children:(0,i.jsx)("div",{className:"text-gray-600 max-w-[200px] text-ellipsis overflow-hidden whitespace-nowrap",children:n})}),'"']})]})});Z.displayName="RenderKey";let G=e=>{let{node:l,isScrolling:t,className:n,withKey:s=!0,withTag:r=!0,withHMR:a=!0,withSelect:o=!0,withTrigger:d=!0,withCollapse:x=!0}=e,{enableCount:u,enableMis:h}=_.Z.useShallowStableSelector(e=>({enableCount:e.state.enableRuntimeCount,enableMis:e.state.enableRuntimeMis}));(0,c.useLayoutEffect)(()=>(u&&P(l.i),()=>{W(l.i)}),[l,u]);let{c:m,t:v}=V.g.useShallowStableSelector(e=>{var t;return u&&(null===(t=e.state)||void 0===t?void 0:t[l.i])||{}}),j=(0,L.P)((0,c.useCallback)(e=>{var t;return null===(t=e.state)||void 0===t?void 0:t[l.i]},[l.i])),g=(0,K.m)((0,c.useCallback)(e=>{var t;return null===(t=e.state)||void 0===t?void 0:t[l.i]},[l.i])),N=q((0,c.useCallback)(e=>{var t;return null===(t=e.state)||void 0===t?void 0:t[l.i]},[l.i])),b=(0,I.i)((0,c.useCallback)(e=>e.map[l.n],[l.n])),{select:S,closeList:k,selectList:C}=(0,y.O)((0,c.useCallback)(e=>({select:e.select,closeList:e.closeList,selectList:e.selectList}),[])),A=o&&l.i===S,z=x&&(null==k?void 0:k[l.i]),O=(0,c.useMemo)(()=>o&&S&&!A&&(null==C?void 0:C[l.i]),[o,S,A,C,l.i]),R=Array.isArray(null==l?void 0:l.c),F=R?z?(0,i.jsx)(w.VZf,{width:16,height:16}):(0,i.jsx)(w.AS7,{width:16,height:16}):null,T=l._d||0;return(0,i.jsx)("div",{id:"node-"+l.i.toString(),"data-depth":T,onClick:()=>{o&&D(l.i)},onMouseEnter:()=>{o&&U(l.i)},onMouseOut:()=>{o&&U("")},className:"w-full h-full node-item cursor-pointer rounded-sm select-none "+(n||"")+"".concat(o?" node-item-hover":"")+"".concat(O?" node-item-select":"")+"".concat(A?" node-item-selected":""),children:(0,i.jsxs)("div",{className:"flex items-center h-full w-full px-[2px] relative",children:[A&&(0,i.jsx)("div",{className:"absolute top-0 left-[1px] h-full border-l-2 border-blue-400 rounded-sm pointer-events-none"}),(0,i.jsx)("div",{className:"flex-grow",style:{width:"calc(100%-calc(".concat(T,"*var(--indentation-size)))"),marginLeft:"calc(".concat(T," * var(--indentation-size)")},children:(0,i.jsxs)("div",{"data-content":!0,className:"flex items-center w-fit",children:[x&&(0,i.jsx)("span",{className:" text-gray-400 min-w-[18px]"+(R?" hover:text-gray-700":""),onClick:e=>{e.stopPropagation(),B(l.i)},children:R?t?F:(0,i.jsx)(M.e,{content:z?"Toggle to open":"Toggle to close",delay:800,showArrow:!0,color:"foreground",children:F}):null}),(0,i.jsx)("p",{className:"node-name line-clamp-1",children:b}),r&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(f.q,{x:1}),(0,i.jsx)(H,{node:l})]}),d&&j>0&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(f.q,{x:1}),(0,i.jsx)(M.e,{content:"trigger update",showArrow:!0,color:"primary",children:(0,i.jsx)(p.z,{size:"sm",radius:"none",color:"primary",className:"rounded-md capitalize text-[8px] h-[14px]",children:j})})]}),u&&m&&m>0&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(f.q,{x:1}),(0,i.jsx)(M.e,{content:"run count",showArrow:!0,color:"secondary",children:(0,i.jsxs)(p.z,{size:"sm",radius:"none",color:"secondary",className:"rounded-md capitalize text-[8px] h-[14px]",children:[m,h&&v?" (".concat(v,"ms)"):""]})})]}),a&&g>0&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(f.q,{x:1}),(0,i.jsx)(M.e,{content:"hmr update",showArrow:!0,color:"success",children:(0,i.jsx)(p.z,{size:"sm",radius:"none",color:"success",className:"rounded-md capitalize text-[8px] h-[14px]",children:g})})]}),N&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(f.q,{x:1}),(0,i.jsx)(p.z,{size:"sm",radius:"none",color:"warning",className:"rounded-md capitalize text-[8px] h-[14px]",children:N})]}),s&&l.k&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(f.q,{x:1}),(0,i.jsx)(Z,{node:l,isScrolling:t})]})]})})]})})},J=y.O.getActions().forceReload,X=()=>{let e=(0,y.O)(e=>e.select),l=(0,j.K)(e=>e.nodes),t=S.useShallowStableSelector(e=>e.state),n=l.find(l=>l.i===e);return n?(0,i.jsxs)("div",{className:"p-2 ".concat("sm"===t?"text-[15px]":"md"===t?"text-[16px]":"text-[17px]"," sticky top-0 bg-content1 z-50"),children:[(0,i.jsx)(G,{node:n,withCollapse:!1,withSelect:!1,withKey:!1}),(0,i.jsx)(M.e,{content:"force load",showArrow:!0,color:"foreground",placement:"bottom-end",children:(0,i.jsx)(R.A,{isIconOnly:!0,size:"sm",variant:"flat",className:"absolute right-4 top-0",onClick:J,children:(0,i.jsx)(w.BGW,{width:"10",height:"10"})})}),(0,i.jsx)(g.j,{})]}):null},Y=e=>{let l=(0,c.useRef)(e);return l.current=e,(0,c.useCallback)(function(){for(var e,t,n=arguments.length,s=Array(n),i=0;i{var e;let l=(0,y.O)(e=>e.select),t=(0,j.K)(e=>e.nodes),n=S.useShallowStableSelector(e=>e.state),s=t.find(e=>e.i===l),r=Object.keys((null==s?void 0:null===(e=s.p)||void 0===e?void 0:e.v)||{}),a=null==s?void 0:s.i,o=r.length>0,c="sm"===n?"text-[11px]":"md"===n?"text-[12px]":"text-[13px]",d=Y(e=>{var l,t;let n=r[e];return(0,i.jsx)("div",{className:"".concat(c," tree-wrapper"),children:(0,i.jsx)(z,{name:n,item:null==s?void 0:null===(t=s.p)||void 0===t?void 0:null===(l=t.v)||void 0===l?void 0:l[n]})},a+"-"+e)});return o?(0,i.jsxs)("div",{className:"p-2",children:[(0,i.jsx)("div",{className:"flex items-center justify-between",children:(0,i.jsx)("span",{children:"props"})}),(0,i.jsx)(f.q,{y:1}),(0,i.jsx)("div",{className:"w-full",children:r.map((e,l)=>d(l))}),(0,i.jsx)(g.j,{})]}):null};var Q=t(9676),ee=t(5696),el=t(8344);let et=()=>{let e=(0,y.O)(e=>e.select),l=(0,j.K)(e=>e.nodes),t=S.useShallowStableSelector(e=>e.state),n="sm"===t?"text-[11px]":"md"===t?"text-[12px]":"text-[13px]",s=l.find(l=>l.i===e),r=null==s?void 0:s._t,a=(0,ee.k)(e=>e.filter),o=(0,c.useMemo)(()=>Array.from(a).map(e=>+e),[a]),d=(0,Q.p)(e=>e.list),x=null==r?void 0:r[(null==r?void 0:r.length)-1];(null==x?void 0:x.startsWith("@my-react"))?r=null==r?void 0:r.slice(0,-1):x=void 0;let u=(0,c.useMemo)(()=>null==r?void 0:r.map(e=>d.find(l=>l.i===e)),[d,r]),h=(0,c.useMemo)(()=>null==u?void 0:u.filter(e=>!(0,el.VR)(e,o)),[o,u]),m=Y(e=>{let l=null==h?void 0:h[e];return l?(0,i.jsx)("div",{className:"".concat(n," ml-2 "),children:(0,i.jsx)(G,{node:l,withCollapse:!1})},l.i):null});return(null==h?void 0:h.length)?(0,i.jsxs)("div",{className:"p-2",children:[(0,i.jsx)("div",{children:"renders"}),(0,i.jsx)(f.q,{y:1}),(0,i.jsxs)("div",{className:"w-full",children:[h.map((e,l)=>m(l)),(0,i.jsx)("div",{className:"".concat(n," ml-2 px-[2px]"),children:x||"@my-react"})]}),(0,i.jsx)(g.j,{})]}):null},en=()=>{let e=(0,y.O)(e=>e.select),l=(0,j.K)(e=>e.nodes),t=S.useShallowStableSelector(e=>e.state),n=l.find(l=>l.i===e),s=null==n?void 0:n._s;return(null==s?void 0:s.fileName)?(0,i.jsxs)("div",{className:"p-2",children:[(0,i.jsx)("div",{children:"source"}),(0,i.jsx)(f.q,{y:1}),(0,i.jsx)("div",{className:"w-full",children:(0,i.jsx)("div",{className:"".concat("sm"===t?"text-[11px]":"md"===t?"text-[12px]":"text-[13px]"," ml-2 px-[2px] text-gray-600"),children:(null==s?void 0:s.fileName)+"".concat((null==s?void 0:s.lineNumber)?":"+(null==s?void 0:s.lineNumber):"")+"".concat((null==s?void 0:s.columnNumber)?":"+(null==s?void 0:s.columnNumber):"")})})]}):null},es=()=>{var e,l,t;let n=(0,y.O)(e=>e.select),s=(0,j.K)(e=>e.nodes),r=S.useShallowStableSelector(e=>e.state),a=s.find(e=>e.i===n),o=Object.keys((null==a?void 0:null===(e=a.s)||void 0===e?void 0:e.t)!=="Null"&&(null==a?void 0:null===(l=a.s)||void 0===l?void 0:l.t)!=="Undefined"&&(null==a?void 0:null===(t=a.s)||void 0===t?void 0:t.v)||{}),c=null==a?void 0:a.i,d=o.length>0,x="sm"===r?"text-[11px]":"md"===r?"text-[12px]":"text-[13px]",u=Y(e=>{var l,t;let n=o[e];return(0,i.jsx)("div",{className:"".concat(x," tree-wrapper"),children:(0,i.jsx)(z,{name:n,item:null==a?void 0:null===(t=a.s)||void 0===t?void 0:null===(l=t.v)||void 0===l?void 0:l[n]})},c+"-"+e)});return d?(0,i.jsxs)("div",{className:"p-2",children:[(0,i.jsx)("div",{className:"flex items-center justify-between",children:(0,i.jsx)("span",{children:"states"})}),(0,i.jsx)(f.q,{y:1}),(0,i.jsx)("div",{className:"w-full",children:o.map((e,l)=>u(l))}),(0,i.jsx)(g.j,{})]}):null},ei=()=>{let{loading:e}=j.K.useShallowStableSelector(e=>({nodeList:e.nodes,loading:e.loading}));return e?(0,i.jsx)("div",{className:"node-view h-full p-1 flex items-center justify-center",children:(0,i.jsx)(v.c,{color:"primary"})}):(0,i.jsx)("div",{className:"node-view h-full p-1",children:(0,i.jsxs)("div",{className:"group h-full overflow-auto",children:[(0,i.jsx)(X,{}),(0,i.jsx)($,{}),(0,i.jsx)(es,{}),(0,i.jsx)(O,{}),(0,i.jsx)(et,{}),(0,i.jsx)(en,{})]})})};var er=t(7014),ea=t(2570);let eo=function(e){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,[t,n]=(0,c.useState)(e);return[t,(0,c.useMemo)(()=>(0,F.debounce)(n,l),[l])]},ec=[],ed={width:0,height:0,left:0,right:0,top:0,bottom:0,x:0,y:0};var ex=t(3586),eu=t(40),eh=t(9634),em=t(9798),ev=t(5017),ej=t(3396),ep=t(3404),ef=t(1638),eg=t(6560),ew=t(8214),eN=t(4180),ey=t(8485),eb=t(4874),eS=t(3256);let{setSelect:ek}=y.O.getActions(),eC=(0,c.memo)(e=>{var l;let{handle:t}=e,[n,s]=(0,c.useState)(""),r=(0,Q.p)(e=>e.list),[a,o]=(0,c.useState)(0),[x,u]=(0,c.useState)([]),[h,m]=(0,c.useState)([]),v=(0,I.i)(e=>e.map),j=x[a],p=null===(l=h[j])||void 0===l?void 0:l.i,g=e=>{if(null==e||e.preventDefault(),n){o(0);let e=r.map(e=>({...e,_name:v[e.n]})),l=e.map((e,l)=>e._name.includes(n)?l:-1).filter(e=>-1!==e);m(e),u(l),0===l.length?d.Am.error("Can't find current name",{position:"top-right"}):d.Am.success("Find ".concat(l.length," items"),{position:"top-right"})}};return(0,c.useEffect)(()=>{o(0),u([])},[n]),(0,c.useEffect)(()=>{void 0!==j&&(null==t||t.scrollToIndex({index:j}),ek(p,!0))},[j,t,p]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("form",{onSubmit:g,children:(0,i.jsx)(eS.Y,{placeholder:"Search component",className:"w-full",value:n,variant:"flat",onChange:e=>s(e.target.value),endContent:(0,i.jsx)(R.A,{isIconOnly:!0,variant:"light",onClick:g,children:(0,i.jsx)(w._Ve,{className:"text-black/50 dark:text-white/90 text-slate-400 flex-shrink-0"})})})}),x.length>1&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(f.q,{x:2}),(0,i.jsxs)(eu.g,{variant:"flat",children:[(0,i.jsx)(M.e,{content:"Total ".concat(x.length,", current ").concat(a+1),showArrow:!0,color:"foreground",children:(0,i.jsx)(R.A,{isIconOnly:!0,onClick:()=>o(e=>(e-1+x.length)%x.length),isDisabled:0===a,children:(0,i.jsx)(w.Hf3,{})})}),(0,i.jsx)(M.e,{content:"Total ".concat(x.length,", current ").concat(a+1),showArrow:!0,color:"foreground",children:(0,i.jsx)(R.A,{isIconOnly:!0,onClick:()=>o(e=>(e+1)%x.length),isDisabled:a===x.length-1,children:(0,i.jsx)(w.veu,{})})})]})]})]})});eC.displayName="TreeViewSearch";let eA=ee.k.getActions().onChange,ez=(0,c.memo)(e=>{let{handle:l}=e,{isOpen:t,onOpen:n,onClose:r,onOpenChange:a}=(0,ex.q)(),{theme:c,setTheme:d}=(0,o.F)(),{state:x,setEnableHover:u,setEnableUpdate:h,setEnableRuntimeCount:m,setEnableRuntimeMis:v}=(0,_.Z)(),{state:j,setUISize:N}=S(),{state:y,cb:b}=(0,eb.$)(e=>({state:e.state,cb:e.cb})),k=(0,ee.k)(e=>e.filter);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"fixed top-3 right-3 z-10 flex",children:[(0,i.jsx)(eC,{handle:l}),(0,i.jsx)(f.q,{x:2}),(0,i.jsxs)(eu.g,{variant:"flat",children:[(0,i.jsx)(M.e,{content:(0,i.jsx)("p",{className:y?"text-green-400":"text-red-400",children:y?"DevTool Connect":"DevTool DisConnect"}),showArrow:!0,children:(0,i.jsx)(R.A,{isIconOnly:!0,onClick:()=>null==b?void 0:b(),disabled:y,children:y?(0,i.jsx)(w.NhS,{className:"text-green-500"}):(0,i.jsx)(w.xrR,{className:" text-red-500"})})}),(0,i.jsx)(R.A,{isIconOnly:!0,onClick:()=>d("dark"===c?"light":"dark"),children:"dark"===c?(0,i.jsx)(w.kLh,{className:"text-gray-500"}):(0,i.jsx)(w.NWY,{className:"text-yellow-500"})}),(0,i.jsx)(M.e,{content:"Setting",showArrow:!0,color:"foreground",children:(0,i.jsx)(R.A,{isIconOnly:!0,onClick:n,children:(0,i.jsx)(w.UG6,{className:" text-gray-500"})})})]})]}),(0,i.jsx)(eh.R,{isOpen:t,size:"xl",onClose:r,onOpenChange:a,isDismissable:!1,placement:"top",children:(0,i.jsxs)(em.A,{children:[(0,i.jsx)(ev.k,{children:(0,i.jsxs)("h3",{className:"text-[1em]",children:["Setting ",(0,i.jsx)("small",{children:"@my-react"})]})}),(0,i.jsx)(ej.I,{className:"text-[14px]",children:(0,i.jsxs)("div",{className:"flex flex-col gap-y-4",children:[(0,i.jsxs)("div",{className:"flex flex-col gap-y-2",children:[(0,i.jsx)("p",{className:"whitespace-nowrap text-[14px] text-foreground-500",children:"Filter Node: "}),(0,i.jsx)("div",{className:"flex items-center",children:(0,i.jsx)(ep.g,{selectionMode:"multiple",placeholder:"Select a Type",selectedKeys:k,"aria-label":"Filter Node",className:"flex items-center",radius:"sm",variant:"bordered",size:"lg",onChange:e=>{eA(new Set(e.target.value.split(",")))},children:F.typeKeys.map(e=>(0,i.jsx)(ef.R,{value:e,children:(0,F.getTypeName)(e)},e))})})]}),(0,i.jsx)(g.j,{}),(0,i.jsxs)("div",{className:"flex flex-col gap-y-2",children:[(0,i.jsx)("p",{className:"whitespace-nowrap text-[14px] text-foreground-500",children:"UI Size: "}),(0,i.jsxs)(eg.X,{value:j,onValueChange:e=>N(e),orientation:"horizontal",classNames:{wrapper:"gap-x-6"},children:[(0,i.jsx)(ew.J,{value:s.sm,children:"Small Size"}),(0,i.jsx)(ew.J,{value:s.md,children:"Medium Size"}),(0,i.jsx)(ew.J,{value:s.lg,children:"Large Size"})]})]}),(0,i.jsx)(g.j,{}),(0,i.jsxs)("div",{className:"flex flex-col gap-y-2",children:[(0,i.jsx)(eN.K,{isSelected:x.enableUpdate,onValueChange:h,color:"primary",children:(0,i.jsxs)("div",{className:"flex",children:["Highlight Update",(0,i.jsxs)("div",{className:"ml-4 gap-x-2 flex",children:[(0,i.jsx)(p.z,{style:{backgroundColor:F.color.update,mixBlendMode:"difference"},children:"update"}),(0,i.jsx)(p.z,{style:{backgroundColor:F.color.append,mixBlendMode:"difference"},children:"append"}),(0,i.jsx)(p.z,{style:{backgroundColor:F.color.setRef,mixBlendMode:"difference"},children:"setRef"}),(0,i.jsx)(p.z,{style:{backgroundColor:F.color.warn,mixBlendMode:"difference"},children:"warn"})]})]})}),(0,i.jsx)(eN.K,{isSelected:x.enableHover,onValueChange:u,color:"secondary",children:"Hover Overlay"}),(0,i.jsx)(eN.K,{isSelected:x.enableRuntimeCount,onValueChange:m,color:"success",children:"RuntimeCount (DevMode only)"}),(0,i.jsx)(eN.K,{isSelected:x.enableRuntimeMis,isDisabled:!x.enableRuntimeCount,onValueChange:v,color:"warning",children:"RuntimeMis (DevMode only)"})]})]})}),(0,i.jsx)(ey.R,{children:(0,i.jsx)(R.A,{onClick:r,variant:"bordered",children:"Close"})})]})})]})});ez.displayName="TreeViewSetting";let eO=(e,l,t)=>{let n=Array.from(e.querySelectorAll("[data-depth]")),s=e.clientWidth,i=l.current||12;for(let e of(s>t.current&&(i=12),t.current=s,n)){var r;let l=parseInt(e.getAttribute("data-depth")||"0",10)||0;0!==l&&(i=Math.min(i,Math.max(0,s-((null===(r=e.querySelector("[data-content]"))||void 0===r?void 0:r.clientWidth)||0)-6)/l))}l.current=i,e.style.setProperty("--indentation-size","".concat(i,"px")),e.style.setProperty("--width-size","".concat(s,"px"))},eM=(0,c.memo)(e=>{let{onScroll:l,data:t,onMount:n}=e,[r,a]=(0,c.useState)(!1),o=(0,c.useRef)(null),d=y.O.useShallowStableSelector(e=>e.select),x=S.useShallowStableSelector(e=>e.state),u=Y((e,l,n)=>{let{isScrolling:r}=n,a=t[e];return a?(0,i.jsx)(G,{node:a,isScrolling:r,className:x===s.sm?"text-[12px]":x===s.md?"text-[14px]":"text-[16px]"}):null}),h=(0,c.useMemo)(()=>t.findIndex(e=>e.i===d),[t,d]);(0,c.useEffect)(()=>{if(-1!==h){var e;null===(e=o.current)||void 0===e||e.scrollIntoView({index:h})}},[h]);let m=t.length>0;return((0,c.useEffect)(()=>(m&&n(o.current),()=>{n()}),[m,n]),t.length)?(0,i.jsx)(er.OO,{ref:o,overscan:60,isScrolling:a,context:{isScrolling:r},onScroll:l,totalCount:t.length,itemContent:u}):null});eM.displayName="TreeViewImpl";let eR=(0,c.memo)(()=>{let e=(0,c.useRef)(null),l=Q.p.useShallowStableSelector(e=>e.list),{width:t,height:n}=function(e){let{ref:l,cssSelector:t,getEle:n,deps:s}=e,i=(0,c.useRef)(n);i.current=n;let[r,a]=eo(ed,100);return(0,ea.L)(()=>{var e;let n=l?l.current:t?document.querySelector(t):(null===(e=i.current)||void 0===e?void 0:e.call(i))||null;if(n){if(window.ResizeObserver){let e=new ResizeObserver(()=>{a(n.getBoundingClientRect())});return e.observe(n),()=>e.disconnect()}{let e=()=>a(n.getBoundingClientRect());return e(),window.addEventListener("resize",e,{passive:!0}),()=>window.removeEventListener("resize",e)}}},[l,t,a,...s||ec]),r}({ref:e}),[s,r]=(0,c.useState)(),a=(0,c.useRef)(12),o=(0,c.useRef)(t),d=(0,c.useCallback)(()=>{e.current&&eO(e.current,a,o)},[]);return(0,c.useEffect)(()=>{d()},[t,n,l.length,d]),(0,i.jsx)("div",{className:"tree-view h-full p-1",children:(0,i.jsxs)("div",{className:"group h-full transform-gpu",ref:e,children:[(0,i.jsx)(eM,{onScroll:d,data:l,onMount:r}),(0,i.jsx)(ez,{handle:s})]})})});function eF(){let e=(0,eb.$)(e=>e.error),{theme:l}=(0,o.F)();return(0,c.useEffect)(()=>{e&&d.Am.error(e,{position:"top-right"})},[e]),(0,i.jsxs)("main",{className:"flex p-1 h-screen",children:[(0,i.jsx)(a(),{children:(0,i.jsx)("title",{children:"@my-react devtools"})}),(0,i.jsx)(d.x7,{richColors:!0,theme:"dark"===l?"dark":"light"}),(0,i.jsx)(m,{left:(0,i.jsx)(eR,{}),right:(0,i.jsx)(ei,{})})]})}eR.displayName="TreeView"}},function(e){e.O(0,[44,774,888,179],function(){return e(e.s=5834)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/devTool-ebbcd20da26671a2.js b/_next/static/chunks/pages/devTool-ebbcd20da26671a2.js new file mode 100644 index 0000000..9ff9db7 --- /dev/null +++ b/_next/static/chunks/pages/devTool-ebbcd20da26671a2.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[374],{5834:function(e,l,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/devTool",function(){return t(8231)}])},8231:function(e,l,t){"use strict";t.r(l),t.d(l,{default:function(){return eF}});var n,s,i=t(4746),r=t(2700),a=t.n(r),c=t(2551),o=t(4177),d=t(4153),x=t(6139),u=t(1026),h=t(7960);let m=e=>{let{left:l,right:t}=e;return(0,i.jsx)(x.w,{className:"w-full",radius:"sm",children:(0,i.jsx)(u.G,{className:"w-full p-0",children:(0,i.jsxs)(h.oL,{children:[l,t]})})})};var v=t(7954),j=t(3105),p=t(6734),f=t(6388),g=t(3799),w=t(3498),N=t(6721),y=t(1773),S=t(5316);(n=s||(s={})).sm="sm",n.md="md",n.lg="lg";let b=(0,S.eK)(()=>({state:"sm"}),{withActions:e=>({setUISize:l=>e.state=l}),withDeepSelector:!1}),k=e=>{let l=null==e?void 0:e.v,t=null==e?void 0:e.t;if("Element"===t||"Date"===t||"Boolean"===t||"Error"===t||"Number"===t||"Symbol"===t)return l;if((null==e?void 0:e.l)===!1)return"Array"===e.t||"Set"===e.t?"[…]":"Map"===e.t||"Object"===e.t?"{…}":"…";if(null!==l&&"object"==typeof l&&!Array.isArray(l)&&"function"==typeof l[window.Symbol.iterator])return"(…)";if(Array.isArray(l))return l.length>0?"[…]":"[]";if("Null"===t)return"null";if("Undefined"===t)return"undef";if("object"==typeof l)return Object.keys(l).length>0?"{…}":"{}";if("Function"===t)return"".concat(l.substr(0,10)+(l.length>10?"…":""));if("string"==typeof l)return'"'.concat(l.substr(0,10)+(l.length>10?"…":""),'"');else return l};function C(e,l){if("Object"===e){let e=Object.keys(l),t=e.slice(0,3).map(e=>"".concat(e,": ").concat(k(l[e]))).concat(e.length>3?["…"]:[]).join(", ");return"{ ".concat(t," }")}if("Array"!==e)return e;{let e=l.slice(0,4).map(e=>k(e)).concat(l.length>4?["…"]:[]).join(", ");return"[".concat(e,"]")}}let A=e=>{var l;let{item:t}=e,[n,s]=(0,o.useState)(!1),r=t.h,a=n?(0,i.jsx)(w.AS7,{width:"16",height:"16"}):(0,i.jsx)(w.VZf,{width:"16",height:"16"});return r?(0,i.jsx)(z,{name:t.n,item:t.v,prefix:(0,i.jsx)(p.z,{classNames:{content:"p-0"},size:"sm",className:"rounded-sm text-center mr-1 flex-shrink-0 font-[300] !px-1 text-gray-800 dark:text-gray-200 !h-[1.4em] !max-w-[initial] !min-w-[initial]",children:t.i})}):(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("div",{className:"hook-stack-view",children:[(0,i.jsxs)("div",{className:"flex w-full my-0.5",children:[(0,i.jsx)("span",{className:"text-gray-400 hover:text-gray-700",onClick:()=>s(!n),children:a}),(0,i.jsxs)("div",{className:"max-w-full line-clamp-1",children:[t.n,":"]})]}),(0,i.jsx)("div",{className:"".concat(n?"block":"hidden"," ml-4 my-0.5"),children:null===(l=t.c)||void 0===l?void 0:l.map((e,l)=>(0,i.jsx)(A,{item:e},e.n+"-"+l))})]})})},z=e=>{var l,t,n,s;let{name:r,item:a,prefix:c}=e,[d,x]=(0,o.useState)(!1),u=N.F.useShallowStableSelector(e=>{var l,t;return null===(t=e.data)||void 0===t?void 0:null===(l=t[(null==a?void 0:a.i)||""])||void 0===l?void 0:l.loaded}),h=null!==(l=null==u?void 0:u.v)&&void 0!==l?l:null==a?void 0:a.v,m=null!==(t=null==u?void 0:u.n)&&void 0!==t?t:null==a?void 0:a.n,j=null!==(n=null==u?void 0:u.t)&&void 0!==n?n:null==a?void 0:a.t,p=null!==(s=null==u?void 0:u.c)&&void 0!==s?s:null==a?void 0:a.c,f=(0,o.useMemo)(()=>{if(m)return m;if("Array"===j||"Set"===j||"Map"===j){let e=C("Array",null!=h?h:[]);return"Set"===j||"Map"===j?"".concat(j,"(").concat(e,")"):e}if("Iterable"===j||"Object"===j)return C("Object",null!=h?h:{})},[j,m,h]);if((0,o.useEffect)(()=>{d&&(null==a?void 0:a.l)===!1&&a.i&&!u&&N.F.getActions().setLoading(a.i)},[u,d,null==a?void 0:a.i,null==a?void 0:a.l]),!a)return null;let g=a.e,y=d?(0,i.jsx)(w.AS7,{width:"16",height:"16"}):(0,i.jsx)(w.VZf,{width:"16",height:"16"});if(g)return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("div",{className:"hook-value-view",children:[(0,i.jsxs)("div",{className:"flex w-full my-0.5 items-center",children:[(0,i.jsx)("span",{className:"text-gray-400 hover:text-gray-700",onClick:()=>x(!d),children:y}),c,(0,i.jsxs)("div",{className:"max-w-full line-clamp-1 break-all",children:[r,": ",(0,i.jsx)("span",{className:"hook-value-placeholder",children:h?f:(0,i.jsx)(w.nWS,{className:"inline-block"})})]})]}),(!p||d)&&(0,i.jsx)("div",{className:"".concat(d?"block":"hidden"," ml-6 my-0.5"),children:h?Array.isArray(h)?(0,i.jsx)(i.Fragment,{children:h.map((e,l)=>(0,i.jsx)(z,{name:l.toString(),item:e},l))}):(0,i.jsx)(i.Fragment,{children:Object.keys(h).map(e=>(0,i.jsx)(z,{name:e,item:h[e]},e))}):(0,i.jsx)(v.c,{size:"sm"})})]})});{let e="String"===a.t?'"'.concat(String(a.v),'"'):String(a.v),l=(0,i.jsx)("span",{className:"hook-".concat(a.t),children:e});return(0,i.jsx)("div",{className:"hook-value-view",children:(0,i.jsxs)("div",{className:"flex w-full my-0.5 items-center",children:[(0,i.jsx)("span",{className:"text-transparent",children:y}),c,(0,i.jsxs)("div",{className:"max-w-full line-clamp-1 break-all",children:[r,": ",(0,i.jsx)("span",{className:"hook-value-placeholder",children:l})]})]})})}},O=()=>{let e=(0,y.O)(e=>e.select),l=(0,j.K)(e=>e.nodes),t=b.useShallowStableSelector(e=>e.state),n=l.find(l=>l.i===e),s=null==n?void 0:n.i,r=(null==n?void 0:n._h)||[];return r.length>0?(0,i.jsxs)("div",{className:"p-2",children:[(0,i.jsx)("div",{className:"flex items-center justify-between",children:(0,i.jsx)("span",{children:"hooks"})}),(0,i.jsx)(f.q,{y:1}),(0,i.jsx)("div",{className:"w-full ".concat("sm"===t?"text-[11px]":"md"===t?"text-[12px]":"text-[13px]"," tree-wrapper"),children:r.map((e,l)=>(0,i.jsx)(A,{item:e},s+"-"+l))}),(0,i.jsx)(g.j,{})]}):null};var M=t(154),R=t(418),F=t(715),T=t(1463),_=t(4688),E=t(2825);let q=(0,S.eK)(()=>({state:{}}),{withActions:e=>({highlightNode:(l,t)=>{e.state[l]=t,setTimeout(()=>{delete e.state[l]},3e3)}})});E.s||(window.useHighlightNode=q);var K=t(5720),I=t(5993),V=t(4736),L=t(872);let{setSelect:D,setClose:B,setHover:U}=y.O.getActions(),{add:P,remove:W}=T.M.getActions(),H=(0,o.memo)(e=>{let{node:l}=e,t=(0,F.getFiberTag)(l.t);return(null==t?void 0:t.length)?(0,i.jsx)("div",{className:" gap-x-[2px] flex items-center",children:t.map(e=>(0,i.jsx)(p.z,{size:"sm",radius:"none",className:"rounded-md capitalize text-[8px] h-[14px]",children:e},e))}):null});H.displayName="RenderTag";let Z=(0,o.memo)(e=>{let{node:l,isScrolling:t}=e,n=(0,I.i)((0,o.useCallback)(e=>{var t;return null===(t=e.map)||void 0===t?void 0:t[l.k]},[l.k]));return(0,i.jsxs)("div",{"data-key":!0,className:"flex items-center gap-x-[1px] text-[12px]",children:[(0,i.jsx)("div",{className:" text-[#40af2c]",children:"key"}),(0,i.jsx)("div",{className:" text-gray-400",children:"="}),(0,i.jsxs)("div",{className:"flex",children:['"',t?(0,i.jsx)("div",{className:"text-gray-600 max-w-[200px] text-ellipsis overflow-hidden whitespace-nowrap",children:n}):(0,i.jsx)(M.e,{content:n,delay:800,showArrow:!0,color:"foreground",children:(0,i.jsx)("div",{className:"text-gray-600 max-w-[200px] text-ellipsis overflow-hidden whitespace-nowrap",children:n})}),'"']})]})});Z.displayName="RenderKey";let G=e=>{let{node:l,isScrolling:t,className:n,withKey:s=!0,withTag:r=!0,withHMR:a=!0,withSelect:c=!0,withTrigger:d=!0,withCollapse:x=!0}=e,{enableCount:u,enableMis:h}=_.Z.useShallowStableSelector(e=>({enableCount:e.state.enableRuntimeCount,enableMis:e.state.enableRuntimeMis}));(0,o.useLayoutEffect)(()=>(u&&P(l.i),()=>{W(l.i)}),[l,u]);let{c:m,t:v}=V.g.useShallowStableSelector(e=>{var t;return u&&(null===(t=e.state)||void 0===t?void 0:t[l.i])||{}}),j=(0,L.P)((0,o.useCallback)(e=>{var t;return null===(t=e.state)||void 0===t?void 0:t[l.i]},[l.i])),g=(0,K.m)((0,o.useCallback)(e=>{var t;return null===(t=e.state)||void 0===t?void 0:t[l.i]},[l.i])),N=q((0,o.useCallback)(e=>{var t;return null===(t=e.state)||void 0===t?void 0:t[l.i]},[l.i])),S=(0,I.i)((0,o.useCallback)(e=>e.map[l.n],[l.n])),{select:b,closeList:k,selectList:C}=(0,y.O)((0,o.useCallback)(e=>({select:e.select,closeList:e.closeList,selectList:e.selectList}),[])),A=c&&l.i===b,z=x&&(null==k?void 0:k[l.i]),O=(0,o.useMemo)(()=>c&&b&&!A&&(null==C?void 0:C[l.i]),[c,b,A,C,l.i]),R=Array.isArray(null==l?void 0:l.c),F=R?z?(0,i.jsx)(w.VZf,{width:16,height:16}):(0,i.jsx)(w.AS7,{width:16,height:16}):null,T=l._d||0;return(0,i.jsx)("div",{id:"node-"+l.i.toString(),"data-depth":T,onClick:()=>{c&&D(l.i)},onMouseEnter:()=>{c&&U(l.i)},onMouseOut:()=>{c&&U("")},className:"w-full h-full node-item cursor-pointer rounded-sm select-none "+(n||"")+"".concat(c?" node-item-hover":"")+"".concat(O?" node-item-select":"")+"".concat(A?" node-item-selected":""),children:(0,i.jsxs)("div",{className:"flex items-center h-full w-full px-[2px] relative",children:[A&&(0,i.jsx)("div",{className:"absolute top-0 left-[1px] h-full border-l-2 border-blue-400 rounded-sm pointer-events-none"}),(0,i.jsx)("div",{className:"flex-grow",style:{width:"calc(100%-calc(".concat(T,"*var(--indentation-size)))"),marginLeft:"calc(".concat(T," * var(--indentation-size)")},children:(0,i.jsxs)("div",{"data-content":!0,className:"flex items-center w-fit",children:[x&&(0,i.jsx)("span",{className:" text-gray-400 min-w-[18px]"+(R?" hover:text-gray-700":""),onClick:e=>{e.stopPropagation(),B(l.i)},children:R?t?F:(0,i.jsx)(M.e,{content:z?"Toggle to open":"Toggle to close",delay:800,showArrow:!0,color:"foreground",children:F}):null}),(0,i.jsx)("p",{className:"node-name line-clamp-1",children:S}),r&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(f.q,{x:1}),(0,i.jsx)(H,{node:l})]}),d&&j>0&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(f.q,{x:1}),(0,i.jsx)(M.e,{content:"trigger update",showArrow:!0,color:"primary",children:(0,i.jsx)(p.z,{size:"sm",radius:"none",color:"primary",className:"rounded-md capitalize text-[8px] h-[14px]",children:j})})]}),u&&m&&m>0&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(f.q,{x:1}),(0,i.jsx)(M.e,{content:"run count",showArrow:!0,color:"secondary",children:(0,i.jsxs)(p.z,{size:"sm",radius:"none",color:"secondary",className:"rounded-md capitalize text-[8px] h-[14px]",children:[m,h&&v?" (".concat(v,"ms)"):""]})})]}),a&&g>0&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(f.q,{x:1}),(0,i.jsx)(M.e,{content:"hmr update",showArrow:!0,color:"success",children:(0,i.jsx)(p.z,{size:"sm",radius:"none",color:"success",className:"rounded-md capitalize text-[8px] h-[14px]",children:g})})]}),N&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(f.q,{x:1}),(0,i.jsx)(p.z,{size:"sm",radius:"none",color:"warning",className:"rounded-md capitalize text-[8px] h-[14px]",children:N})]}),s&&l.k&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(f.q,{x:1}),(0,i.jsx)(Z,{node:l,isScrolling:t})]})]})})]})})},J=y.O.getActions().forceReload,X=()=>{let e=(0,y.O)(e=>e.select),l=(0,j.K)(e=>e.nodes),t=b.useShallowStableSelector(e=>e.state),n=l.find(l=>l.i===e);return n?(0,i.jsxs)("div",{className:"p-2 ".concat("sm"===t?"text-[15px]":"md"===t?"text-[16px]":"text-[17px]"," sticky top-0 bg-content1 z-50"),children:[(0,i.jsx)(G,{node:n,withCollapse:!1,withSelect:!1,withKey:!1}),(0,i.jsx)(M.e,{content:"force load",showArrow:!0,color:"foreground",placement:"bottom-end",children:(0,i.jsx)(R.A,{isIconOnly:!0,size:"sm",variant:"flat",className:"absolute right-4 top-0",onClick:J,children:(0,i.jsx)(w.BGW,{width:"10",height:"10"})})}),(0,i.jsx)(g.j,{})]}):null},Y=e=>{let l=(0,o.useRef)(e);return l.current=e,(0,o.useCallback)(function(){for(var e,t,n=arguments.length,s=Array(n),i=0;i{var e;let l=(0,y.O)(e=>e.select),t=(0,j.K)(e=>e.nodes),n=b.useShallowStableSelector(e=>e.state),s=t.find(e=>e.i===l),r=Object.keys((null==s?void 0:null===(e=s.p)||void 0===e?void 0:e.v)||{}),a=null==s?void 0:s.i,c=r.length>0,o="sm"===n?"text-[11px]":"md"===n?"text-[12px]":"text-[13px]",d=Y(e=>{var l,t;let n=r[e];return(0,i.jsx)("div",{className:"".concat(o," tree-wrapper"),children:(0,i.jsx)(z,{name:n,item:null==s?void 0:null===(t=s.p)||void 0===t?void 0:null===(l=t.v)||void 0===l?void 0:l[n]})},a+"-"+e)});return c?(0,i.jsxs)("div",{className:"p-2",children:[(0,i.jsx)("div",{className:"flex items-center justify-between",children:(0,i.jsx)("span",{children:"props"})}),(0,i.jsx)(f.q,{y:1}),(0,i.jsx)("div",{className:"w-full",children:r.map((e,l)=>d(l))}),(0,i.jsx)(g.j,{})]}):null};var Q=t(9676),ee=t(5696),el=t(8344);let et=()=>{let e=(0,y.O)(e=>e.select),l=(0,j.K)(e=>e.nodes),t=b.useShallowStableSelector(e=>e.state),n="sm"===t?"text-[11px]":"md"===t?"text-[12px]":"text-[13px]",s=l.find(l=>l.i===e),r=null==s?void 0:s._t,a=(0,ee.k)(e=>e.filter),c=(0,o.useMemo)(()=>Array.from(a).map(e=>+e),[a]),d=(0,Q.p)(e=>e.list),x=null==r?void 0:r[(null==r?void 0:r.length)-1];(null==x?void 0:x.startsWith("@my-react"))?r=null==r?void 0:r.slice(0,-1):x=void 0;let u=(0,o.useMemo)(()=>null==r?void 0:r.map(e=>d.find(l=>l.i===e)),[d,r]),h=(0,o.useMemo)(()=>null==u?void 0:u.filter(e=>!(0,el.VR)(e,c)),[c,u]),m=Y(e=>{let l=null==h?void 0:h[e];return l?(0,i.jsx)("div",{className:"".concat(n," ml-2 "),children:(0,i.jsx)(G,{node:l,withCollapse:!1})},l.i):null});return(null==h?void 0:h.length)?(0,i.jsxs)("div",{className:"p-2",children:[(0,i.jsx)("div",{children:"renders"}),(0,i.jsx)(f.q,{y:1}),(0,i.jsxs)("div",{className:"w-full",children:[h.map((e,l)=>m(l)),(0,i.jsx)("div",{className:"".concat(n," ml-2 px-[2px]"),children:x||"@my-react"})]}),(0,i.jsx)(g.j,{})]}):null},en=()=>{let e=(0,y.O)(e=>e.select),l=(0,j.K)(e=>e.nodes),t=b.useShallowStableSelector(e=>e.state),n=l.find(l=>l.i===e),s=null==n?void 0:n._s;return(null==s?void 0:s.fileName)?(0,i.jsxs)("div",{className:"p-2",children:[(0,i.jsx)("div",{children:"source"}),(0,i.jsx)(f.q,{y:1}),(0,i.jsx)("div",{className:"w-full",children:(0,i.jsx)("div",{className:"".concat("sm"===t?"text-[11px]":"md"===t?"text-[12px]":"text-[13px]"," ml-2 px-[2px] text-gray-600"),children:(null==s?void 0:s.fileName)+"".concat((null==s?void 0:s.lineNumber)?":"+(null==s?void 0:s.lineNumber):"")+"".concat((null==s?void 0:s.columnNumber)?":"+(null==s?void 0:s.columnNumber):"")})})]}):null},es=()=>{var e,l,t;let n=(0,y.O)(e=>e.select),s=(0,j.K)(e=>e.nodes),r=b.useShallowStableSelector(e=>e.state),a=s.find(e=>e.i===n),c=Object.keys((null==a?void 0:null===(e=a.s)||void 0===e?void 0:e.t)!=="Null"&&(null==a?void 0:null===(l=a.s)||void 0===l?void 0:l.t)!=="Undefined"&&(null==a?void 0:null===(t=a.s)||void 0===t?void 0:t.v)||{}),o=null==a?void 0:a.i,d=c.length>0,x="sm"===r?"text-[11px]":"md"===r?"text-[12px]":"text-[13px]",u=Y(e=>{var l,t;let n=c[e];return(0,i.jsx)("div",{className:"".concat(x," tree-wrapper"),children:(0,i.jsx)(z,{name:n,item:null==a?void 0:null===(t=a.s)||void 0===t?void 0:null===(l=t.v)||void 0===l?void 0:l[n]})},o+"-"+e)});return d?(0,i.jsxs)("div",{className:"p-2",children:[(0,i.jsx)("div",{className:"flex items-center justify-between",children:(0,i.jsx)("span",{children:"states"})}),(0,i.jsx)(f.q,{y:1}),(0,i.jsx)("div",{className:"w-full",children:c.map((e,l)=>u(l))}),(0,i.jsx)(g.j,{})]}):null},ei=()=>{let{loading:e}=j.K.useShallowStableSelector(e=>({nodeList:e.nodes,loading:e.loading}));return e?(0,i.jsx)("div",{className:"node-view h-full p-1 flex items-center justify-center",children:(0,i.jsx)(v.c,{color:"primary"})}):(0,i.jsx)("div",{className:"node-view h-full p-1",children:(0,i.jsxs)("div",{className:"group h-full overflow-auto",children:[(0,i.jsx)(X,{}),(0,i.jsx)($,{}),(0,i.jsx)(es,{}),(0,i.jsx)(O,{}),(0,i.jsx)(et,{}),(0,i.jsx)(en,{})]})})};var er=t(7014),ea=t(2570);let ec=function(e){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,[t,n]=(0,o.useState)(e);return[t,(0,o.useMemo)(()=>(0,F.debounce)(n,l),[l])]},eo=[],ed={width:0,height:0,left:0,right:0,top:0,bottom:0,x:0,y:0};var ex=t(3586),eu=t(40),eh=t(9634),em=t(9798),ev=t(5017),ej=t(3396),ep=t(3404),ef=t(1638),eg=t(6560),ew=t(8214),eN=t(4180),ey=t(8485),eS=t(4874),eb=t(3256);let{setSelect:ek}=y.O.getActions(),eC=(0,o.memo)(e=>{var l;let{handle:t}=e,[n,s]=(0,o.useState)(""),r=(0,Q.p)(e=>e.list),[a,c]=(0,o.useState)(0),[x,u]=(0,o.useState)([]),[h,m]=(0,o.useState)([]),v=(0,I.i)(e=>e.map),j=x[a],p=null===(l=h[j])||void 0===l?void 0:l.i,g=e=>{if(null==e||e.preventDefault(),n){c(0);let e=r.map(e=>({...e,_name:v[e.n]})),l=e.map((e,l)=>e._name.includes(n)?l:-1).filter(e=>-1!==e);m(e),u(l),0===l.length?d.Am.error("Can't find current name",{position:"top-right"}):d.Am.success("Find ".concat(l.length," items"),{position:"top-right"})}};return(0,o.useEffect)(()=>{c(0),u([])},[n]),(0,o.useEffect)(()=>{void 0!==j&&(null==t||t.scrollToIndex({index:j}),ek(p,!0))},[j,t,p]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("form",{onSubmit:g,children:(0,i.jsx)(eb.Y,{placeholder:"Search component",className:"w-full",value:n,variant:"flat",onChange:e=>s(e.target.value),endContent:(0,i.jsx)(R.A,{isIconOnly:!0,variant:"light",onClick:g,children:(0,i.jsx)(w._Ve,{className:"text-black/50 dark:text-white/90 text-slate-400 flex-shrink-0"})})})}),x.length>1&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(f.q,{x:2}),(0,i.jsxs)(eu.g,{variant:"flat",children:[(0,i.jsx)(M.e,{content:"Total ".concat(x.length,", current ").concat(a+1),showArrow:!0,color:"foreground",children:(0,i.jsx)(R.A,{isIconOnly:!0,onClick:()=>c(e=>(e-1+x.length)%x.length),isDisabled:0===a,children:(0,i.jsx)(w.Hf3,{})})}),(0,i.jsx)(M.e,{content:"Total ".concat(x.length,", current ").concat(a+1),showArrow:!0,color:"foreground",children:(0,i.jsx)(R.A,{isIconOnly:!0,onClick:()=>c(e=>(e+1)%x.length),isDisabled:a===x.length-1,children:(0,i.jsx)(w.veu,{})})})]})]})]})});eC.displayName="TreeViewSearch";let eA=ee.k.getActions().onChange,ez=(0,o.memo)(e=>{let{handle:l}=e,{isOpen:t,onOpen:n,onClose:r,onOpenChange:a}=(0,ex.q)(),{theme:o,setTheme:d}=(0,c.F)(),{state:x,setEnableHover:u,setEnableUpdate:h,setEnableRuntimeCount:m,setEnableRuntimeMis:v}=(0,_.Z)(),{state:j,setUISize:N}=b(),{state:y,cb:S}=(0,eS.$)(e=>({state:e.state,cb:e.cb})),k=(0,ee.k)(e=>e.filter);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"fixed top-3 right-3 z-10 flex",children:[(0,i.jsx)(eC,{handle:l}),(0,i.jsx)(f.q,{x:2}),(0,i.jsxs)(eu.g,{variant:"flat",children:[(0,i.jsx)(M.e,{content:(0,i.jsx)("p",{className:y?"text-green-400":"text-red-400",children:y?"DevTool Connect":"DevTool DisConnect"}),showArrow:!0,children:(0,i.jsx)(R.A,{isIconOnly:!0,onClick:()=>null==S?void 0:S(),disabled:y,children:y?(0,i.jsx)(w.NhS,{className:"text-green-500"}):(0,i.jsx)(w.xrR,{className:" text-red-500"})})}),(0,i.jsx)(R.A,{isIconOnly:!0,onClick:()=>d("dark"===o?"light":"dark"),children:"dark"===o?(0,i.jsx)(w.kLh,{className:"text-gray-500"}):(0,i.jsx)(w.NWY,{className:"text-yellow-500"})}),(0,i.jsx)(M.e,{content:"Setting",showArrow:!0,color:"foreground",children:(0,i.jsx)(R.A,{isIconOnly:!0,onClick:n,children:(0,i.jsx)(w.UG6,{className:" text-gray-500"})})})]})]}),(0,i.jsx)(eh.R,{isOpen:t,size:"xl",onClose:r,onOpenChange:a,isDismissable:!1,placement:"top",children:(0,i.jsxs)(em.A,{children:[(0,i.jsx)(ev.k,{children:(0,i.jsxs)("h3",{className:"text-[1em]",children:["Setting ",(0,i.jsx)("small",{children:"@my-react"})]})}),(0,i.jsx)(ej.I,{className:"text-[14px]",children:(0,i.jsxs)("div",{className:"flex flex-col gap-y-4",children:[(0,i.jsxs)("div",{className:"flex flex-col gap-y-2",children:[(0,i.jsx)("p",{className:"whitespace-nowrap text-[14px] text-foreground-500",children:"Filter Node: "}),(0,i.jsx)("div",{className:"flex items-center",children:(0,i.jsx)(ep.g,{selectionMode:"multiple",placeholder:"Select a Type",selectedKeys:k,"aria-label":"Filter Node",className:"flex items-center",radius:"sm",variant:"bordered",size:"lg",onChange:e=>{eA(new Set(e.target.value.split(",")))},children:F.typeKeys.map(e=>(0,i.jsx)(ef.R,{value:e,children:(0,F.getTypeName)(e)},e))})})]}),(0,i.jsx)(g.j,{}),(0,i.jsxs)("div",{className:"flex flex-col gap-y-2",children:[(0,i.jsx)("p",{className:"whitespace-nowrap text-[14px] text-foreground-500",children:"UI Size: "}),(0,i.jsxs)(eg.X,{value:j,onValueChange:e=>N(e),orientation:"horizontal",classNames:{wrapper:"gap-x-6"},children:[(0,i.jsx)(ew.J,{value:s.sm,children:"Small Size"}),(0,i.jsx)(ew.J,{value:s.md,children:"Medium Size"}),(0,i.jsx)(ew.J,{value:s.lg,children:"Large Size"})]})]}),(0,i.jsx)(g.j,{}),(0,i.jsxs)("div",{className:"flex flex-col gap-y-2",children:[(0,i.jsx)(eN.K,{isSelected:x.enableUpdate,onValueChange:h,color:"primary",children:(0,i.jsxs)("div",{className:"flex",children:["Highlight Update",(0,i.jsxs)("div",{className:"ml-4 gap-x-2 flex",children:[(0,i.jsx)(p.z,{style:{backgroundColor:F.color.update,mixBlendMode:"difference"},children:"update"}),(0,i.jsx)(p.z,{style:{backgroundColor:F.color.append,mixBlendMode:"difference"},children:"append"}),(0,i.jsx)(p.z,{style:{backgroundColor:F.color.setRef,mixBlendMode:"difference"},children:"setRef"}),(0,i.jsx)(p.z,{style:{backgroundColor:F.color.warn,mixBlendMode:"difference"},children:"warn"})]})]})}),(0,i.jsx)(eN.K,{isSelected:x.enableHover,onValueChange:u,color:"secondary",children:"Hover Overlay"}),(0,i.jsx)(eN.K,{isSelected:x.enableRuntimeCount,onValueChange:m,color:"success",children:"RuntimeCount (DevMode only)"}),(0,i.jsx)(eN.K,{isSelected:x.enableRuntimeMis,isDisabled:!x.enableRuntimeCount,onValueChange:v,color:"warning",children:"RuntimeMis (DevMode only)"})]})]})}),(0,i.jsx)(ey.R,{children:(0,i.jsx)(R.A,{onClick:r,variant:"bordered",children:"Close"})})]})})]})});ez.displayName="TreeViewSetting";let eO=(e,l,t)=>{let n=Array.from(e.querySelectorAll("[data-depth]")),s=e.clientWidth,i=l.current||12;for(let e of(s>t.current&&(i=12),t.current=s,n)){var r;let l=parseInt(e.getAttribute("data-depth")||"0",10)||0;0!==l&&(i=Math.min(i,Math.max(0,s-((null===(r=e.querySelector("[data-content]"))||void 0===r?void 0:r.clientWidth)||0)-6)/l))}l.current=i,e.style.setProperty("--indentation-size","".concat(i,"px")),e.style.setProperty("--width-size","".concat(s,"px"))},eM=(0,o.memo)(e=>{let{onScroll:l,data:t,onMount:n}=e,[r,a]=(0,o.useState)(!1),c=(0,o.useRef)(null),d=y.O.useShallowStableSelector(e=>e.select),x=b.useShallowStableSelector(e=>e.state),u=Y((e,l,n)=>{let{isScrolling:r}=n,a=t[e];return a?(0,i.jsx)(G,{node:a,isScrolling:r,className:x===s.sm?"text-[12px]":x===s.md?"text-[14px]":"text-[16px]"}):null}),h=(0,o.useMemo)(()=>t.findIndex(e=>e.i===d),[t,d]);(0,o.useEffect)(()=>{if(-1!==h){var e;null===(e=c.current)||void 0===e||e.scrollIntoView({index:h})}},[h]);let m=t.length>0;return((0,o.useEffect)(()=>(m&&n(c.current),()=>{n()}),[m,n]),t.length)?(0,i.jsx)(er.OO,{ref:c,overscan:60,isScrolling:a,context:{isScrolling:r},onScroll:l,totalCount:t.length,itemContent:u}):null});eM.displayName="TreeViewImpl";let eR=(0,o.memo)(()=>{let e=(0,o.useRef)(null),l=Q.p.useShallowStableSelector(e=>e.list),{width:t,height:n}=function(e){let{ref:l,cssSelector:t,getEle:n,deps:s}=e,i=(0,o.useRef)(n);i.current=n;let[r,a]=ec(ed,100);return(0,ea.L)(()=>{var e;let n=l?l.current:t?document.querySelector(t):(null===(e=i.current)||void 0===e?void 0:e.call(i))||null;if(n){if(window.ResizeObserver){let e=new ResizeObserver(()=>{a(n.getBoundingClientRect())});return e.observe(n),()=>e.disconnect()}{let e=()=>a(n.getBoundingClientRect());return e(),window.addEventListener("resize",e,{passive:!0}),()=>window.removeEventListener("resize",e)}}},[l,t,a,...s||eo]),r}({ref:e}),[s,r]=(0,o.useState)(),a=(0,o.useRef)(12),c=(0,o.useRef)(t),d=(0,o.useCallback)(()=>{e.current&&eO(e.current,a,c)},[]);return(0,o.useEffect)(()=>{d()},[t,n,l.length,d]),(0,i.jsx)("div",{className:"tree-view h-full p-1",children:(0,i.jsxs)("div",{className:"group h-full transform-gpu",ref:e,children:[(0,i.jsx)(eM,{onScroll:d,data:l,onMount:r}),(0,i.jsx)(ez,{handle:s})]})})});function eF(){let e=(0,eS.$)(e=>e.error),{theme:l}=(0,c.F)();return(0,o.useEffect)(()=>{e&&d.Am.error(e,{position:"top-right"})},[e]),(0,i.jsxs)("main",{className:"flex p-1 h-screen",children:[(0,i.jsx)(a(),{children:(0,i.jsx)("title",{children:"@my-react devtools"})}),(0,i.jsx)(d.x7,{richColors:!0,theme:"dark"===l?"dark":"light"}),(0,i.jsx)(m,{left:(0,i.jsx)(eR,{}),right:(0,i.jsx)(ei,{})})]})}eR.displayName="TreeView"}},function(e){e.O(0,[44,774,888,179],function(){return e(e.s=5834)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/devTool.html b/devTool.html index 0aa8711..eaa6d85 100644 --- a/devTool.html +++ b/devTool.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/disablePopup.html b/disablePopup.html index 3d679b0..46d1bb0 100644 --- a/disablePopup.html +++ b/disablePopup.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/enablePopup.html b/enablePopup.html index efbe960..dc62e94 100644 --- a/enablePopup.html +++ b/enablePopup.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/index.html b/index.html index a2aa7b3..111b8ed 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file