@commandkit/devtools 0.0.0 → 1.2.0-rc.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 (52) hide show
  1. package/README.md +22 -1
  2. package/dist/index.js +7 -2
  3. package/dist/server/api.js +3 -1
  4. package/dist/server/app.d.ts +0 -6
  5. package/dist/server/app.js +32 -5
  6. package/dist/server/middlewares/auth.middleware.js +1 -3
  7. package/dist/server/routes/commands.js +3 -1
  8. package/dist/server/routes/feature-flags.d.ts +2 -0
  9. package/dist/server/routes/feature-flags.js +17 -0
  10. package/package.json +6 -6
  11. package/ui/assets/commands-DCZg-MCP.js +21 -0
  12. package/ui/assets/events-BvXEfwuo.js +1 -0
  13. package/ui/assets/feature-flags-CWG46eCK.js +1 -0
  14. package/ui/assets/guilds-D1Zv6HHT.js +1 -0
  15. package/ui/assets/index-B_iMxRPI.css +1 -0
  16. package/ui/assets/index-BvL7r8Ib.js +175 -0
  17. package/ui/assets/index-CVOoBVlk.js +21 -0
  18. package/ui/assets/plugins-Tydyi8kX.js +1 -0
  19. package/ui/index.html +2 -2
  20. package/ui/assets/commands-1CNKwBwb.js +0 -21
  21. package/ui/assets/commands-BPtOowvt.js +0 -21
  22. package/ui/assets/commands-Btwm5Y8X.js +0 -21
  23. package/ui/assets/commands-Co75Omrs.js +0 -21
  24. package/ui/assets/commands-DGHj0IlF.js +0 -21
  25. package/ui/assets/commands-DLOqEa09.js +0 -21
  26. package/ui/assets/commands-Dbur0m-5.js +0 -21
  27. package/ui/assets/events-8TOcM0SA.js +0 -1
  28. package/ui/assets/events-KoIfZdN4.js +0 -1
  29. package/ui/assets/guilds-BaRgpZjQ.js +0 -1
  30. package/ui/assets/guilds-C14RhxbA.js +0 -1
  31. package/ui/assets/guilds-C62gvmcC.js +0 -1
  32. package/ui/assets/guilds-DtkkgV8x.js +0 -1
  33. package/ui/assets/index-AmEdk0_Y.js +0 -171
  34. package/ui/assets/index-B8uO3jW2.css +0 -1
  35. package/ui/assets/index-BHEndNIe.js +0 -21
  36. package/ui/assets/index-BXHhn7xD.js +0 -166
  37. package/ui/assets/index-BjtGQ5LZ.js +0 -1
  38. package/ui/assets/index-C9O1tyee.js +0 -1
  39. package/ui/assets/index-C9x2u88i.js +0 -1
  40. package/ui/assets/index-CDsIFLA6.js +0 -1
  41. package/ui/assets/index-CHwEhXRf.js +0 -171
  42. package/ui/assets/index-Cdbz8y0S.css +0 -1
  43. package/ui/assets/index-CfqrFrUN.css +0 -1
  44. package/ui/assets/index-DQXVwUX6.js +0 -171
  45. package/ui/assets/index-DeEbAdiT.js +0 -171
  46. package/ui/assets/index-Dls-gZXQ.js +0 -21
  47. package/ui/assets/index-YSZlLuZW.css +0 -1
  48. package/ui/assets/index-d6nxy4gt.js +0 -171
  49. package/ui/assets/index-lMaZhtOv.js +0 -1
  50. package/ui/assets/index-sbkUtK44.js +0 -171
  51. package/ui/assets/plugins-CdXdPOuc.js +0 -1
  52. package/ui/assets/plugins-DY8I3O9T.js +0 -1
