@weconjs/core 1.2.1 → 1.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/devtools/client/assets/CopyButton-DIdtJD4_.js +6 -0
- package/dist/devtools/client/assets/ModuleDetail-Dx6eU87l.js +1 -0
- package/dist/devtools/client/assets/TranslationEditor-Bj654a_E.js +11 -0
- package/dist/devtools/client/assets/{chevron-right-5kHArGor.js → chevron-right-E9DzkOHY.js} +1 -1
- package/dist/devtools/client/assets/copy-BvbhBv2y.js +6 -0
- package/dist/devtools/client/assets/index-B42p6IVr.js +6 -0
- package/dist/devtools/client/assets/index-CSkGspzD.js +1 -0
- package/dist/devtools/client/assets/index-CnAObNgT.js +16 -0
- package/dist/devtools/client/assets/index-CwJHaaYT.css +1 -0
- package/dist/devtools/client/assets/index-Dfe66IW7.js +1 -0
- package/dist/devtools/client/assets/index-DoHRi03N.js +201 -0
- package/dist/devtools/client/assets/index-DvvGoEUv.js +1 -0
- package/dist/devtools/client/assets/loader-circle-DoOjJ8vr.js +6 -0
- package/dist/devtools/client/assets/plus-Ca-xq8y8.js +6 -0
- package/dist/devtools/client/assets/save-CV1xmSXO.js +11 -0
- package/dist/devtools/client/assets/search-CpTZ4fXm.js +6 -0
- package/dist/devtools/client/index.html +2 -2
- package/package.json +1 -1
- package/dist/devtools/client/assets/ModuleDetail-D48_sbbw.js +0 -1
- package/dist/devtools/client/assets/TranslationEditor-jStG1RAy.js +0 -6
- package/dist/devtools/client/assets/api-Cos33Dpe.js +0 -11
- package/dist/devtools/client/assets/arrow-left-DJopkT8h.js +0 -6
- package/dist/devtools/client/assets/index-BFzJyDrn.css +0 -1
- package/dist/devtools/client/assets/index-BfruOLuK.js +0 -1
- package/dist/devtools/client/assets/index-C1UW7SQ3.js +0 -181
- package/dist/devtools/client/assets/index-CjtK_Y_1.js +0 -1
- package/dist/devtools/client/assets/index-D4ILhFBs.js +0 -1
- package/dist/devtools/client/assets/index-DrU8DYLn.js +0 -6
- package/dist/devtools/client/assets/index-GjEUP-iz.js +0 -6
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{c,r as n,j as t}from"./index-DoHRi03N.js";import{C as p}from"./copy-BvbhBv2y.js";/**
|
|
2
|
+
* @license lucide-react v0.460.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 l=c("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);function u({value:o,className:s=""}){const[a,e]=n.useState(!1),r=async i=>{i.stopPropagation();try{await navigator.clipboard.writeText(o),e(!0),setTimeout(()=>e(!1),1500)}catch{}};return t.jsx("button",{onClick:r,className:`inline-flex size-6 items-center justify-center rounded-tertiary transition-colors hover:bg-primary ${s}`,title:"Copy to clipboard",children:a?t.jsx(l,{className:"size-3.5 text-green-600"}):t.jsx(p,{className:"size-3.5 text-secondary"})})}export{u as C};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as S,r as m,u as w,d as C,a as g,j as e,m as j}from"./index-DoHRi03N.js";import{C as b}from"./CopyButton-DIdtJD4_.js";import{L as N}from"./loader-circle-DoOjJ8vr.js";import{A as E,S as z}from"./save-CV1xmSXO.js";import"./copy-BvbhBv2y.js";function J(){var y;const{name:t}=S(),[s,l]=m.useState(null),[d,o]=m.useState(!0),h=w(),{addToast:u}=C(),[x,f]=m.useState([]);return m.useEffect(()=>{t&&Promise.all([g.get(`/modules/${t}`),g.get("/routes")]).then(([c,a])=>{l(c.data);const n=(a.data??[]).filter(i=>i.module===t);f(n)}).catch(console.error).finally(()=>o(!1))},[t]),d?e.jsx("div",{className:"flex h-full items-center justify-center",children:e.jsx(N,{className:"size-8 animate-spin text-primary"})}):s?e.jsxs(j.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{duration:.3},className:"flex size-full flex-col gap-6 overflow-y-auto p-6",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("button",{onClick:()=>h("/modules"),className:"flex size-8 items-center justify-center rounded-secondary border border-primary transition-colors hover:bg-primary",children:e.jsx(E,{className:"size-4 text-primary"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold text-primary",children:s.name}),e.jsxs("p",{className:"text-sm text-secondary",children:["namespace: ",s.namespace," · ",x.length," routes"]})]})]}),s.description&&e.jsx("p",{className:"text-sm text-secondary",children:s.description}),s.hasConfig&&((y=s.config)==null?void 0:y.current)&&e.jsx(M,{moduleName:s.name,config:s.config.current,addToast:u}),x.length>0&&e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("h2",{className:"text-lg font-semibold text-primary",children:"Routes"}),e.jsx("div",{className:"overflow-auto rounded-secondary border border-primary",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-primary bg-primary text-left text-xs text-secondary",children:[e.jsx("th",{className:"px-4 py-2",children:"Method"}),e.jsx("th",{className:"px-4 py-2",children:"Path"}),e.jsx("th",{className:"px-4 py-2",children:"RAI"})]})}),e.jsx("tbody",{children:x.map((c,a)=>e.jsxs("tr",{className:"border-b border-primary last:border-0",children:[e.jsx("td",{className:"px-4 py-2",children:e.jsx(P,{method:c.method})}),e.jsx("td",{className:"px-4 py-2",children:e.jsxs("div",{className:"group flex items-center gap-1.5",children:[e.jsx("span",{className:"font-mono text-xs text-primary",children:c.path}),e.jsx("span",{className:"opacity-0 transition-opacity group-hover:opacity-100",children:e.jsx(b,{value:c.path})})]})}),e.jsx("td",{className:"px-4 py-2",children:e.jsxs("div",{className:"group flex items-center gap-1.5",children:[e.jsx("span",{className:"font-mono text-xs text-secondary",children:c.rai}),e.jsx("span",{className:"opacity-0 transition-opacity group-hover:opacity-100",children:e.jsx(b,{value:c.rai})})]})})]},a))})]})})]})]}):e.jsx("div",{className:"flex h-full items-center justify-center",children:e.jsx("p",{className:"text-secondary",children:"Module not found"})})}function M({moduleName:t,config:s,addToast:l}){const[d,o]=m.useState(JSON.parse(JSON.stringify(s))),[h,u]=m.useState(!1),[x,f]=m.useState(!1),y=(a,r,n)=>{let i=r;if(n==="boolean")i=r==="true";else if(n==="number")i=r===""?0:Number(r);else if(n==="object")try{i=JSON.parse(r)}catch{i=r}o(p=>({...p,[a]:i})),u(!0)},c=async()=>{var a,r,n,i;f(!0);try{await g.put(`/config/${t}`,d),u(!1),l({type:"success",message:`${t} config saved`})}catch(p){const v=((i=(n=(r=(a=p==null?void 0:p.response)==null?void 0:a.data)==null?void 0:r.errors)==null?void 0:n[0])==null?void 0:i.message)||"Validation failed";l({type:"error",message:v})}finally{f(!1)}};return e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h2",{className:"text-lg font-semibold text-primary",children:"Config"}),h&&e.jsxs(j.button,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},whileTap:{scale:.95},onClick:c,disabled:x,className:"flex items-center gap-2 rounded-secondary bg-btn-primary px-4 py-2 text-sm font-medium text-btn-primary transition-opacity hover:opacity-90 disabled:opacity-50",children:[x?e.jsx(N,{className:"size-4 animate-spin"}):e.jsx(z,{className:"size-4"}),"Save"]})]}),e.jsx("div",{className:"rounded-secondary border border-primary bg-secondary p-4",children:e.jsx("div",{className:"flex flex-col gap-3",children:Object.entries(d).map(([a,r])=>e.jsx(O,{label:a,value:r,onChange:(n,i)=>y(a,n,i)},a))})})]})}function O({label:t,value:s,onChange:l}){const d=typeof s;return d==="boolean"?e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsx("label",{className:"text-sm font-medium text-primary",children:t}),e.jsx("button",{onClick:()=>l(String(!s),"boolean"),className:`relative h-6 w-11 rounded-full transition-colors ${s?"bg-green-500":"bg-gray-300"}`,children:e.jsx("span",{className:`absolute left-0.5 top-0.5 size-5 rounded-full bg-white shadow transition-transform ${s?"translate-x-5":"translate-x-0"}`})})]}):d==="number"?e.jsxs("div",{className:"flex flex-col gap-1 sm:flex-row sm:items-center sm:gap-4",children:[e.jsx("label",{className:"min-w-[160px] text-sm font-medium text-primary",children:t}),e.jsx("input",{type:"number",value:String(s),onChange:o=>l(o.target.value,"number"),className:"w-full rounded-tertiary border border-primary bg-primary px-3 py-1.5 text-sm text-primary outline-none focus:border-blue-500"})]}):d==="object"?e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("label",{className:"text-sm font-medium text-primary",children:t}),e.jsx("textarea",{value:JSON.stringify(s,null,2),onChange:o=>l(o.target.value,"object"),rows:Math.min(Object.keys(s||{}).length+2,10),className:"w-full rounded-tertiary border border-primary bg-primary px-3 py-1.5 font-mono text-xs text-primary outline-none focus:border-blue-500"})]}):e.jsxs("div",{className:"flex flex-col gap-1 sm:flex-row sm:items-center sm:gap-4",children:[e.jsx("label",{className:"min-w-[160px] text-sm font-medium text-primary",children:t}),e.jsx("input",{type:"text",value:String(s??""),onChange:o=>l(o.target.value,"string"),className:"w-full rounded-tertiary border border-primary bg-primary px-3 py-1.5 text-sm text-primary outline-none focus:border-blue-500"})]})}function P({method:t}){const s={GET:"bg-green-100 text-green-700",POST:"bg-blue-100 text-blue-700",PUT:"bg-yellow-100 text-yellow-700",PATCH:"bg-orange-100 text-orange-700",DELETE:"bg-red-100 text-red-700"};return e.jsx("span",{className:`inline-block rounded px-2 py-0.5 text-xs font-semibold ${s[t.toUpperCase()]??"bg-gray-100 text-gray-700"}`,children:t.toUpperCase()})}export{J as default};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{c as $,j as e,A as H,m as u,b as q,r as d,u as U,d as X,a as L,X as _}from"./index-DoHRi03N.js";import{L as T}from"./loader-circle-DoOjJ8vr.js";import{A as B,S as J}from"./save-CV1xmSXO.js";import{P as Q}from"./plus-Ca-xq8y8.js";import{S as W}from"./search-CpTZ4fXm.js";/**
|
|
2
|
+
* @license lucide-react v0.460.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=$("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/**
|
|
7
|
+
* @license lucide-react v0.460.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 Z=$("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);function ee({open:n,title:a,message:i,confirmLabel:o="Confirm",onConfirm:s,onCancel:r}){return e.jsx(H,{children:n&&e.jsxs(e.Fragment,{children:[e.jsx(u.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-40 bg-black/40",onClick:r}),e.jsxs(u.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{type:"spring",stiffness:400,damping:30},className:"fixed left-1/2 top-1/2 z-50 w-full max-w-sm -translate-x-1/2 -translate-y-1/2 rounded-primary border border-primary bg-secondary p-6 shadow-heavy",children:[e.jsx("h3",{className:"mb-2 text-lg font-semibold text-primary",children:a}),e.jsx("p",{className:"mb-6 text-sm text-secondary",children:i}),e.jsxs("div",{className:"flex justify-end gap-3",children:[e.jsx("button",{onClick:r,className:"rounded-secondary border border-primary px-4 py-2 text-sm text-primary transition-colors hover:bg-primary",children:"Cancel"}),e.jsx("button",{onClick:s,className:"rounded-secondary bg-red-500 px-4 py-2 text-sm font-medium text-white transition-opacity hover:opacity-90",children:o})]})]})]})})}function D(n,a=""){const i={};for(const[o,s]of Object.entries(n)){const r=a?`${a}.${o}`:o;s!==null&&typeof s=="object"&&!Array.isArray(s)?Object.assign(i,D(s,r)):i[r]=String(s??"")}return i}function te(n){const a={};for(const[i,o]of Object.entries(n)){const s=i.split(".");let r=a;for(let m=0;m<s.length-1;m++)(r[s[m]]===void 0||typeof r[s[m]]!="object")&&(r[s[m]]={}),r=r[s[m]];r[s[s.length-1]]=o}return a}function oe(){const{namespace:n,lang:a}=q(),[i,o]=d.useState({}),[s,r]=d.useState(!0),[m,w]=d.useState(!1),[O,f]=d.useState(!1),[x,V]=d.useState(""),[C,y]=d.useState(!1),[S,j]=d.useState(""),[K,v]=d.useState(""),[z,p]=d.useState(""),[h,N]=d.useState(null),R=U(),{addToast:b}=X();d.useEffect(()=>{!n||!a||L.get(`/i18n/${n}/${a}`).then(t=>{var c;const l=((c=t.data)==null?void 0:c.translations)??t.data??{};o(D(l))}).catch(console.error).finally(()=>r(!1))},[n,a]);const F=(t,l)=>{o(c=>({...c,[t]:l})),f(!0)},M=async()=>{if(!(!n||!a)){w(!0);try{const t=te(i);await L.put(`/i18n/${n}/${a}`,t),f(!1),b({type:"success",message:"Translations saved"})}catch{b({type:"error",message:"Failed to save translations"})}finally{w(!1)}}},k=()=>{const t=S.trim();if(!t){p("Key is required");return}if(i[t]!==void 0){p("Key already exists");return}o(l=>({...l,[t]:K})),f(!0),j(""),v(""),p(""),y(!1),b({type:"info",message:`Added key "${t}"`})},P=t=>{o(l=>{const c={...l};return delete c[t],c}),f(!0),N(null),b({type:"info",message:`Removed key "${t}"`})};if(s)return e.jsx("div",{className:"flex h-full items-center justify-center",children:e.jsx(T,{className:"size-8 animate-spin text-primary"})});const g=Object.entries(i),A=x?g.filter(([t,l])=>t.toLowerCase().includes(x.toLowerCase())||l.toLowerCase().includes(x.toLowerCase())):g;let E="";return e.jsxs(u.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{duration:.3},className:"flex size-full flex-col gap-5 overflow-y-auto p-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("button",{onClick:()=>R("/i18n"),className:"flex size-8 items-center justify-center rounded-secondary border border-primary transition-colors hover:bg-primary",children:e.jsx(B,{className:"size-4 text-primary"})}),e.jsxs("div",{children:[e.jsxs("h1",{className:"text-2xl font-bold text-primary",children:[n," / ",a==null?void 0:a.toUpperCase()]}),e.jsxs("p",{className:"text-sm text-secondary",children:[g.length," keys"]})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[!C&&e.jsxs("button",{onClick:()=>y(!0),className:"flex items-center gap-1.5 rounded-secondary border border-dashed border-primary px-3 py-1.5 text-xs text-secondary transition-colors hover:bg-primary hover:text-primary",children:[e.jsx(Q,{className:"size-3"}),"Add Key"]}),O&&e.jsxs(u.button,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},whileTap:{scale:.95},onClick:M,disabled:m,className:"flex items-center gap-2 rounded-secondary bg-btn-primary px-4 py-2 text-sm font-medium text-btn-primary transition-opacity hover:opacity-90 disabled:opacity-50",children:[m?e.jsx(T,{className:"size-4 animate-spin"}):e.jsx(J,{className:"size-4"}),"Save"]})]})]}),e.jsxs("div",{className:"relative",children:[e.jsx(W,{className:"absolute left-3 top-1/2 size-4 -translate-y-1/2 text-secondary"}),e.jsx("input",{type:"text",placeholder:"Search keys or values...",value:x,onChange:t=>V(t.target.value),className:"w-full rounded-secondary border border-primary bg-secondary py-2 pl-9 pr-4 text-sm text-primary outline-none focus:border-blue-500"})]}),C&&e.jsx(u.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},className:"rounded-secondary border-2 border-dashed border-blue-300 bg-secondary p-4",children:e.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-end",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx("label",{className:"mb-1 block text-xs font-medium text-secondary",children:"Key"}),e.jsx("input",{type:"text",value:S,onChange:t=>{j(t.target.value),p("")},onKeyDown:t=>{t.key==="Enter"&&k(),t.key==="Escape"&&y(!1)},placeholder:"group.translation_key",autoFocus:!0,className:"w-full rounded-tertiary border border-primary bg-primary px-3 py-1.5 text-sm text-primary outline-none focus:border-blue-500"}),z&&e.jsx("p",{className:"mt-1 text-xs text-red-500",children:z})]}),e.jsxs("div",{className:"flex-1",children:[e.jsx("label",{className:"mb-1 block text-xs font-medium text-secondary",children:"Value"}),e.jsx("input",{type:"text",value:K,onChange:t=>v(t.target.value),onKeyDown:t=>{t.key==="Enter"&&k(),t.key==="Escape"&&y(!1)},placeholder:"Translation text",className:"w-full rounded-tertiary border border-primary bg-primary px-3 py-1.5 text-sm text-primary outline-none focus:border-blue-500"})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{onClick:k,className:"rounded-secondary bg-btn-primary px-4 py-1.5 text-sm font-medium text-btn-primary transition-opacity hover:opacity-90",children:"Add"}),e.jsx("button",{onClick:()=>{y(!1),j(""),v(""),p("")},className:"rounded-secondary p-1.5 transition-colors hover:bg-primary",children:e.jsx(_,{className:"size-4 text-secondary"})})]})]})}),A.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 py-12",children:[e.jsx(Y,{className:"size-10 text-secondary"}),e.jsx("p",{className:"text-sm text-secondary",children:g.length===0?'No translation keys yet. Click "Add Key" to get started.':"No keys match your search."})]}):e.jsx("div",{className:"flex flex-col gap-1.5",children:A.map(([t,l])=>{const c=t.split(".")[0],I=!x&&c!==E;return x||(E=c),e.jsxs("div",{children:[I&&t.includes(".")&&e.jsx("div",{className:"mb-1 mt-4 first:mt-0",children:e.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-secondary",children:c})}),e.jsxs("div",{className:"group flex items-center gap-3 rounded-secondary border border-primary bg-secondary p-3",children:[e.jsx("label",{className:"min-w-[200px] shrink-0 font-mono text-xs font-semibold text-primary",children:t.includes(".")?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-secondary",children:t.substring(0,t.lastIndexOf(".")+1)}),t.substring(t.lastIndexOf(".")+1)]}):t}),e.jsx("input",{type:"text",value:l,onChange:G=>F(t,G.target.value),className:"w-full rounded-tertiary border border-primary bg-primary px-3 py-1.5 text-sm text-primary outline-none focus:border-blue-500"}),e.jsx("button",{onClick:()=>N(t),className:"shrink-0 rounded-tertiary p-1.5 text-secondary opacity-0 transition-all hover:bg-red-50 hover:text-red-500 group-hover:opacity-100",children:e.jsx(Z,{className:"size-3.5"})})]})]},t)})}),e.jsx(ee,{open:h!==null,title:"Delete translation key",message:`Remove "${h}" from this translation file? Save to persist the change.`,confirmLabel:"Delete",onConfirm:()=>h&&P(h),onCancel:()=>N(null)})]})}export{oe as default};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{c}from"./index-DoHRi03N.js";/**
|
|
2
|
+
* @license lucide-react v0.460.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 t=c("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);export{t as C};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{c as A,r as o,u as S,j as e,B as E,R as C,S as I,G as k,m as h,a as i}from"./index-DoHRi03N.js";import{L as M}from"./loader-circle-DoOjJ8vr.js";/**
|
|
2
|
+
* @license lucide-react v0.460.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 z=A("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),L={development:"bg-green-100 text-green-700",staging:"bg-yellow-100 text-yellow-700",production:"bg-red-100 text-red-700"};function D(){const[a,y]=o.useState(null),[n,g]=o.useState({modules:0,routes:0,namespaces:0}),[f,v]=o.useState(!0),[c,b]=o.useState(null),d=S();if(o.useEffect(()=>{(async()=>{var r,m,p,x,u;try{const[l,N,w,R]=await Promise.all([i.get("/modules"),i.get("/routes"),i.get("/config"),i.get("/i18n").catch(()=>({data:[]}))]),s=w.data;y({name:((r=s==null?void 0:s.app)==null?void 0:r.name)??"Wecon App",version:((m=s==null?void 0:s.app)==null?void 0:m.version)??"0.0.0",mode:(s==null?void 0:s.mode)??"development"}),g({modules:((p=l.data)==null?void 0:p.length)??0,routes:((x=N.data)==null?void 0:x.length)??0,namespaces:((u=R.data)==null?void 0:u.length)??0})}catch(l){b(l.message||"Failed to connect to DevTools API")}finally{v(!1)}})()},[]),f)return e.jsx("div",{className:"flex h-full items-center justify-center",children:e.jsx(M,{className:"size-8 animate-spin text-primary"})});if(c)return e.jsx("div",{className:"flex h-full items-center justify-center",children:e.jsxs("div",{className:"rounded-primary border border-primary bg-secondary p-8 text-center",children:[e.jsx("div",{className:"mb-3 text-lg font-semibold text-primary",children:"Connection Error"}),e.jsx("p",{className:"text-sm text-secondary",children:c}),e.jsx("p",{className:"mt-2 text-xs text-secondary",children:"Make sure your Wecon app is running with devtools enabled."})]})});const j=[{title:"Modules",value:n.modules,icon:E,description:"Registered application modules",path:"/modules",color:"text-blue-500"},{title:"Routes",value:n.routes,icon:C,description:"API route endpoints (RAIs)",path:"/routes",color:"text-green-500"},{title:"Config",value:"Edit",icon:I,description:"Application configuration",path:"/config",color:"text-orange-500"},{title:"I18n",value:n.namespaces||"Manage",icon:k,description:"Translation namespaces",path:"/i18n",color:"text-purple-500"}];return e.jsxs(h.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{duration:.3},className:"flex size-full flex-col gap-6 overflow-y-auto p-6",children:[a&&e.jsxs("div",{className:"flex items-center justify-between rounded-primary border border-primary bg-secondary p-6",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold text-primary",children:a.name}),e.jsxs("p",{className:"mt-1 text-sm text-secondary",children:["v",a.version," · Wecon DevTools"]})]}),e.jsx("span",{className:`rounded-full px-3 py-1 text-xs font-semibold ${L[a.mode]??"bg-gray-100 text-gray-700"}`,children:a.mode})]}),e.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",children:j.map((t,r)=>e.jsxs(h.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.3,delay:r*.05},whileHover:{scale:1.02},whileTap:{scale:.98},onClick:()=>d(t.path),className:"flex cursor-pointer flex-col gap-3 rounded-primary border border-primary bg-secondary p-5 shadow-small transition-shadow hover:shadow-medium",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(t.icon,{className:`size-5 ${t.color}`}),e.jsx("span",{className:"text-2xl font-bold text-primary",children:t.value})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-semibold text-primary",children:t.title}),e.jsx("div",{className:"text-xs text-secondary",children:t.description})]})]},t.title))}),e.jsxs("div",{children:[e.jsx("h2",{className:"mb-3 text-sm font-semibold text-secondary",children:"Quick Actions"}),e.jsx("div",{className:"flex flex-wrap gap-3",children:[{label:"Edit Config",path:"/config"},{label:"Manage Translations",path:"/i18n"},{label:"View All Routes",path:"/routes"}].map(t=>e.jsxs("button",{onClick:()=>d(t.path),className:"flex items-center gap-2 rounded-secondary border border-primary bg-secondary px-4 py-2.5 text-sm text-primary transition-shadow hover:shadow-small",children:[t.label,e.jsx(z,{className:"size-3.5 text-secondary"})]},t.path))})]})]})}export{D as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r,a as b,j as e,m as f}from"./index-DoHRi03N.js";import{C as p}from"./CopyButton-DIdtJD4_.js";import{L as g}from"./loader-circle-DoOjJ8vr.js";import{S as j}from"./search-CpTZ4fXm.js";import"./copy-BvbhBv2y.js";const N={GET:"bg-green-100 text-green-700",POST:"bg-blue-100 text-blue-700",PUT:"bg-yellow-100 text-yellow-700",PATCH:"bg-orange-100 text-orange-700",DELETE:"bg-red-100 text-red-700"};function E(){const[s,m]=r.useState([]),[h,y]=r.useState(!0),[a,u]=r.useState(""),[l,d]=r.useState("all");if(r.useEffect(()=>{b.get("/routes").then(t=>m(t.data??[])).catch(console.error).finally(()=>y(!1))},[]),h)return e.jsx("div",{className:"flex h-full items-center justify-center",children:e.jsx(g,{className:"size-8 animate-spin text-primary"})});const o=[...new Set(s.map(t=>t.module).filter(Boolean))],i=s.filter(t=>{const c=l==="all"||t.module===l,n=!a||t.path.toLowerCase().includes(a.toLowerCase())||t.rai.toLowerCase().includes(a.toLowerCase())||t.method.toLowerCase().includes(a.toLowerCase());return c&&n});return e.jsxs(f.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{duration:.3},className:"flex size-full flex-col gap-5 overflow-y-auto p-6",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold text-primary",children:"Routes"}),e.jsx("p",{className:"mt-1 text-sm text-secondary",children:i.length===s.length?`${s.length} endpoint${s.length!==1?"s":""}`:`${i.length} of ${s.length} endpoints`})]}),e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsxs("div",{className:"relative",children:[e.jsx(j,{className:"absolute left-3 top-1/2 size-4 -translate-y-1/2 text-secondary"}),e.jsx("input",{type:"text",placeholder:"Search by path, RAI, or method...",value:a,onChange:t=>u(t.target.value),className:"w-full rounded-secondary border border-primary bg-secondary py-2 pl-9 pr-4 text-sm text-primary outline-none focus:border-blue-500"})]}),o.length>1&&e.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[e.jsx("button",{onClick:()=>d("all"),className:`rounded-full px-3 py-1 text-xs font-medium transition-colors ${l==="all"?"bg-btn-active-primary text-btn-primary":"border border-primary text-secondary hover:bg-primary hover:text-primary"}`,children:"All"}),o.map(t=>e.jsx("button",{onClick:()=>d(t),className:`rounded-full px-3 py-1 text-xs font-medium transition-colors ${l===t?"bg-btn-active-primary text-btn-primary":"border border-primary text-secondary hover:bg-primary hover:text-primary"}`,children:t},t))]})]}),e.jsx("div",{className:"overflow-auto rounded-primary border border-primary",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-primary bg-primary text-left text-xs text-secondary",children:[e.jsx("th",{className:"px-4 py-3",children:"Method"}),e.jsx("th",{className:"px-4 py-3",children:"Path"}),e.jsx("th",{className:"px-4 py-3",children:"RAI"}),o.length>0&&e.jsx("th",{className:"px-4 py-3",children:"Module"}),e.jsx("th",{className:"px-4 py-3",children:"Roles"})]})}),e.jsx("tbody",{children:i.map((t,c)=>{var n;return e.jsxs("tr",{className:"border-b border-primary bg-secondary last:border-0",children:[e.jsx("td",{className:"px-4 py-2.5",children:e.jsx("span",{className:`inline-block rounded px-2 py-0.5 text-xs font-semibold ${N[t.method.toUpperCase()]??"bg-gray-100 text-gray-700"}`,children:t.method.toUpperCase()})}),e.jsx("td",{className:"px-4 py-2.5",children:e.jsxs("div",{className:"group flex items-center gap-1.5",children:[e.jsx("span",{className:"font-mono text-xs text-primary",children:t.path}),e.jsx("span",{className:"opacity-0 transition-opacity group-hover:opacity-100",children:e.jsx(p,{value:t.path})})]})}),e.jsx("td",{className:"px-4 py-2.5",children:e.jsxs("div",{className:"group flex items-center gap-1.5",children:[e.jsx("span",{className:"font-mono text-xs text-secondary",children:t.rai}),e.jsx("span",{className:"opacity-0 transition-opacity group-hover:opacity-100",children:e.jsx(p,{value:t.rai})})]})}),o.length>0&&e.jsx("td",{className:"px-4 py-2.5",children:t.module&&e.jsx("span",{className:"rounded-full bg-primary px-2 py-0.5 text-xs text-secondary",children:t.module})}),e.jsx("td",{className:"px-4 py-2.5",children:e.jsx("div",{className:"flex flex-wrap gap-1",children:(n=t.roles)==null?void 0:n.map(x=>e.jsx("span",{className:"rounded-full bg-primary px-2 py-0.5 text-xs text-secondary",children:x},x))})})]},c)})})]})})]})}export{E as default};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import{c as w,r as j,d as O,j as e,m as P,a as C}from"./index-DoHRi03N.js";import{C as R}from"./CopyButton-DIdtJD4_.js";import{L as E}from"./loader-circle-DoOjJ8vr.js";import{C as V}from"./chevron-right-E9DzkOHY.js";import"./copy-BvbhBv2y.js";/**
|
|
2
|
+
* @license lucide-react v0.460.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 T=w("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
7
|
+
* @license lucide-react v0.460.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 D=w("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
|
|
12
|
+
* @license lucide-react v0.460.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 J=w("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]),U=["app.name","mode"];function v(s,i,c){const m=JSON.parse(JSON.stringify(s)),n=i.split(".");let o=m;for(let t=0;t<n.length-1;t++)o[n[t]]===void 0&&(o[n[t]]={}),o=o[n[t]];return o[n[n.length-1]]=c,m}function _(){const[s,i]=j.useState(null),[c,m]=j.useState(!0),{addToast:n}=O();j.useEffect(()=>{(async()=>{try{const[r,d]=await Promise.all([C.get("/config"),C.get("/modules")]),p=r.data??{},y=d.data??[],u={},N=y.filter(f=>f.hasConfig).map(async f=>{try{const g=await C.get(`/config/${f.name}`);g.data&&Object.keys(g.data).length>0&&(u[f.name]=g.data)}catch{}});await Promise.all(N),Object.keys(u).length>0&&(p.moduleConfigs=u),i(p)}catch(r){console.error(r)}finally{m(!1)}})()},[]);const o=(a,r)=>{s&&i(v(s,a,r))},t=async(a,r)=>{var p,y,u,N,f,g,$,l,x;const d=a.match(/^moduleConfigs\.([^.]+)\.(.+)$/);if(d){const[,h,b]=d,z=((p=s==null?void 0:s.moduleConfigs)==null?void 0:p[h])??{},A=v(z,b,r);try{await C.put(`/config/${h}`,A),o(a,r),n({type:"success",message:`Updated ${h}.${b}`})}catch(k){const M=((f=(N=(u=(y=k==null?void 0:k.response)==null?void 0:y.data)==null?void 0:u.errors)==null?void 0:N[0])==null?void 0:f.message)||`Failed to update ${h}.${b}`;n({type:"error",message:M})}return}try{await C.put("/config",{path:a,value:r}),o(a,r),n({type:"success",message:`Updated ${a}`})}catch(h){const b=((x=(l=($=(g=h==null?void 0:h.response)==null?void 0:g.data)==null?void 0:$.errors)==null?void 0:l[0])==null?void 0:x.message)||`Failed to update ${a}`;n({type:"error",message:b})}};return c?e.jsx("div",{className:"flex h-full items-center justify-center",children:e.jsx(E,{className:"size-8 animate-spin text-primary"})}):e.jsxs(P.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{duration:.3},className:"flex size-full flex-col gap-6 overflow-y-auto p-6",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold text-primary",children:"Configuration"}),e.jsx("p",{className:"mt-1 text-sm text-secondary",children:"Click on any value to edit it. Changes are saved instantly."})]}),s&&e.jsx("div",{className:"rounded-primary border border-primary bg-secondary p-5",children:e.jsx(S,{data:s,path:"",onSave:t,addToast:n})})]})}function S({data:s,depth:i=0,path:c,onSave:m,addToast:n}){if(s==null)return e.jsx("span",{className:"text-gray-400 italic",children:"null"});if(typeof s!="object")return e.jsx(L,{value:s,path:c,onSave:m,addToast:n});if(Array.isArray(s))return s.length===0?e.jsx("span",{className:"text-gray-400",children:"[]"}):e.jsx("div",{className:"flex flex-col gap-0.5",style:{marginLeft:i>0?20:0},children:s.map((t,a)=>e.jsxs("div",{className:"flex items-start gap-1",children:[e.jsxs("span",{className:"mt-0.5 font-mono text-[10px] text-gray-400 select-none",children:["[",a,"]"]}),e.jsx(S,{data:t,depth:i+1,path:c?`${c}.${a}`:`${a}`,onSave:m,addToast:n})]},a))});const o=Object.entries(s);return o.length===0?e.jsx("span",{className:"text-gray-400",children:"{}"}):e.jsx("div",{className:"flex flex-col gap-0.5",style:{marginLeft:i>0?20:0},children:o.map(([t,a])=>e.jsx(B,{propKey:t,value:a,depth:i,path:c?`${c}.${t}`:t,onSave:m,addToast:n},t))})}function B({propKey:s,value:i,depth:c,path:m,onSave:n,addToast:o}){const[t,a]=j.useState(c<2),r=typeof i=="object"&&i!==null,d=m.match(/^moduleConfigs\.[^.]+$/)!==null;return e.jsxs("div",{className:"flex flex-col",children:[e.jsxs("div",{className:`flex items-center gap-1.5 py-0.5 font-mono text-xs ${r?"cursor-pointer hover:bg-primary/30 -mx-1 px-1 rounded-tertiary":""} ${d?"mt-1":""}`,onClick:()=>r&&a(!t),children:[r?t?e.jsx(T,{className:"size-3 shrink-0 text-secondary"}):e.jsx(V,{className:"size-3 shrink-0 text-secondary"}):e.jsx("span",{className:"inline-block w-3 shrink-0"}),e.jsx("span",{className:`font-semibold ${d?"text-blue-600":"text-primary"}`,children:s}),e.jsx("span",{className:"text-gray-400",children:":"}),!r&&e.jsx("span",{className:"ml-1 flex items-center gap-1",children:e.jsx(L,{value:i,path:m,onSave:n,addToast:o})}),r&&!t&&e.jsx("span",{className:"text-gray-400",children:Array.isArray(i)?`[${i.length}]`:`{${Object.keys(i).length}}`})]}),r&&t&&e.jsx(S,{data:i,depth:c+1,path:m,onSave:n,addToast:o})]})}function L({value:s,path:i,onSave:c,addToast:m}){const[n,o]=j.useState(!1),[t,a]=j.useState(""),[r,d]=j.useState(!1),p=j.useRef(null),y=U.includes(i),u=()=>{y||r||(a(String(s??"")),o(!0),setTimeout(()=>{var l;return(l=p.current)==null?void 0:l.select()},0))},N=()=>{o(!1)},f=async()=>{if(r)return;const l=t.trim();let x=l;if(l==="true"?x=!0:l==="false"?x=!1:l==="null"?x=null:l!==""&&!isNaN(Number(l))&&(x=Number(l)),x===s){o(!1);return}d(!0);try{await c(i,x)}finally{d(!1),o(!1)}},g=l=>{l.key==="Enter"&&f(),l.key==="Escape"&&N()};if(r)return e.jsx(E,{className:"size-3 animate-spin text-secondary"});if(n)return e.jsx("input",{ref:p,type:"text",value:t,onChange:l=>a(l.target.value),onKeyDown:g,onBlur:f,autoFocus:!0,className:"max-w-[300px] rounded-tertiary border border-blue-400 bg-primary px-1.5 py-0.5 font-mono text-xs text-primary outline-none"});const $=()=>s==null?e.jsx("span",{className:"italic text-gray-400",children:"null"}):typeof s=="string"?e.jsxs("span",{className:"text-green-600",children:['"',s,'"']}):typeof s=="boolean"?e.jsx("span",{className:"text-blue-600",children:s?"true":"false"}):e.jsx("span",{className:"text-orange-600",children:String(s)});return e.jsxs("span",{className:"group/leaf inline-flex items-center gap-1",children:[e.jsx("span",{onClick:u,className:y?"":"cursor-pointer rounded-tertiary px-0.5 transition-colors hover:bg-primary/50",children:$()}),y?e.jsx(D,{className:"size-3 text-gray-400"}):e.jsxs("span",{className:"flex items-center gap-0.5 opacity-0 transition-opacity group-hover/leaf:opacity-100",children:[e.jsx("button",{onClick:u,className:"rounded-tertiary p-0.5 transition-colors hover:bg-primary",children:e.jsx(J,{className:"size-3 text-secondary"})}),e.jsx(R,{value:String(s??"")})]})]})}export{_ as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import"https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap";*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}html{--text-primary: #1b2149;--text-secondary: #37474f;--bg-primary: #f7f7fd;--bg-secondary: #ffffff;--active-btn-primary-bg: #7b57df;--hover-btn-primary-bg: #cfd8dc;--border-primary: #d5d7e3;--box-shadow-heavy: rgba(0, 0, 0, .1) 0px 10px 20px 0px, rgba(0, 0, 0, .15) 0px 5px 10px -2px;--box-shadow-light: rgba(0, 0, 0, .1) 0px 10px 20px -5px, rgba(0, 0, 0, .1) 0px 3px 8px 0px;--primary-color: #7b57df;--secondary-color: #78909c;--light-color: #ffffff;--dark-color: #263238;--body-bg: var(--bg-primary);--text-color: var(--dark-color);--btn-primary-bg: var(--primary-color);--btn-primary-color: #fff;--border-radius-primary: 8px;--border-radius-secondary: 6px;--border-radius-tertiary: 4px;--shadow-small: 0 2px 4px rgba(0, 0, 0, .1);--shadow-medium: 0 4px 8px rgba(0, 0, 0, .15);--font-family-base: "Inter", sans-serif}html[data-theme=dark-forest]{--text-primary: #ffffff;--text-secondary: #ccdbdc;--bg-primary: #1f2421;--bg-secondary: #2c3531;--active-btn-primary-bg: #ffd166;--hover-btn-primary-bg: #d5834a;--border-primary: #4d4d4d;--primary-color: #007a5a;--secondary-color: #ccdbdc;--light-color: #f7f9f9;--dark-color: #1f2421;--body-bg: #2c3531;--text-color: #ffffff;--btn-primary-bg: #ffd166;--btn-primary-color: #1f2421}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.-right-\[10px\]{right:-10px}.bottom-6{bottom:1.5rem}.left-0\.5{left:.125rem}.left-1\/2{left:50%}.left-3{left:.75rem}.right-6{right:1.5rem}.top-0\.5{top:.125rem}.top-1\/2,.top-\[50\%\]{top:50%}.z-40{z-index:40}.z-50{z-index:50}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.mx-auto{margin-left:auto;margin-right:auto}.my-auto{margin-top:auto;margin-bottom:auto}.-ml-\[300px\]{margin-left:-300px}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-6{margin-bottom:1.5rem}.mb-\[10px\]{margin-bottom:10px}.ml-0{margin-left:0}.ml-1{margin-left:.25rem}.mr-4{margin-right:1rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.size-10{width:2.5rem;height:2.5rem}.size-16{width:4rem;height:4rem}.size-20{width:5rem;height:5rem}.size-3{width:.75rem;height:.75rem}.size-3\.5{width:.875rem;height:.875rem}.size-4{width:1rem;height:1rem}.size-5{width:1.25rem;height:1.25rem}.size-6{width:1.5rem;height:1.5rem}.size-7{width:1.75rem;height:1.75rem}.size-8{width:2rem;height:2rem}.size-\[25px\]{width:25px;height:25px}.size-\[45px\]{width:45px;height:45px}.size-full{width:100%;height:100%}.h-6{height:1.5rem}.h-\[24px\]{height:24px}.h-\[60px\]{height:60px}.h-dvh{height:100dvh}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.h-lvh{height:100lvh}.h-px{height:1px}.h-screen{height:100vh}.max-h-\[100dvh\]{max-height:100dvh}.max-h-\[40px\]{max-height:40px}.max-h-dvh{max-height:100dvh}.min-h-\[24px\]{min-height:24px}.min-h-\[40px\]{min-height:40px}.min-h-lvh{min-height:100lvh}.w-11{width:2.75rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-3{width:.75rem}.w-\[300px\]{width:300px}.w-\[50px\]{width:50px}.w-\[68px\]{width:68px}.w-\[80\%\]{width:80%}.w-\[calc\(100\%-300px\)\]{width:calc(100% - 300px)}.w-\[calc\(100\%-68px\)\]{width:calc(100% - 68px)}.w-full{width:100%}.min-w-\[160px\]{min-width:160px}.min-w-\[200px\]{min-width:200px}.min-w-\[300px\]{min-width:300px}.min-w-\[50px\]{min-width:50px}.min-w-\[68px\]{min-width:68px}.min-w-full{min-width:100%}.max-w-\[300px\]{max-width:300px}.max-w-\[50px\]{max-width:50px}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-5{--tw-translate-x: 1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rotate-180{--tw-rotate: -180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-0{--tw-rotate: 0deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-primary{border-radius:var(--border-radius-primary)}.rounded-secondary{border-radius:var(--border-radius-secondary)}.rounded-tertiary{border-radius:var(--border-radius-tertiary)}.border{border-width:1px}.border-2{border-width:2px}.border-8{border-width:8px}.border-b{border-bottom-width:1px}.border-r{border-right-width:1px}.border-dashed{border-style:dashed}.border-blue-200{--tw-border-opacity: 1;border-color:rgb(191 219 254 / var(--tw-border-opacity, 1))}.border-blue-300{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity, 1))}.border-blue-400{--tw-border-opacity: 1;border-color:rgb(96 165 250 / var(--tw-border-opacity, 1))}.border-green-200{--tw-border-opacity: 1;border-color:rgb(187 247 208 / var(--tw-border-opacity, 1))}.border-primary{border-color:var(--border-primary)}.border-red-200{--tw-border-opacity: 1;border-color:rgb(254 202 202 / var(--tw-border-opacity, 1))}.border-t-blue-500{--tw-border-opacity: 1;border-top-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.bg-black\/40{background-color:#0006}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.bg-btn-active-primary{background-color:var(--active-btn-primary-bg)}.bg-btn-primary{background-color:var(--btn-primary-bg)}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-gray-300{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity, 1))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-orange-100{--tw-bg-opacity: 1;background-color:rgb(255 237 213 / var(--tw-bg-opacity, 1))}.bg-primary{background-color:var(--bg-primary)}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-secondary{background-color:var(--bg-secondary)}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity, 1))}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.p-\[8px\]{padding:8px}.px-0\.5{padding-left:.125rem;padding-right:.125rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-\[10px\]{padding-left:10px;padding-right:10px}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-\[10px\]{padding-top:10px;padding-bottom:10px}.py-\[12px\]{padding-top:12px;padding-bottom:12px}.py-\[5px\]{padding-top:5px;padding-bottom:5px}.pl-4{padding-left:1rem}.pl-9{padding-left:2.25rem}.pr-4{padding-right:1rem}.text-left{text-align:left}.text-center{text-align:center}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\[10px\]{font-size:10px}.text-\[14px\]{font-size:14px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tracking-wider{letter-spacing:.05em}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.text-btn-primary{color:var(--btn-primary-color)}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity, 1))}.text-orange-500{--tw-text-opacity: 1;color:rgb(249 115 22 / var(--tw-text-opacity, 1))}.text-orange-600{--tw-text-opacity: 1;color:rgb(234 88 12 / var(--tw-text-opacity, 1))}.text-orange-700{--tw-text-opacity: 1;color:rgb(194 65 12 / var(--tw-text-opacity, 1))}.text-primary{color:var(--text-primary)}.text-purple-500{--tw-text-opacity: 1;color:rgb(168 85 247 / var(--tw-text-opacity, 1))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.text-secondary{color:var(--text-secondary)}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-700{--tw-text-opacity: 1;color:rgb(161 98 7 / var(--tw-text-opacity, 1))}.opacity-0{opacity:0}.opacity-40{opacity:.4}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-heavy{--tw-shadow: var(--box-shadow-heavy);--tw-shadow-colored: var(--box-shadow-heavy);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-light{--tw-shadow: var(--box-shadow-light);--tw-shadow-colored: var(--box-shadow-light);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-medium{--tw-shadow: var(--shadow-medium);--tw-shadow-colored: var(--shadow-medium);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-small{--tw-shadow: var(--shadow-small);--tw-shadow-colored: var(--shadow-small);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-linear{transition-timing-function:linear}:root{line-height:1.5;font-weight:400;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-color:var(--bg-primary);color:var(--text-primary)}*{padding:0;margin:0;box-sizing:border-box;font-family:Inter,sans-serif}#root{max-width:2444px;width:100%;min-height:100vh;margin:0 auto}body{margin:0;display:flex;place-items:center;min-width:320px;min-height:100vh;background-color:var(--bg-primary);color:var(--text-primary)}.before\:absolute:before{content:var(--tw-content);position:absolute}.before\:min-h-\[25px\]:before{content:var(--tw-content);min-height:25px}.before\:min-w-\[7px\]:before{content:var(--tw-content);min-width:7px}.before\:rounded-r-\[30px\]:before{content:var(--tw-content);border-top-right-radius:30px;border-bottom-right-radius:30px}.before\:bg-secondary:before{content:var(--tw-content);background-color:var(--bg-secondary)}.first\:mt-0:first-child{margin-top:0}.last\:border-0:last-child{border-width:0px}.hover\:bg-primary:hover{background-color:var(--bg-primary)}.hover\:bg-red-50:hover{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.hover\:bg-secondary:hover{background-color:var(--bg-secondary)}.hover\:text-primary:hover{color:var(--text-primary)}.hover\:text-red-500:hover{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.hover\:opacity-90:hover{opacity:.9}.hover\:shadow-medium:hover{--tw-shadow: var(--shadow-medium);--tw-shadow-colored: var(--shadow-medium);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-small:hover{--tw-shadow: var(--shadow-small);--tw-shadow-colored: var(--shadow-small);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.disabled\:opacity-50:disabled{opacity:.5}.group\/leaf:hover .group-hover\/leaf\:opacity-100,.group:hover .group-hover\:opacity-100{opacity:1}@media (min-width: 480px){.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-end{align-items:flex-end}.sm\:items-center{align-items:center}.sm\:gap-4{gap:1rem}}@media (min-width: 1024px){.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}input:is(:-webkit-autofill,:-webkit-autofill:hover,:-webkit-autofill:focus){border:inherit;font-family:Inter,sans-serif;-webkit-text-fill-color:inherit;-webkit-box-shadow:inherit;-webkit-transition:background-color 5000s ease-in-out 0s;transition:background-color 5000s ease-in-out 0s}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,u as c,a as d,j as e,m as r,B as x}from"./index-DoHRi03N.js";import{L as m}from"./loader-circle-DoOjJ8vr.js";import{C as u}from"./chevron-right-E9DzkOHY.js";function y(){const[a,i]=t.useState([]),[n,l]=t.useState(!0),o=c();return t.useEffect(()=>{d.get("/modules").then(s=>{i(s.data)}).catch(console.error).finally(()=>l(!1))},[]),n?e.jsx("div",{className:"flex h-full items-center justify-center",children:e.jsx(m,{className:"size-8 animate-spin text-primary"})}):e.jsxs(r.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{duration:.3},className:"flex size-full flex-col gap-6 overflow-y-auto p-6",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold text-primary",children:"Modules"}),e.jsxs("p",{className:"mt-1 text-sm text-secondary",children:[a.length," registered module",a.length!==1?"s":""]})]}),e.jsx("div",{className:"flex flex-col gap-3",children:a.map(s=>e.jsxs(r.div,{whileHover:{x:4},onClick:()=>o(`/modules/${s.name}`),className:"flex cursor-pointer items-center gap-4 rounded-primary border border-primary bg-secondary p-4 transition-shadow hover:shadow-small",children:[e.jsx("div",{className:"flex size-10 items-center justify-center rounded-secondary bg-primary",children:e.jsx(x,{className:"size-5 text-secondary"})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"font-semibold text-primary",children:s.name}),e.jsx("div",{className:"text-xs text-secondary",children:s.description||"No description"})]}),e.jsxs("div",{className:"flex items-center gap-4 text-xs text-secondary",children:[e.jsxs("span",{children:[s.routeCount," route",s.routeCount!==1?"s":""]}),s.hasConfig&&e.jsx("span",{className:"rounded-full bg-primary px-2 py-0.5 text-primary",children:"config"})]}),e.jsx(u,{className:"size-4 text-secondary"})]},s.name))})]})}export{y as default};
|