@overlordai/server 1.0.43 → 1.0.45
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/database/repositories/task.repository.d.ts +1 -0
- package/dist/database/repositories/task.repository.d.ts.map +1 -1
- package/dist/database/repositories/task.repository.js +12 -0
- package/dist/database/repositories/task.repository.js.map +1 -1
- package/dist/dispatcher/dispatcher.service.d.ts +2 -0
- package/dist/dispatcher/dispatcher.service.d.ts.map +1 -1
- package/dist/dispatcher/dispatcher.service.js +20 -0
- package/dist/dispatcher/dispatcher.service.js.map +1 -1
- package/dist/web/task.controller.d.ts +35 -2
- package/dist/web/task.controller.d.ts.map +1 -1
- package/dist/web/task.controller.js +12 -2
- package/dist/web/task.controller.js.map +1 -1
- package/dist/web/worker-channel.gateway.d.ts.map +1 -1
- package/dist/web/worker-channel.gateway.js +6 -0
- package/dist/web/worker-channel.gateway.js.map +1 -1
- package/package.json +2 -2
- package/public/assets/AccessTokensPage-BfnD9Iq1.js +1 -0
- package/public/assets/{AdminPage-CWuaOv13.js → AdminPage-DAdc1aYl.js} +1 -1
- package/public/assets/ApiReferencePage-D5bxbl32.js +1 -0
- package/public/assets/{AuditLogPage-DN8yUTwT.js → AuditLogPage-DNHuGrbA.js} +7 -2
- package/public/assets/{BotManage-FsGWv-Cs.js → BotManage-DcubGYNM.js} +1 -1
- package/public/assets/CliReferencePage-1IQb_18H.js +4 -0
- package/public/assets/{DeveloperManage-NVw4KyvZ.js → DeveloperManage-D19Be0bq.js} +1 -1
- package/public/assets/EditProjectPage-CUq3YnL9.js +2 -0
- package/public/assets/{EmptyState-D_O928BP.js → EmptyState-C6pl-fmx.js} +1 -1
- package/public/assets/HomePage-DDcke6KF.js +1 -0
- package/public/assets/LandingPage-B9qdImIR.js +26 -0
- package/public/assets/{LoginPage-D1iYDj3x.js → LoginPage-ZuDHpVDO.js} +1 -1
- package/public/assets/MachineDetailPage-BFiOZP9o.js +1 -0
- package/public/assets/MachineListPage-DuynA1Fy.js +6 -0
- package/public/assets/{NotFoundPage-8NSuGh0w.js → NotFoundPage-DGJi_8PE.js} +1 -1
- package/public/assets/{PipelineEditorPage-Dvw7waws.js → PipelineEditorPage-BVvZPEJ5.js} +1 -1
- package/public/assets/{ProfilePage-fbqb6M9W.js → ProfilePage-DxZI6bWN.js} +1 -1
- package/public/assets/ProjectDetailPage-5QV2RtDD.js +7 -0
- package/public/assets/ProjectListPage-BpGHRc3A.js +6 -0
- package/public/assets/{QuickAuth-BVu5F4-Z.js → QuickAuth-Dc7ZSFup.js} +1 -1
- package/public/assets/RemoveMemberConfirmDialog-fX5QtE50.js +6 -0
- package/public/assets/{Select-D1rjtzkM.js → Select-CI29u-rR.js} +2 -2
- package/public/assets/{SettingsPage-BYx5zcQ4.js → SettingsPage-DWR2r67s.js} +1 -1
- package/public/assets/{Skeleton-JjetbQBe.js → Skeleton-FjHq0xtc.js} +1 -1
- package/public/assets/{TaskDetailPage-Cj8c16k5.js → TaskDetailPage-D1VmY43e.js} +7 -7
- package/public/assets/TaskListPage-DvjPxlMS.js +1 -0
- package/public/assets/{TaskStatusBadge-4uLJX_Vd.js → TaskStatusBadge-DBm4u0Hu.js} +1 -1
- package/public/assets/TokenManage-t44NnmaR.js +1 -0
- package/public/assets/{TotpSetupPage-DFyQKciF.js → TotpSetupPage-DOGWrqB6.js} +1 -1
- package/public/assets/{WorkerSetupGuidePage-LUifUcBd.js → WorkerSetupGuidePage-CEIv1MTN.js} +1 -1
- package/public/assets/{arrow-left-CR5jvFjP.js → arrow-left-B_Wt2yqc.js} +1 -1
- package/public/assets/{arrow-right-Bo1TJaJG.js → arrow-right-D2IR7djk.js} +1 -1
- package/public/assets/{bot-DxFLx72V.js → bot-C3fIKd-I.js} +1 -1
- package/public/assets/{copy-xV3w7rMd.js → copy-s5DfTWQm.js} +1 -1
- package/public/assets/{external-link-YMd0b2Hu.js → external-link-CINotlqA.js} +1 -1
- package/public/assets/index-BwfyjudA.css +1 -0
- package/public/assets/index-Cg6K4aRG.js +207 -0
- package/public/assets/{key-Bq5CCd4F.js → key-B_A2sL4D.js} +1 -1
- package/public/assets/{loader-circle-B9QqvZqZ.js → loader-circle-CaGKX8EV.js} +1 -1
- package/public/assets/{pencil-DbvawD2W.js → pencil-C2IdswnN.js} +1 -1
- package/public/assets/{plus-DHhiUFNm.js → plus-B6X_qZtX.js} +1 -1
- package/public/assets/protocol-C4f2G7mk.js +1 -0
- package/public/assets/{rotate-ccw-Chvhmlkh.js → rotate-ccw-DMxEN3xn.js} +1 -1
- package/public/assets/{scroll-text-C6gAM7YD.js → scroll-text-D9V4g5t_.js} +1 -1
- package/public/assets/{settings-B50SrjPV.js → settings-CD2kB-Z7.js} +1 -1
- package/public/assets/{task.store-DyE-1EPm.js → task.store-KG-6fhl8.js} +1 -1
- package/public/assets/{trash-2-DFZZLvex.js → trash-2-BI3guxl6.js} +1 -1
- package/public/assets/{users-CP0hBaq4.js → users-DL4F_cGf.js} +1 -1
- package/public/favicon.svg +2 -2
- package/public/index.html +3 -3
- package/public/assets/AccessTokensPage-bSuzjk3Y.js +0 -1
- package/public/assets/ApiReferencePage-DzvO8t7S.js +0 -1
- package/public/assets/CliReferencePage-Dr4YTU9I.js +0 -8
- package/public/assets/EditProjectPage-Ypprcu5c.js +0 -2
- package/public/assets/HomePage-B2OxK5xj.js +0 -1
- package/public/assets/LandingPage-BKxZn7u-.js +0 -36
- package/public/assets/MachineDetailPage-B8kl4br1.js +0 -1
- package/public/assets/MachineListPage-Cdhs5E6Q.js +0 -6
- package/public/assets/ProjectDetailPage-C8_CaJ4q.js +0 -7
- package/public/assets/ProjectListPage-Bo9irGl7.js +0 -6
- package/public/assets/RemoveMemberConfirmDialog-VXTWA_wn.js +0 -6
- package/public/assets/SkillPage-W3D0XriB.js +0 -1
- package/public/assets/TaskListPage-zOvt0-cZ.js +0 -1
- package/public/assets/TokenManage-B8Ib-gxA.js +0 -1
- package/public/assets/chevron-right-VfZqXu3w.js +0 -6
- package/public/assets/index-MbPa7F7Y.css +0 -1
- package/public/assets/index-_asV5ZlD.js +0 -212
- package/public/assets/protocol-C5uQmiiB.js +0 -1
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{c as A,a as w,r as a,j as e,f as P,d as L,h as R}from"./index-Cg6K4aRG.js";import{G as b,A as p}from"./protocol-C4f2G7mk.js";import{S as F}from"./Select-CI29u-rR.js";import{E as G}from"./EmptyState-C6pl-fmx.js";import{T as I}from"./Skeleton-FjHq0xtc.js";import{P as M}from"./plus-B6X_qZtX.js";/**
|
|
2
|
+
* @license lucide-react v0.469.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 D=A("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]),f={width:"100%",padding:"0.5rem 0.75rem",backgroundColor:"var(--bg-input)",border:"1px solid var(--border)",borderRadius:"4px",color:"var(--text-primary)",fontSize:"0.75rem",fontFamily:"'JetBrains Mono', monospace",outline:"none",boxSizing:"border-box"},m={display:"block",color:"var(--text-secondary)",fontSize:"0.7rem",marginBottom:"0.25rem",fontFamily:"'JetBrains Mono', monospace"};function H({isOpen:u,onClose:s,onCreated:g}){const{t}=w(),[n,x]=a.useState(""),[l,i]=a.useState(""),[c,v]=a.useState(""),[o,d]=a.useState("main"),[_,S]=a.useState(b.GITHUB),[k,B]=a.useState(p.CLAUDE),[j,N]=a.useState(!1),[T,h]=a.useState("");a.useEffect(()=>{u&&E()},[u]);function E(){x(""),i(""),v(""),d("main"),S(b.GITHUB),B(p.CLAUDE),h("")}function C(){E(),s()}async function U(r){r.preventDefault(),h(""),N(!0);try{const y=await P.post("admin/projects",{json:{name:n,key:l,repoUrl:c,defaultBranch:o,gitPlatform:_,agentType:k}}).json();g(y),C()}catch(y){const z=y instanceof Error?y.message:t("projects.failed_to_create_project");h(z)}finally{N(!1)}}return u?e.jsx("div",{onClick:C,style:{position:"fixed",inset:0,zIndex:50,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"var(--modal-backdrop, rgba(12,12,12,0.6))"},children:e.jsxs("div",{onClick:r=>r.stopPropagation(),style:{width:"100%",maxWidth:"480px",backgroundColor:"var(--bg-card)",border:"1px solid var(--border)",borderRadius:"4px",padding:"1.5rem",fontFamily:"'JetBrains Mono', monospace"},children:[e.jsxs("div",{style:{marginBottom:"1.25rem"},children:[e.jsxs("div",{style:{color:"var(--accent)",fontSize:"0.875rem",fontWeight:600},children:["> ",t("projects.create_project")]}),e.jsx("div",{style:{color:"var(--text-muted)",fontSize:"0.7rem",marginTop:"0.25rem"},children:t("projects.add_project_desc")})]}),T&&e.jsx("div",{style:{marginBottom:"1rem",padding:"0.5rem 0.75rem",borderRadius:"4px",backgroundColor:"rgba(239, 68, 68, 0.1)",border:"1px solid rgba(239, 68, 68, 0.3)",color:"var(--destructive)",fontSize:"0.7rem"},children:T}),e.jsxs("form",{onSubmit:U,style:{display:"flex",flexDirection:"column",gap:"0.875rem"},children:[e.jsxs("div",{children:[e.jsx("label",{style:m,children:t("projects.project_name")}),e.jsx("input",{type:"text",value:n,onChange:r=>x(r.target.value),placeholder:t("projects.project_name_placeholder"),required:!0,autoFocus:!0,style:f,onFocus:r=>r.target.style.borderColor="var(--accent)",onBlur:r=>r.target.style.borderColor="var(--border)"})]}),e.jsxs("div",{children:[e.jsx("label",{style:m,children:t("projects.project_key")}),e.jsx("input",{type:"text",value:l,onChange:r=>i(r.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"")),placeholder:t("projects.project_key_placeholder"),required:!0,style:f,onFocus:r=>r.target.style.borderColor="var(--accent)",onBlur:r=>r.target.style.borderColor="var(--border)"}),e.jsx("div",{style:{color:"var(--text-muted)",fontSize:"0.65rem",marginTop:"0.25rem"},children:t("projects.project_key_hint")})]}),e.jsxs("div",{children:[e.jsx("label",{style:m,children:t("projects.repo_url")}),e.jsx("input",{type:"text",value:c,onChange:r=>v(r.target.value),placeholder:t("projects.repo_url_placeholder"),required:!0,style:f,onFocus:r=>r.target.style.borderColor="var(--accent)",onBlur:r=>r.target.style.borderColor="var(--border)"})]}),e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr 1fr",gap:"0.75rem"},children:[e.jsxs("div",{children:[e.jsx("label",{style:m,children:t("projects.default_branch")}),e.jsx("input",{type:"text",value:o,onChange:r=>d(r.target.value),placeholder:t("projects.main"),style:f,onFocus:r=>r.target.style.borderColor="var(--accent)",onBlur:r=>r.target.style.borderColor="var(--border)"})]}),e.jsxs("div",{children:[e.jsx("label",{style:m,children:t("projects.git_platform")}),e.jsx(F,{value:_,onChange:r=>S(r),options:[{value:b.GITHUB,label:t("projects.github")},{value:b.GITLAB,label:t("projects.gitlab")},{value:b.GITEA,label:t("projects.gitea")}]})]}),e.jsxs("div",{children:[e.jsx("label",{style:m,children:t("projects.agent_type")}),e.jsx(F,{value:k,onChange:r=>B(r),options:[{value:p.CLAUDE,label:t("projects.claude")},{value:p.CURSOR,label:t("projects.cursor")},{value:p.CODEX,label:t("projects.codex")},{value:p.CUSTOM,label:t("projects.custom")}]})]})]}),e.jsxs("div",{style:{display:"flex",gap:"0.75rem",marginTop:"0.5rem"},children:[e.jsx("button",{type:"button",onClick:C,disabled:j,style:{flex:1,padding:"0.5rem",backgroundColor:"transparent",border:"1px solid var(--border)",borderRadius:"4px",fontSize:"0.75rem",fontFamily:"'JetBrains Mono', monospace",cursor:"pointer",transition:"color 0.15s, border-color 0.15s"},className:"text-[var(--text-muted)] hover:text-[var(--text-primary)] hover:border-[var(--text-muted)]",children:t("common.cancel")}),e.jsx("button",{type:"submit",disabled:j||!n||!l||!c,style:{flex:1,padding:"0.5rem",backgroundColor:"var(--accent)",color:"#0C0C0C",border:"none",borderRadius:"4px",fontSize:"0.75rem",fontWeight:600,fontFamily:"'JetBrains Mono', monospace",cursor:j||!n||!l||!c?"not-allowed":"pointer",opacity:j||!n||!l||!c?.7:1},children:t(j?"common.creating":"common.create")})]})]})]})}):null}function X(){const u=L(),{t:s}=w(),[g,t]=a.useState([]),[n,x]=a.useState(!0),[l,i]=a.useState(!1);R(a.useMemo(()=>e.jsxs("button",{onClick:()=>i(!0),className:"flex items-center gap-1.5 rounded-[4px] bg-[var(--accent)] px-3 py-1.5 text-xs font-medium text-black",children:[e.jsx(M,{className:"h-3.5 w-3.5"}),s("projects.create_project")]}),[s]));async function c(){x(!0);try{const o=await P.get("web/projects").json();t(o)}catch{}finally{x(!1)}}a.useEffect(()=>{c()},[]);function v(o){t(d=>[o,...d])}return e.jsxs("div",{className:"mx-auto max-w-5xl px-6 py-8",children:[n?e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4",children:e.jsx(I,{rows:4})}):g.length===0?e.jsx(G,{icon:D,title:s("projects.no_projects_yet"),description:s("projects.create_first_project"),actionLabel:s("projects.create_project"),onAction:()=>i(!0)}):e.jsxs("div",{className:"rounded border border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsxs("div",{className:"grid grid-cols-[100px_1fr_1fr_100px] gap-4 border-b border-[var(--border-row)] px-4 py-2.5",children:[e.jsx("span",{className:"text-xs font-medium text-[var(--text-muted)]",children:s("projects.key")}),e.jsx("span",{className:"text-xs font-medium text-[var(--text-muted)]",children:s("projects.name")}),e.jsx("span",{className:"text-xs font-medium text-[var(--text-muted)]",children:s("projects.repository")}),e.jsx("span",{className:"text-xs font-medium text-[var(--text-muted)]",children:s("projects.agent")})]}),g.map(o=>e.jsxs("div",{onClick:()=>u(`/projects/${o.key}`),className:"grid cursor-pointer grid-cols-[100px_1fr_1fr_100px] gap-4 border-b border-[var(--border-row)] px-4 py-3 last:border-b-0 hover:bg-[var(--bg-input)]",children:[e.jsx("span",{className:"truncate text-sm text-[var(--accent)]",children:o.key}),e.jsx("span",{className:"truncate text-sm text-[var(--text-primary)]",children:o.name}),e.jsx("a",{href:o.repoUrl,target:"_blank",rel:"noopener noreferrer",className:"truncate text-sm text-[var(--accent)] hover:underline",onClick:d=>d.stopPropagation(),children:o.repoUrl}),e.jsx("span",{className:"text-sm text-[var(--text-secondary)]",children:o.agentType})]},o.key))]}),e.jsx(H,{isOpen:l,onClose:()=>i(!1),onCreated:v})]})}export{X as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as b,r as s,f as h,j as e,C as v}from"./index-
|
|
1
|
+
import{a as b,r as s,f as h,j as e,C as v}from"./index-Cg6K4aRG.js";import{C as f}from"./copy-s5DfTWQm.js";function k({mode:l}){const{t:o}=b(),[n,d]=s.useState([]),[x,c]=s.useState(null),[u,i]=s.useState(!1);s.useEffect(()=>{h.get("web/profile/tokens").json().then(t=>{const r=t.filter(m=>m.status==="active");d(r),r.length>0&&c(r[0].id)}).catch(()=>{})},[]);const a=l==="cli"?"ov login --token <your-token>":'curl -H "authorization: bearer <your-token>" http://localhost:9000/api/web/tasks',p=s.useCallback(()=>{navigator.clipboard.writeText(a),i(!0),setTimeout(()=>i(!1),2e3)},[a]);return n.length===0?null:e.jsxs("div",{className:"mb-8 rounded-[4px] border border-[var(--accent)]/20 bg-[var(--bg-card)] p-4",children:[e.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:o("docs.quick_start_with_token")}),e.jsx("select",{value:x??"",onChange:t=>c(Number(t.target.value)),className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-primary)] px-2 py-1 text-xs text-[var(--text-primary)]",children:n.map(t=>e.jsx("option",{value:t.id,children:t.label},t.id))})]}),e.jsxs("div",{className:"flex items-center justify-between gap-2 rounded-[4px] bg-[var(--bg-primary)] px-3 py-2",children:[e.jsx("code",{className:"text-xs text-[var(--accent)] break-all",children:a}),e.jsx("button",{onClick:p,className:"shrink-0 text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",children:u?e.jsx(v,{size:14}):e.jsx(f,{size:14})})]}),e.jsx("p",{className:"mt-2 text-[10px] text-[var(--text-muted)]",children:o("docs.replace_token_hint")})]})}export{k as Q};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{c as _,a as N,r as s,j as e,X as S,f as h,l as R}from"./index-Cg6K4aRG.js";import{P as i}from"./protocol-C4f2G7mk.js";import{S as g}from"./Select-CI29u-rR.js";/**
|
|
2
|
+
* @license lucide-react v0.469.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 I=_("UserMinus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);function A({isOpen:a,onClose:d,projectKey:m,onAdded:x}){const{t}=N(),[o,E]=s.useState([]),[n,u]=s.useState(""),[v,j]=s.useState(i.MEMBER),[p,f]=s.useState(!1),[y,b]=s.useState("");s.useEffect(()=>{if(!a)return;async function r(){try{const l=await h.get("web/projects/developers").json();E(l)}catch{}}r()},[a]);function c(){u(""),j(i.MEMBER),b(""),d()}async function M(r){if(r.preventDefault(),!!n){b(""),f(!0);try{await h.post(`web/projects/${m}/members`,{json:{developerId:parseInt(n,10),role:v}}),x(),c()}catch(l){const k=l instanceof Error?l.message:t("projects.failed_to_add_member");b(k)}finally{f(!1)}}}return a?e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",style:{backdropFilter:"blur(2px)"},children:[e.jsx("div",{className:"fixed inset-0 bg-[var(--modal-backdrop)]",onClick:c}),e.jsx("div",{className:"relative z-10 w-full max-w-[480px] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] font-mono",children:e.jsxs("form",{onSubmit:M,children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 py-4",children:[e.jsx("h3",{className:"text-sm text-[var(--text-primary)]",children:t("projects.add_member_title")}),e.jsx("button",{type:"button",className:"rounded-[4px] p-1 text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",onClick:c,children:e.jsx(S,{className:"h-4 w-4"})})]}),e.jsxs("div",{className:"space-y-4 px-5 py-5",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:t("projects.developer")}),e.jsx(g,{value:n,onChange:u,options:o.map(r=>({value:String(r.id),label:`${r.name} (${r.gitEmail})`})),placeholder:t("projects.select_developer")})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:t("projects.role")}),e.jsx(g,{value:v,onChange:r=>j(r),options:[{value:i.MEMBER,label:t("projects.member_role")},{value:i.MAINTAINER,label:t("projects.maintainer_role")}]})]}),y&&e.jsx("div",{className:"rounded-[4px] border border-red-500/30 bg-red-500/10 px-3 py-2 text-xs text-red-400",children:y})]}),e.jsxs("div",{className:"flex items-center justify-end gap-2 border-t border-[var(--border)] px-5 py-4",children:[e.jsx("button",{type:"button",className:"rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors disabled:opacity-50",disabled:p,onClick:c,children:t("common.cancel")}),e.jsx("button",{type:"submit",className:"rounded-[4px] bg-[var(--accent)] px-3 py-1.5 text-xs text-black hover:opacity-90 transition-opacity disabled:opacity-50",disabled:p||!n,children:t(p?"projects.adding":"projects.add_member")})]})]})})]}):null}function L({isOpen:a,onClose:d,onConfirm:m,memberName:x,loading:t}){const{t:o}=N();return e.jsx(R,{isOpen:a,onClose:d,onConfirm:m,title:`> ${o("projects.remove_member")}`,message:o("projects.remove_member_confirm",{name:x}),confirmLabel:o("common.remove"),confirmVariant:"danger",isLoading:t})}export{A,L as R,I as U};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{c as f,r as c,j as t}from"./index-
|
|
1
|
+
import{c as f,r as c,j as t}from"./index-Cg6K4aRG.js";/**
|
|
2
2
|
* @license lucide-react v0.469.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
5
5
|
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const b=f("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);function h({value:r,onChange:
|
|
6
|
+
*/const b=f("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);function h({value:r,onChange:i,options:l,placeholder:x,disabled:a=!1,className:d=""}){var u;const[n,s]=c.useState(!1),o=c.useRef(null),m=((u=l.find(e=>e.value===r))==null?void 0:u.label)??x??"";return c.useEffect(()=>{function e(v){o.current&&!o.current.contains(v.target)&&s(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),t.jsxs("div",{ref:o,className:`relative ${d}`,children:[t.jsxs("button",{type:"button",disabled:a,onClick:()=>!a&&s(!n),className:`flex w-full items-center justify-between rounded-[4px] border bg-[var(--bg-input)] px-3 py-2 font-mono text-xs outline-none transition-colors ${n?"border-[var(--accent)] text-[var(--text-primary)]":"border-[var(--border)] text-[var(--text-primary)] hover:border-[var(--text-muted)]"} ${a?"cursor-not-allowed opacity-50":"cursor-pointer"}`,children:[t.jsx("span",{className:r?"":"text-[var(--text-muted)]",children:m}),t.jsx(b,{size:12,className:`ml-2 shrink-0 text-[var(--text-muted)] transition-transform ${n?"rotate-180":""}`})]}),n&&t.jsx("div",{className:"absolute left-0 z-50 mt-1 max-h-48 w-full overflow-auto rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] py-1 shadow-lg",children:l.map(e=>t.jsxs("button",{type:"button",onClick:()=>{i(e.value),s(!1)},className:`flex w-full items-center px-3 py-1.5 text-left font-mono text-xs transition-colors ${e.value===r?"bg-[var(--accent)]/10 text-[var(--accent)]":"text-[var(--text-secondary)] hover:bg-[var(--bg-input)] hover:text-[var(--text-primary)]"}`,children:[e.value===r&&t.jsx("span",{className:"mr-2 text-[var(--accent)]",children:">"}),e.label]},e.value))})]})}export{h as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./index-
|
|
1
|
+
import{j as e}from"./index-Cg6K4aRG.js";const n="rounded-[4px] bg-[var(--border)] animate-pulse";function c({rows:r=5}){const a=[[60,200,80,120],[60,160,100,80],[60,220,70,140],[60,180,90,100],[60,190,110,90]];return e.jsx("div",{className:"flex flex-col gap-3",children:Array.from({length:r}).map((s,l)=>{const t=a[l%a.length];return e.jsx("div",{className:"flex gap-4",children:t.map((i,o)=>e.jsx("div",{className:n,style:{width:i,height:12}},o))},l)})})}function m({cards:r=4}){return e.jsx("div",{className:"grid grid-cols-2 gap-3",children:Array.from({length:r}).map((a,s)=>e.jsx("div",{className:`${n} h-20`},s))})}export{m as C,c as T};
|