@@ -0,0 +1,21 @@
1
+ import{i as c,u as h,j as e,B as s,C as a,b as r,f as t,e as l,l as x,h as m,m as n,n as i}from"./index-BvL7r8Ib.js";/**
2
+ * @license lucide-react v0.539.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const j=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],o=c("arrow-up-right",j);/**
7
+ * @license lucide-react v0.539.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */const u=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],p=c("message-square",u);/**
12
+ * @license lucide-react v0.539.0 - ISC
13
+ *
14
+ * This source code is licensed under the ISC license.
15
+ * See the LICENSE file in the root directory of this source tree.
16
+ */const f=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],N=c("server",f);/**
17
+ * @license lucide-react v0.539.0 - ISC
18
+ *
19
+ * This source code is licensed under the ISC license.
20
+ * See the LICENSE file in the root directory of this source tree.
21
+ */const g=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],y=c("users",g);function w(){const d=h();return e.jsxs("div",{className:"flex flex-1 flex-col gap-6 p-6",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("h1",{className:"text-3xl font-bold inline-flex items-center gap-2",children:["CommandKit DevTools ",e.jsx(s,{children:"Preview"})]}),e.jsx("p",{className:"text-muted-foreground",children:"Welcome to the CommandKit DevTools."})]}),e.jsxs("div",{className:"grid gap-6 md:grid-cols-3",children:[e.jsxs(a,{children:[e.jsxs(r,{className:"flex flex-row items-center justify-between pb-2",children:[e.jsx(t,{className:"text-xl font-medium",children:"Guilds"}),e.jsx(N,{className:"h-5 w-5 text-muted-foreground"})]}),e.jsxs(l,{children:[e.jsx("div",{className:"text-3xl font-bold",children:d.user.data.guilds}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Servers where your bot is active"})]}),e.jsx(x,{children:e.jsxs(s,{variant:"outline",className:"gap-1",children:[e.jsx(o,{className:"h-3 w-3"}),e.jsx("span",{children:"Active"})]})})]}),e.jsxs(a,{children:[e.jsxs(r,{className:"flex flex-row items-center justify-between pb-2",children:[e.jsx(t,{className:"text-xl font-medium",children:"Users"}),e.jsx(y,{className:"h-5 w-5 text-muted-foreground"})]}),e.jsxs(l,{children:[e.jsx("div",{className:"text-3xl font-bold",children:d.user.data.users}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Users with access to your bot"})]}),e.jsx(x,{children:e.jsxs(s,{variant:"outline",className:"gap-1",children:[e.jsx(o,{className:"h-3 w-3"}),e.jsx("span",{children:"Growing"})]})})]}),e.jsxs(a,{children:[e.jsxs(r,{className:"flex flex-row items-center justify-between pb-2",children:[e.jsx(t,{className:"text-xl font-medium",children:"Channels"}),e.jsx(p,{className:"h-5 w-5 text-muted-foreground"})]}),e.jsxs(l,{children:[e.jsx("div",{className:"text-3xl font-bold",children:d.user.data.channels}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Channels where your bot is available"})]}),e.jsx(x,{children:e.jsxs(s,{variant:"outline",className:"gap-1",children:[e.jsx(o,{className:"h-3 w-3"}),e.jsx("span",{children:"Available"})]})})]})]}),e.jsxs(a,{children:[e.jsxs(r,{children:[e.jsx(t,{children:"Quick Actions"}),e.jsx(m,{children:"These are some of the available actions"})]}),e.jsxs(l,{className:"flex flex-wrap gap-4",children:[e.jsx(n,{to:"/commands",children:e.jsx(i,{className:"cursor-pointer",children:"View Commands"})}),e.jsx(n,{to:"/guilds",children:e.jsx(i,{className:"cursor-pointer",children:"Manage Guilds"})}),e.jsx(n,{to:"/events",children:e.jsx(i,{className:"cursor-pointer",children:"View Events"})}),e.jsx(n,{to:"/plugins",children:e.jsx(i,{className:"cursor-pointer",children:"View Plugins"})})]})]})]})}export{w as component};
@@ -0,0 +1 @@
1
+ import{g as X,u as tt,a as et,j as y,L as rt,B as nt}from"./index-BvL7r8Ib.js";var I={exports:{}},st=I.exports,V;function it(){return V||(V=1,function(k,H){(function(N,D){k.exports=D()})(st,function(){var N=1e3,D=6e4,g=36e5,U="millisecond",_="second",O="minute",b="hour",v="day",C="week",m="month",J="quarter",M="year",j="date",Z="Invalid Date",P=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,Q=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,K={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(s){var r=["th","st","nd","rd"],t=s%100;return"["+s+(r[(t-20)%10]||r[t]||r[0])+"]"}},q=function(s,r,t){var n=String(s);return!n||n.length>=r?s:""+Array(r+1-n.length).join(t)+s},G={s:q,z:function(s){var r=-s.utcOffset(),t=Math.abs(r),n=Math.floor(t/60),e=t%60;return(r<=0?"+":"-")+q(n,2,"0")+":"+q(e,2,"0")},m:function s(r,t){if(r.date()<t.date())return-s(t,r);var n=12*(t.year()-r.year())+(t.month()-r.month()),e=r.clone().add(n,m),i=t-e<0,a=r.clone().add(n+(i?-1:1),m);return+(-(n+(t-e)/(i?e-a:a-e))||0)},a:function(s){return s<0?Math.ceil(s)||0:Math.floor(s)},p:function(s){return{M:m,y:M,w:C,d:v,D:j,h:b,m:O,s:_,ms:U,Q:J}[s]||String(s||"").toLowerCase().replace(/s$/,"")},u:function(s){return s===void 0}},T="en",x={};x[T]=K;var z="$isDayjsObject",R=function(s){return s instanceof F||!(!s||!s[z])},W=function s(r,t,n){var e;if(!r)return T;if(typeof r=="string"){var i=r.toLowerCase();x[i]&&(e=i),t&&(x[i]=t,e=i);var a=r.split("-");if(!e&&a.length>1)return s(a[0])}else{var o=r.name;x[o]=r,e=o}return!n&&e&&(T=e),e||!n&&T},f=function(s,r){if(R(s))return s.clone();var t=typeof r=="object"?r:{};return t.date=s,t.args=arguments,new F(t)},u=G;u.l=W,u.i=R,u.w=function(s,r){return f(s,{locale:r.$L,utc:r.$u,x:r.$x,$offset:r.$offset})};var F=function(){function s(t){this.$L=W(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[z]=!0}var r=s.prototype;return r.parse=function(t){this.$d=function(n){var e=n.date,i=n.utc;if(e===null)return new Date(NaN);if(u.u(e))return new Date;if(e instanceof Date)return new Date(e);if(typeof e=="string"&&!/Z$/i.test(e)){var a=e.match(P);if(a){var o=a[2]-1||0,c=(a[7]||"0").substring(0,3);return i?new Date(Date.UTC(a[1],o,a[3]||1,a[4]||0,a[5]||0,a[6]||0,c)):new Date(a[1],o,a[3]||1,a[4]||0,a[5]||0,a[6]||0,c)}}return new Date(e)}(t),this.init()},r.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},r.$utils=function(){return u},r.isValid=function(){return this.$d.toString()!==Z},r.isSame=function(t,n){var e=f(t);return this.startOf(n)<=e&&e<=this.endOf(n)},r.isAfter=function(t,n){return f(t)<this.startOf(n)},r.isBefore=function(t,n){return this.endOf(n)<f(t)},r.$g=function(t,n,e){return u.u(t)?this[n]:this.set(e,t)},r.unix=function(){return Math.floor(this.valueOf()/1e3)},r.valueOf=function(){return this.$d.getTime()},r.startOf=function(t,n){var e=this,i=!!u.u(n)||n,a=u.p(t),o=function(w,l){var p=u.w(e.$u?Date.UTC(e.$y,l,w):new Date(e.$y,l,w),e);return i?p:p.endOf(v)},c=function(w,l){return u.w(e.toDate()[w].apply(e.toDate("s"),(i?[0,0,0,0]:[23,59,59,999]).slice(l)),e)},d=this.$W,h=this.$M,$=this.$D,Y="set"+(this.$u?"UTC":"");switch(a){case M:return i?o(1,0):o(31,11);case m:return i?o(1,h):o(0,h+1);case C:var S=this.$locale().weekStart||0,L=(d<S?d+7:d)-S;return o(i?$-L:$+(6-L),h);case v:case j:return c(Y+"Hours",0);case b:return c(Y+"Minutes",1);case O:return c(Y+"Seconds",2);case _:return c(Y+"Milliseconds",3);default:return this.clone()}},r.endOf=function(t){return this.startOf(t,!1)},r.$set=function(t,n){var e,i=u.p(t),a="set"+(this.$u?"UTC":""),o=(e={},e[v]=a+"Date",e[j]=a+"Date",e[m]=a+"Month",e[M]=a+"FullYear",e[b]=a+"Hours",e[O]=a+"Minutes",e[_]=a+"Seconds",e[U]=a+"Milliseconds",e)[i],c=i===v?this.$D+(n-this.$W):n;if(i===m||i===M){var d=this.clone().set(j,1);d.$d[o](c),d.init(),this.$d=d.set(j,Math.min(this.$D,d.daysInMonth())).$d}else o&&this.$d[o](c);return this.init(),this},r.set=function(t,n){return this.clone().$set(t,n)},r.get=function(t){return this[u.p(t)]()},r.add=function(t,n){var e,i=this;t=Number(t);var a=u.p(n),o=function(h){var $=f(i);return u.w($.date($.date()+Math.round(h*t)),i)};if(a===m)return this.set(m,this.$M+t);if(a===M)return this.set(M,this.$y+t);if(a===v)return o(1);if(a===C)return o(7);var c=(e={},e[O]=D,e[b]=g,e[_]=N,e)[a]||1,d=this.$d.getTime()+t*c;return u.w(d,this)},r.subtract=function(t,n){return this.add(-1*t,n)},r.format=function(t){var n=this,e=this.$locale();if(!this.isValid())return e.invalidDate||Z;var i=t||"YYYY-MM-DDTHH:mm:ssZ",a=u.z(this),o=this.$H,c=this.$m,d=this.$M,h=e.weekdays,$=e.months,Y=e.meridiem,S=function(l,p,A,E){return l&&(l[p]||l(n,i))||A[p].slice(0,E)},L=function(l){return u.s(o%12||12,l,"0")},w=Y||function(l,p,A){var E=l<12?"AM":"PM";return A?E.toLowerCase():E};return i.replace(Q,function(l,p){return p||function(A){switch(A){case"YY":return String(n.$y).slice(-2);case"YYYY":return u.s(n.$y,4,"0");case"M":return d+1;case"MM":return u.s(d+1,2,"0");case"MMM":return S(e.monthsShort,d,$,3);case"MMMM":return S($,d);case"D":return n.$D;case"DD":return u.s(n.$D,2,"0");case"d":return String(n.$W);case"dd":return S(e.weekdaysMin,n.$W,h,2);case"ddd":return S(e.weekdaysShort,n.$W,h,3);case"dddd":return h[n.$W];case"H":return String(o);case"HH":return u.s(o,2,"0");case"h":return L(1);case"hh":return L(2);case"a":return w(o,c,!0);case"A":return w(o,c,!1);case"m":return String(c);case"mm":return u.s(c,2,"0");case"s":return String(n.$s);case"ss":return u.s(n.$s,2,"0");case"SSS":return u.s(n.$ms,3,"0");case"Z":return a}return null}(l)||a.replace(":","")})},r.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},r.diff=function(t,n,e){var i,a=this,o=u.p(n),c=f(t),d=(c.utcOffset()-this.utcOffset())*D,h=this-c,$=function(){return u.m(a,c)};switch(o){case M:i=$()/12;break;case m:i=$();break;case J:i=$()/3;break;case C:i=(h-d)/6048e5;break;case v:i=(h-d)/864e5;break;case b:i=h/g;break;case O:i=h/D;break;case _:i=h/N;break;default:i=h}return e?i:u.a(i)},r.daysInMonth=function(){return this.endOf(m).$D},r.$locale=function(){return x[this.$L]},r.locale=function(t,n){if(!t)return this.$L;var e=this.clone(),i=W(t,n,!0);return i&&(e.$L=i),e},r.clone=function(){return u.w(this.$d,this)},r.toDate=function(){return new Date(this.valueOf())},r.toJSON=function(){return this.isValid()?this.toISOString():null},r.toISOString=function(){return this.$d.toISOString()},r.toString=function(){return this.$d.toUTCString()},s}(),B=F.prototype;return f.prototype=B,[["$ms",U],["$s",_],["$m",O],["$H",b],["$W",v],["$M",m],["$y",M],["$D",j]].forEach(function(s){B[s[1]]=function(r){return this.$g(r,s[0],s[1])}}),f.extend=function(s,r){return s.$i||(s(r,F,f),s.$i=!0),f},f.locale=W,f.isDayjs=R,f.unix=function(s){return f(1e3*s)},f.en=x[T],f.Ls=x,f.p={},f})}(I)),I.exports}var at=it();const ut=X(at),ot="YYYY-MM-DD HH:mm:ss";function ct(k,H=ot){return ut(k).format(H)}function dt(){const k=tt(),{data:H,isLoading:N,isError:D}=et({queryKey:["plugins"],queryFn:async()=>await k.plugins.fetch()});return N||!H?y.jsx(rt,{}):D?y.jsx("div",{className:"h-screen grid place-items-center",children:y.jsx("h1",{className:"text-2xl text-red-500",children:"An error occurred while fetching plugins data."})}):y.jsxs("div",{className:"p-4",children:[y.jsx("h1",{className:"text-2xl font-bold mb-6",children:"Plugins"}),y.jsx("div",{className:"grid grid-cols-3 gap-4 py-4",children:H.map(g=>y.jsxs("div",{className:"border p-4 rounded",children:[y.jsx("h2",{className:"text-lg font-semibold",children:g.name}),y.jsx(nt,{variant:"outline",className:"text-sm text-gray-500 mt-2 font-mono",children:g.id}),y.jsxs("p",{className:"text-muted-foreground text-xs mt-2 font-medium",children:["Registered at ",ct(g.loadedAt)]})]},g.id))})]})}export{dt as component};
package/ui/index.html CHANGED
@@ -11,8 +11,8 @@
11
11
  <style>
12
12
  @import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap');
13
13
  </style>
14
- <script type="module" crossorigin src="/assets/index-DeEbAdiT.js"></script>
15
- <link rel="stylesheet" crossorigin href="/assets/index-B8uO3jW2.css">
14
+ <script type="module" crossorigin src="/assets/index-BvL7r8Ib.js"></script>
15
+ <link rel="stylesheet" crossorigin href="/assets/index-B_iMxRPI.css">
16
16
  </head>
17
17
  <body>
18
18
  <div id="root"></div>
@@ -1,21 +0,0 @@
1
- import{c as i,r as p,u as N,a as f,j as e,B as x,C as v,b}from"./index-sbkUtK44.js";/**
2
- * @license lucide-react v0.468.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const y=i("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
7
- * @license lucide-react v0.468.0 - ISC
8
- *
9
- * This source code is licensed under the ISC license.
10
- * See the LICENSE file in the root directory of this source tree.
11
- */const C=i("Command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]);/**
12
- * @license lucide-react v0.468.0 - ISC
13
- *
14
- * This source code is licensed under the ISC license.
15
- * See the LICENSE file in the root directory of this source tree.
16
- */const g=i("FolderTree",[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]]);/**
17
- * @license lucide-react v0.468.0 - ISC
18
- *
19
- * This source code is licensed under the ISC license.
20
- * See the LICENSE file in the root directory of this source tree.
21
- */const u=i("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]),w=({command:t,middlewares:d})=>e.jsxs(b,{className:"p-4 mt-4 bg-muted/50 border-l-4 border-l-primary rounded-sm",children:[e.jsx("h3",{className:"text-lg font-bold mb-2",children:t.name}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2 text-sm",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-muted-foreground",children:"ID:"}),e.jsx("p",{className:"font-mono text-xs break-all",children:t.id})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-muted-foreground",children:"Category:"}),e.jsx("p",{children:t.category||"Uncategorized"})]}),e.jsxs("div",{className:"md:col-span-2",children:[e.jsx("p",{className:"text-muted-foreground",children:"Path:"}),e.jsx("p",{className:"font-mono text-xs break-all",children:t.path})]}),e.jsxs("div",{className:"md:col-span-2",children:[e.jsx("p",{className:"text-muted-foreground",children:"Relative Path:"}),e.jsx("p",{className:"font-mono text-xs",children:t.relativePath})]}),e.jsxs("div",{className:"md:col-span-2",children:[e.jsx("p",{className:"text-muted-foreground",children:"Middlewares:"}),e.jsx("div",{className:"flex flex-wrap gap-2 mt-1",children:t.middlewares.map(l=>{const a=d[l];return e.jsxs(x,{variant:"outline",className:"flex items-center gap-1",children:[e.jsx(u,{className:"h-3 w-3"}),(a==null?void 0:a.name)||l,(a==null?void 0:a.global)&&e.jsx("span",{className:"text-xs ml-1 text-muted-foreground",children:"(global)"})]},l)})})]})]})]}),j=({name:t,children:d,isCommand:l=!1,hasMiddleware:a=!1,onClick:n,isSelected:c})=>{const[o,h]=p.useState(!0),s=!!d;return e.jsxs("div",{className:"ml-4",children:[e.jsxs("div",{className:`flex items-center py-1 cursor-pointer hover:bg-slate-100 dark:hover:bg-gray-800/50 rounded ${c?"bg-slate-100 dark:bg-gray-800/50":""}`,onClick:()=>{s&&h(!o),n&&n()},children:[s?o?e.jsx(y,{className:"h-4 w-4 mr-1 text-muted-foreground"}):e.jsx(v,{className:"h-4 w-4 mr-1 text-muted-foreground"}):e.jsx("span",{className:"w-5"}),l?e.jsx(C,{className:"h-4 w-4 mr-1 text-primary"}):e.jsx(g,{className:"h-4 w-4 mr-1 text-amber-500"}),e.jsx("span",{className:`${l?"font-mono text-sm":"font-semibold"}`,children:t}),a&&e.jsxs(x,{variant:"outline",className:"ml-2 py-0 h-5",children:[e.jsx(u,{className:"h-3 w-3 mr-1"}),"λ"]})]}),s&&o&&e.jsx("div",{className:"border-l border-dashed border-slate-300 dark:border-slate-700 pl-2",children:d})]})},M=function(){const[d,l]=p.useState(null),a=N(),{data:n,isError:c,isLoading:o}=f({queryKey:["commands"],enabled:!!a,refetchOnWindowFocus:!0,refetchOnReconnect:!0,queryFn:async()=>(await a.api.get("/commands")).data}),h=n?Object.values(n.commands).reduce((s,m)=>{const r=m.category||"uncategorized";return s[r]||(s[r]=[]),s[r].push(m),s},{}):{};return o?e.jsx("div",{className:"flex justify-center items-center h-64",children:"Loading command data..."}):c?e.jsx("div",{className:"text-red-500",children:c}):n?e.jsxs("div",{className:"container mx-auto p-4",children:[e.jsx("h1",{className:"text-2xl font-bold mb-6",children:"Command Hierarchy"}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[e.jsxs("div",{className:"lg:col-span-1 border rounded-lg p-4 bg-muted/50 shadow-sm overflow-auto max-h-[80vh]",children:[e.jsx("h2",{className:"text-xl font-bold mb-4",children:"Commands"}),e.jsx("div",{className:"command-tree",children:Object.entries(h).map(([s,m])=>e.jsx(j,{name:s,children:m.map(r=>e.jsx(j,{name:r.name,isCommand:!0,hasMiddleware:r.middlewares.length>0,onClick:()=>l(r.id),isSelected:d===r.id},r.id))},s))})]}),e.jsxs("div",{className:"lg:col-span-2 border rounded-lg p-4 bg-muted/50 shadow-sm",children:[e.jsx("h2",{className:"text-xl font-bold mb-4",children:"Command Details"}),d?e.jsx(w,{command:n.commands[d],middlewares:n.middlewares}):e.jsxs("div",{className:"text-center p-8 text-muted-foreground",children:[e.jsx(g,{className:"h-12 w-12 mx-auto mb-4 opacity-50"}),e.jsx("p",{children:"Select a command to view its details"})]})]})]}),e.jsx("div",{className:"mt-6 text-sm text-muted-foreground",children:e.jsxs("p",{children:[e.jsxs(x,{variant:"outline",className:"mr-2",children:[e.jsx(u,{className:"h-3 w-3 mr-1"}),"λ"]}),"indicates the command has middleware associated"]})})]}):e.jsx("div",{children:"No command data available"})};export{M as component};
@@ -1,21 +0,0 @@
1
- import{h as i,r as p,u as N,a as f,j as e,B as x,i as v,C as b}from"./index-CHwEhXRf.js";/**
2
- * @license lucide-react v0.468.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const y=i("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
7
- * @license lucide-react v0.468.0 - ISC
8
- *
9
- * This source code is licensed under the ISC license.
10
- * See the LICENSE file in the root directory of this source tree.
11
- */const C=i("Command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]);/**
12
- * @license lucide-react v0.468.0 - ISC
13
- *
14
- * This source code is licensed under the ISC license.
15
- * See the LICENSE file in the root directory of this source tree.
16
- */const g=i("FolderTree",[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]]);/**
17
- * @license lucide-react v0.468.0 - ISC
18
- *
19
- * This source code is licensed under the ISC license.
20
- * See the LICENSE file in the root directory of this source tree.
21
- */const u=i("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]),w=({command:t,middlewares:d})=>e.jsxs(b,{className:"p-4 mt-4 bg-muted/50 border-l-4 border-l-primary rounded-sm",children:[e.jsx("h3",{className:"text-lg font-bold mb-2",children:t.name}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2 text-sm",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-muted-foreground",children:"ID:"}),e.jsx("p",{className:"font-mono text-xs break-all",children:t.id})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-muted-foreground",children:"Category:"}),e.jsx("p",{children:t.category||"Uncategorized"})]}),e.jsxs("div",{className:"md:col-span-2",children:[e.jsx("p",{className:"text-muted-foreground",children:"Path:"}),e.jsx("p",{className:"font-mono text-xs break-all",children:t.path})]}),e.jsxs("div",{className:"md:col-span-2",children:[e.jsx("p",{className:"text-muted-foreground",children:"Relative Path:"}),e.jsx("p",{className:"font-mono text-xs",children:t.relativePath})]}),e.jsxs("div",{className:"md:col-span-2",children:[e.jsx("p",{className:"text-muted-foreground",children:"Middlewares:"}),e.jsx("div",{className:"flex flex-wrap gap-2 mt-1",children:t.middlewares.map(l=>{const a=d[l];return e.jsxs(x,{variant:"outline",className:"flex items-center gap-1",children:[e.jsx(u,{className:"h-3 w-3"}),(a==null?void 0:a.name)||l,(a==null?void 0:a.global)&&e.jsx("span",{className:"text-xs ml-1 text-muted-foreground",children:"(global)"})]},l)})})]})]})]}),j=({name:t,children:d,isCommand:l=!1,hasMiddleware:a=!1,onClick:n,isSelected:c})=>{const[o,h]=p.useState(!0),s=!!d;return e.jsxs("div",{className:"ml-4",children:[e.jsxs("div",{className:`flex items-center py-1 cursor-pointer hover:bg-slate-100 dark:hover:bg-gray-800/50 rounded ${c?"bg-slate-100 dark:bg-gray-800/50":""}`,onClick:()=>{s&&h(!o),n&&n()},children:[s?o?e.jsx(y,{className:"h-4 w-4 mr-1 text-muted-foreground"}):e.jsx(v,{className:"h-4 w-4 mr-1 text-muted-foreground"}):e.jsx("span",{className:"w-5"}),l?e.jsx(C,{className:"h-4 w-4 mr-1 text-primary"}):e.jsx(g,{className:"h-4 w-4 mr-1 text-amber-500"}),e.jsx("span",{className:`${l?"font-mono text-sm":"font-semibold"}`,children:t}),a&&e.jsxs(x,{variant:"outline",className:"ml-2 py-0 h-5",children:[e.jsx(u,{className:"h-3 w-3 mr-1"}),"λ"]})]}),s&&o&&e.jsx("div",{className:"border-l border-dashed border-slate-300 dark:border-slate-700 pl-2",children:d})]})},M=function(){const[d,l]=p.useState(null),a=N(),{data:n,isError:c,isLoading:o}=f({queryKey:["commands"],enabled:!!a,refetchOnWindowFocus:!0,refetchOnReconnect:!0,queryFn:async()=>(await a.api.get("/commands")).data}),h=n?Object.values(n.commands).reduce((s,m)=>{const r=m.category||"uncategorized";return s[r]||(s[r]=[]),s[r].push(m),s},{}):{};return o?e.jsx("div",{className:"flex justify-center items-center h-64",children:"Loading command data..."}):c?e.jsx("div",{className:"text-red-500",children:c}):n?e.jsxs("div",{className:"container mx-auto p-4",children:[e.jsx("h1",{className:"text-2xl font-bold mb-6",children:"Command Hierarchy"}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[e.jsxs("div",{className:"lg:col-span-1 border rounded-lg p-4 bg-muted/50 shadow-sm overflow-auto max-h-[80vh]",children:[e.jsx("h2",{className:"text-xl font-bold mb-4",children:"Commands"}),e.jsx("div",{className:"command-tree",children:Object.entries(h).map(([s,m])=>e.jsx(j,{name:s,children:m.map(r=>e.jsx(j,{name:r.name,isCommand:!0,hasMiddleware:r.middlewares.length>0,onClick:()=>l(r.id),isSelected:d===r.id},r.id))},s))})]}),e.jsxs("div",{className:"lg:col-span-2 border rounded-lg p-4 bg-muted/50 shadow-sm",children:[e.jsx("h2",{className:"text-xl font-bold mb-4",children:"Command Details"}),d?e.jsx(w,{command:n.commands[d],middlewares:n.middlewares}):e.jsxs("div",{className:"text-center p-8 text-muted-foreground",children:[e.jsx(g,{className:"h-12 w-12 mx-auto mb-4 opacity-50"}),e.jsx("p",{children:"Select a command to view its details"})]})]})]}),e.jsx("div",{className:"mt-6 text-sm text-muted-foreground",children:e.jsxs("p",{children:[e.jsxs(x,{variant:"outline",className:"mr-2",children:[e.jsx(u,{className:"h-3 w-3 mr-1"}),"λ"]}),"indicates the command has middleware associated"]})})]}):e.jsx("div",{children:"No command data available"})};export{M as component};
@@ -1,21 +0,0 @@
1
- import{i,r as p,u as N,a as f,j as e,B as h,k as v,C as b}from"./index-AmEdk0_Y.js";/**
2
- * @license lucide-react v0.468.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const y=i("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
7
- * @license lucide-react v0.468.0 - ISC
8
- *
9
- * This source code is licensed under the ISC license.
10
- * See the LICENSE file in the root directory of this source tree.
11
- */const C=i("Command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]);/**
12
- * @license lucide-react v0.468.0 - ISC
13
- *
14
- * This source code is licensed under the ISC license.
15
- * See the LICENSE file in the root directory of this source tree.
16
- */const g=i("FolderTree",[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]]);/**
17
- * @license lucide-react v0.468.0 - ISC
18
- *
19
- * This source code is licensed under the ISC license.
20
- * See the LICENSE file in the root directory of this source tree.
21
- */const u=i("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]),w=({command:t,middlewares:d})=>e.jsxs(b,{className:"p-4 mt-4 bg-muted/50 border-l-4 border-l-primary rounded-sm",children:[e.jsx("h3",{className:"text-lg font-bold mb-2",children:t.name}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2 text-sm",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-muted-foreground",children:"ID:"}),e.jsx("p",{className:"font-mono text-xs break-all",children:t.id})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-muted-foreground",children:"Category:"}),e.jsx("p",{children:t.category||"Uncategorized"})]}),e.jsxs("div",{className:"md:col-span-2",children:[e.jsx("p",{className:"text-muted-foreground",children:"Path:"}),e.jsx("p",{className:"font-mono text-xs break-all",children:t.path})]}),e.jsxs("div",{className:"md:col-span-2",children:[e.jsx("p",{className:"text-muted-foreground",children:"Relative Path:"}),e.jsx("p",{className:"font-mono text-xs",children:t.relativePath})]}),e.jsxs("div",{className:"md:col-span-2",children:[e.jsx("p",{className:"text-muted-foreground",children:"Middlewares:"}),e.jsx("div",{className:"flex flex-wrap gap-2 mt-1",children:t.middlewares.map(l=>{const a=d[l];return e.jsxs(h,{variant:"outline",className:"flex items-center gap-1",children:[e.jsx(u,{className:"h-3 w-3"}),(a==null?void 0:a.name)||l,(a==null?void 0:a.global)&&e.jsx("span",{className:"text-xs ml-1 text-muted-foreground",children:"(global)"})]},l)})})]})]})]}),j=({name:t,children:d,isCommand:l=!1,hasMiddleware:a=!1,onClick:n,isSelected:c})=>{const[o,x]=p.useState(!0),s=!!d;return e.jsxs("div",{className:"ml-4",children:[e.jsxs("div",{className:`flex items-center py-1 cursor-pointer hover:bg-slate-100 dark:hover:bg-gray-800/50 rounded ${c?"bg-slate-100 dark:bg-gray-800/50":""}`,onClick:()=>{s&&x(!o),n&&n()},children:[s?o?e.jsx(y,{className:"h-4 w-4 mr-1 text-muted-foreground"}):e.jsx(v,{className:"h-4 w-4 mr-1 text-muted-foreground"}):e.jsx("span",{className:"w-5"}),l?e.jsx(C,{className:"h-4 w-4 mr-1 text-primary"}):e.jsx(g,{className:"h-4 w-4 mr-1 text-amber-500"}),e.jsx("span",{className:`${l?"font-mono text-sm":"font-semibold"}`,children:t}),a&&e.jsxs(h,{variant:"outline",className:"ml-2 py-0 h-5",children:[e.jsx(u,{className:"h-3 w-3 mr-1"}),"λ"]})]}),s&&o&&e.jsx("div",{className:"border-l border-dashed border-slate-300 dark:border-slate-700 pl-2",children:d})]})},M=function(){const[d,l]=p.useState(null),a=N(),{data:n,isError:c,isLoading:o}=f({queryKey:["commands"],enabled:!!a,refetchOnWindowFocus:!0,refetchOnReconnect:!0,queryFn:async()=>(await a.api.get("/commands")).data}),x=n?Object.values(n.commands).reduce((s,m)=>{const r=m.category||"uncategorized";return s[r]||(s[r]=[]),s[r].push(m),s},{}):{};return o?e.jsx("div",{className:"flex justify-center items-center h-64",children:"Loading command data..."}):c?e.jsx("div",{className:"text-red-500",children:c}):n?e.jsxs("div",{className:"container mx-auto p-4",children:[e.jsx("h1",{className:"text-2xl font-bold mb-6",children:"Commands"}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[e.jsxs("div",{className:"lg:col-span-1 border rounded-lg p-4 bg-muted/50 shadow-sm overflow-auto max-h-[80vh]",children:[e.jsx("h2",{className:"text-xl font-bold mb-4",children:"Commands"}),e.jsx("div",{className:"command-tree",children:Object.entries(x).map(([s,m])=>e.jsx(j,{name:s,children:m.map(r=>e.jsx(j,{name:r.name,isCommand:!0,hasMiddleware:r.middlewares.length>0,onClick:()=>l(r.id),isSelected:d===r.id},r.id))},s))})]}),e.jsxs("div",{className:"lg:col-span-2 border rounded-lg p-4 bg-muted/50 shadow-sm",children:[e.jsx("h2",{className:"text-xl font-bold mb-4",children:"Command Details"}),d?e.jsx(w,{command:n.commands[d],middlewares:n.middlewares}):e.jsxs("div",{className:"text-center p-8 text-muted-foreground",children:[e.jsx(g,{className:"h-12 w-12 mx-auto mb-4 opacity-50"}),e.jsx("p",{children:"Select a command to view its details"})]})]})]}),e.jsx("div",{className:"mt-6 text-sm text-muted-foreground",children:e.jsxs("p",{children:[e.jsxs(h,{variant:"outline",className:"mr-2",children:[e.jsx(u,{className:"h-3 w-3 mr-1"}),"λ"]}),"indicates the command has middleware associated"]})})]}):e.jsx("div",{children:"No command data available"})};export{M as component};
@@ -1,21 +0,0 @@
1
- import{c as i,r as p,u as N,a as f,j as e,B as x,C as v,b}from"./index-d6nxy4gt.js";/**
2
- * @license lucide-react v0.468.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const y=i("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
7
- * @license lucide-react v0.468.0 - ISC
8
- *
9
- * This source code is licensed under the ISC license.
10
- * See the LICENSE file in the root directory of this source tree.
11
- */const C=i("Command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]);/**
12
- * @license lucide-react v0.468.0 - ISC
13
- *
14
- * This source code is licensed under the ISC license.
15
- * See the LICENSE file in the root directory of this source tree.
16
- */const g=i("FolderTree",[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]]);/**
17
- * @license lucide-react v0.468.0 - ISC
18
- *
19
- * This source code is licensed under the ISC license.
20
- * See the LICENSE file in the root directory of this source tree.
21
- */const u=i("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]),w=({command:t,middlewares:d})=>e.jsxs(b,{className:"p-4 mt-4 bg-muted/50 border-l-4 border-l-primary rounded-sm",children:[e.jsx("h3",{className:"text-lg font-bold mb-2",children:t.name}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2 text-sm",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-muted-foreground",children:"ID:"}),e.jsx("p",{className:"font-mono text-xs break-all",children:t.id})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-muted-foreground",children:"Category:"}),e.jsx("p",{children:t.category||"Uncategorized"})]}),e.jsxs("div",{className:"md:col-span-2",children:[e.jsx("p",{className:"text-muted-foreground",children:"Path:"}),e.jsx("p",{className:"font-mono text-xs break-all",children:t.path})]}),e.jsxs("div",{className:"md:col-span-2",children:[e.jsx("p",{className:"text-muted-foreground",children:"Relative Path:"}),e.jsx("p",{className:"font-mono text-xs",children:t.relativePath})]}),e.jsxs("div",{className:"md:col-span-2",children:[e.jsx("p",{className:"text-muted-foreground",children:"Middlewares:"}),e.jsx("div",{className:"flex flex-wrap gap-2 mt-1",children:t.middlewares.map(l=>{const a=d[l];return e.jsxs(x,{variant:"outline",className:"flex items-center gap-1",children:[e.jsx(u,{className:"h-3 w-3"}),(a==null?void 0:a.name)||l,(a==null?void 0:a.global)&&e.jsx("span",{className:"text-xs ml-1 text-muted-foreground",children:"(global)"})]},l)})})]})]})]}),j=({name:t,children:d,isCommand:l=!1,hasMiddleware:a=!1,onClick:n,isSelected:c})=>{const[o,h]=p.useState(!0),s=!!d;return e.jsxs("div",{className:"ml-4",children:[e.jsxs("div",{className:`flex items-center py-1 cursor-pointer hover:bg-slate-100 dark:hover:bg-gray-800/50 rounded ${c?"bg-slate-100 dark:bg-gray-800/50":""}`,onClick:()=>{s&&h(!o),n&&n()},children:[s?o?e.jsx(y,{className:"h-4 w-4 mr-1 text-muted-foreground"}):e.jsx(v,{className:"h-4 w-4 mr-1 text-muted-foreground"}):e.jsx("span",{className:"w-5"}),l?e.jsx(C,{className:"h-4 w-4 mr-1 text-primary"}):e.jsx(g,{className:"h-4 w-4 mr-1 text-amber-500"}),e.jsx("span",{className:`${l?"font-mono text-sm":"font-semibold"}`,children:t}),a&&e.jsxs(x,{variant:"outline",className:"ml-2 py-0 h-5",children:[e.jsx(u,{className:"h-3 w-3 mr-1"}),"λ"]})]}),s&&o&&e.jsx("div",{className:"border-l border-dashed border-slate-300 dark:border-slate-700 pl-2",children:d})]})},M=function(){const[d,l]=p.useState(null),a=N(),{data:n,isError:c,isLoading:o}=f({queryKey:["commands"],enabled:!!a,refetchOnWindowFocus:!0,refetchOnReconnect:!0,queryFn:async()=>(await a.api.get("/commands")).data}),h=n?Object.values(n.commands).reduce((s,m)=>{const r=m.category||"uncategorized";return s[r]||(s[r]=[]),s[r].push(m),s},{}):{};return o?e.jsx("div",{className:"flex justify-center items-center h-64",children:"Loading command data..."}):c?e.jsx("div",{className:"text-red-500",children:c}):n?e.jsxs("div",{className:"container mx-auto p-4",children:[e.jsx("h1",{className:"text-2xl font-bold mb-6",children:"Command Hierarchy"}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[e.jsxs("div",{className:"lg:col-span-1 border rounded-lg p-4 bg-muted/50 shadow-sm overflow-auto max-h-[80vh]",children:[e.jsx("h2",{className:"text-xl font-bold mb-4",children:"Commands"}),e.jsx("div",{className:"command-tree",children:Object.entries(h).map(([s,m])=>e.jsx(j,{name:s,children:m.map(r=>e.jsx(j,{name:r.name,isCommand:!0,hasMiddleware:r.middlewares.length>0,onClick:()=>l(r.id),isSelected:d===r.id},r.id))},s))})]}),e.jsxs("div",{className:"lg:col-span-2 border rounded-lg p-4 bg-muted/50 shadow-sm",children:[e.jsx("h2",{className:"text-xl font-bold mb-4",children:"Command Details"}),d?e.jsx(w,{command:n.commands[d],middlewares:n.middlewares}):e.jsxs("div",{className:"text-center p-8 text-muted-foreground",children:[e.jsx(g,{className:"h-12 w-12 mx-auto mb-4 opacity-50"}),e.jsx("p",{children:"Select a command to view its details"})]})]})]}),e.jsx("div",{className:"mt-6 text-sm text-muted-foreground",children:e.jsxs("p",{children:[e.jsxs(x,{variant:"outline",className:"mr-2",children:[e.jsx(u,{className:"h-3 w-3 mr-1"}),"λ"]}),"indicates the command has middleware associated"]})})]}):e.jsx("div",{children:"No command data available"})};export{M as component};
@@ -1,21 +0,0 @@
1
- import{c as b,r,j as a,B as f,C as v,a as k}from"./index-DQXVwUX6.js";/**
2
- * @license lucide-react v0.468.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const w=b("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
7
- * @license lucide-react v0.468.0 - ISC
8
- *
9
- * This source code is licensed under the ISC license.
10
- * See the LICENSE file in the root directory of this source tree.
11
- */const P=b("Command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]);/**
12
- * @license lucide-react v0.468.0 - ISC
13
- *
14
- * This source code is licensed under the ISC license.
15
- * See the LICENSE file in the root directory of this source tree.
16
- */const u=b("FolderTree",[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]]);/**
17
- * @license lucide-react v0.468.0 - ISC
18
- *
19
- * This source code is licensed under the ISC license.
20
- * See the LICENSE file in the root directory of this source tree.
21
- */const g=b("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]),y={commands:{"498d84ce-3dd1-4896-a034-ce712652bd66":{id:"498d84ce-3dd1-4896-a034-ce712652bd66",name:"reload",path:"~/commandkit/app/commands/(developer)/reload.js",category:"developer",parentPath:"~/commandkit/app/commands/(developer)",relativePath:"/(developer)/reload.js",middlewares:["4b228f6a-774e-4f81-954f-6db40b0cb6e5","2a1278ee-d642-4ad9-b899-6ad6405ea054"]},"fb07c361-3aa3-43c4-854f-fac44799e324":{id:"fb07c361-3aa3-43c4-854f-fac44799e324",name:"run-after",path:"~/commandkit/app/commands/(developer)/run-after.js",category:"developer",parentPath:"~/commandkit/app/commands/(developer)",relativePath:"/(developer)/run-after.js",middlewares:["4b228f6a-774e-4f81-954f-6db40b0cb6e5","2a1278ee-d642-4ad9-b899-6ad6405ea054"]},"4d3a2a49-4c75-4029-9a7b-55434713b7eb":{id:"4d3a2a49-4c75-4029-9a7b-55434713b7eb",name:"server",path:"~/commandkit/app/commands/(developer)/server.js",category:"developer",parentPath:"~/commandkit/app/commands/(developer)",relativePath:"/(developer)/server.js",middlewares:["4b228f6a-774e-4f81-954f-6db40b0cb6e5","2a1278ee-d642-4ad9-b899-6ad6405ea054"]},"08c2612a-dfcd-4f20-ab0f-0660317aeb01":{id:"08c2612a-dfcd-4f20-ab0f-0660317aeb01",name:"forward",path:"~/commandkit/app/commands/(forward)/forward.js",category:"forward",parentPath:"~/commandkit/app/commands/(forward)",relativePath:"/(forward)/forward.js",middlewares:["2a1278ee-d642-4ad9-b899-6ad6405ea054"]},"7eebc5bc-5615-4d92-a05b-fb1628c33aa9":{id:"7eebc5bc-5615-4d92-a05b-fb1628c33aa9",name:"forwarded",path:"~/commandkit/app/commands/(forward)/forwarded.js",category:"forward",parentPath:"~/commandkit/app/commands/(forward)",relativePath:"/(forward)/forwarded.js",middlewares:["2a1278ee-d642-4ad9-b899-6ad6405ea054"]},"fcfb3105-716f-4c3c-8063-d02d26110c5b":{id:"fcfb3105-716f-4c3c-8063-d02d26110c5b",name:"avatar",path:"~/commandkit/app/commands/(general)/avatar.js",category:"general",parentPath:"~/commandkit/app/commands/(general)",relativePath:"/(general)/avatar.js",middlewares:["2a1278ee-d642-4ad9-b899-6ad6405ea054"]},"648e4200-294c-4433-9aeb-f38120e0a22a":{id:"648e4200-294c-4433-9aeb-f38120e0a22a",name:"cat",path:"~/commandkit/app/commands/(general)/cat.js",category:"general",parentPath:"~/commandkit/app/commands/(general)",relativePath:"/(general)/cat.js",middlewares:["2a1278ee-d642-4ad9-b899-6ad6405ea054"]},"c8229c9d-d05f-4fab-8f75-56ea81a3b0bc":{id:"c8229c9d-d05f-4fab-8f75-56ea81a3b0bc",name:"dog",path:"~/commandkit/app/commands/(general)/dog.js",category:"general",parentPath:"~/commandkit/app/commands/(general)",relativePath:"/(general)/dog.js",middlewares:["2a1278ee-d642-4ad9-b899-6ad6405ea054"]},"81d59af2-486b-4192-8f57-af5b28341371":{id:"81d59af2-486b-4192-8f57-af5b28341371",name:"help",path:"~/commandkit/app/commands/(general)/help.js",category:"general",parentPath:"~/commandkit/app/commands/(general)",relativePath:"/(general)/help.js",middlewares:["2a1278ee-d642-4ad9-b899-6ad6405ea054"]},"e6f2c177-5d7b-41f0-8155-7df35bd3680a":{id:"e6f2c177-5d7b-41f0-8155-7df35bd3680a",name:"ping",path:"~/commandkit/app/commands/(general)/ping.js",category:"general",parentPath:"~/commandkit/app/commands/(general)",relativePath:"/(general)/ping.js",middlewares:["2a1278ee-d642-4ad9-b899-6ad6405ea054"]},"8604fad4-464e-43ff-9bb2-53c3380a4c1c":{id:"8604fad4-464e-43ff-9bb2-53c3380a4c1c",name:"commandkit",path:"~/commandkit/app/commands/(interactions)/commandkit.js",category:"interactions",parentPath:"~/commandkit/app/commands/(interactions)",relativePath:"/(interactions)/commandkit.js",middlewares:["bad9cc82-f063-4b6c-ac3c-9f70097ec251","2a1278ee-d642-4ad9-b899-6ad6405ea054"]},"7e0dd6ec-0136-46bc-bc7a-63f1d6b2a9a1":{id:"7e0dd6ec-0136-46bc-bc7a-63f1d6b2a9a1",name:"confirmation",path:"~/commandkit/app/commands/(interactions)/confirmation.js",category:"interactions",parentPath:"~/commandkit/app/commands/(interactions)",relativePath:"/(interactions)/confirmation.js",middlewares:["bad9cc82-f063-4b6c-ac3c-9f70097ec251","2a1278ee-d642-4ad9-b899-6ad6405ea054"]},"3b6b54bb-f970-4098-a7df-ce0857128cf8":{id:"3b6b54bb-f970-4098-a7df-ce0857128cf8",name:"prompt",path:"~/commandkit/app/commands/(interactions)/prompt.js",category:"interactions",parentPath:"~/commandkit/app/commands/(interactions)",relativePath:"/(interactions)/prompt.js",middlewares:["bad9cc82-f063-4b6c-ac3c-9f70097ec251","2a1278ee-d642-4ad9-b899-6ad6405ea054"]},"3cd7d037-44ad-4d67-8683-0ab0a7eb3ed1":{id:"3cd7d037-44ad-4d67-8683-0ab0a7eb3ed1",name:"xp",path:"~/commandkit/app/commands/(leveling)/xp.js",category:"leveling",parentPath:"~/commandkit/app/commands/(leveling)",relativePath:"/(leveling)/xp.js",middlewares:["2a1278ee-d642-4ad9-b899-6ad6405ea054"]},"c34e0d79-6ce8-4271-a5a9-ef6ead9de7ba":{id:"c34e0d79-6ce8-4271-a5a9-ef6ead9de7ba",name:"select-channel",path:"~/commandkit/app/commands/(select menu)/select-channel.js",category:"select menu",parentPath:"~/commandkit/app/commands/(select menu)",relativePath:"/(select menu)/select-channel.js",middlewares:["2a1278ee-d642-4ad9-b899-6ad6405ea054"]},"f679d103-612c-45bd-b9fc-0e50c1e45986":{id:"f679d103-612c-45bd-b9fc-0e50c1e45986",name:"select-mentionable",path:"~/commandkit/app/commands/(select menu)/select-mentionable.js",category:"select menu",parentPath:"~/commandkit/app/commands/(select menu)",relativePath:"/(select menu)/select-mentionable.js",middlewares:["2a1278ee-d642-4ad9-b899-6ad6405ea054"]},"d72e1837-3a95-4233-ba0e-39e93b03d53f":{id:"d72e1837-3a95-4233-ba0e-39e93b03d53f",name:"select-role",path:"~/commandkit/app/commands/(select menu)/select-role.js",category:"select menu",parentPath:"~/commandkit/app/commands/(select menu)",relativePath:"/(select menu)/select-role.js",middlewares:["2a1278ee-d642-4ad9-b899-6ad6405ea054"]},"9203d089-fd35-421e-8afe-e345c1006ab9":{id:"9203d089-fd35-421e-8afe-e345c1006ab9",name:"select-string-multi",path:"~/commandkit/app/commands/(select menu)/select-string-multi.js",category:"select menu",parentPath:"~/commandkit/app/commands/(select menu)",relativePath:"/(select menu)/select-string-multi.js",middlewares:["2a1278ee-d642-4ad9-b899-6ad6405ea054"]},"a13b0df7-cfde-4fa1-af9c-7fc360c8a14e":{id:"a13b0df7-cfde-4fa1-af9c-7fc360c8a14e",name:"select-string",path:"~/commandkit/app/commands/(select menu)/select-string.js",category:"select menu",parentPath:"~/commandkit/app/commands/(select menu)",relativePath:"/(select menu)/select-string.js",middlewares:["2a1278ee-d642-4ad9-b899-6ad6405ea054"]},"ba8932bb-ab00-4ab5-8d42-66c307da9d34":{id:"ba8932bb-ab00-4ab5-8d42-66c307da9d34",name:"select-user",path:"~/commandkit/app/commands/(select menu)/select-user.js",category:"select menu",parentPath:"~/commandkit/app/commands/(select menu)",relativePath:"/(select menu)/select-user.js",middlewares:["2a1278ee-d642-4ad9-b899-6ad6405ea054"]},"13cd73bf-efc8-48cb-8979-a02f969ac15b":{id:"13cd73bf-efc8-48cb-8979-a02f969ac15b",name:"invalidate-random",path:"~/commandkit/app/commands/invalidate-random.js",category:null,parentPath:"~/commandkit/app/commands",relativePath:"/invalidate-random.js",middlewares:["2a1278ee-d642-4ad9-b899-6ad6405ea054"]},"e410ee9d-56ae-4212-8947-042a7ba10391":{id:"e410ee9d-56ae-4212-8947-042a7ba10391",name:"random",path:"~/commandkit/app/commands/random.js",category:null,parentPath:"~/commandkit/app/commands",relativePath:"/random.js",middlewares:["2a1278ee-d642-4ad9-b899-6ad6405ea054"]},"9cf724a5-cc3d-4bf9-acaa-a9f7c5002311":{id:"9cf724a5-cc3d-4bf9-acaa-a9f7c5002311",name:"revalidate-random",path:"~/commandkit/app/commands/revalidate-random.js",category:null,parentPath:"~/commandkit/app/commands",relativePath:"/revalidate-random.js",middlewares:["2a1278ee-d642-4ad9-b899-6ad6405ea054"]}},middlewares:{"4b228f6a-774e-4f81-954f-6db40b0cb6e5":{id:"4b228f6a-774e-4f81-954f-6db40b0cb6e5",name:"+middleware",path:"~/commandkit/app/commands/(developer)/+middleware.js",relativePath:"/(developer)/+middleware.js",parentPath:"~/commandkit/app/commands/(developer)",global:!1},"bad9cc82-f063-4b6c-ac3c-9f70097ec251":{id:"bad9cc82-f063-4b6c-ac3c-9f70097ec251",name:"+middleware",path:"~/commandkit/app/commands/(interactions)/+middleware.js",relativePath:"/(interactions)/+middleware.js",parentPath:"~/commandkit/app/commands/(interactions)",global:!1},"2a1278ee-d642-4ad9-b899-6ad6405ea054":{id:"2a1278ee-d642-4ad9-b899-6ad6405ea054",name:"+global-middleware",path:"~/commandkit/app/commands/+global-middleware.js",relativePath:"/+global-middleware.js",parentPath:"~/commandkit/app/commands",global:!0}}},N=({command:t,middlewares:d})=>a.jsxs(k,{className:"p-4 mt-4 bg-muted/50 border-l-4 border-l-primary rounded-sm",children:[a.jsx("h3",{className:"text-lg font-bold mb-2",children:t.name}),a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2 text-sm",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-muted-foreground",children:"ID:"}),a.jsx("p",{className:"font-mono text-xs break-all",children:t.id})]}),a.jsxs("div",{children:[a.jsx("p",{className:"text-muted-foreground",children:"Category:"}),a.jsx("p",{children:t.category||"Uncategorized"})]}),a.jsxs("div",{className:"md:col-span-2",children:[a.jsx("p",{className:"text-muted-foreground",children:"Path:"}),a.jsx("p",{className:"font-mono text-xs break-all",children:t.path})]}),a.jsxs("div",{className:"md:col-span-2",children:[a.jsx("p",{className:"text-muted-foreground",children:"Relative Path:"}),a.jsx("p",{className:"font-mono text-xs",children:t.relativePath})]}),a.jsxs("div",{className:"md:col-span-2",children:[a.jsx("p",{className:"text-muted-foreground",children:"Middlewares:"}),a.jsx("div",{className:"flex flex-wrap gap-2 mt-1",children:t.middlewares.map(m=>{const e=d[m];return a.jsxs(f,{variant:"outline",className:"flex items-center gap-1",children:[a.jsx(g,{className:"h-3 w-3"}),(e==null?void 0:e.name)||m,(e==null?void 0:e.global)&&a.jsx("span",{className:"text-xs ml-1 text-muted-foreground",children:"(global)"})]},m)})})]})]})]}),j=({name:t,children:d,isCommand:m=!1,hasMiddleware:e=!1,onClick:o,isSelected:h})=>{const[n,i]=r.useState(!0),l=!!d;return a.jsxs("div",{className:"ml-4",children:[a.jsxs("div",{className:`flex items-center py-1 cursor-pointer hover:bg-slate-100 dark:hover:bg-gray-800/50 rounded ${h?"bg-slate-100 dark:bg-gray-800/50":""}`,onClick:()=>{l&&i(!n),o&&o()},children:[l?n?a.jsx(w,{className:"h-4 w-4 mr-1 text-muted-foreground"}):a.jsx(v,{className:"h-4 w-4 mr-1 text-muted-foreground"}):a.jsx("span",{className:"w-5"}),m?a.jsx(P,{className:"h-4 w-4 mr-1 text-primary"}):a.jsx(u,{className:"h-4 w-4 mr-1 text-amber-500"}),a.jsx("span",{className:`${m?"font-mono text-sm":"font-semibold"}`,children:t}),e&&a.jsxs(f,{variant:"outline",className:"ml-2 py-0 h-5",children:[a.jsx(g,{className:"h-3 w-3 mr-1"}),"λ"]})]}),l&&n&&a.jsx("div",{className:"border-l border-dashed border-slate-300 dark:border-slate-700 pl-2",children:d})]})},S=function(){const[d,m]=r.useState(null),[e,o]=r.useState(null),[h,n]=r.useState(!0),[i,l]=r.useState(null);r.useEffect(()=>{try{m(y),n(!1)}catch(c){l("Failed to load command data"),n(!1),console.error(c)}},[]);const x=d?Object.values(d.commands).reduce((c,p)=>{const s=p.category||"uncategorized";return c[s]||(c[s]=[]),c[s].push(p),c},{}):{};return h?a.jsx("div",{className:"flex justify-center items-center h-64",children:"Loading command data..."}):i?a.jsx("div",{className:"text-red-500",children:i}):d?a.jsxs("div",{className:"container mx-auto p-4",children:[a.jsx("h1",{className:"text-2xl font-bold mb-6",children:"Command Hierarchy"}),a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[a.jsxs("div",{className:"lg:col-span-1 border rounded-lg p-4 bg-muted/50 shadow-sm overflow-auto max-h-[80vh]",children:[a.jsx("h2",{className:"text-xl font-bold mb-4",children:"Commands"}),a.jsx("div",{className:"command-tree",children:Object.entries(x).map(([c,p])=>a.jsx(j,{name:c,children:p.map(s=>a.jsx(j,{name:s.name,isCommand:!0,hasMiddleware:s.middlewares.length>0,onClick:()=>o(s.id),isSelected:e===s.id},s.id))},c))})]}),a.jsxs("div",{className:"lg:col-span-2 border rounded-lg p-4 bg-muted/50 shadow-sm",children:[a.jsx("h2",{className:"text-xl font-bold mb-4",children:"Command Details"}),e?a.jsx(N,{command:d.commands[e],middlewares:d.middlewares}):a.jsxs("div",{className:"text-center p-8 text-muted-foreground",children:[a.jsx(u,{className:"h-12 w-12 mx-auto mb-4 opacity-50"}),a.jsx("p",{children:"Select a command to view its details"})]})]})]}),a.jsx("div",{className:"mt-6 text-sm text-muted-foreground",children:a.jsxs("p",{children:[a.jsxs(f,{variant:"outline",className:"mr-2",children:[a.jsx(g,{className:"h-3 w-3 mr-1"}),"λ"]}),"indicates the command has middleware associated"]})})]}):a.jsx("div",{children:"No command data available"})};export{S as component};
@@ -1,21 +0,0 @@
1
- import{i,r as p,u as N,a as f,j as e,B as h,k as v,C as b}from"./index-DeEbAdiT.js";/**
2
- * @license lucide-react v0.468.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const y=i("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
7
- * @license lucide-react v0.468.0 - ISC
8
- *
9
- * This source code is licensed under the ISC license.
10
- * See the LICENSE file in the root directory of this source tree.
11
- */const C=i("Command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]);/**
12
- * @license lucide-react v0.468.0 - ISC
13
- *
14
- * This source code is licensed under the ISC license.
15
- * See the LICENSE file in the root directory of this source tree.
16
- */const g=i("FolderTree",[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]]);/**
17
- * @license lucide-react v0.468.0 - ISC
18
- *
19
- * This source code is licensed under the ISC license.
20
- * See the LICENSE file in the root directory of this source tree.
21
- */const u=i("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]),w=({command:t,middlewares:d})=>e.jsxs(b,{className:"p-4 mt-4 bg-muted/50 border-l-4 border-l-primary rounded-sm",children:[e.jsx("h3",{className:"text-lg font-bold mb-2",children:t.name}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2 text-sm",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-muted-foreground",children:"ID:"}),e.jsx("p",{className:"font-mono text-xs break-all",children:t.id})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-muted-foreground",children:"Category:"}),e.jsx("p",{children:t.category||"Uncategorized"})]}),e.jsxs("div",{className:"md:col-span-2",children:[e.jsx("p",{className:"text-muted-foreground",children:"Path:"}),e.jsx("p",{className:"font-mono text-xs break-all",children:t.path})]}),e.jsxs("div",{className:"md:col-span-2",children:[e.jsx("p",{className:"text-muted-foreground",children:"Relative Path:"}),e.jsx("p",{className:"font-mono text-xs",children:t.relativePath})]}),e.jsxs("div",{className:"md:col-span-2",children:[e.jsx("p",{className:"text-muted-foreground",children:"Middlewares:"}),e.jsx("div",{className:"flex flex-wrap gap-2 mt-1",children:t.middlewares.map(l=>{const a=d[l];return e.jsxs(h,{variant:"outline",className:"flex items-center gap-1",children:[e.jsx(u,{className:"h-3 w-3"}),(a==null?void 0:a.name)||l,(a==null?void 0:a.global)&&e.jsx("span",{className:"text-xs ml-1 text-muted-foreground",children:"(global)"})]},l)})})]})]})]}),j=({name:t,children:d,isCommand:l=!1,hasMiddleware:a=!1,onClick:n,isSelected:c})=>{const[o,x]=p.useState(!0),s=!!d;return e.jsxs("div",{className:"ml-4",children:[e.jsxs("div",{className:`flex items-center py-1 cursor-pointer hover:bg-slate-100 dark:hover:bg-gray-800/50 rounded ${c?"bg-slate-100 dark:bg-gray-800/50":""}`,onClick:()=>{s&&x(!o),n&&n()},children:[s?o?e.jsx(y,{className:"h-4 w-4 mr-1 text-muted-foreground"}):e.jsx(v,{className:"h-4 w-4 mr-1 text-muted-foreground"}):e.jsx("span",{className:"w-5"}),l?e.jsx(C,{className:"h-4 w-4 mr-1 text-primary"}):e.jsx(g,{className:"h-4 w-4 mr-1 text-amber-500"}),e.jsx("span",{className:`${l?"font-mono text-sm":"font-semibold"}`,children:t}),a&&e.jsxs(h,{variant:"outline",className:"ml-2 py-0 h-5",children:[e.jsx(u,{className:"h-3 w-3 mr-1"}),"λ"]})]}),s&&o&&e.jsx("div",{className:"border-l border-dashed border-slate-300 dark:border-slate-700 pl-2",children:d})]})},M=function(){const[d,l]=p.useState(null),a=N(),{data:n,isError:c,isLoading:o}=f({queryKey:["commands"],enabled:!!a,refetchOnWindowFocus:!0,refetchOnReconnect:!0,queryFn:async()=>(await a.api.get("/commands")).data}),x=n?Object.values(n.commands).reduce((s,m)=>{const r=m.category||"uncategorized";return s[r]||(s[r]=[]),s[r].push(m),s},{}):{};return o?e.jsx("div",{className:"flex justify-center items-center h-64",children:"Loading command data..."}):c?e.jsx("div",{className:"text-red-500",children:c}):n?e.jsxs("div",{className:"container mx-auto p-4",children:[e.jsx("h1",{className:"text-2xl font-bold mb-6",children:"Commands"}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[e.jsxs("div",{className:"lg:col-span-1 border rounded-lg p-4 bg-muted/50 shadow-sm overflow-auto max-h-[80vh]",children:[e.jsx("h2",{className:"text-xl font-bold mb-4",children:"Commands"}),e.jsx("div",{className:"command-tree",children:Object.entries(x).map(([s,m])=>e.jsx(j,{name:s,children:m.map(r=>e.jsx(j,{name:r.name,isCommand:!0,hasMiddleware:r.middlewares.length>0,onClick:()=>l(r.id),isSelected:d===r.id},r.id))},s))})]}),e.jsxs("div",{className:"lg:col-span-2 border rounded-lg p-4 bg-muted/50 shadow-sm",children:[e.jsx("h2",{className:"text-xl font-bold mb-4",children:"Command Details"}),d?e.jsx(w,{command:n.commands[d],middlewares:n.middlewares}):e.jsxs("div",{className:"text-center p-8 text-muted-foreground",children:[e.jsx(g,{className:"h-12 w-12 mx-auto mb-4 opacity-50"}),e.jsx("p",{children:"Select a command to view its details"})]})]})]}),e.jsx("div",{className:"mt-6 text-sm text-muted-foreground",children:e.jsxs("p",{children:[e.jsxs(h,{variant:"outline",className:"mr-2",children:[e.jsx(u,{className:"h-3 w-3 mr-1"}),"λ"]}),"indicates the command has middleware associated"]})})]}):e.jsx("div",{children:"No command data available"})};export{M as component};
@@ -1,21 +0,0 @@
1
- import{c as b,r,j as a,B as f,C as v,a as k}from"./index-BXHhn7xD.js";/**
2
- * @license lucide-react v0.468.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const w=b("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
7
- * @license lucide-react v0.468.0 - ISC
8
- *
9
- * This source code is licensed under the ISC license.
10
- * See the LICENSE file in the root directory of this source tree.
11
- */const P=b("Command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]);/**
12
- * @license lucide-react v0.468.0 - ISC
13
- *
14
- * This source code is licensed under the ISC license.
15
- * See the LICENSE file in the root directory of this source tree.
16
- */const u=b("FolderTree",[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]]);/**
17
- * @license lucide-react v0.468.0 - ISC
18
- *
19
- * This source code is licensed under the ISC license.
20
- * See the LICENSE file in the root directory of this source tree.
21
- */const g=b("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]),y={commands:{"498d84ce-3dd1-4896-a034-ce712652bd66":{id:"498d84ce-3dd1-4896-a034-ce712652bd66",name:"reload",path:"~/commandkit/app/commands/(developer)/reload.js",category:"developer",parentPath:"~/commandkit/app/commands/(developer)",relativePath:"/(developer)/reload.js",middlewares:["4b228f6a-774e-4f81-954f-6db40b0cb6e5","2a1278ee-d642-4ad9-b899-6ad6405ea054"]},"fb07c361-3aa3-43c4-854f-fac44799e324":{id:"fb07c361-3aa3-43c4-854f-fac44799e324",name:"run-after",path:"~/commandkit/app/commands/(developer)/run-after.js",category:"developer",parentPath:"~/commandkit/app/commands/(developer)",relativePath:"/(developer)/run-after.js",middlewares:["4b228f6a-774e-4f81-954f-6db40b0cb6e5","2a1278ee-d642-4ad9-b899-6ad6405ea054"]},"4d3a2a49-4c75-4029-9a7b-55434713b7eb":{id:"4d3a2a49-4c75-4029-9a7b-55434713b7eb",name:"server",path:"~/commandkit/app/commands/(developer)/server.js",category:"developer",parentPath:"~/commandkit/app/commands/(developer)",relativePath:"/(developer)/server.js",middlewares:["4b228f6a-774e-4f81-954f-6db40b0cb6e5","2a1278ee-d642-4ad9-b899-6ad6405ea054"]},"08c2612a-dfcd-4f20-ab0f-0660317aeb01":{id:"08c2612a-dfcd-4f20-ab0f-0660317aeb01",name:"forward",path:"~/commandkit/app/commands/(forward)/forward.js",category:"forward",parentPath:"~/commandkit/app/commands/(forward)",relativePath:"/(forward)/forward.js",middlewares:["2a1278ee-d642-4ad9-b899-6ad6405ea054"]},"7eebc5bc-5615-4d92-a05b-fb1628c33aa9":{id:"7eebc5bc-5615-4d92-a05b-fb1628c33aa9",name:"forwarded",path:"~/commandkit/app/commands/(forward)/forwarded.js",category:"forward",parentPath:"~/commandkit/app/commands/(forward)",relativePath:"/(forward)/forwarded.js",middlewares:["2a1278ee-d642-4ad9-b899-6ad6405ea054"]},"fcfb3105-716f-4c3c-8063-d02d26110c5b":{id:"fcfb3105-716f-4c3c-8063-d02d26110c5b",name:"avatar",path:"~/commandkit/app/commands/(general)/avatar.js",category:"general",parentPath:"~/commandkit/app/commands/(general)",relativePath:"/(general)/avatar.js",middlewares:["2a1278ee-d642-4ad9-b899-6ad6405ea054"]},"648e4200-294c-4433-9aeb-f38120e0a22a":{id:"648e4200-294c-4433-9aeb-f38120e0a22a",name:"cat",path:"~/commandkit/app/commands/(general)/cat.js",category:"general",parentPath:"~/commandkit/app/commands/(general)",relativePath:"/(general)/cat.js",middlewares:["2a1278ee-d642-4ad9-b899-6ad6405ea054"]},"c8229c9d-d05f-4fab-8f75-56ea81a3b0bc":{id:"c8229c9d-d05f-4fab-8f75-56ea81a3b0bc",name:"dog",path:"~/commandkit/app/commands/(general)/dog.js",category:"general",parentPath:"~/commandkit/app/commands/(general)",relativePath:"/(general)/dog.js",middlewares:["2a1278ee-d642-4ad9-b899-6ad6405ea054"]},"81d59af2-486b-4192-8f57-af5b28341371":{id:"81d59af2-486b-4192-8f57-af5b28341371",name:"help",path:"~/commandkit/app/commands/(general)/help.js",category:"general",parentPath:"~/commandkit/app/commands/(general)",relativePath:"/(general)/help.js",middlewares:["2a1278ee-d642-4ad9-b899-6ad6405ea054"]},"e6f2c177-5d7b-41f0-8155-7df35bd3680a":{id:"e6f2c177-5d7b-41f0-8155-7df35bd3680a",name:"ping",path:"~/commandkit/app/commands/(general)/ping.js",category:"general",parentPath:"~/commandkit/app/commands/(general)",relativePath:"/(general)/ping.js",middlewares:["2a1278ee-d642-4ad9-b899-6ad6405ea054"]},"8604fad4-464e-43ff-9bb2-53c3380a4c1c":{id:"8604fad4-464e-43ff-9bb2-53c3380a4c1c",name:"commandkit",path:"~/commandkit/app/commands/(interactions)/commandkit.js",category:"interactions",parentPath:"~/commandkit/app/commands/(interactions)",relativePath:"/(interactions)/commandkit.js",middlewares:["bad9cc82-f063-4b6c-ac3c-9f70097ec251","2a1278ee-d642-4ad9-b899-6ad6405ea054"]},"7e0dd6ec-0136-46bc-bc7a-63f1d6b2a9a1":{id:"7e0dd6ec-0136-46bc-bc7a-63f1d6b2a9a1",name:"confirmation",path:"~/commandkit/app/commands/(interactions)/confirmation.js",category:"interactions",parentPath:"~/commandkit/app/commands/(interactions)",relativePath:"/(interactions)/confirmation.js",middlewares:["bad9cc82-f063-4b6c-ac3c-9f70097ec251","2a1278ee-d642-4ad9-b899-6ad6405ea054"]},"3b6b54bb-f970-4098-a7df-ce0857128cf8":{id:"3b6b54bb-f970-4098-a7df-ce0857128cf8",name:"prompt",path:"~/commandkit/app/commands/(interactions)/prompt.js",category:"interactions",parentPath:"~/commandkit/app/commands/(interactions)",relativePath:"/(interactions)/prompt.js",middlewares:["bad9cc82-f063-4b6c-ac3c-9f70097ec251","2a1278ee-d642-4ad9-b899-6ad6405ea054"]},"3cd7d037-44ad-4d67-8683-0ab0a7eb3ed1":{id:"3cd7d037-44ad-4d67-8683-0ab0a7eb3ed1",name:"xp",path:"~/commandkit/app/commands/(leveling)/xp.js",category:"leveling",parentPath:"~/commandkit/app/commands/(leveling)",relativePath:"/(leveling)/xp.js",middlewares:["2a1278ee-d642-4ad9-b899-6ad6405ea054"]},"c34e0d79-6ce8-4271-a5a9-ef6ead9de7ba":{id:"c34e0d79-6ce8-4271-a5a9-ef6ead9de7ba",name:"select-channel",path:"~/commandkit/app/commands/(select menu)/select-channel.js",category:"select menu",parentPath:"~/commandkit/app/commands/(select menu)",relativePath:"/(select menu)/select-channel.js",middlewares:["2a1278ee-d642-4ad9-b899-6ad6405ea054"]},"f679d103-612c-45bd-b9fc-0e50c1e45986":{id:"f679d103-612c-45bd-b9fc-0e50c1e45986",name:"select-mentionable",path:"~/commandkit/app/commands/(select menu)/select-mentionable.js",category:"select menu",parentPath:"~/commandkit/app/commands/(select menu)",relativePath:"/(select menu)/select-mentionable.js",middlewares:["2a1278ee-d642-4ad9-b899-6ad6405ea054"]},"d72e1837-3a95-4233-ba0e-39e93b03d53f":{id:"d72e1837-3a95-4233-ba0e-39e93b03d53f",name:"select-role",path:"~/commandkit/app/commands/(select menu)/select-role.js",category:"select menu",parentPath:"~/commandkit/app/commands/(select menu)",relativePath:"/(select menu)/select-role.js",middlewares:["2a1278ee-d642-4ad9-b899-6ad6405ea054"]},"9203d089-fd35-421e-8afe-e345c1006ab9":{id:"9203d089-fd35-421e-8afe-e345c1006ab9",name:"select-string-multi",path:"~/commandkit/app/commands/(select menu)/select-string-multi.js",category:"select menu",parentPath:"~/commandkit/app/commands/(select menu)",relativePath:"/(select menu)/select-string-multi.js",middlewares:["2a1278ee-d642-4ad9-b899-6ad6405ea054"]},"a13b0df7-cfde-4fa1-af9c-7fc360c8a14e":{id:"a13b0df7-cfde-4fa1-af9c-7fc360c8a14e",name:"select-string",path:"~/commandkit/app/commands/(select menu)/select-string.js",category:"select menu",parentPath:"~/commandkit/app/commands/(select menu)",relativePath:"/(select menu)/select-string.js",middlewares:["2a1278ee-d642-4ad9-b899-6ad6405ea054"]},"ba8932bb-ab00-4ab5-8d42-66c307da9d34":{id:"ba8932bb-ab00-4ab5-8d42-66c307da9d34",name:"select-user",path:"~/commandkit/app/commands/(select menu)/select-user.js",category:"select menu",parentPath:"~/commandkit/app/commands/(select menu)",relativePath:"/(select menu)/select-user.js",middlewares:["2a1278ee-d642-4ad9-b899-6ad6405ea054"]},"13cd73bf-efc8-48cb-8979-a02f969ac15b":{id:"13cd73bf-efc8-48cb-8979-a02f969ac15b",name:"invalidate-random",path:"~/commandkit/app/commands/invalidate-random.js",category:null,parentPath:"~/commandkit/app/commands",relativePath:"/invalidate-random.js",middlewares:["2a1278ee-d642-4ad9-b899-6ad6405ea054"]},"e410ee9d-56ae-4212-8947-042a7ba10391":{id:"e410ee9d-56ae-4212-8947-042a7ba10391",name:"random",path:"~/commandkit/app/commands/random.js",category:null,parentPath:"~/commandkit/app/commands",relativePath:"/random.js",middlewares:["2a1278ee-d642-4ad9-b899-6ad6405ea054"]},"9cf724a5-cc3d-4bf9-acaa-a9f7c5002311":{id:"9cf724a5-cc3d-4bf9-acaa-a9f7c5002311",name:"revalidate-random",path:"~/commandkit/app/commands/revalidate-random.js",category:null,parentPath:"~/commandkit/app/commands",relativePath:"/revalidate-random.js",middlewares:["2a1278ee-d642-4ad9-b899-6ad6405ea054"]}},middlewares:{"4b228f6a-774e-4f81-954f-6db40b0cb6e5":{id:"4b228f6a-774e-4f81-954f-6db40b0cb6e5",name:"+middleware",path:"~/commandkit/app/commands/(developer)/+middleware.js",relativePath:"/(developer)/+middleware.js",parentPath:"~/commandkit/app/commands/(developer)",global:!1},"bad9cc82-f063-4b6c-ac3c-9f70097ec251":{id:"bad9cc82-f063-4b6c-ac3c-9f70097ec251",name:"+middleware",path:"~/commandkit/app/commands/(interactions)/+middleware.js",relativePath:"/(interactions)/+middleware.js",parentPath:"~/commandkit/app/commands/(interactions)",global:!1},"2a1278ee-d642-4ad9-b899-6ad6405ea054":{id:"2a1278ee-d642-4ad9-b899-6ad6405ea054",name:"+global-middleware",path:"~/commandkit/app/commands/+global-middleware.js",relativePath:"/+global-middleware.js",parentPath:"~/commandkit/app/commands",global:!0}}},N=({command:t,middlewares:d})=>a.jsxs(k,{className:"p-4 mt-4 bg-muted/50 border-l-4 border-l-primary rounded-sm",children:[a.jsx("h3",{className:"text-lg font-bold mb-2",children:t.name}),a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2 text-sm",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-muted-foreground",children:"ID:"}),a.jsx("p",{className:"font-mono text-xs break-all",children:t.id})]}),a.jsxs("div",{children:[a.jsx("p",{className:"text-muted-foreground",children:"Category:"}),a.jsx("p",{children:t.category||"Uncategorized"})]}),a.jsxs("div",{className:"md:col-span-2",children:[a.jsx("p",{className:"text-muted-foreground",children:"Path:"}),a.jsx("p",{className:"font-mono text-xs break-all",children:t.path})]}),a.jsxs("div",{className:"md:col-span-2",children:[a.jsx("p",{className:"text-muted-foreground",children:"Relative Path:"}),a.jsx("p",{className:"font-mono text-xs",children:t.relativePath})]}),a.jsxs("div",{className:"md:col-span-2",children:[a.jsx("p",{className:"text-muted-foreground",children:"Middlewares:"}),a.jsx("div",{className:"flex flex-wrap gap-2 mt-1",children:t.middlewares.map(m=>{const e=d[m];return a.jsxs(f,{variant:"outline",className:"flex items-center gap-1",children:[a.jsx(g,{className:"h-3 w-3"}),(e==null?void 0:e.name)||m,(e==null?void 0:e.global)&&a.jsx("span",{className:"text-xs ml-1 text-muted-foreground",children:"(global)"})]},m)})})]})]})]}),j=({name:t,children:d,isCommand:m=!1,hasMiddleware:e=!1,onClick:o,isSelected:h})=>{const[n,i]=r.useState(!0),l=!!d;return a.jsxs("div",{className:"ml-4",children:[a.jsxs("div",{className:`flex items-center py-1 cursor-pointer hover:bg-slate-100 dark:hover:bg-gray-800/50 rounded ${h?"bg-slate-100 dark:bg-gray-800/50":""}`,onClick:()=>{l&&i(!n),o&&o()},children:[l?n?a.jsx(w,{className:"h-4 w-4 mr-1 text-muted-foreground"}):a.jsx(v,{className:"h-4 w-4 mr-1 text-muted-foreground"}):a.jsx("span",{className:"w-5"}),m?a.jsx(P,{className:"h-4 w-4 mr-1 text-primary"}):a.jsx(u,{className:"h-4 w-4 mr-1 text-amber-500"}),a.jsx("span",{className:`${m?"font-mono text-sm":"font-semibold"}`,children:t}),e&&a.jsxs(f,{variant:"outline",className:"ml-2 py-0 h-5",children:[a.jsx(g,{className:"h-3 w-3 mr-1"}),"λ"]})]}),l&&n&&a.jsx("div",{className:"border-l border-dashed border-slate-300 dark:border-slate-700 pl-2",children:d})]})},S=function(){const[d,m]=r.useState(null),[e,o]=r.useState(null),[h,n]=r.useState(!0),[i,l]=r.useState(null);r.useEffect(()=>{try{m(y),n(!1)}catch(c){l("Failed to load command data"),n(!1),console.error(c)}},[]);const x=d?Object.values(d.commands).reduce((c,p)=>{const s=p.category||"uncategorized";return c[s]||(c[s]=[]),c[s].push(p),c},{}):{};return h?a.jsx("div",{className:"flex justify-center items-center h-64",children:"Loading command data..."}):i?a.jsx("div",{className:"text-red-500",children:i}):d?a.jsxs("div",{className:"container mx-auto p-4",children:[a.jsx("h1",{className:"text-2xl font-bold mb-6",children:"Command Hierarchy"}),a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[a.jsxs("div",{className:"lg:col-span-1 border rounded-lg p-4 bg-muted/50 shadow-sm overflow-auto max-h-[80vh]",children:[a.jsx("h2",{className:"text-xl font-bold mb-4",children:"Commands"}),a.jsx("div",{className:"command-tree",children:Object.entries(x).map(([c,p])=>a.jsx(j,{name:c,children:p.map(s=>a.jsx(j,{name:s.name,isCommand:!0,hasMiddleware:s.middlewares.length>0,onClick:()=>o(s.id),isSelected:e===s.id},s.id))},c))})]}),a.jsxs("div",{className:"lg:col-span-2 border rounded-lg p-4 bg-muted/50 shadow-sm",children:[a.jsx("h2",{className:"text-xl font-bold mb-4",children:"Command Details"}),e?a.jsx(N,{command:d.commands[e],middlewares:d.middlewares}):a.jsxs("div",{className:"text-center p-8 text-muted-foreground",children:[a.jsx(u,{className:"h-12 w-12 mx-auto mb-4 opacity-50"}),a.jsx("p",{children:"Select a command to view its details"})]})]})]}),a.jsx("div",{className:"mt-6 text-sm text-muted-foreground",children:a.jsxs("p",{children:[a.jsxs(f,{variant:"outline",className:"mr-2",children:[a.jsx(g,{className:"h-3 w-3 mr-1"}),"λ"]}),"indicates the command has middleware associated"]})})]}):a.jsx("div",{children:"No command data available"})};export{S as component};
@@ -1 +0,0 @@
1
- import{u as x,a as p,r as o,j as e,L as u,B as c}from"./index-DeEbAdiT.js";const j=function(){const i=x(),{data:n,isLoading:m,isError:l}=p({queryKey:["events"],queryFn:async()=>await i.events.fetch()}),r=o.useMemo(()=>crypto.randomUUID(),[]),d=o.useMemo(()=>{if(!n)return[];const s={};return n.forEach(a=>{const t=a.namespace||r;s[t]||(s[t]=[]),s[t].push(a)}),Object.entries(s).map(([a,t])=>({namespace:a,events:t}))},[n,r]);return m||!n?e.jsx(u,{}):l?e.jsx("div",{className:"h-screen grid place-items-center",children:e.jsx("h1",{className:"text-2xl text-red-500",children:"An error occurred while fetching events data."})}):e.jsx("div",{className:"p-4",children:d.map(s=>e.jsxs("div",{className:"mb-6",children:[e.jsx("h1",{className:"text-2xl font-bold capitalize",children:s.namespace===r?"Default":s.namespace}),e.jsx("div",{className:"grid grid-cols-3 gap-4 py-4",children:s.events.map(a=>e.jsxs("div",{className:"border p-4 rounded",children:[e.jsx("h2",{className:"text-lg font-semibold",children:a.name}),e.jsx("p",{className:"text-muted-foreground text-xs mt-2 font-medium font-mono break-all",children:a.metadata.path}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs(c,{variant:"outline",className:"text-xs text-gray-500 mt-2 font-mono",children:["Namespace: ",a.namespace||"discord.js"]}),e.jsxs(c,{variant:"outline",className:"text-xs text-gray-500 mt-2 font-mono break-all",children:["Once: ",a.onceListeners]}),e.jsxs(c,{variant:"outline",className:"text-xs text-gray-500 mt-2 font-mono break-all",children:["Regular: ",a.regularListeners]})]})]},`${a.name}-${s.namespace}`))})]},s.namespace))})};export{j as component};
@@ -1 +0,0 @@
1
- import{u as x,a as p,r as o,j as e,L as u,B as c}from"./index-AmEdk0_Y.js";const j=function(){const i=x(),{data:n,isLoading:m,isError:l}=p({queryKey:["events"],queryFn:async()=>await i.events.fetch()}),r=o.useMemo(()=>crypto.randomUUID(),[]),d=o.useMemo(()=>{if(!n)return[];const s={};return n.forEach(a=>{const t=a.namespace||r;s[t]||(s[t]=[]),s[t].push(a)}),Object.entries(s).map(([a,t])=>({namespace:a,events:t}))},[n,r]);return m||!n?e.jsx(u,{}):l?e.jsx("div",{className:"h-screen grid place-items-center",children:e.jsx("h1",{className:"text-2xl text-red-500",children:"An error occurred while fetching events data."})}):e.jsx("div",{className:"p-4",children:d.map(s=>e.jsxs("div",{className:"mb-6",children:[e.jsx("h1",{className:"text-2xl font-bold capitalize",children:s.namespace===r?"Default":s.namespace}),e.jsx("div",{className:"grid grid-cols-3 gap-4 py-4",children:s.events.map(a=>e.jsxs("div",{className:"border p-4 rounded",children:[e.jsx("h2",{className:"text-lg font-semibold",children:a.name}),e.jsx("p",{className:"text-muted-foreground text-xs mt-2 font-medium font-mono break-all",children:a.metadata.path}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs(c,{variant:"outline",className:"text-xs text-gray-500 mt-2 font-mono",children:["Namespace: ",a.namespace||"discord.js"]}),e.jsxs(c,{variant:"outline",className:"text-xs text-gray-500 mt-2 font-mono break-all",children:["Once: ",a.onceListeners]}),e.jsxs(c,{variant:"outline",className:"text-xs text-gray-500 mt-2 font-mono break-all",children:["Regular: ",a.regularListeners]})]})]},`${a.name}-${s.namespace}`))})]},s.namespace))})};export{j as component};
@@ -1 +0,0 @@
1
- import{j as o}from"./index-d6nxy4gt.js";const e=function(){return o.jsx("div",{children:'Hello "/guilds"!'})};export{e as component};
@@ -1 +0,0 @@
1
- import{u as c,a as d,j as e,L as i,C as o,b as l,A as m,c as x,d as h,e as j,f as p,h as u}from"./index-DeEbAdiT.js";const N=function(){const a=c(),{data:r,isLoading:n,isError:t}=d({queryKey:["guilds"],queryFn:async()=>await a.guilds.fetch()});return n||!r?e.jsx(i,{}):t?e.jsx("div",{className:"h-screen grid place-items-center",children:e.jsx("h1",{className:"text-2xl text-red-500",children:"An error occurred while fetching guilds data."})}):e.jsxs("div",{className:"grid grid-cols-3 gap-4 p-4",children:[e.jsx("h1",{className:"text-2xl font-bold col-span-3",children:"Guilds"}),r.map(s=>e.jsxs(o,{className:"border p-4 rounded",children:[e.jsx(l,{children:e.jsxs(m,{className:"h-12 w-12 rounded-lg",children:[e.jsx(x,{src:s.iconURL,alt:s.name}),e.jsx(h,{className:"rounded-lg",children:s.nameAcronym})]})}),e.jsxs(j,{children:[e.jsx(p,{children:s.name}),e.jsx(u,{children:s.description||`${s.name} server`})]})]},s.id))]})};export{N as component};
@@ -1 +0,0 @@
1
- import{u as c,a as d,j as e,L as i,C as o,b as l,A as m,c as x,d as h,e as u,f as j,g as p}from"./index-CHwEhXRf.js";const g=function(){const a=c(),{data:r,isLoading:n,isError:t}=d({queryKey:["guilds"],queryFn:async()=>(await a.fetchGuilds()).guilds});return n||!r?e.jsx(i,{}):t?e.jsx("div",{className:"h-screen grid place-items-center",children:e.jsx("h1",{className:"text-2xl text-red-500",children:"An error occurred while fetching guilds data."})}):e.jsx("div",{className:"grid grid-cols-3 gap-4 p-4",children:r.map(s=>e.jsxs(o,{className:"border p-4 rounded",children:[e.jsx(l,{children:e.jsxs(m,{className:"h-12 w-12 rounded-lg",children:[e.jsx(x,{src:s.iconURL,alt:s.name}),e.jsx(h,{className:"rounded-lg",children:s.nameAcronym})]})}),e.jsxs(u,{children:[e.jsx(j,{children:s.name}),e.jsx(p,{children:s.description||`${s.name} server`})]})]},s.id))})};export{g as component};
@@ -1 +0,0 @@
1
- import{u as c,a as d,j as e,L as i,C as o,b as l,A as m,c as x,d as h,e as j,f as p,h as u}from"./index-AmEdk0_Y.js";const N=function(){const a=c(),{data:r,isLoading:n,isError:t}=d({queryKey:["guilds"],queryFn:async()=>await a.guilds.fetch()});return n||!r?e.jsx(i,{}):t?e.jsx("div",{className:"h-screen grid place-items-center",children:e.jsx("h1",{className:"text-2xl text-red-500",children:"An error occurred while fetching guilds data."})}):e.jsxs("div",{className:"grid grid-cols-3 gap-4 p-4",children:[e.jsx("h1",{className:"text-2xl font-bold col-span-3",children:"Guilds"}),r.map(s=>e.jsxs(o,{className:"border p-4 rounded",children:[e.jsx(l,{children:e.jsxs(m,{className:"h-12 w-12 rounded-lg",children:[e.jsx(x,{src:s.iconURL,alt:s.name}),e.jsx(h,{className:"rounded-lg",children:s.nameAcronym})]})}),e.jsxs(j,{children:[e.jsx(p,{children:s.name}),e.jsx(u,{children:s.description||`${s.name} server`})]})]},s.id))]})};export{N as component};