loki-mode 7.5.28 → 7.5.30
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/SKILL.md +2 -2
- package/VERSION +1 -1
- package/autonomy/loki +3 -3
- package/dashboard/__init__.py +1 -1
- package/dashboard/server.py +19 -0
- package/docs/INSTALLATION.md +1 -1
- package/docs/MERGE-DEDUP-MAP.md +420 -0
- package/docs/MERGE-ROUTE-MAP.md +139 -0
- package/docs/MERGE3-PLAN.md +119 -0
- package/loki-ts/dist/loki.js +2 -2
- package/mcp/__init__.py +1 -1
- package/package.json +2 -2
- package/web-app/dist/assets/{AdminPage-DwVUK4v9.js → AdminPage-CKUOsWZW.js} +3 -3
- package/web-app/dist/assets/{Avatar-B7gqhcg3.js → Avatar-CL9Id9Hi.js} +1 -1
- package/web-app/dist/assets/{Badge-DA3xNJAS.js → Badge-B12zwlD7.js} +1 -1
- package/web-app/dist/assets/{Button-BPXURLaK.js → Button-CFLVoduT.js} +1 -1
- package/web-app/dist/assets/{ComparePage-B0JQMhKG.js → ComparePage-Dg0UdZAk.js} +1 -1
- package/web-app/dist/assets/{GitHubIssuesPanel-D38-fy29.js → GitHubIssuesPanel-CSitxtAX.js} +2 -2
- package/web-app/dist/assets/{GitHubPRsPanel-DLPcW3N0.js → GitHubPRsPanel-BIT06FRo.js} +1 -1
- package/web-app/dist/assets/HomePage-pU_0fGny.js +28 -0
- package/web-app/dist/assets/{LoginPage-DqCzxsfx.js → LoginPage-DTZtt2Yb.js} +1 -1
- package/web-app/dist/assets/MagicPage-10zfra8o.js +31 -0
- package/web-app/dist/assets/{MetricsPage-CPYQR0zr.js → MetricsPage-C-wiKUkv.js} +1 -1
- package/web-app/dist/assets/NotFoundPage-BDkcmhYe.js +1 -0
- package/web-app/dist/assets/{ProjectPage-DNujSl6j.js → ProjectPage-CiCavQ8n.js} +71 -71
- package/web-app/dist/assets/ProjectsPage-BLCXQwwC.js +6 -0
- package/web-app/dist/assets/{SettingsPage-BaQJbOgL.js → SettingsPage-PkxtaMyg.js} +3 -3
- package/web-app/dist/assets/{ShowcasePage-DQR_e-kg.js → ShowcasePage-iECp8Tha.js} +1 -1
- package/web-app/dist/assets/SystemSettingsPage-DS6Anno1.js +6 -0
- package/web-app/dist/assets/{TeamsPage-DOFErDqX.js → TeamsPage-ls6h6bNL.js} +1 -1
- package/web-app/dist/assets/{TemplatesPage-Ty72hILN.js → TemplatesPage-Bk0QzlPt.js} +3 -3
- package/web-app/dist/assets/{TerminalOutput-DqOVnR1p.js → TerminalOutput-4-1hWCtZ.js} +1 -1
- package/web-app/dist/assets/{activity-BgBZ4s4c.js → activity-DH3ih2nS.js} +1 -1
- package/web-app/dist/assets/{bell-C-UezVWi.js → bell-Gn17S6uv.js} +1 -1
- package/web-app/dist/assets/{bot-D70fEnm5.js → bot-Cbycc3VE.js} +1 -1
- package/web-app/dist/assets/{check-CBohulxQ.js → check-nIAqa-kf.js} +1 -1
- package/web-app/dist/assets/{chevron-left-C-emzUhB.js → chevron-left-D2jcWDll.js} +1 -1
- package/web-app/dist/assets/{circle-alert-8SRY0_GX.js → circle-alert-CpL4Bhvt.js} +1 -1
- package/web-app/dist/assets/{clock-mfq4XnPQ.js → clock-IW4Wq86N.js} +1 -1
- package/web-app/dist/assets/{cloud-DpRM7T8t.js → cloud-Cn8nNuH2.js} +1 -1
- package/web-app/dist/assets/{code-xml-1N2Ui-4c.js → code-xml-BiJBteXf.js} +1 -1
- package/web-app/dist/assets/{copy-LXquTgzI.js → copy-CnqkyNsi.js} +1 -1
- package/web-app/dist/assets/{database-S1dyXnuT.js → database-CKSReqa5.js} +1 -1
- package/web-app/dist/assets/{dollar-sign-CRqk0dW5.js → dollar-sign-CDzDY64R.js} +1 -1
- package/web-app/dist/assets/{file-code-corner-B99CwY_6.js → file-code-corner-Box4IwG1.js} +1 -1
- package/web-app/dist/assets/{file-plus-DZ5qnz5b.js → file-plus-DpGqlXF8.js} +1 -1
- package/web-app/dist/assets/{folder-open-DBCm7yuF.js → folder-open-B57dAoBv.js} +1 -1
- package/web-app/dist/assets/{git-commit-horizontal-DM1ERuNd.js → git-commit-horizontal-BVbucmO5.js} +1 -1
- package/web-app/dist/assets/{globe-B7xEJSL_.js → globe-BkOnKl4x.js} +1 -1
- package/web-app/dist/assets/{hammer-Cgi3LTuS.js → hammer-DRbIQ4QU.js} +1 -1
- package/web-app/dist/assets/{index-BN52-GQT.js → index-CM_b_EhP.js} +77 -77
- package/web-app/dist/assets/{layers-Bi8RPIBC.js → layers-B78BiFiU.js} +1 -1
- package/web-app/dist/assets/{lightbulb-Doc_n8JX.js → lightbulb-B-Itbm9g.js} +1 -1
- package/web-app/dist/assets/{loader-circle-BB932A7A.js → loader-circle-Oq6NQhW2.js} +1 -1
- package/web-app/dist/assets/{lock-Bt6gpMrs.js → lock-DbJ9zxbw.js} +1 -1
- package/web-app/dist/assets/{mail-BuzAu1IP.js → mail-CzMRod6m.js} +1 -1
- package/web-app/dist/assets/{package-BE5FHxQ8.js → package-WZ5osvej.js} +1 -1
- package/web-app/dist/assets/{plus-CNqABexN.js → plus-j08lFR-K.js} +1 -1
- package/web-app/dist/assets/{refresh-cw-34B13ztx.js → refresh-cw-CIr7E-g2.js} +1 -1
- package/web-app/dist/assets/{rotate-ccw-CrD2QB29.js → rotate-ccw-gwoXxDeE.js} +1 -1
- package/web-app/dist/assets/{save-DsJcqdnI.js → save-B8fV_ZpE.js} +1 -1
- package/web-app/dist/assets/{server-BcgRMArA.js → server-D5dO1paz.js} +1 -1
- package/web-app/dist/assets/{shield-alert-DLYLdVJ0.js → shield-alert-Du08zhdg.js} +1 -1
- package/web-app/dist/assets/{trash-2-Cc-VTvzt.js → trash-2-DEKSVae5.js} +1 -1
- package/web-app/dist/assets/{trending-down-CrDpO2a_.js → trending-down-DBiXUtxJ.js} +1 -1
- package/web-app/dist/assets/{trending-up-CNVsmM3G.js → trending-up-BgmK_tHq.js} +1 -1
- package/web-app/dist/assets/{upload-LuDuB7Wc.js → upload-IaViyeVD.js} +1 -1
- package/web-app/dist/assets/{usePolling-C8rvc-CG.js → usePolling-PiRLqNu6.js} +1 -1
- package/web-app/dist/assets/{user-BT79cI-o.js → user-BB5J8wAF.js} +1 -1
- package/web-app/dist/index.html +2 -3
- package/web-app/server.py +45 -7
- package/web-app/dist/assets/HomePage-CzeoS2V_.js +0 -28
- package/web-app/dist/assets/MagicPage-CBLqpa55.js +0 -31
- package/web-app/dist/assets/NotFoundPage-B62u4iCs.js +0 -1
- package/web-app/dist/assets/ProjectsPage-uHG7kxB-.js +0 -6
- package/web-app/dist/assets/SystemSettingsPage-C_Q_1WK4.js +0 -6
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{c as $,j as e,r as u,x as D,h as P,i as R,u as z,a as E,n as L,l as M,E as A,f as _}from"./index-CM_b_EhP.js";import{B as C}from"./Button-CFLVoduT.js";import{B as U}from"./Badge-B12zwlD7.js";import{L as I}from"./lightbulb-B-Itbm9g.js";import{T as O}from"./trending-up-BgmK_tHq.js";import{T as H,M as Y}from"./trending-down-DBiXUtxJ.js";import{u as q}from"./usePolling-PiRLqNu6.js";import{R as G}from"./refresh-cw-CIr7E-g2.js";import{P as S}from"./plus-j08lFR-K.js";import{F as K}from"./folder-open-B57dAoBv.js";import{C as Q}from"./copy-CnqkyNsi.js";import{T as V}from"./trash-2-DEKSVae5.js";import"./clock-IW4Wq86N.js";import"./circle-alert-CpL4Bhvt.js";import"./check-nIAqa-kf.js";/**
|
|
2
|
+
* @license lucide-react v0.577.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=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],X=$("ellipsis-vertical",W),J={none:"p-0",sm:"p-3",md:"p-4",lg:"p-6"};function Z({hover:t=!1,padding:r="md",className:n="",children:a,onClick:d}){return e.jsx("div",{role:d?"button":void 0,tabIndex:d?0:void 0,onClick:d,onKeyDown:d?l=>{(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),d())}:void 0,className:["bg-white border border-[#ECEAE3] rounded-[5px] shadow-card group",t&&"hover:shadow-card-hover transition-shadow duration-200",d&&"cursor-pointer",J[r],n].filter(Boolean).join(" "),children:a})}const y={"A+":{color:"text-success",bg:"bg-success/10",border:"border-success/20"},A:{color:"text-success",bg:"bg-success/10",border:"border-success/20"},"A-":{color:"text-success",bg:"bg-success/8",border:"border-success/15"},"B+":{color:"text-teal",bg:"bg-teal/10",border:"border-teal/20"},B:{color:"text-teal",bg:"bg-teal/8",border:"border-teal/15"},"B-":{color:"text-info",bg:"bg-info/8",border:"border-info/15"},"C+":{color:"text-warning",bg:"bg-warning/10",border:"border-warning/20"},C:{color:"text-warning",bg:"bg-warning/8",border:"border-warning/15"},"C-":{color:"text-warning",bg:"bg-warning/8",border:"border-warning/15"},D:{color:"text-danger",bg:"bg-danger/10",border:"border-danger/20"},F:{color:"text-danger",bg:"bg-danger/15",border:"border-danger/25"}};function ee(t){const r=[],n=[],a=Math.min(t.testCoverage,100);r.push({label:"Test Coverage",score:a,weight:.3,description:`${Math.round(a)}% of code covered`}),a<60&&n.push(`Add tests to increase coverage from ${Math.round(a)}% to 80%+`);const d=t.lintErrors===0?100:Math.max(0,100-t.lintErrors*5);r.push({label:"Code Quality",score:d,weight:.25,description:t.lintErrors===0?"No lint errors":`${t.lintErrors} lint error${t.lintErrors!==1?"s":""} found`}),t.lintErrors>0&&n.push(`Fix ${t.lintErrors} lint error${t.lintErrors!==1?"s":""} to improve code quality`);const l=Math.round(t.buildSuccessRate*100);r.push({label:"Build Reliability",score:l,weight:.25,description:`${l}% of recent builds succeeded`}),l<80&&n.push("Investigate build failures to improve reliability");const m=Math.max(0,100-t.codeComplexity);r.push({label:"Simplicity",score:m,weight:.2,description:m>=70?"Code is well-structured":"Some files could benefit from refactoring"}),m<50&&n.push("Refactor complex files to reduce cognitive load");const i=Math.round(r.reduce((o,x)=>o+x.score*x.weight,0));let s;if(i>=95?s="A+":i>=90?s="A":i>=85?s="A-":i>=80?s="B+":i>=75?s="B":i>=70?s="B-":i>=65?s="C+":i>=60?s="C":i>=55?s="C-":i>=40?s="D":s="F",n.length===0&&i<95){const o=r.reduce((x,f)=>f.score<x.score?f:x,r[0]);n.push(`Improve ${o.label.toLowerCase()} to reach the next grade`)}return{score:i,grade:s,factors:r,recommendations:n}}function te({history:t}){if(t.length<2)return null;const r=t[t.length-1].score,n=t[t.length-2].score,a=r-n;return a>2?e.jsxs("span",{className:"inline-flex items-center gap-0.5 text-success text-[11px] font-medium",children:[e.jsx(O,{size:11})," +",a]}):a<-2?e.jsxs("span",{className:"inline-flex items-center gap-0.5 text-danger text-[11px] font-medium",children:[e.jsx(H,{size:11})," ",a]}):e.jsxs("span",{className:"inline-flex items-center gap-0.5 text-muted text-[11px]",children:[e.jsx(Y,{size:11})," Stable"]})}function se({history:t}){if(t.length===0)return null;const r=100;return 100/t.length,e.jsx("div",{className:"flex items-end gap-0.5 h-8",children:t.map((n,a)=>{const d=n.score/r*100,l=y[n.grade]||y.C;return e.jsx("div",{className:`flex-1 rounded-t-sm transition-all duration-300 ${l.bg}`,style:{height:`${d}%`,minWidth:"4px"},title:`Build #${n.buildNumber}: ${n.grade} (${n.score})`},a)})})}function re(t){const[r,n]=u.useState(!1),{score:a,grade:d,factors:l,recommendations:m}=ee(t),i=y[d]||y.C,s=t.history||[];return t.badge?e.jsxs("div",{className:`inline-flex items-center gap-1.5 px-2.5 py-1 rounded-pill border text-xs font-bold ${i.color} ${i.bg} ${i.border}`,children:[e.jsx(D,{size:12}),d]}):e.jsxs("div",{className:"card overflow-hidden",children:[e.jsxs("button",{onClick:()=>n(!r),className:"w-full flex items-center justify-between px-4 py-3 hover:bg-hover/30 transition-colors",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:`flex items-center justify-center w-10 h-10 rounded-lg ${i.bg} ${i.border} border`,children:e.jsx("span",{className:`text-lg font-bold font-mono ${i.color}`,children:d})}),e.jsxs("div",{className:"text-left",children:[e.jsx("h3",{className:"text-sm font-semibold text-ink",children:"Project Health"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:"text-xs text-muted font-mono",children:[a,"/100"]}),s.length>=2&&e.jsx(te,{history:s})]})]})]}),e.jsx("span",{className:"text-muted",children:r?e.jsx(P,{size:16}):e.jsx(R,{size:16})})]}),r&&e.jsxs("div",{className:"px-4 pb-4 space-y-4",children:[e.jsx("div",{className:"space-y-3",children:l.map(o=>e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-1",children:[e.jsx("span",{className:"text-xs font-medium text-secondary",children:o.label}),e.jsxs("span",{className:`text-xs font-mono font-semibold ${o.score>=80?"text-success":o.score>=60?"text-warning":"text-danger"}`,children:[Math.round(o.score),"%"]})]}),e.jsx("div",{className:"w-full h-1.5 bg-border rounded-full overflow-hidden",children:e.jsx("div",{className:`h-full rounded-full transition-all duration-700 ease-out ${o.score>=80?"bg-success":o.score>=60?"bg-warning":"bg-danger"}`,style:{width:`${Math.min(o.score,100)}%`}})}),e.jsx("p",{className:"text-[11px] text-muted mt-0.5",children:o.description})]},o.label))}),s.length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"text-[11px] font-semibold text-muted uppercase tracking-wider mb-2",children:"Recent Builds"}),e.jsx(se,{history:s})]}),m.length>0&&e.jsxs("div",{className:"bg-primary/5 border border-primary/10 rounded-card p-3",children:[e.jsxs("div",{className:"flex items-center gap-1.5 mb-2",children:[e.jsx(I,{size:12,className:"text-primary"}),e.jsx("span",{className:"text-[11px] font-semibold text-primary uppercase tracking-wider",children:"Recommendations"})]}),e.jsx("ul",{className:"space-y-1",children:m.map((o,x)=>e.jsxs("li",{className:"text-xs text-secondary flex items-start gap-1.5",children:[e.jsx("span",{className:"text-primary mt-0.5 flex-shrink-0",children:"--"}),o]},x))})]})]})]})}function ne({onRefresh:t,threshold:r=80,enabled:n=!0}){const a=u.useRef(null),[d,l]=u.useState(!1),[m,i]=u.useState(!1),[s,o]=u.useState(0),x=u.useRef(0),f=u.useRef(!1),g=u.useCallback(p=>{if(!n||m)return;const h=a.current;h&&h.scrollTop<=0&&(x.current=p.touches[0].clientY,f.current=!0)},[n,m]),b=u.useCallback(p=>{if(!n||!f.current||m)return;const h=p.touches[0].clientY-x.current;if(h>0){const v=Math.min(h*.5,120);o(v),l(!0)}else f.current=!1,l(!1),o(0)},[n,m]),j=u.useCallback(async()=>{if(!(!n||!f.current))if(f.current=!1,s>=r){i(!0),o(0),l(!1);try{await t()}finally{i(!1)}}else o(0),l(!1)},[n,s,r,t]);return u.useEffect(()=>{const p=a.current;if(!(!p||!n))return p.addEventListener("touchstart",g,{passive:!0}),p.addEventListener("touchmove",b,{passive:!0}),p.addEventListener("touchend",j,{passive:!0}),()=>{p.removeEventListener("touchstart",g),p.removeEventListener("touchmove",b),p.removeEventListener("touchend",j)}},[n,g,b,j]),{ref:a,pulling:d,refreshing:m,pullDistance:s}}function le(t){const r=k(t);return r==="completed"?"completed":r==="running"?"running":r==="failed"?"failed":r==="started"?"started":"empty"}const ie={completed:"Completed",complete:"Completed",done:"Completed",completion_promise_fulfilled:"Completed",running:"Running",in_progress:"Running",planning:"Planning",started:"Started",error:"Failed",failed:"Failed",empty:"Empty"};function k(t){return{completion_promise_fulfilled:"completed",complete:"completed",done:"completed",in_progress:"running",planning:"running",error:"failed"}[t]||t}const ae=[{key:"all",label:"All"},{key:"running",label:"Running"},{key:"completed",label:"Completed"},{key:"failed",label:"Failed"}];function Ee(){const t=z(),[r,n]=u.useState(""),[a,d]=u.useState("all"),[l,m]=u.useState(null),[i,s]=u.useState(!1),[o,x]=u.useState(null),f=u.useCallback(()=>E.getSessionsHistory(),[]),{data:g,refresh:b}=q(f,15e3,!0),{ref:j,pulling:p,refreshing:h,pullDistance:v}=ne({onRefresh:async()=>{b()},enabled:!0}),w=u.useMemo(()=>{if(!g)return[];let c=g;if(a!=="all"&&(c=c.filter(N=>N.status===a)),r.trim()){const N=r.trim().toLowerCase();c=c.filter(T=>T.prd_snippet.toLowerCase().includes(N))}return c},[g,a,r]),B=c=>{navigator.clipboard.writeText(c),x("Path copied"),setTimeout(()=>x(null),2e3)},F=async()=>{if(l){s(!0);try{await E.deleteSession(l.id),m(null),x("Project deleted"),setTimeout(()=>x(null),3e3),b()}catch(c){x(`Delete failed: ${c instanceof Error?c.message:"Unknown error"}`),setTimeout(()=>x(null),5e3)}finally{s(!1)}}};return e.jsxs("div",{ref:j,className:"max-w-[1400px] mx-auto px-6 max-md:px-4 py-8 overflow-auto h-full",children:[(p||h)&&e.jsx("div",{className:"flex items-center justify-center py-3",children:h?e.jsx("div",{className:"ptr-spinner"}):e.jsx(G,{size:20,className:"text-[#553DE9] transition-transform",style:{transform:`rotate(${Math.min(v*3,360)}deg)`,opacity:Math.min(v/80,1)}})}),e.jsxs("div",{className:"flex items-center justify-between mb-6",children:[e.jsx("h1",{className:"font-heading text-h1 max-md:text-h2 text-[#36342E]",children:"Projects"}),e.jsx(C,{icon:S,onClick:()=>t("/"),children:"New Project"})]}),e.jsxs("div",{className:"flex items-center max-md:flex-col gap-4 max-md:gap-3 mb-6",children:[e.jsxs("div",{className:"relative flex-1 max-w-sm",children:[e.jsx(L,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[#6B6960]"}),e.jsx("input",{type:"text",placeholder:"Search projects...","aria-label":"Search projects",value:r,onChange:c=>n(c.target.value),className:"w-full pl-9 pr-3 py-2 text-sm border border-[#ECEAE3] rounded-[5px] bg-white text-[#36342E] placeholder:text-[#939084] focus:outline-none focus:ring-2 focus:ring-[#553DE9]/20 focus:border-[#553DE9]"})]}),e.jsx("div",{className:"flex items-center gap-1",role:"tablist",children:ae.map(c=>e.jsx("button",{role:"tab","aria-selected":a===c.key,onClick:()=>d(c.key),className:`px-3 py-1.5 text-xs font-semibold rounded-[3px] transition-colors ${a===c.key?"bg-[#553DE9] text-white":"text-[#6B6960] hover:text-[#36342E] hover:bg-[#F8F4F0]"}`,children:c.label},c.key))})]}),w.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center py-20 text-center",children:[e.jsx("p",{className:"text-[#6B6960] text-sm mb-4",children:"No projects yet. Start building."}),e.jsx(C,{icon:S,onClick:()=>t("/"),children:"New Project"})]}):e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:w.map(c=>e.jsx(oe,{session:c,onOpen:()=>t(`/project/${c.id}`),onDelete:()=>m(c),onCopyPath:()=>B(c.path)},c.id))}),l&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",children:e.jsxs("div",{className:"bg-white rounded-lg shadow-xl max-w-md w-full mx-4 p-6",children:[e.jsxs("h2",{className:"text-base font-semibold text-[#36342E] mb-2",children:["Delete ",l.prd_snippet||"Untitled project","?"]}),e.jsx("p",{className:"text-sm text-[#6B6960] mb-6",children:"This will remove all files, dependencies, and state. This cannot be undone."}),e.jsxs("div",{className:"flex items-center justify-end gap-3",children:[e.jsx("button",{onClick:()=>m(null),disabled:i,className:"px-4 py-2 text-sm font-medium text-[#6B6960] hover:text-[#36342E] rounded-[5px] hover:bg-[#F8F4F0] transition-colors disabled:opacity-50",children:"Cancel"}),e.jsx("button",{onClick:F,disabled:i,className:"px-4 py-2 text-sm font-medium text-white bg-red-600 hover:bg-red-700 rounded-[5px] transition-colors disabled:opacity-50",children:i?"Deleting...":"Delete"})]})]})}),o&&e.jsxs("div",{className:"fixed bottom-6 right-6 z-50 px-4 py-3 bg-[#36342E] text-white text-sm rounded-[5px] shadow-lg flex items-center gap-2",children:[o,e.jsx("button",{onClick:()=>x(null),className:"text-white/60 hover:text-white",children:e.jsx(M,{size:14})})]})]})}function oe({session:t,onOpen:r,onDelete:n,onCopyPath:a}){const[d,l]=u.useState(!1),m=u.useRef(null);u.useEffect(()=>{if(!d)return;const s=o=>{m.current&&!m.current.contains(o.target)&&l(!1)};return document.addEventListener("mousedown",s),()=>document.removeEventListener("mousedown",s)},[d]);const i=new Date(t.date).toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"});return e.jsxs(Z,{hover:!0,onClick:r,className:"relative",children:[e.jsxs("div",{className:"absolute top-2.5 right-2.5 z-10",ref:m,children:[e.jsx("button",{onClick:s=>{s.stopPropagation(),l(!d)},"aria-label":"Project options",className:"p-1 rounded-[3px] text-[#B8B5AD] hover:text-[#36342E] hover:bg-[#F8F4F0] transition-colors",children:e.jsx(X,{size:16})}),d&&e.jsxs("div",{className:"absolute right-0 top-8 w-44 bg-white border border-[#ECEAE3] rounded-[5px] shadow-lg py-1 z-20",children:[e.jsxs("button",{onClick:s=>{s.stopPropagation(),l(!1),r()},className:"flex items-center gap-2.5 w-full px-3 py-2 text-sm text-[#36342E] hover:bg-[#F8F4F0] transition-colors text-left",children:[e.jsx(K,{size:14,className:"text-[#6B6960]"}),"Open project"]}),e.jsxs("button",{onClick:s=>{s.stopPropagation(),l(!1),window.open(`${_}/project/${t.id}`,"_blank")},className:"flex items-center gap-2.5 w-full px-3 py-2 text-sm text-[#36342E] hover:bg-[#F8F4F0] transition-colors text-left",children:[e.jsx(A,{size:14,className:"text-[#6B6960]"}),"Open in new tab"]}),e.jsxs("button",{onClick:s=>{s.stopPropagation(),l(!1),a()},className:"flex items-center gap-2.5 w-full px-3 py-2 text-sm text-[#36342E] hover:bg-[#F8F4F0] transition-colors text-left",children:[e.jsx(Q,{size:14,className:"text-[#6B6960]"}),"Copy path"]}),e.jsx("div",{className:"border-t border-[#ECEAE3] my-1"}),e.jsxs("button",{onClick:s=>{s.stopPropagation(),l(!1),n()},className:"flex items-center gap-2.5 w-full px-3 py-2 text-sm text-red-600 hover:bg-red-50 transition-colors text-left",children:[e.jsx(V,{size:14}),"Delete project"]})]})]}),e.jsxs("div",{className:"flex items-center justify-between mb-2 pr-6",children:[e.jsx("span",{className:"text-xs text-[#6B6960]",children:i}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(re,{testCoverage:72,lintErrors:0,buildSuccessRate:k(t.status)==="completed"?1:.8,codeComplexity:25,badge:!0}),e.jsx(U,{status:le(t.status),children:ie[t.status]||t.status})]})]}),e.jsx("h3",{className:"text-sm font-medium text-[#36342E] line-clamp-2 mb-2",children:t.prd_snippet||"Untitled project"}),e.jsx("p",{className:"text-xs text-[#6B6960] truncate",children:t.path})]})}export{Ee as default};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import{c as tt,j as e,r as t,
|
|
1
|
+
import{c as tt,j as e,r as t,y as fe,a as se,z as st,Q as at,K as nt,I as ot,n as it,E as lt}from"./index-CM_b_EhP.js";import{E as rt,R as ct}from"./rotate-ccw-gwoXxDeE.js";import{H as dt}from"./hammer-DRbIQ4QU.js";import{C as ut}from"./cloud-Cn8nNuH2.js";import{L as xt}from"./loader-circle-Oq6NQhW2.js";import{C as mt}from"./check-nIAqa-kf.js";import{C as pt}from"./circle-alert-CpL4Bhvt.js";/**
|
|
2
2
|
* @license lucide-react v0.577.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 ft=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],ht=tt("code",ft);function j({label:n,description:r,value:l,onChange:f,disabled:x=!1}){const b=`toggle-${n.replace(/\s+/g,"-").toLowerCase()}`;return e.jsxs("div",{className:"flex items-center justify-between py-3",children:[e.jsxs("div",{className:"flex-1 mr-4",children:[e.jsx("label",{htmlFor:b,className:"text-sm font-medium text-[#36342E] cursor-pointer",children:n}),r&&e.jsx("p",{className:"text-xs text-[#6B6960] mt-0.5",children:r})]}),e.jsx("button",{id:b,type:"button",role:"switch","aria-checked":l,"aria-label":n,disabled:x,onClick:()=>f(!l),className:["relative inline-flex h-6 w-11 flex-shrink-0 rounded-full border-2 border-transparent transition-colors duration-200 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[#553DE9]",l?"bg-[#553DE9]":"bg-[#ECEAE3]",x?"opacity-50 cursor-not-allowed":"cursor-pointer"].filter(Boolean).join(" "),children:e.jsx("span",{"aria-hidden":"true",className:["pointer-events-none inline-block h-5 w-5 rounded-full bg-white shadow-sm transform transition-transform duration-200",l?"translate-x-5":"translate-x-0"].join(" ")})})]})}function p({label:n,description:r,options:l,value:f,onChange:x,disabled:b=!1}){const g=`select-${n.replace(/\s+/g,"-").toLowerCase()}`;return e.jsxs("div",{className:"flex items-center justify-between py-3",children:[e.jsxs("div",{className:"flex-1 mr-4",children:[e.jsx("label",{htmlFor:g,className:"text-sm font-medium text-[#36342E]",children:n}),r&&e.jsx("p",{className:"text-xs text-[#6B6960] mt-0.5",children:r})]}),e.jsx("select",{id:g,value:f,onChange:m=>x(m.target.value),disabled:b,"aria-label":n,className:["px-3 py-1.5 text-sm border border-[#ECEAE3] rounded-lg bg-white text-[#36342E] focus:border-[#553DE9] focus:outline-none focus:ring-1 focus:ring-[#553DE9] min-w-[140px]",b?"opacity-50 cursor-not-allowed":"cursor-pointer"].filter(Boolean).join(" "),children:l.map(m=>e.jsx("option",{value:m.value,children:m.label},m.value))})]})}function ue({label:n,description:r,min:l,max:f,value:x,onChange:b,step:g=1,unit:m="",disabled:E=!1}){const S=`slider-${n.replace(/\s+/g,"-").toLowerCase()}`,y=(x-l)/(f-l)*100;return e.jsxs("div",{className:"py-3",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:S,className:"text-sm font-medium text-[#36342E]",children:n}),r&&e.jsx("p",{className:"text-xs text-[#6B6960] mt-0.5",children:r})]}),e.jsxs("span",{className:"text-sm font-mono text-[#553DE9] min-w-[48px] text-right",children:[x,m]})]}),e.jsx("input",{id:S,type:"range",min:l,max:f,step:g,value:x,onChange:A=>b(Number(A.target.value)),disabled:E,"aria-label":n,"aria-valuemin":l,"aria-valuemax":f,"aria-valuenow":x,className:"w-full h-2 rounded-full appearance-none cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",style:{background:`linear-gradient(to right, #553DE9 0%, #553DE9 ${y}%, #ECEAE3 ${y}%, #ECEAE3 100%)`}}),e.jsxs("div",{className:"flex justify-between mt-1",children:[e.jsxs("span",{className:"text-[11px] text-[#939084]",children:[l,m]}),e.jsxs("span",{className:"text-[11px] text-[#939084]",children:[f,m]})]})]})}function ae({label:n,description:r,type:l="text",value:f,onChange:x,placeholder:b,disabled:g=!1}){const m=`input-${n.replace(/\s+/g,"-").toLowerCase()}`,[E,S]=t.useState(!1),y=l==="password",A=y&&E?"text":l;return e.jsxs("div",{className:"py-3",children:[e.jsxs("div",{className:"mb-1.5",children:[e.jsx("label",{htmlFor:m,className:"text-sm font-medium text-[#36342E]",children:n}),r&&e.jsx("p",{className:"text-xs text-[#6B6960] mt-0.5",children:r})]}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{id:m,type:A,value:f,onChange:C=>x(C.target.value),placeholder:b,disabled:g,"aria-label":n,className:["w-full px-3 py-2 text-sm border border-[#ECEAE3] rounded-lg bg-white text-[#36342E] focus:border-[#553DE9] focus:outline-none focus:ring-1 focus:ring-[#553DE9] placeholder:text-[#939084]",y&&"pr-10",g?"opacity-50 cursor-not-allowed":""].filter(Boolean).join(" ")}),y&&e.jsx("button",{type:"button",onClick:()=>S(!E),className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-[#939084] hover:text-[#36342E] transition-colors","aria-label":E?"Hide password":"Show password",children:E?e.jsx(rt,{size:16}):e.jsx(fe,{size:16})})]})]})}function bt({label:n,className:r=""}){return n?e.jsxs("div",{className:`flex items-center gap-3 ${r}`,children:[e.jsx("span",{className:"flex-1 border-t border-[#ECEAE3] dark:border-[#2A2A30]"}),e.jsx("span",{className:"text-xs text-muted font-medium",children:n}),e.jsx("span",{className:"flex-1 border-t border-[#ECEAE3] dark:border-[#2A2A30]"})]}):e.jsx("hr",{className:`border-t border-[#ECEAE3] dark:border-[#2A2A30] ${r}`})}const he="pl_settings_";function o(n,r){try{const l=localStorage.getItem(`${he}${n}`);return l===null?r:JSON.parse(l)}catch{return r}}function i(n,r){try{localStorage.setItem(`${he}${n}`,JSON.stringify(r))}catch{}}const xe=[{id:"general",label:"General",icon:st},{id:"appearance",label:"Appearance",icon:at},{id:"editor",label:"Editor",icon:ht},{id:"build",label:"Build",icon:dt},{id:"providers",label:"Providers",icon:ut},{id:"shortcuts",label:"Keyboard Shortcuts",icon:nt},{id:"accessibility",label:"Accessibility",icon:fe},{id:"about",label:"About",icon:ot}],me=[{id:"claude",name:"Claude",description:"Anthropic Claude Code -- full features",models:["claude-sonnet-4-20250514","claude-opus-4-20250514","claude-haiku-4-20250514"],defaultModel:"claude-sonnet-4-20250514"},{id:"codex",name:"Codex",description:"OpenAI Codex CLI -- degraded mode",models:["gpt-5.3-codex","o3","o4-mini"],defaultModel:"gpt-5.3-codex"},{id:"gemini",name:"Gemini",description:"Google Gemini CLI -- degraded mode",models:["gemini-3-pro-medium","gemini-2.5-flash","gemini-2.5-pro"],defaultModel:"gemini-3-pro-medium"},{id:"cline",name:"Cline",description:"VS Code extension -- sequential mode",models:["claude-sonnet-4-20250514","gpt-4.1"],defaultModel:"claude-sonnet-4-20250514"},{id:"aider",name:"Aider",description:"Terminal-based pair programming",models:["claude-sonnet-4-20250514","gpt-4.1","ollama_chat/deepseek-coder"],defaultModel:"claude-sonnet-4-20250514"}],gt=typeof navigator<"u"&&/Mac/.test(navigator.userAgent),v=gt?"Cmd":"Ctrl",pe=[{action:"Save file",keys:`${v}+S`,category:"File"},{action:"Quick open file",keys:`${v}+P`,category:"File"},{action:"Command palette",keys:`${v}+K`,category:"Navigation"},{action:"Toggle terminal",keys:`${v}+\``,category:"Navigation"},{action:"Start / stop build",keys:`${v}+B`,category:"Build"},{action:"Show keyboard shortcuts",keys:`${v}+?`,category:"Help"},{action:"Close modals",keys:"Escape",category:"Navigation"},{action:"Focus search",keys:`${v}+F`,category:"Navigation"},{action:"Toggle sidebar",keys:`${v}+\\`,category:"Navigation"},{action:"New project",keys:`${v}+N`,category:"File"},{action:"Go to settings",keys:`${v}+,`,category:"Navigation"}];function d({children:n}){return e.jsx("h3",{className:"text-xs font-semibold uppercase tracking-wider text-[#939084] mb-3 mt-6 first:mt-0",children:n})}function h(){return e.jsx(bt,{className:"my-1"})}function wt(){var de;const[n,r]=t.useState("general"),[l,f]=t.useState(()=>o("projectDir","~/projects")),[x,b]=t.useState(()=>o("autoSave",!0)),[g,m]=t.useState(()=>o("autoSaveInterval","15")),[E,S]=t.useState(()=>o("language","en")),[y,A]=t.useState(()=>o("telemetry",!1)),[C,be]=t.useState(()=>{const a=localStorage.getItem("pl_theme");return a==="light"||a==="dark"?a:"system"}),[B,ge]=t.useState(()=>o("accentColor","purple")),[M,je]=t.useState(()=>o("fontSize","medium")),[T,ve]=t.useState(()=>o("sidebarPosition","left")),[H,Ee]=t.useState(()=>o("compactMode",!1)),[G,ye]=t.useState(()=>o("animationLevel","full")),[I,Ce]=t.useState(()=>o("editorFont","JetBrains Mono")),[$,Ne]=t.useState(()=>o("editorFontSize",14)),[O,Se]=t.useState(()=>o("tabSize","2")),[_,we]=t.useState(()=>o("wordWrap",!0)),[V,Ae]=t.useState(()=>o("lineNumbers",!0)),[K,ke]=t.useState(()=>o("minimap",!0)),[W,Fe]=t.useState(()=>o("bracketMatching",!0)),[q,Pe]=t.useState(()=>o("defaultProvider","claude")),[U,De]=t.useState(()=>o("maxIterations",25)),[J,Le]=t.useState(()=>o("qualityStrictness","standard")),[Q,Be]=t.useState(()=>o("autoDeploy",!1)),[X,Me]=t.useState(()=>o("budgetLimit","")),[Y,Ie]=t.useState(()=>o("buildNotifications",!0)),[Z,$e]=t.useState(()=>o("providerKeys",{})),[ee,ze]=t.useState(()=>o("providerModels",{})),[z,Re]=t.useState(()=>o("providerPriority",["claude","codex","gemini","cline","aider"])),[ne,oe]=t.useState(null),[ie,R]=t.useState({}),[k,Te]=t.useState(()=>o("highContrast",!1)),[F,He]=t.useState(()=>o("focusIndicator","default")),[w,Ge]=t.useState(()=>o("motionPref","full")),[te,Oe]=t.useState(()=>o("screenReaderAnnouncements",!0)),[P,_e]=t.useState(()=>o("fontScaling","100")),[le,Ve]=t.useState(""),[D,re]=t.useState("");t.useEffect(()=>{i("projectDir",l)},[l]),t.useEffect(()=>{i("autoSave",x)},[x]),t.useEffect(()=>{i("autoSaveInterval",g)},[g]),t.useEffect(()=>{i("language",E)},[E]),t.useEffect(()=>{i("telemetry",y)},[y]),t.useEffect(()=>{if(C==="system"){const a=window.matchMedia("(prefers-color-scheme: dark)").matches;document.documentElement.classList.toggle("dark",a),localStorage.removeItem("pl_theme")}else document.documentElement.classList.toggle("dark",C==="dark"),localStorage.setItem("pl_theme",C)},[C]),t.useEffect(()=>{i("accentColor",B)},[B]),t.useEffect(()=>{i("fontSize",M)},[M]),t.useEffect(()=>{i("sidebarPosition",T)},[T]),t.useEffect(()=>{i("compactMode",H)},[H]),t.useEffect(()=>{i("animationLevel",G)},[G]),t.useEffect(()=>{i("editorFont",I)},[I]),t.useEffect(()=>{i("editorFontSize",$)},[$]),t.useEffect(()=>{i("tabSize",O)},[O]),t.useEffect(()=>{i("wordWrap",_)},[_]),t.useEffect(()=>{i("lineNumbers",V)},[V]),t.useEffect(()=>{i("minimap",K)},[K]),t.useEffect(()=>{i("bracketMatching",W)},[W]),t.useEffect(()=>{i("defaultProvider",q)},[q]),t.useEffect(()=>{i("maxIterations",U)},[U]),t.useEffect(()=>{i("qualityStrictness",J)},[J]),t.useEffect(()=>{i("autoDeploy",Q)},[Q]),t.useEffect(()=>{i("budgetLimit",X)},[X]),t.useEffect(()=>{i("buildNotifications",Y)},[Y]),t.useEffect(()=>{i("providerKeys",Z)},[Z]),t.useEffect(()=>{i("providerModels",ee)},[ee]),t.useEffect(()=>{i("providerPriority",z)},[z]),t.useEffect(()=>{i("highContrast",k)},[k]),t.useEffect(()=>{i("focusIndicator",F)},[F]),t.useEffect(()=>{i("motionPref",w)},[w]),t.useEffect(()=>{i("screenReaderAnnouncements",te)},[te]),t.useEffect(()=>{i("fontScaling",P)},[P]),t.useEffect(()=>{const a=parseInt(P,10);return document.documentElement.style.fontSize=`${15*a/100}px`,()=>{document.documentElement.style.fontSize=""}},[P]),t.useEffect(()=>{document.documentElement.classList.toggle("high-contrast",k)},[k]),t.useEffect(()=>{document.documentElement.classList.toggle("reduce-motion",w==="reduced"),document.documentElement.classList.toggle("no-motion",w==="none")},[w]),t.useEffect(()=>{document.documentElement.classList.toggle("enhanced-focus",F==="enhanced")},[F]),t.useEffect(()=>{se.getStatus().then(a=>Ve(a.version||"")).catch(()=>{})},[]);const Ke=t.useCallback(async a=>{oe(a),R(u=>{const s={...u};return delete s[a],s});try{await se.setProvider(a),(await se.getCurrentProvider()).provider===a?R(s=>({...s,[a]:"success"})):R(s=>({...s,[a]:"error"}))}catch{R(u=>({...u,[a]:"error"}))}finally{oe(null)}},[]),ce=t.useCallback((a,u)=>{Re(s=>{const c=s.indexOf(a);if(c===-1)return s;const N=u==="up"?c-1:c+1;if(N<0||N>=s.length)return s;const L=[...s];return[L[c],L[N]]=[L[N],L[c]],L})},[]);function We(){switch(n){case"general":return e.jsx(qe,{});case"appearance":return e.jsx(Ue,{});case"editor":return e.jsx(Je,{});case"build":return e.jsx(Qe,{});case"providers":return e.jsx(Xe,{});case"shortcuts":return e.jsx(Ye,{});case"accessibility":return e.jsx(Ze,{});case"about":return e.jsx(et,{});default:return null}}function qe(){return e.jsxs("div",{children:[e.jsx(d,{children:"Project"}),e.jsx(ae,{label:"Default project directory",description:"New projects will be created in this directory",value:l,onChange:f,placeholder:"~/projects"}),e.jsx(h,{}),e.jsx(d,{children:"Saving"}),e.jsx(j,{label:"Auto-save",description:"Automatically save files when modified",value:x,onChange:b}),e.jsx(p,{label:"Auto-save interval",description:"How often to auto-save open files",options:[{value:"5",label:"5 seconds"},{value:"15",label:"15 seconds"},{value:"30",label:"30 seconds"},{value:"60",label:"60 seconds"}],value:g,onChange:m,disabled:!x}),e.jsx(h,{}),e.jsx(d,{children:"Preferences"}),e.jsx(p,{label:"Language",description:"Interface language",options:[{value:"en",label:"English"}],value:E,onChange:S}),e.jsx(j,{label:"Telemetry",description:"Help improve Purple Lab by sending anonymous usage data",value:y,onChange:A})]})}function Ue(){const a=[{id:"purple",color:"#553DE9",label:"Purple"},{id:"blue",color:"#2563EB",label:"Blue"},{id:"green",color:"#059669",label:"Green"},{id:"orange",color:"#D97706",label:"Orange"},{id:"pink",color:"#DB2777",label:"Pink"}],u={small:"text-xs",medium:"text-sm",large:"text-base"};return e.jsxs("div",{children:[e.jsx(d,{children:"Theme"}),e.jsxs("div",{className:"py-3",children:[e.jsx("label",{className:"text-sm font-medium text-[#36342E] block mb-3",children:"Color theme"}),e.jsx("div",{className:"flex gap-3",children:["light","dark","system"].map(s=>e.jsxs("button",{type:"button",onClick:()=>be(s),className:["flex-1 flex flex-col items-center gap-2 p-3 rounded-lg border-2 transition-colors",C===s?"border-[#553DE9] bg-[#553DE9]/5":"border-[#ECEAE3] hover:border-[#553DE9]/30"].join(" "),"aria-pressed":C===s,children:[e.jsxs("div",{className:["w-full h-12 rounded border flex items-end px-1.5 pb-1.5 gap-1",s==="dark"?"bg-[#1A1A1E] border-[#2A2A30]":s==="light"?"bg-white border-[#ECEAE3]":"bg-gradient-to-r from-white to-[#1A1A1E] border-[#ECEAE3]"].join(" "),children:[e.jsx("div",{className:`w-2 h-4 rounded-sm ${s==="dark"?"bg-[#2A2A30]":"bg-[#ECEAE3]"}`}),e.jsx("div",{className:`w-4 h-3 rounded-sm ${s==="dark"?"bg-[#2A2A30]":"bg-[#ECEAE3]"}`}),e.jsx("div",{className:`w-3 h-5 rounded-sm ${s==="dark"?"bg-[#2A2A30]":"bg-[#ECEAE3]"}`})]}),e.jsx("span",{className:"text-xs font-medium text-[#36342E] capitalize",children:s})]},s))})]}),e.jsx(h,{}),e.jsx(d,{children:"Accent color"}),e.jsx("div",{className:"py-3",children:e.jsx("div",{className:"flex gap-3",children:a.map(s=>e.jsxs("button",{type:"button",onClick:()=>ge(s.id),className:"flex flex-col items-center gap-1.5 group","aria-label":s.label,"aria-pressed":B===s.id,children:[e.jsx("div",{className:["w-8 h-8 rounded-full transition-all",B===s.id?"ring-2 ring-offset-2 ring-[#553DE9] scale-110":"group-hover:scale-105"].join(" "),style:{backgroundColor:s.color}}),e.jsx("span",{className:"text-[11px] text-[#6B6960]",children:s.label})]},s.id))})}),e.jsx(h,{}),e.jsx(d,{children:"Layout"}),e.jsx(p,{label:"Font size",description:"Base font size for the interface",options:[{value:"small",label:"Small"},{value:"medium",label:"Medium"},{value:"large",label:"Large"}],value:M,onChange:je}),e.jsx("div",{className:"pl-4 pb-2",children:e.jsx("span",{className:`${u[M]} text-[#6B6960] italic`,children:"The quick brown fox jumps over the lazy dog."})}),e.jsx(p,{label:"Sidebar position",description:"Which side the navigation sidebar appears on",options:[{value:"left",label:"Left"},{value:"right",label:"Right"}],value:T,onChange:ve}),e.jsx(j,{label:"Compact mode",description:"Reduce padding and spacing throughout the interface",value:H,onChange:Ee}),e.jsx(p,{label:"Animations",description:"Control interface transition animations",options:[{value:"full",label:"Full"},{value:"reduced",label:"Reduced"},{value:"none",label:"None"}],value:G,onChange:ye})]})}function Je(){return e.jsxs("div",{children:[e.jsx(d,{children:"Font"}),e.jsx(p,{label:"Font family",description:"Font used in the code editor",options:[{value:"JetBrains Mono",label:"JetBrains Mono"},{value:"Fira Code",label:"Fira Code"},{value:"Source Code Pro",label:"Source Code Pro"},{value:"Consolas",label:"Consolas"}],value:I,onChange:Ce}),e.jsx(ue,{label:"Font size",description:"Size of text in the code editor",min:12,max:24,value:$,onChange:Ne,unit:"px"}),e.jsxs("div",{className:"my-3 rounded-lg border border-[#ECEAE3] overflow-hidden",children:[e.jsx("div",{className:"bg-[#FAF9F6] px-3 py-1.5 border-b border-[#ECEAE3]",children:e.jsx("span",{className:"text-[11px] text-[#939084]",children:"Preview"})}),e.jsx("div",{className:"bg-white p-4",children:e.jsx("pre",{className:"text-[#36342E] leading-relaxed",style:{fontFamily:`"${I}", monospace`,fontSize:`${$}px`},children:`function greet(name) {
|
|
6
|
+
*/const ft=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],ht=tt("code",ft);function j({label:n,description:r,value:l,onChange:f,disabled:x=!1}){const b=`toggle-${n.replace(/\s+/g,"-").toLowerCase()}`;return e.jsxs("div",{className:"flex items-center justify-between py-3",children:[e.jsxs("div",{className:"flex-1 mr-4",children:[e.jsx("label",{htmlFor:b,className:"text-sm font-medium text-[#36342E] cursor-pointer",children:n}),r&&e.jsx("p",{className:"text-xs text-[#6B6960] mt-0.5",children:r})]}),e.jsx("button",{id:b,type:"button",role:"switch","aria-checked":l,"aria-label":n,disabled:x,onClick:()=>f(!l),className:["relative inline-flex h-6 w-11 flex-shrink-0 rounded-full border-2 border-transparent transition-colors duration-200 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[#553DE9]",l?"bg-[#553DE9]":"bg-[#ECEAE3]",x?"opacity-50 cursor-not-allowed":"cursor-pointer"].filter(Boolean).join(" "),children:e.jsx("span",{"aria-hidden":"true",className:["pointer-events-none inline-block h-5 w-5 rounded-full bg-white shadow-sm transform transition-transform duration-200",l?"translate-x-5":"translate-x-0"].join(" ")})})]})}function p({label:n,description:r,options:l,value:f,onChange:x,disabled:b=!1}){const g=`select-${n.replace(/\s+/g,"-").toLowerCase()}`;return e.jsxs("div",{className:"flex items-center justify-between py-3",children:[e.jsxs("div",{className:"flex-1 mr-4",children:[e.jsx("label",{htmlFor:g,className:"text-sm font-medium text-[#36342E]",children:n}),r&&e.jsx("p",{className:"text-xs text-[#6B6960] mt-0.5",children:r})]}),e.jsx("select",{id:g,value:f,onChange:m=>x(m.target.value),disabled:b,"aria-label":n,className:["px-3 py-1.5 text-sm border border-[#ECEAE3] rounded-lg bg-white text-[#36342E] focus:border-[#553DE9] focus:outline-none focus:ring-1 focus:ring-[#553DE9] min-w-[140px]",b?"opacity-50 cursor-not-allowed":"cursor-pointer"].filter(Boolean).join(" "),children:l.map(m=>e.jsx("option",{value:m.value,children:m.label},m.value))})]})}function ue({label:n,description:r,min:l,max:f,value:x,onChange:b,step:g=1,unit:m="",disabled:E=!1}){const S=`slider-${n.replace(/\s+/g,"-").toLowerCase()}`,y=(x-l)/(f-l)*100;return e.jsxs("div",{className:"py-3",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:S,className:"text-sm font-medium text-[#36342E]",children:n}),r&&e.jsx("p",{className:"text-xs text-[#6B6960] mt-0.5",children:r})]}),e.jsxs("span",{className:"text-sm font-mono text-[#553DE9] min-w-[48px] text-right",children:[x,m]})]}),e.jsx("input",{id:S,type:"range",min:l,max:f,step:g,value:x,onChange:A=>b(Number(A.target.value)),disabled:E,"aria-label":n,"aria-valuemin":l,"aria-valuemax":f,"aria-valuenow":x,className:"w-full h-2 rounded-full appearance-none cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",style:{background:`linear-gradient(to right, #553DE9 0%, #553DE9 ${y}%, #ECEAE3 ${y}%, #ECEAE3 100%)`}}),e.jsxs("div",{className:"flex justify-between mt-1",children:[e.jsxs("span",{className:"text-[11px] text-[#939084]",children:[l,m]}),e.jsxs("span",{className:"text-[11px] text-[#939084]",children:[f,m]})]})]})}function ae({label:n,description:r,type:l="text",value:f,onChange:x,placeholder:b,disabled:g=!1}){const m=`input-${n.replace(/\s+/g,"-").toLowerCase()}`,[E,S]=t.useState(!1),y=l==="password",A=y&&E?"text":l;return e.jsxs("div",{className:"py-3",children:[e.jsxs("div",{className:"mb-1.5",children:[e.jsx("label",{htmlFor:m,className:"text-sm font-medium text-[#36342E]",children:n}),r&&e.jsx("p",{className:"text-xs text-[#6B6960] mt-0.5",children:r})]}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{id:m,type:A,value:f,onChange:C=>x(C.target.value),placeholder:b,disabled:g,"aria-label":n,className:["w-full px-3 py-2 text-sm border border-[#ECEAE3] rounded-lg bg-white text-[#36342E] focus:border-[#553DE9] focus:outline-none focus:ring-1 focus:ring-[#553DE9] placeholder:text-[#939084]",y&&"pr-10",g?"opacity-50 cursor-not-allowed":""].filter(Boolean).join(" ")}),y&&e.jsx("button",{type:"button",onClick:()=>S(!E),className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-[#939084] hover:text-[#36342E] transition-colors","aria-label":E?"Hide password":"Show password",children:E?e.jsx(rt,{size:16}):e.jsx(fe,{size:16})})]})]})}function bt({label:n,className:r=""}){return n?e.jsxs("div",{className:`flex items-center gap-3 ${r}`,children:[e.jsx("span",{className:"flex-1 border-t border-[#ECEAE3] dark:border-[#2A2A30]"}),e.jsx("span",{className:"text-xs text-muted font-medium",children:n}),e.jsx("span",{className:"flex-1 border-t border-[#ECEAE3] dark:border-[#2A2A30]"})]}):e.jsx("hr",{className:`border-t border-[#ECEAE3] dark:border-[#2A2A30] ${r}`})}const he="pl_settings_";function o(n,r){try{const l=localStorage.getItem(`${he}${n}`);return l===null?r:JSON.parse(l)}catch{return r}}function i(n,r){try{localStorage.setItem(`${he}${n}`,JSON.stringify(r))}catch{}}const xe=[{id:"general",label:"General",icon:st},{id:"appearance",label:"Appearance",icon:at},{id:"editor",label:"Editor",icon:ht},{id:"build",label:"Build",icon:dt},{id:"providers",label:"Providers",icon:ut},{id:"shortcuts",label:"Keyboard Shortcuts",icon:nt},{id:"accessibility",label:"Accessibility",icon:fe},{id:"about",label:"About",icon:ot}],me=[{id:"claude",name:"Claude",description:"Anthropic Claude Code -- full features (Opus 4.7 default, 1M context)",models:["claude-opus-4-7","claude-sonnet-4-6","claude-haiku-4-5-20251001"],defaultModel:"claude-opus-4-7"},{id:"codex",name:"Codex",description:"OpenAI Codex CLI -- degraded mode",models:["gpt-5.3-codex","o3","o4-mini"],defaultModel:"gpt-5.3-codex"},{id:"gemini",name:"Gemini",description:"Google Gemini CLI -- degraded mode",models:["gemini-3-pro-medium","gemini-2.5-flash","gemini-2.5-pro"],defaultModel:"gemini-3-pro-medium"},{id:"cline",name:"Cline",description:"VS Code extension -- sequential mode",models:["claude-opus-4-7","claude-sonnet-4-6","gpt-4.1"],defaultModel:"claude-opus-4-7"},{id:"aider",name:"Aider",description:"Terminal-based pair programming",models:["claude-opus-4-7","claude-sonnet-4-6","gpt-4.1","ollama_chat/deepseek-coder"],defaultModel:"claude-opus-4-7"}],gt=typeof navigator<"u"&&/Mac/.test(navigator.userAgent),v=gt?"Cmd":"Ctrl",pe=[{action:"Save file",keys:`${v}+S`,category:"File"},{action:"Quick open file",keys:`${v}+P`,category:"File"},{action:"Command palette",keys:`${v}+K`,category:"Navigation"},{action:"Toggle terminal",keys:`${v}+\``,category:"Navigation"},{action:"Start / stop build",keys:`${v}+B`,category:"Build"},{action:"Show keyboard shortcuts",keys:`${v}+?`,category:"Help"},{action:"Close modals",keys:"Escape",category:"Navigation"},{action:"Focus search",keys:`${v}+F`,category:"Navigation"},{action:"Toggle sidebar",keys:`${v}+\\`,category:"Navigation"},{action:"New project",keys:`${v}+N`,category:"File"},{action:"Go to settings",keys:`${v}+,`,category:"Navigation"}];function d({children:n}){return e.jsx("h3",{className:"text-xs font-semibold uppercase tracking-wider text-[#939084] mb-3 mt-6 first:mt-0",children:n})}function h(){return e.jsx(bt,{className:"my-1"})}function wt(){var de;const[n,r]=t.useState("general"),[l,f]=t.useState(()=>o("projectDir","~/projects")),[x,b]=t.useState(()=>o("autoSave",!0)),[g,m]=t.useState(()=>o("autoSaveInterval","15")),[E,S]=t.useState(()=>o("language","en")),[y,A]=t.useState(()=>o("telemetry",!1)),[C,be]=t.useState(()=>{const a=localStorage.getItem("pl_theme");return a==="light"||a==="dark"?a:"system"}),[M,ge]=t.useState(()=>o("accentColor","purple")),[B,je]=t.useState(()=>o("fontSize","medium")),[T,ve]=t.useState(()=>o("sidebarPosition","left")),[H,Ee]=t.useState(()=>o("compactMode",!1)),[G,ye]=t.useState(()=>o("animationLevel","full")),[I,Ce]=t.useState(()=>o("editorFont","JetBrains Mono")),[z,Ne]=t.useState(()=>o("editorFontSize",14)),[O,Se]=t.useState(()=>o("tabSize","2")),[_,we]=t.useState(()=>o("wordWrap",!0)),[V,Ae]=t.useState(()=>o("lineNumbers",!0)),[K,ke]=t.useState(()=>o("minimap",!0)),[W,Fe]=t.useState(()=>o("bracketMatching",!0)),[q,Pe]=t.useState(()=>o("defaultProvider","claude")),[U,De]=t.useState(()=>o("maxIterations",25)),[J,Le]=t.useState(()=>o("qualityStrictness","standard")),[Q,Me]=t.useState(()=>o("autoDeploy",!1)),[X,Be]=t.useState(()=>o("budgetLimit","")),[Y,Ie]=t.useState(()=>o("buildNotifications",!0)),[Z,ze]=t.useState(()=>o("providerKeys",{})),[ee,$e]=t.useState(()=>o("providerModels",{})),[$,Re]=t.useState(()=>o("providerPriority",["claude","codex","gemini","cline","aider"])),[ne,oe]=t.useState(null),[ie,R]=t.useState({}),[k,Te]=t.useState(()=>o("highContrast",!1)),[F,He]=t.useState(()=>o("focusIndicator","default")),[w,Ge]=t.useState(()=>o("motionPref","full")),[te,Oe]=t.useState(()=>o("screenReaderAnnouncements",!0)),[P,_e]=t.useState(()=>o("fontScaling","100")),[le,Ve]=t.useState(""),[D,re]=t.useState("");t.useEffect(()=>{i("projectDir",l)},[l]),t.useEffect(()=>{i("autoSave",x)},[x]),t.useEffect(()=>{i("autoSaveInterval",g)},[g]),t.useEffect(()=>{i("language",E)},[E]),t.useEffect(()=>{i("telemetry",y)},[y]),t.useEffect(()=>{if(C==="system"){const a=window.matchMedia("(prefers-color-scheme: dark)").matches;document.documentElement.classList.toggle("dark",a),localStorage.removeItem("pl_theme")}else document.documentElement.classList.toggle("dark",C==="dark"),localStorage.setItem("pl_theme",C)},[C]),t.useEffect(()=>{i("accentColor",M)},[M]),t.useEffect(()=>{i("fontSize",B)},[B]),t.useEffect(()=>{i("sidebarPosition",T)},[T]),t.useEffect(()=>{i("compactMode",H)},[H]),t.useEffect(()=>{i("animationLevel",G)},[G]),t.useEffect(()=>{i("editorFont",I)},[I]),t.useEffect(()=>{i("editorFontSize",z)},[z]),t.useEffect(()=>{i("tabSize",O)},[O]),t.useEffect(()=>{i("wordWrap",_)},[_]),t.useEffect(()=>{i("lineNumbers",V)},[V]),t.useEffect(()=>{i("minimap",K)},[K]),t.useEffect(()=>{i("bracketMatching",W)},[W]),t.useEffect(()=>{i("defaultProvider",q)},[q]),t.useEffect(()=>{i("maxIterations",U)},[U]),t.useEffect(()=>{i("qualityStrictness",J)},[J]),t.useEffect(()=>{i("autoDeploy",Q)},[Q]),t.useEffect(()=>{i("budgetLimit",X)},[X]),t.useEffect(()=>{i("buildNotifications",Y)},[Y]),t.useEffect(()=>{i("providerKeys",Z)},[Z]),t.useEffect(()=>{i("providerModels",ee)},[ee]),t.useEffect(()=>{i("providerPriority",$)},[$]),t.useEffect(()=>{i("highContrast",k)},[k]),t.useEffect(()=>{i("focusIndicator",F)},[F]),t.useEffect(()=>{i("motionPref",w)},[w]),t.useEffect(()=>{i("screenReaderAnnouncements",te)},[te]),t.useEffect(()=>{i("fontScaling",P)},[P]),t.useEffect(()=>{const a=parseInt(P,10);return document.documentElement.style.fontSize=`${15*a/100}px`,()=>{document.documentElement.style.fontSize=""}},[P]),t.useEffect(()=>{document.documentElement.classList.toggle("high-contrast",k)},[k]),t.useEffect(()=>{document.documentElement.classList.toggle("reduce-motion",w==="reduced"),document.documentElement.classList.toggle("no-motion",w==="none")},[w]),t.useEffect(()=>{document.documentElement.classList.toggle("enhanced-focus",F==="enhanced")},[F]),t.useEffect(()=>{se.getStatus().then(a=>Ve(a.version||"")).catch(()=>{})},[]);const Ke=t.useCallback(async a=>{oe(a),R(u=>{const s={...u};return delete s[a],s});try{await se.setProvider(a),(await se.getCurrentProvider()).provider===a?R(s=>({...s,[a]:"success"})):R(s=>({...s,[a]:"error"}))}catch{R(u=>({...u,[a]:"error"}))}finally{oe(null)}},[]),ce=t.useCallback((a,u)=>{Re(s=>{const c=s.indexOf(a);if(c===-1)return s;const N=u==="up"?c-1:c+1;if(N<0||N>=s.length)return s;const L=[...s];return[L[c],L[N]]=[L[N],L[c]],L})},[]);function We(){switch(n){case"general":return e.jsx(qe,{});case"appearance":return e.jsx(Ue,{});case"editor":return e.jsx(Je,{});case"build":return e.jsx(Qe,{});case"providers":return e.jsx(Xe,{});case"shortcuts":return e.jsx(Ye,{});case"accessibility":return e.jsx(Ze,{});case"about":return e.jsx(et,{});default:return null}}function qe(){return e.jsxs("div",{children:[e.jsx(d,{children:"Project"}),e.jsx(ae,{label:"Default project directory",description:"New projects will be created in this directory",value:l,onChange:f,placeholder:"~/projects"}),e.jsx(h,{}),e.jsx(d,{children:"Saving"}),e.jsx(j,{label:"Auto-save",description:"Automatically save files when modified",value:x,onChange:b}),e.jsx(p,{label:"Auto-save interval",description:"How often to auto-save open files",options:[{value:"5",label:"5 seconds"},{value:"15",label:"15 seconds"},{value:"30",label:"30 seconds"},{value:"60",label:"60 seconds"}],value:g,onChange:m,disabled:!x}),e.jsx(h,{}),e.jsx(d,{children:"Preferences"}),e.jsx(p,{label:"Language",description:"Interface language",options:[{value:"en",label:"English"}],value:E,onChange:S}),e.jsx(j,{label:"Telemetry",description:"Help improve Purple Lab by sending anonymous usage data",value:y,onChange:A})]})}function Ue(){const a=[{id:"purple",color:"#553DE9",label:"Purple"},{id:"blue",color:"#2563EB",label:"Blue"},{id:"green",color:"#059669",label:"Green"},{id:"orange",color:"#D97706",label:"Orange"},{id:"pink",color:"#DB2777",label:"Pink"}],u={small:"text-xs",medium:"text-sm",large:"text-base"};return e.jsxs("div",{children:[e.jsx(d,{children:"Theme"}),e.jsxs("div",{className:"py-3",children:[e.jsx("label",{className:"text-sm font-medium text-[#36342E] block mb-3",children:"Color theme"}),e.jsx("div",{className:"flex gap-3",children:["light","dark","system"].map(s=>e.jsxs("button",{type:"button",onClick:()=>be(s),className:["flex-1 flex flex-col items-center gap-2 p-3 rounded-lg border-2 transition-colors",C===s?"border-[#553DE9] bg-[#553DE9]/5":"border-[#ECEAE3] hover:border-[#553DE9]/30"].join(" "),"aria-pressed":C===s,children:[e.jsxs("div",{className:["w-full h-12 rounded border flex items-end px-1.5 pb-1.5 gap-1",s==="dark"?"bg-[#1A1A1E] border-[#2A2A30]":s==="light"?"bg-white border-[#ECEAE3]":"bg-gradient-to-r from-white to-[#1A1A1E] border-[#ECEAE3]"].join(" "),children:[e.jsx("div",{className:`w-2 h-4 rounded-sm ${s==="dark"?"bg-[#2A2A30]":"bg-[#ECEAE3]"}`}),e.jsx("div",{className:`w-4 h-3 rounded-sm ${s==="dark"?"bg-[#2A2A30]":"bg-[#ECEAE3]"}`}),e.jsx("div",{className:`w-3 h-5 rounded-sm ${s==="dark"?"bg-[#2A2A30]":"bg-[#ECEAE3]"}`})]}),e.jsx("span",{className:"text-xs font-medium text-[#36342E] capitalize",children:s})]},s))})]}),e.jsx(h,{}),e.jsx(d,{children:"Accent color"}),e.jsx("div",{className:"py-3",children:e.jsx("div",{className:"flex gap-3",children:a.map(s=>e.jsxs("button",{type:"button",onClick:()=>ge(s.id),className:"flex flex-col items-center gap-1.5 group","aria-label":s.label,"aria-pressed":M===s.id,children:[e.jsx("div",{className:["w-8 h-8 rounded-full transition-all",M===s.id?"ring-2 ring-offset-2 ring-[#553DE9] scale-110":"group-hover:scale-105"].join(" "),style:{backgroundColor:s.color}}),e.jsx("span",{className:"text-[11px] text-[#6B6960]",children:s.label})]},s.id))})}),e.jsx(h,{}),e.jsx(d,{children:"Layout"}),e.jsx(p,{label:"Font size",description:"Base font size for the interface",options:[{value:"small",label:"Small"},{value:"medium",label:"Medium"},{value:"large",label:"Large"}],value:B,onChange:je}),e.jsx("div",{className:"pl-4 pb-2",children:e.jsx("span",{className:`${u[B]} text-[#6B6960] italic`,children:"The quick brown fox jumps over the lazy dog."})}),e.jsx(p,{label:"Sidebar position",description:"Which side the navigation sidebar appears on",options:[{value:"left",label:"Left"},{value:"right",label:"Right"}],value:T,onChange:ve}),e.jsx(j,{label:"Compact mode",description:"Reduce padding and spacing throughout the interface",value:H,onChange:Ee}),e.jsx(p,{label:"Animations",description:"Control interface transition animations",options:[{value:"full",label:"Full"},{value:"reduced",label:"Reduced"},{value:"none",label:"None"}],value:G,onChange:ye})]})}function Je(){return e.jsxs("div",{children:[e.jsx(d,{children:"Font"}),e.jsx(p,{label:"Font family",description:"Font used in the code editor",options:[{value:"JetBrains Mono",label:"JetBrains Mono"},{value:"Fira Code",label:"Fira Code"},{value:"Source Code Pro",label:"Source Code Pro"},{value:"Consolas",label:"Consolas"}],value:I,onChange:Ce}),e.jsx(ue,{label:"Font size",description:"Size of text in the code editor",min:12,max:24,value:z,onChange:Ne,unit:"px"}),e.jsxs("div",{className:"my-3 rounded-lg border border-[#ECEAE3] overflow-hidden",children:[e.jsx("div",{className:"bg-[#FAF9F6] px-3 py-1.5 border-b border-[#ECEAE3]",children:e.jsx("span",{className:"text-[11px] text-[#939084]",children:"Preview"})}),e.jsx("div",{className:"bg-white p-4",children:e.jsx("pre",{className:"text-[#36342E] leading-relaxed",style:{fontFamily:`"${I}", monospace`,fontSize:`${z}px`},children:`function greet(name) {
|
|
7
7
|
return \`Hello, \${name}!\`;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
greet("world");`})})]}),e.jsx(h,{}),e.jsx(d,{children:"Formatting"}),e.jsx(p,{label:"Tab size",description:"Number of spaces per tab",options:[{value:"2",label:"2 spaces"},{value:"4",label:"4 spaces"},{value:"8",label:"8 spaces"}],value:O,onChange:Se}),e.jsx(j,{label:"Word wrap",description:"Wrap long lines to fit the editor width",value:_,onChange:we}),e.jsx(h,{}),e.jsx(d,{children:"Display"}),e.jsx(j,{label:"Line numbers",description:"Show line numbers in the gutter",value:V,onChange:Ae}),e.jsx(j,{label:"Minimap",description:"Show a miniature overview of the file",value:K,onChange:ke}),e.jsx(j,{label:"Bracket matching",description:"Highlight matching brackets",value:W,onChange:Fe})]})}function Qe(){return e.jsxs("div",{children:[e.jsx(d,{children:"Provider"}),e.jsx(p,{label:"Default provider",description:"AI provider to use for new builds",options:me.map(a=>({value:a.id,label:a.name})),value:q,onChange:Pe}),e.jsx(h,{}),e.jsx(d,{children:"Execution"}),e.jsx(ue,{label:"Max iterations",description:"Maximum number of RARV iterations per build",min:5,max:50,value:U,onChange:De,step:5}),e.jsx(p,{label:"Quality gate strictness",description:"How strict the quality gates are during builds",options:[{value:"relaxed",label:"Relaxed"},{value:"standard",label:"Standard"},{value:"strict",label:"Strict"}],value:J,onChange:Le}),e.jsx(h,{}),e.jsx(d,{children:"Automation"}),e.jsx(j,{label:"Auto-deploy on success",description:"Automatically deploy when build completes successfully",value:Q,onChange:Be}),e.jsx(ae,{label:"Budget limit",description:"Maximum spend per build (leave empty for unlimited)",type:"number",value:X,onChange:Me,placeholder:"e.g. 10.00"}),e.jsx(j,{label:"Build notifications",description:"Show browser notifications for build events",value:Y,onChange:Ie})]})}function Xe(){return e.jsxs("div",{children:[e.jsx(d,{children:"Configured providers"}),e.jsx("div",{className:"flex flex-col gap-4 mt-2",children:z.map((a,u)=>{const s=me.find(c=>c.id===a);return s?e.jsxs("div",{className:"border border-[#ECEAE3] rounded-lg p-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"w-6 h-6 flex items-center justify-center rounded-full bg-[#553DE9]/10 text-[#553DE9] text-xs font-bold",children:u+1}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-sm font-medium text-[#36342E]",children:s.name}),e.jsx("p",{className:"text-xs text-[#6B6960]",children:s.description})]})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("button",{type:"button",onClick:()=>ce(s.id,"up"),disabled:u===0,className:"px-2 py-1 text-xs text-[#6B6960] hover:text-[#36342E] disabled:opacity-30 disabled:cursor-not-allowed","aria-label":`Move ${s.name} up`,children:"Up"}),e.jsx("button",{type:"button",onClick:()=>ce(s.id,"down"),disabled:u===z.length-1,className:"px-2 py-1 text-xs text-[#6B6960] hover:text-[#36342E] disabled:opacity-30 disabled:cursor-not-allowed","aria-label":`Move ${s.name} down`,children:"Down"})]})]}),e.jsx(ae,{label:"API key",type:"password",value:Z[s.id]||"",onChange:c=>$e(N=>({...N,[s.id]:c})),placeholder:`Enter ${s.name} API key`}),e.jsx(p,{label:"Model",options:s.models.map(c=>({value:c,label:c})),value:ee[s.id]||s.defaultModel,onChange:c=>ze(N=>({...N,[s.id]:c}))}),e.jsxs("div",{className:"flex items-center gap-3 mt-2",children:[e.jsxs("button",{type:"button",onClick:()=>Ke(s.id),disabled:ne!==null,className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium border border-[#553DE9] text-[#553DE9] hover:bg-[#E8E4FD] rounded-lg transition-colors disabled:opacity-50",children:[ne===s.id?e.jsx(xt,{size:12,className:"animate-spin"}):null,"Test Connection"]}),ie[s.id]==="success"&&e.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-[#059669]",children:[e.jsx(mt,{size:12})," Connected"]}),ie[s.id]==="error"&&e.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-[#C45B5B]",children:[e.jsx(pt,{size:12})," Connection failed"]})]})]},s.id):null})}),e.jsx("div",{className:"mt-4 p-3 rounded-lg bg-[#FAF9F6] border border-[#ECEAE3]",children:e.jsx("p",{className:"text-xs text-[#6B6960]",children:"Priority order determines the fallback chain. If the primary provider fails, the next one in order will be used. Use the Up/Down buttons to reorder."})})]})}function Ye(){const a=D?pe.filter(s=>s.action.toLowerCase().includes(D.toLowerCase())||s.keys.toLowerCase().includes(D.toLowerCase())||s.category.toLowerCase().includes(D.toLowerCase())):pe,u=[...new Set(a.map(s=>s.category))];return e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsxs("div",{className:"flex-1 relative",children:[e.jsx(it,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[#939084]"}),e.jsx("input",{type:"text",value:D,onChange:s=>re(s.target.value),placeholder:"Search shortcuts...",className:"w-full pl-8 pr-3 py-2 text-sm border border-[#ECEAE3] rounded-lg bg-white text-[#36342E] focus:border-[#553DE9] focus:outline-none focus:ring-1 focus:ring-[#553DE9] placeholder:text-[#939084]","aria-label":"Search keyboard shortcuts"})]}),e.jsxs("button",{type:"button",onClick:()=>re(""),className:"inline-flex items-center gap-1.5 px-3 py-2 text-xs text-[#6B6960] hover:text-[#36342E] border border-[#ECEAE3] rounded-lg hover:bg-[#F8F4F0] transition-colors",children:[e.jsx(ct,{size:12}),"Reset to defaults"]})]}),u.map(s=>e.jsxs("div",{children:[e.jsx(d,{children:s}),e.jsx("div",{className:"flex flex-col",children:a.filter(c=>c.category===s).map(c=>e.jsxs("div",{className:"flex items-center justify-between py-2.5 px-2 rounded-lg hover:bg-[#FAF9F6]",children:[e.jsx("span",{className:"text-sm text-[#36342E]",children:c.action}),e.jsx("kbd",{className:"px-2.5 py-1 text-xs font-mono bg-[#FAF9F6] border border-[#ECEAE3] rounded-md text-[#6B6960]",children:c.keys})]},c.action))})]},s)),e.jsx("div",{className:"mt-6 p-3 rounded-lg bg-[#FAF9F6] border border-[#ECEAE3]",children:e.jsxs("p",{className:"text-xs text-[#6B6960]",children:["Press ",e.jsxs("kbd",{className:"px-1.5 py-0.5 text-[11px] font-mono bg-white border border-[#ECEAE3] rounded",children:[v,"+?"]})," anywhere to see keyboard shortcuts."]})})]})}function Ze(){return e.jsxs("div",{children:[e.jsx(d,{children:"Vision"}),e.jsx(j,{label:"High contrast mode",description:"Increase contrast for text and UI elements",value:k,onChange:Te}),e.jsx(p,{label:"Focus indicators",description:"Visibility of keyboard focus outlines",options:[{value:"default",label:"Default"},{value:"enhanced",label:"Enhanced (thicker, more visible)"}],value:F,onChange:He}),e.jsx(p,{label:"Font scaling",description:"Scale all text in the interface",options:[{value:"100",label:"100%"},{value:"125",label:"125%"},{value:"150",label:"150%"}],value:P,onChange:_e}),e.jsx(h,{}),e.jsx(d,{children:"Motion"}),e.jsx(p,{label:"Motion preference",description:"Control animations and transitions",options:[{value:"full",label:"Full -- all animations enabled"},{value:"reduced",label:"Reduced -- minimal animations"},{value:"none",label:"None -- no animations"}],value:w,onChange:Ge}),e.jsx(h,{}),e.jsx(d,{children:"Screen reader"}),e.jsx(j,{label:"Screen reader announcements",description:"Enable additional ARIA live region announcements",value:te,onChange:Oe}),e.jsx("div",{className:"mt-6 p-3 rounded-lg bg-[#FAF9F6] border border-[#ECEAE3]",children:e.jsx("p",{className:"text-xs text-[#6B6960]",children:"Purple Lab is designed to work with assistive technologies. All interactive elements include proper ARIA labels and keyboard navigation support. If you encounter accessibility issues, please report them via the About section."})})]})}function et(){return e.jsxs("div",{children:[e.jsx(d,{children:"Purple Lab"}),e.jsxs("div",{className:"py-3",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{className:"w-12 h-12 rounded-xl bg-[#553DE9] flex items-center justify-center",children:e.jsx("span",{className:"text-white font-heading font-bold text-lg",children:"PL"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-base font-heading font-bold text-[#36342E]",children:"Purple Lab"}),e.jsx("p",{className:"text-xs text-[#6B6960]",children:"Powered by Loki Mode"})]})]}),e.jsxs("div",{className:"border border-[#ECEAE3] rounded-lg divide-y divide-[#ECEAE3]",children:[le&&e.jsxs("div",{className:"flex items-center justify-between px-4 py-3",children:[e.jsx("span",{className:"text-sm text-[#6B6960]",children:"Version"}),e.jsxs("span",{className:"text-sm font-mono font-medium text-[#36342E]",children:["v",le]})]}),e.jsxs("div",{className:"flex items-center justify-between px-4 py-3",children:[e.jsx("span",{className:"text-sm text-[#6B6960]",children:"Build date"}),e.jsx("span",{className:"text-sm font-mono text-[#36342E]",children:"2026-03-24"})]}),e.jsxs("div",{className:"flex items-center justify-between px-4 py-3",children:[e.jsx("span",{className:"text-sm text-[#6B6960]",children:"License"}),e.jsx("span",{className:"text-sm text-[#36342E]",children:"MIT"})]})]})]}),e.jsx(h,{}),e.jsx(d,{children:"Links"}),e.jsx("div",{className:"flex flex-col gap-1 py-2",children:[{label:"Documentation",href:"https://www.autonomi.dev/docs"},{label:"GitHub",href:"https://github.com/asklokesh/loki-mode"},{label:"Changelog",href:"https://github.com/asklokesh/loki-mode/blob/main/CHANGELOG.md"},{label:"Report a bug",href:"https://github.com/asklokesh/loki-mode/issues/new"}].map(a=>e.jsxs("a",{href:a.href,target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-between px-3 py-2.5 rounded-lg text-sm text-[#36342E] hover:bg-[#FAF9F6] transition-colors group",children:[e.jsx("span",{children:a.label}),e.jsx(lt,{size:14,className:"text-[#939084] group-hover:text-[#553DE9] transition-colors"})]},a.label))}),e.jsx(h,{}),e.jsx(d,{children:"Updates"}),e.jsx("div",{className:"py-3",children:e.jsx("button",{type:"button",onClick:()=>{window.open("https://github.com/asklokesh/loki-mode/releases","_blank")},className:"inline-flex items-center gap-2 px-4 py-2 text-sm font-medium border border-[#553DE9] text-[#553DE9] hover:bg-[#E8E4FD] rounded-lg transition-colors",children:"Check for updates"})})]})}return e.jsxs("div",{className:"flex h-full min-h-0",children:[e.jsx("nav",{className:"w-56 flex-shrink-0 border-r border-[#ECEAE3] bg-[#FAF9F6] overflow-y-auto","aria-label":"Settings categories",children:e.jsxs("div",{className:"px-4 py-5",children:[e.jsx("h1",{className:"font-heading text-lg font-bold text-[#36342E] mb-4",children:"Settings"}),e.jsx("ul",{className:"flex flex-col gap-0.5",children:xe.map(a=>{const u=n===a.id;return e.jsx("li",{children:e.jsxs("button",{type:"button",onClick:()=>r(a.id),className:["flex items-center gap-2.5 w-full px-3 py-2 text-sm rounded-lg transition-colors text-left",u?"bg-[#553DE9]/10 text-[#553DE9] font-medium":"text-[#36342E] hover:bg-[#F8F4F0]"].join(" "),"aria-current":u?"page":void 0,children:[e.jsx(a.icon,{size:16}),e.jsx("span",{children:a.label})]})},a.id)})})]})}),e.jsx("main",{className:"flex-1 overflow-y-auto",children:e.jsxs("div",{className:"max-w-[640px] mx-auto px-8 py-6",children:[e.jsx("h2",{className:"font-heading text-base font-bold text-[#36342E] mb-1",children:(de=xe.find(a=>a.id===n))==null?void 0:de.label}),e.jsxs("p",{className:"text-xs text-[#6B6960] mb-6",children:[n==="general"&&"Manage general application preferences",n==="appearance"&&"Customize the look and feel of Purple Lab",n==="editor"&&"Configure the code editor behavior and display",n==="build"&&"Control build execution and automation settings",n==="providers"&&"Configure AI provider connections and fallback chain",n==="shortcuts"&&"View and manage keyboard shortcuts",n==="accessibility"&&"Adjust accessibility and assistive technology options",n==="about"&&"Version information and useful links"]}),We()]})})]})}export{wt as default};
|
|
10
|
+
greet("world");`})})]}),e.jsx(h,{}),e.jsx(d,{children:"Formatting"}),e.jsx(p,{label:"Tab size",description:"Number of spaces per tab",options:[{value:"2",label:"2 spaces"},{value:"4",label:"4 spaces"},{value:"8",label:"8 spaces"}],value:O,onChange:Se}),e.jsx(j,{label:"Word wrap",description:"Wrap long lines to fit the editor width",value:_,onChange:we}),e.jsx(h,{}),e.jsx(d,{children:"Display"}),e.jsx(j,{label:"Line numbers",description:"Show line numbers in the gutter",value:V,onChange:Ae}),e.jsx(j,{label:"Minimap",description:"Show a miniature overview of the file",value:K,onChange:ke}),e.jsx(j,{label:"Bracket matching",description:"Highlight matching brackets",value:W,onChange:Fe})]})}function Qe(){return e.jsxs("div",{children:[e.jsx(d,{children:"Provider"}),e.jsx(p,{label:"Default provider",description:"AI provider to use for new builds",options:me.map(a=>({value:a.id,label:a.name})),value:q,onChange:Pe}),e.jsx(h,{}),e.jsx(d,{children:"Execution"}),e.jsx(ue,{label:"Max iterations",description:"Maximum number of RARV iterations per build",min:5,max:50,value:U,onChange:De,step:5}),e.jsx(p,{label:"Quality gate strictness",description:"How strict the quality gates are during builds",options:[{value:"relaxed",label:"Relaxed"},{value:"standard",label:"Standard"},{value:"strict",label:"Strict"}],value:J,onChange:Le}),e.jsx(h,{}),e.jsx(d,{children:"Automation"}),e.jsx(j,{label:"Auto-deploy on success",description:"Automatically deploy when build completes successfully",value:Q,onChange:Me}),e.jsx(ae,{label:"Budget limit",description:"Maximum spend per build (leave empty for unlimited)",type:"number",value:X,onChange:Be,placeholder:"e.g. 10.00"}),e.jsx(j,{label:"Build notifications",description:"Show browser notifications for build events",value:Y,onChange:Ie})]})}function Xe(){return e.jsxs("div",{children:[e.jsx(d,{children:"Configured providers"}),e.jsx("div",{className:"flex flex-col gap-4 mt-2",children:$.map((a,u)=>{const s=me.find(c=>c.id===a);return s?e.jsxs("div",{className:"border border-[#ECEAE3] rounded-lg p-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"w-6 h-6 flex items-center justify-center rounded-full bg-[#553DE9]/10 text-[#553DE9] text-xs font-bold",children:u+1}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-sm font-medium text-[#36342E]",children:s.name}),e.jsx("p",{className:"text-xs text-[#6B6960]",children:s.description})]})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("button",{type:"button",onClick:()=>ce(s.id,"up"),disabled:u===0,className:"px-2 py-1 text-xs text-[#6B6960] hover:text-[#36342E] disabled:opacity-30 disabled:cursor-not-allowed","aria-label":`Move ${s.name} up`,children:"Up"}),e.jsx("button",{type:"button",onClick:()=>ce(s.id,"down"),disabled:u===$.length-1,className:"px-2 py-1 text-xs text-[#6B6960] hover:text-[#36342E] disabled:opacity-30 disabled:cursor-not-allowed","aria-label":`Move ${s.name} down`,children:"Down"})]})]}),e.jsx(ae,{label:"API key",type:"password",value:Z[s.id]||"",onChange:c=>ze(N=>({...N,[s.id]:c})),placeholder:`Enter ${s.name} API key`}),e.jsx(p,{label:"Model",options:s.models.map(c=>({value:c,label:c})),value:ee[s.id]||s.defaultModel,onChange:c=>$e(N=>({...N,[s.id]:c}))}),e.jsxs("div",{className:"flex items-center gap-3 mt-2",children:[e.jsxs("button",{type:"button",onClick:()=>Ke(s.id),disabled:ne!==null,className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium border border-[#553DE9] text-[#553DE9] hover:bg-[#E8E4FD] rounded-lg transition-colors disabled:opacity-50",children:[ne===s.id?e.jsx(xt,{size:12,className:"animate-spin"}):null,"Test Connection"]}),ie[s.id]==="success"&&e.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-[#059669]",children:[e.jsx(mt,{size:12})," Connected"]}),ie[s.id]==="error"&&e.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-[#C45B5B]",children:[e.jsx(pt,{size:12})," Connection failed"]})]})]},s.id):null})}),e.jsx("div",{className:"mt-4 p-3 rounded-lg bg-[#FAF9F6] border border-[#ECEAE3]",children:e.jsx("p",{className:"text-xs text-[#6B6960]",children:"Priority order determines the fallback chain. If the primary provider fails, the next one in order will be used. Use the Up/Down buttons to reorder."})})]})}function Ye(){const a=D?pe.filter(s=>s.action.toLowerCase().includes(D.toLowerCase())||s.keys.toLowerCase().includes(D.toLowerCase())||s.category.toLowerCase().includes(D.toLowerCase())):pe,u=[...new Set(a.map(s=>s.category))];return e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsxs("div",{className:"flex-1 relative",children:[e.jsx(it,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[#939084]"}),e.jsx("input",{type:"text",value:D,onChange:s=>re(s.target.value),placeholder:"Search shortcuts...",className:"w-full pl-8 pr-3 py-2 text-sm border border-[#ECEAE3] rounded-lg bg-white text-[#36342E] focus:border-[#553DE9] focus:outline-none focus:ring-1 focus:ring-[#553DE9] placeholder:text-[#939084]","aria-label":"Search keyboard shortcuts"})]}),e.jsxs("button",{type:"button",onClick:()=>re(""),className:"inline-flex items-center gap-1.5 px-3 py-2 text-xs text-[#6B6960] hover:text-[#36342E] border border-[#ECEAE3] rounded-lg hover:bg-[#F8F4F0] transition-colors",children:[e.jsx(ct,{size:12}),"Reset to defaults"]})]}),u.map(s=>e.jsxs("div",{children:[e.jsx(d,{children:s}),e.jsx("div",{className:"flex flex-col",children:a.filter(c=>c.category===s).map(c=>e.jsxs("div",{className:"flex items-center justify-between py-2.5 px-2 rounded-lg hover:bg-[#FAF9F6]",children:[e.jsx("span",{className:"text-sm text-[#36342E]",children:c.action}),e.jsx("kbd",{className:"px-2.5 py-1 text-xs font-mono bg-[#FAF9F6] border border-[#ECEAE3] rounded-md text-[#6B6960]",children:c.keys})]},c.action))})]},s)),e.jsx("div",{className:"mt-6 p-3 rounded-lg bg-[#FAF9F6] border border-[#ECEAE3]",children:e.jsxs("p",{className:"text-xs text-[#6B6960]",children:["Press ",e.jsxs("kbd",{className:"px-1.5 py-0.5 text-[11px] font-mono bg-white border border-[#ECEAE3] rounded",children:[v,"+?"]})," anywhere to see keyboard shortcuts."]})})]})}function Ze(){return e.jsxs("div",{children:[e.jsx(d,{children:"Vision"}),e.jsx(j,{label:"High contrast mode",description:"Increase contrast for text and UI elements",value:k,onChange:Te}),e.jsx(p,{label:"Focus indicators",description:"Visibility of keyboard focus outlines",options:[{value:"default",label:"Default"},{value:"enhanced",label:"Enhanced (thicker, more visible)"}],value:F,onChange:He}),e.jsx(p,{label:"Font scaling",description:"Scale all text in the interface",options:[{value:"100",label:"100%"},{value:"125",label:"125%"},{value:"150",label:"150%"}],value:P,onChange:_e}),e.jsx(h,{}),e.jsx(d,{children:"Motion"}),e.jsx(p,{label:"Motion preference",description:"Control animations and transitions",options:[{value:"full",label:"Full -- all animations enabled"},{value:"reduced",label:"Reduced -- minimal animations"},{value:"none",label:"None -- no animations"}],value:w,onChange:Ge}),e.jsx(h,{}),e.jsx(d,{children:"Screen reader"}),e.jsx(j,{label:"Screen reader announcements",description:"Enable additional ARIA live region announcements",value:te,onChange:Oe}),e.jsx("div",{className:"mt-6 p-3 rounded-lg bg-[#FAF9F6] border border-[#ECEAE3]",children:e.jsx("p",{className:"text-xs text-[#6B6960]",children:"Purple Lab is designed to work with assistive technologies. All interactive elements include proper ARIA labels and keyboard navigation support. If you encounter accessibility issues, please report them via the About section."})})]})}function et(){return e.jsxs("div",{children:[e.jsx(d,{children:"Purple Lab"}),e.jsxs("div",{className:"py-3",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{className:"w-12 h-12 rounded-xl bg-[#553DE9] flex items-center justify-center",children:e.jsx("span",{className:"text-white font-heading font-bold text-lg",children:"PL"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-base font-heading font-bold text-[#36342E]",children:"Purple Lab"}),e.jsx("p",{className:"text-xs text-[#6B6960]",children:"Powered by Loki Mode"})]})]}),e.jsxs("div",{className:"border border-[#ECEAE3] rounded-lg divide-y divide-[#ECEAE3]",children:[le&&e.jsxs("div",{className:"flex items-center justify-between px-4 py-3",children:[e.jsx("span",{className:"text-sm text-[#6B6960]",children:"Version"}),e.jsxs("span",{className:"text-sm font-mono font-medium text-[#36342E]",children:["v",le]})]}),e.jsxs("div",{className:"flex items-center justify-between px-4 py-3",children:[e.jsx("span",{className:"text-sm text-[#6B6960]",children:"Build date"}),e.jsx("span",{className:"text-sm font-mono text-[#36342E]",children:"2026-03-24"})]}),e.jsxs("div",{className:"flex items-center justify-between px-4 py-3",children:[e.jsx("span",{className:"text-sm text-[#6B6960]",children:"License"}),e.jsx("span",{className:"text-sm text-[#36342E]",children:"MIT"})]})]})]}),e.jsx(h,{}),e.jsx(d,{children:"Links"}),e.jsx("div",{className:"flex flex-col gap-1 py-2",children:[{label:"Documentation",href:"https://www.autonomi.dev/docs"},{label:"GitHub",href:"https://github.com/asklokesh/loki-mode"},{label:"Changelog",href:"https://github.com/asklokesh/loki-mode/blob/main/CHANGELOG.md"},{label:"Report a bug",href:"https://github.com/asklokesh/loki-mode/issues/new"}].map(a=>e.jsxs("a",{href:a.href,target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-between px-3 py-2.5 rounded-lg text-sm text-[#36342E] hover:bg-[#FAF9F6] transition-colors group",children:[e.jsx("span",{children:a.label}),e.jsx(lt,{size:14,className:"text-[#939084] group-hover:text-[#553DE9] transition-colors"})]},a.label))}),e.jsx(h,{}),e.jsx(d,{children:"Updates"}),e.jsx("div",{className:"py-3",children:e.jsx("button",{type:"button",onClick:()=>{window.open("https://github.com/asklokesh/loki-mode/releases","_blank")},className:"inline-flex items-center gap-2 px-4 py-2 text-sm font-medium border border-[#553DE9] text-[#553DE9] hover:bg-[#E8E4FD] rounded-lg transition-colors",children:"Check for updates"})})]})}return e.jsxs("div",{className:"flex h-full min-h-0",children:[e.jsx("nav",{className:"w-56 flex-shrink-0 border-r border-[#ECEAE3] bg-[#FAF9F6] overflow-y-auto","aria-label":"Settings categories",children:e.jsxs("div",{className:"px-4 py-5",children:[e.jsx("h1",{className:"font-heading text-lg font-bold text-[#36342E] mb-4",children:"Settings"}),e.jsx("ul",{className:"flex flex-col gap-0.5",children:xe.map(a=>{const u=n===a.id;return e.jsx("li",{children:e.jsxs("button",{type:"button",onClick:()=>r(a.id),className:["flex items-center gap-2.5 w-full px-3 py-2 text-sm rounded-lg transition-colors text-left",u?"bg-[#553DE9]/10 text-[#553DE9] font-medium":"text-[#36342E] hover:bg-[#F8F4F0]"].join(" "),"aria-current":u?"page":void 0,children:[e.jsx(a.icon,{size:16}),e.jsx("span",{children:a.label})]})},a.id)})})]})}),e.jsx("main",{className:"flex-1 overflow-y-auto",children:e.jsxs("div",{className:"max-w-[640px] mx-auto px-8 py-6",children:[e.jsx("h2",{className:"font-heading text-base font-bold text-[#36342E] mb-1",children:(de=xe.find(a=>a.id===n))==null?void 0:de.label}),e.jsxs("p",{className:"text-xs text-[#6B6960] mb-6",children:[n==="general"&&"Manage general application preferences",n==="appearance"&&"Customize the look and feel of Purple Lab",n==="editor"&&"Configure the code editor behavior and display",n==="build"&&"Control build execution and automation settings",n==="providers"&&"Configure AI provider connections and fallback chain",n==="shortcuts"&&"View and manage keyboard shortcuts",n==="accessibility"&&"Adjust accessibility and assistive technology options",n==="about"&&"Version information and useful links"]}),We()]})})]})}export{wt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e,r as c,g as m,h as p,X as h,u}from"./index-BN52-GQT.js";const x=[{label:"Q1 2026",period:"Jan - Mar",features:[{name:"Multi-provider support (5 providers)",status:"completed"},{name:"Memory system with vector search",status:"completed"},{name:"Purple Lab web UI",status:"completed"},{name:"Enterprise auth (OIDC, RBAC)",status:"completed"},{name:"Legacy system healing",status:"completed"}]},{label:"Q2 2026",period:"Apr - Jun",features:[{name:"Real-time collaboration (multi-user)",status:"in-progress"},{name:"Visual workflow builder",status:"in-progress"},{name:"Plugin marketplace",status:"planned"},{name:"Custom agent creation UI",status:"planned"}]},{label:"Q3 2026",period:"Jul - Sep",features:[{name:"Cloud deployment integration",status:"planned"},{name:"Team analytics dashboard",status:"planned"},{name:"AI-powered debugging assistant",status:"planned"},{name:"Mobile companion app",status:"planned"}]},{label:"Q4 2026",period:"Oct - Dec",features:[{name:"Multi-repo orchestration",status:"planned"},{name:"Custom model fine-tuning",status:"planned"},{name:"Compliance report generation",status:"planned"},{name:"On-prem cluster mode",status:"planned"}]}],l={completed:{dot:"bg-[#1FC5A8]",text:"text-[#36342E]",label:"Shipped"},"in-progress":{dot:"bg-[#553DE9]",text:"text-[#36342E]",label:"In Progress"},planned:{dot:"bg-[#939084]",text:"text-[#6B6960]",label:"Planned"}};function b(){return e.jsxs("div",{className:"py-8",children:[e.jsx("h3",{className:"text-xl font-bold text-[#36342E] mb-2",children:"Product Roadmap"}),e.jsx("p",{className:"text-sm text-[#6B6960] mb-8",children:"Where we have been and where we are heading."}),e.jsx("div",{className:"flex gap-6 mb-6",children:["completed","in-progress","planned"].map(t=>e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:`w-2.5 h-2.5 rounded-full ${l[t].dot}`}),e.jsx("span",{className:"text-[#6B6960]",children:l[t].label})]},t))}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-[7px] top-2 bottom-2 w-0.5 bg-[#ECEAE3]"}),e.jsx("div",{className:"space-y-8",children:x.map((t,i)=>e.jsxs("div",{className:"relative pl-8",children:[e.jsx("div",{className:`absolute left-0 top-1 w-[15px] h-[15px] rounded-full border-2 border-white shadow-sm ${i===0?"bg-[#1FC5A8]":i===1?"bg-[#553DE9]":"bg-[#ECEAE3]"}`}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-baseline gap-2 mb-3",children:[e.jsx("h4",{className:"text-base font-bold text-[#36342E]",children:t.label}),e.jsx("span",{className:"text-xs text-[#939084]",children:t.period}),i===1&&e.jsx("span",{className:"px-2 py-0.5 text-xs font-medium rounded-full bg-[#553DE9]/10 text-[#553DE9]",children:"Current"})]}),e.jsx("div",{className:"space-y-2",children:t.features.map(a=>{const s=l[a.status];return e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx("span",{className:`w-2 h-2 rounded-full flex-shrink-0 ${s.dot}`}),e.jsx("span",{className:`text-sm ${s.text}`,children:a.name})]},a.name)})})]})]},t.label))})]})]})}const n=[{version:"6.71.1",date:"Mar 24, 2026",features:["BuildProgressBar server integration with cost, ETA, and phase data","Sprint 1 complete: BuildProgressBar, CommandPalette, dark mode, sidebar theme toggle","Quick-start API, dark mode prep, theme hook foundation"]},{version:"6.70.0",date:"Mar 22, 2026",features:["Embedded Loki Dashboard in Purple Lab workspace","Panel toggles, modern UI, bigger fonts, smooth transitions","Sprint 1 foundation with quick-start API"]},{version:"6.69.0",date:"Mar 20, 2026",features:["Purple Lab IDE workspace with Monaco editor","AI chat panel for iterative development","Activity panel with build log and quality gates"]}];function g(){const[t,i]=c.useState(!1),a=t?n:n.slice(0,2);return e.jsxs("div",{className:"bg-white border border-[#ECEAE3] rounded-xl p-4 shadow-sm",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx("h4",{className:"text-sm font-bold text-[#36342E]",children:"Recent Changes"}),e.jsx("a",{href:"https://github.com/asklokesh/loki-mode/blob/main/CHANGELOG.md",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-[#553DE9] hover:text-[#4832c7] font-medium",children:"View all"})]}),e.jsx("div",{className:"space-y-3",children:a.map(s=>e.jsxs("div",{className:"pb-3 border-b border-[#ECEAE3] last:border-b-0 last:pb-0",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[e.jsxs("span",{className:"px-1.5 py-0.5 text-xs font-mono font-bold rounded bg-[#553DE9]/10 text-[#553DE9]",children:["v",s.version]}),e.jsx("span",{className:"text-xs text-[#939084]",children:s.date})]}),e.jsx("ul",{className:"space-y-1",children:s.features.map((r,o)=>e.jsx("li",{className:"text-xs text-[#6B6960] pl-3 relative before:content-[''] before:absolute before:left-0 before:top-[7px] before:w-1.5 before:h-1.5 before:rounded-full before:bg-[#ECEAE3]",children:r},o))})]},s.version))}),n.length>2&&e.jsxs("button",{onClick:()=>i(!t),className:"mt-2 flex items-center gap-1 text-xs text-[#6B6960] hover:text-[#36342E] transition-colors",children:[t?e.jsx(m,{size:12}):e.jsx(p,{size:12}),t?"Show less":`Show ${n.length-2} more`]})]})}const f={default:"bg-[#F8F4F0] text-[#36342E] border-[#ECEAE3] dark:bg-[#222228] dark:text-[#E8E6E3] dark:border-[#2A2A30]",primary:"bg-[#553DE9]/10 text-[#553DE9] border-[#553DE9]/20 dark:bg-[#553DE9]/20 dark:text-[#7B6BEF] dark:border-[#553DE9]/30",success:"bg-[#1FC5A8]/10 text-[#1FC5A8] border-[#1FC5A8]/20",warning:"bg-[#E5A940]/10 text-[#E5A940] border-[#E5A940]/20",danger:"bg-[#C45B5B]/10 text-[#C45B5B] border-[#C45B5B]/20",info:"bg-[#3B82F6]/10 text-[#3B82F6] border-[#3B82F6]/20"};function E({label:t,color:i="default",removable:a=!1,onClick:s,onRemove:r,className:o=""}){return e.jsxs("span",{className:`inline-flex items-center gap-1 px-2.5 py-0.5 text-xs font-medium rounded-full border transition-colors ${f[i]} ${s?"cursor-pointer hover:opacity-80":""} ${o}`,onClick:s,role:s?"button":void 0,children:[t,a&&e.jsx("button",{type:"button",onClick:d=>{d.stopPropagation(),r==null||r()},className:"inline-flex items-center justify-center w-3.5 h-3.5 rounded-full hover:bg-black/10 dark:hover:bg-white/10 transition-colors","aria-label":`Remove ${t}`,children:e.jsx(h,{size:10})})]})}const w=[{title:"SaaS Dashboard",description:"Admin dashboard with user analytics, charts, and real-time data visualization.",techStack:["React","Tailwind","Chart.js"],buildTime:"~25 min",gradient:"from-[#553DE9] to-[#7B6BEF]",prompt:"Build a SaaS admin dashboard with user analytics, charts showing MRR and churn, and a table of recent signups"},{title:"REST API Server",description:"Production-ready API with authentication, validation, and database integration.",techStack:["Node.js","Express","PostgreSQL"],buildTime:"~20 min",gradient:"from-[#1FC5A8] to-[#38D9A9]",prompt:"Build a REST API server with JWT authentication, user CRUD, input validation, and PostgreSQL database"},{title:"E-commerce Store",description:"Online store with product catalog, cart, checkout, and payment integration.",techStack:["Next.js","Stripe","Prisma"],buildTime:"~45 min",gradient:"from-[#E93D82] to-[#F06595]",prompt:"Build an e-commerce store with product listings, shopping cart, Stripe checkout, and order management"},{title:"Portfolio Website",description:"Personal portfolio with animations, project showcase, and contact form.",techStack:["React","Framer Motion","Tailwind"],buildTime:"~15 min",gradient:"from-[#F59F00] to-[#FCC419]",prompt:"Build a developer portfolio website with animated sections, project gallery, skills list, and contact form"},{title:"CLI Tool",description:"Command-line tool with subcommands, flags, configuration, and colorful output.",techStack:["Node.js","Commander","Chalk"],buildTime:"~15 min",gradient:"from-[#36342E] to-[#6B6960]",prompt:"Build a CLI tool with subcommands for file management: list, copy, move, and search with glob patterns"},{title:"Discord Bot",description:"Interactive bot with slash commands, moderation, and custom responses.",techStack:["Discord.js","Node.js","SQLite"],buildTime:"~20 min",gradient:"from-[#5865F2] to-[#7289DA]",prompt:"Build a Discord bot with slash commands for polls, reminders, moderation (kick/ban), and a leveling system"},{title:"Blog Platform",description:"Full-featured blog with markdown support, categories, and RSS feed.",techStack:["React","MDX","Tailwind"],buildTime:"~30 min",gradient:"from-[#845EF7] to-[#B197FC]",prompt:"Build a blog platform with MDX support, category filtering, search, RSS feed, and a clean reading experience"},{title:"Task Manager",description:"Kanban-style task board with drag-and-drop, labels, and persistence.",techStack:["React","DnD Kit","SQLite"],buildTime:"~25 min",gradient:"from-[#2F71E3] to-[#5C93E8]",prompt:"Build a task manager with kanban board, drag-and-drop cards, labels, due dates, and local SQLite storage"},{title:"Weather App",description:"Weather dashboard with location search, forecasts, and beautiful visualizations.",techStack:["React","OpenWeatherMap","Chart.js"],buildTime:"~15 min",gradient:"from-[#0EA5E9] to-[#38BDF8]",prompt:"Build a weather app with city search, 5-day forecast, current conditions, and temperature charts"},{title:"Chat Application",description:"Real-time chat with rooms, typing indicators, and message history.",techStack:["React","WebSocket","Node.js"],buildTime:"~30 min",gradient:"from-[#22C55E] to-[#4ADE80]",prompt:"Build a real-time chat application with chat rooms, user presence, typing indicators, and message history"},{title:"Landing Page",description:"Conversion-optimized landing page with hero, features, pricing, and CTA sections.",techStack:["HTML","Tailwind","Alpine.js"],buildTime:"~10 min",gradient:"from-[#F97316] to-[#FB923C]",prompt:"Build a SaaS landing page with hero section, feature grid, pricing table, testimonials, and email signup"},{title:"Mobile App",description:"Cross-platform mobile app with navigation, state management, and native features.",techStack:["React Native","Expo","TypeScript"],buildTime:"~35 min",gradient:"from-[#DC2626] to-[#F87171]",prompt:"Build a React Native mobile app with tab navigation, a home feed, profile page, and push notifications setup"}];function j(){const t=u(),i=a=>{sessionStorage.setItem("pl_showcase_prompt",a),t("/")};return e.jsx("div",{className:"min-h-screen bg-[#FAF9F6]",children:e.jsxs("div",{className:"max-w-6xl mx-auto px-6 py-8",children:[e.jsxs("div",{className:"mb-8",children:[e.jsx("h1",{className:"text-2xl font-bold text-[#36342E]",children:"Showcase"}),e.jsx("p",{className:"text-[#6B6960] mt-1",children:'Explore example projects you can build with Loki Mode. Click "Build This" to start any project instantly.'})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5",children:w.map(a=>e.jsxs("div",{className:"bg-white border border-[#ECEAE3] rounded-xl overflow-hidden shadow-sm hover:shadow-md transition-shadow flex flex-col",children:[e.jsx("div",{className:`h-28 bg-gradient-to-br ${a.gradient} flex items-end p-4`,children:e.jsx("h3",{className:"text-lg font-bold text-white drop-shadow-sm",children:a.title})}),e.jsxs("div",{className:"p-4 flex-1 flex flex-col",children:[e.jsx("p",{className:"text-sm text-[#6B6960] mb-3",children:a.description}),e.jsx("div",{className:"flex flex-wrap gap-1.5 mb-3",children:a.techStack.map(s=>e.jsx(E,{label:s,color:"default"},s))}),e.jsxs("div",{className:"mt-auto pt-3 border-t border-[#ECEAE3] flex items-center justify-between",children:[e.jsxs("span",{className:"text-xs text-[#939084]",children:["Est. ",a.buildTime]}),e.jsx("button",{onClick:()=>i(a.prompt),className:"px-4 py-1.5 text-sm font-semibold rounded-lg bg-[#553DE9] text-white hover:bg-[#4832c7] transition-colors",children:"Build This"})]})]})]},a.title))}),e.jsx("div",{className:"mt-12",children:e.jsx(b,{})}),e.jsx("div",{className:"mt-8 max-w-md",children:e.jsx(g,{})})]})})}export{j as default};
|
|
1
|
+
import{j as e,r as c,h as m,i as p,X as h,u}from"./index-CM_b_EhP.js";const x=[{label:"Q1 2026",period:"Jan - Mar",features:[{name:"Multi-provider support (5 providers)",status:"completed"},{name:"Memory system with vector search",status:"completed"},{name:"Purple Lab web UI",status:"completed"},{name:"Enterprise auth (OIDC, RBAC)",status:"completed"},{name:"Legacy system healing",status:"completed"}]},{label:"Q2 2026",period:"Apr - Jun",features:[{name:"Real-time collaboration (multi-user)",status:"in-progress"},{name:"Visual workflow builder",status:"in-progress"},{name:"Plugin marketplace",status:"planned"},{name:"Custom agent creation UI",status:"planned"}]},{label:"Q3 2026",period:"Jul - Sep",features:[{name:"Cloud deployment integration",status:"planned"},{name:"Team analytics dashboard",status:"planned"},{name:"AI-powered debugging assistant",status:"planned"},{name:"Mobile companion app",status:"planned"}]},{label:"Q4 2026",period:"Oct - Dec",features:[{name:"Multi-repo orchestration",status:"planned"},{name:"Custom model fine-tuning",status:"planned"},{name:"Compliance report generation",status:"planned"},{name:"On-prem cluster mode",status:"planned"}]}],l={completed:{dot:"bg-[#1FC5A8]",text:"text-[#36342E]",label:"Shipped"},"in-progress":{dot:"bg-[#553DE9]",text:"text-[#36342E]",label:"In Progress"},planned:{dot:"bg-[#939084]",text:"text-[#6B6960]",label:"Planned"}};function b(){return e.jsxs("div",{className:"py-8",children:[e.jsx("h3",{className:"text-xl font-bold text-[#36342E] mb-2",children:"Product Roadmap"}),e.jsx("p",{className:"text-sm text-[#6B6960] mb-8",children:"Where we have been and where we are heading."}),e.jsx("div",{className:"flex gap-6 mb-6",children:["completed","in-progress","planned"].map(t=>e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:`w-2.5 h-2.5 rounded-full ${l[t].dot}`}),e.jsx("span",{className:"text-[#6B6960]",children:l[t].label})]},t))}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-[7px] top-2 bottom-2 w-0.5 bg-[#ECEAE3]"}),e.jsx("div",{className:"space-y-8",children:x.map((t,i)=>e.jsxs("div",{className:"relative pl-8",children:[e.jsx("div",{className:`absolute left-0 top-1 w-[15px] h-[15px] rounded-full border-2 border-white shadow-sm ${i===0?"bg-[#1FC5A8]":i===1?"bg-[#553DE9]":"bg-[#ECEAE3]"}`}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-baseline gap-2 mb-3",children:[e.jsx("h4",{className:"text-base font-bold text-[#36342E]",children:t.label}),e.jsx("span",{className:"text-xs text-[#939084]",children:t.period}),i===1&&e.jsx("span",{className:"px-2 py-0.5 text-xs font-medium rounded-full bg-[#553DE9]/10 text-[#553DE9]",children:"Current"})]}),e.jsx("div",{className:"space-y-2",children:t.features.map(a=>{const s=l[a.status];return e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx("span",{className:`w-2 h-2 rounded-full flex-shrink-0 ${s.dot}`}),e.jsx("span",{className:`text-sm ${s.text}`,children:a.name})]},a.name)})})]})]},t.label))})]})]})}const n=[{version:"6.71.1",date:"Mar 24, 2026",features:["BuildProgressBar server integration with cost, ETA, and phase data","Sprint 1 complete: BuildProgressBar, CommandPalette, dark mode, sidebar theme toggle","Quick-start API, dark mode prep, theme hook foundation"]},{version:"6.70.0",date:"Mar 22, 2026",features:["Embedded Loki Dashboard in Purple Lab workspace","Panel toggles, modern UI, bigger fonts, smooth transitions","Sprint 1 foundation with quick-start API"]},{version:"6.69.0",date:"Mar 20, 2026",features:["Purple Lab IDE workspace with Monaco editor","AI chat panel for iterative development","Activity panel with build log and quality gates"]}];function g(){const[t,i]=c.useState(!1),a=t?n:n.slice(0,2);return e.jsxs("div",{className:"bg-white border border-[#ECEAE3] rounded-xl p-4 shadow-sm",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx("h4",{className:"text-sm font-bold text-[#36342E]",children:"Recent Changes"}),e.jsx("a",{href:"https://github.com/asklokesh/loki-mode/blob/main/CHANGELOG.md",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-[#553DE9] hover:text-[#4832c7] font-medium",children:"View all"})]}),e.jsx("div",{className:"space-y-3",children:a.map(s=>e.jsxs("div",{className:"pb-3 border-b border-[#ECEAE3] last:border-b-0 last:pb-0",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[e.jsxs("span",{className:"px-1.5 py-0.5 text-xs font-mono font-bold rounded bg-[#553DE9]/10 text-[#553DE9]",children:["v",s.version]}),e.jsx("span",{className:"text-xs text-[#939084]",children:s.date})]}),e.jsx("ul",{className:"space-y-1",children:s.features.map((r,o)=>e.jsx("li",{className:"text-xs text-[#6B6960] pl-3 relative before:content-[''] before:absolute before:left-0 before:top-[7px] before:w-1.5 before:h-1.5 before:rounded-full before:bg-[#ECEAE3]",children:r},o))})]},s.version))}),n.length>2&&e.jsxs("button",{onClick:()=>i(!t),className:"mt-2 flex items-center gap-1 text-xs text-[#6B6960] hover:text-[#36342E] transition-colors",children:[t?e.jsx(m,{size:12}):e.jsx(p,{size:12}),t?"Show less":`Show ${n.length-2} more`]})]})}const f={default:"bg-[#F8F4F0] text-[#36342E] border-[#ECEAE3] dark:bg-[#222228] dark:text-[#E8E6E3] dark:border-[#2A2A30]",primary:"bg-[#553DE9]/10 text-[#553DE9] border-[#553DE9]/20 dark:bg-[#553DE9]/20 dark:text-[#7B6BEF] dark:border-[#553DE9]/30",success:"bg-[#1FC5A8]/10 text-[#1FC5A8] border-[#1FC5A8]/20",warning:"bg-[#E5A940]/10 text-[#E5A940] border-[#E5A940]/20",danger:"bg-[#C45B5B]/10 text-[#C45B5B] border-[#C45B5B]/20",info:"bg-[#3B82F6]/10 text-[#3B82F6] border-[#3B82F6]/20"};function E({label:t,color:i="default",removable:a=!1,onClick:s,onRemove:r,className:o=""}){return e.jsxs("span",{className:`inline-flex items-center gap-1 px-2.5 py-0.5 text-xs font-medium rounded-full border transition-colors ${f[i]} ${s?"cursor-pointer hover:opacity-80":""} ${o}`,onClick:s,role:s?"button":void 0,children:[t,a&&e.jsx("button",{type:"button",onClick:d=>{d.stopPropagation(),r==null||r()},className:"inline-flex items-center justify-center w-3.5 h-3.5 rounded-full hover:bg-black/10 dark:hover:bg-white/10 transition-colors","aria-label":`Remove ${t}`,children:e.jsx(h,{size:10})})]})}const w=[{title:"SaaS Dashboard",description:"Admin dashboard with user analytics, charts, and real-time data visualization.",techStack:["React","Tailwind","Chart.js"],buildTime:"~25 min",gradient:"from-[#553DE9] to-[#7B6BEF]",prompt:"Build a SaaS admin dashboard with user analytics, charts showing MRR and churn, and a table of recent signups"},{title:"REST API Server",description:"Production-ready API with authentication, validation, and database integration.",techStack:["Node.js","Express","PostgreSQL"],buildTime:"~20 min",gradient:"from-[#1FC5A8] to-[#38D9A9]",prompt:"Build a REST API server with JWT authentication, user CRUD, input validation, and PostgreSQL database"},{title:"E-commerce Store",description:"Online store with product catalog, cart, checkout, and payment integration.",techStack:["Next.js","Stripe","Prisma"],buildTime:"~45 min",gradient:"from-[#E93D82] to-[#F06595]",prompt:"Build an e-commerce store with product listings, shopping cart, Stripe checkout, and order management"},{title:"Portfolio Website",description:"Personal portfolio with animations, project showcase, and contact form.",techStack:["React","Framer Motion","Tailwind"],buildTime:"~15 min",gradient:"from-[#F59F00] to-[#FCC419]",prompt:"Build a developer portfolio website with animated sections, project gallery, skills list, and contact form"},{title:"CLI Tool",description:"Command-line tool with subcommands, flags, configuration, and colorful output.",techStack:["Node.js","Commander","Chalk"],buildTime:"~15 min",gradient:"from-[#36342E] to-[#6B6960]",prompt:"Build a CLI tool with subcommands for file management: list, copy, move, and search with glob patterns"},{title:"Discord Bot",description:"Interactive bot with slash commands, moderation, and custom responses.",techStack:["Discord.js","Node.js","SQLite"],buildTime:"~20 min",gradient:"from-[#5865F2] to-[#7289DA]",prompt:"Build a Discord bot with slash commands for polls, reminders, moderation (kick/ban), and a leveling system"},{title:"Blog Platform",description:"Full-featured blog with markdown support, categories, and RSS feed.",techStack:["React","MDX","Tailwind"],buildTime:"~30 min",gradient:"from-[#845EF7] to-[#B197FC]",prompt:"Build a blog platform with MDX support, category filtering, search, RSS feed, and a clean reading experience"},{title:"Task Manager",description:"Kanban-style task board with drag-and-drop, labels, and persistence.",techStack:["React","DnD Kit","SQLite"],buildTime:"~25 min",gradient:"from-[#2F71E3] to-[#5C93E8]",prompt:"Build a task manager with kanban board, drag-and-drop cards, labels, due dates, and local SQLite storage"},{title:"Weather App",description:"Weather dashboard with location search, forecasts, and beautiful visualizations.",techStack:["React","OpenWeatherMap","Chart.js"],buildTime:"~15 min",gradient:"from-[#0EA5E9] to-[#38BDF8]",prompt:"Build a weather app with city search, 5-day forecast, current conditions, and temperature charts"},{title:"Chat Application",description:"Real-time chat with rooms, typing indicators, and message history.",techStack:["React","WebSocket","Node.js"],buildTime:"~30 min",gradient:"from-[#22C55E] to-[#4ADE80]",prompt:"Build a real-time chat application with chat rooms, user presence, typing indicators, and message history"},{title:"Landing Page",description:"Conversion-optimized landing page with hero, features, pricing, and CTA sections.",techStack:["HTML","Tailwind","Alpine.js"],buildTime:"~10 min",gradient:"from-[#F97316] to-[#FB923C]",prompt:"Build a SaaS landing page with hero section, feature grid, pricing table, testimonials, and email signup"},{title:"Mobile App",description:"Cross-platform mobile app with navigation, state management, and native features.",techStack:["React Native","Expo","TypeScript"],buildTime:"~35 min",gradient:"from-[#DC2626] to-[#F87171]",prompt:"Build a React Native mobile app with tab navigation, a home feed, profile page, and push notifications setup"}];function j(){const t=u(),i=a=>{sessionStorage.setItem("pl_showcase_prompt",a),t("/")};return e.jsx("div",{className:"min-h-screen bg-[#FAF9F6]",children:e.jsxs("div",{className:"max-w-6xl mx-auto px-6 py-8",children:[e.jsxs("div",{className:"mb-8",children:[e.jsx("h1",{className:"text-2xl font-bold text-[#36342E]",children:"Showcase"}),e.jsx("p",{className:"text-[#6B6960] mt-1",children:'Explore example projects you can build with Loki Mode. Click "Build This" to start any project instantly.'})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5",children:w.map(a=>e.jsxs("div",{className:"bg-white border border-[#ECEAE3] rounded-xl overflow-hidden shadow-sm hover:shadow-md transition-shadow flex flex-col",children:[e.jsx("div",{className:`h-28 bg-gradient-to-br ${a.gradient} flex items-end p-4`,children:e.jsx("h3",{className:"text-lg font-bold text-white drop-shadow-sm",children:a.title})}),e.jsxs("div",{className:"p-4 flex-1 flex flex-col",children:[e.jsx("p",{className:"text-sm text-[#6B6960] mb-3",children:a.description}),e.jsx("div",{className:"flex flex-wrap gap-1.5 mb-3",children:a.techStack.map(s=>e.jsx(E,{label:s,color:"default"},s))}),e.jsxs("div",{className:"mt-auto pt-3 border-t border-[#ECEAE3] flex items-center justify-between",children:[e.jsxs("span",{className:"text-xs text-[#939084]",children:["Est. ",a.buildTime]}),e.jsx("button",{onClick:()=>i(a.prompt),className:"px-4 py-1.5 text-sm font-semibold rounded-lg bg-[#553DE9] text-white hover:bg-[#4832c7] transition-colors",children:"Build This"})]})]})]},a.title))}),e.jsx("div",{className:"mt-12",children:e.jsx(b,{})}),e.jsx("div",{className:"mt-8 max-w-md",children:e.jsx(g,{})})]})})}export{j as default};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{c as M,r as o,j as e,x as C,y as S,T as D,V as K}from"./index-CM_b_EhP.js";import{B as h}from"./Button-CFLVoduT.js";import{P as L}from"./plus-j08lFR-K.js";import{C as g}from"./check-nIAqa-kf.js";import{C as U}from"./copy-CnqkyNsi.js";import{R as q}from"./refresh-cw-CIr7E-g2.js";import{E as B,R as _}from"./rotate-ccw-gwoXxDeE.js";import{C as $}from"./clock-IW4Wq86N.js";import{T as G}from"./trash-2-DEKSVae5.js";import{S as W}from"./server-D5dO1paz.js";import{H as V}from"./hammer-DRbIQ4QU.js";import{B as Y}from"./bell-Gn17S6uv.js";import{D as H}from"./database-CKSReqa5.js";import{S as Q}from"./shield-alert-Du08zhdg.js";import{S as f}from"./save-B8fV_ZpE.js";/**
|
|
2
|
+
* @license lucide-react v0.577.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:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],I=M("key",J),X=[{id:"key-1",name:"Production CI/CD",prefix:"pk_l",createdAt:new Date(Date.now()-45*864e5).toISOString(),lastUsed:new Date(Date.now()-36e5).toISOString(),scopes:["read","write","deploy"]},{id:"key-2",name:"Staging Environment",prefix:"pk_s",createdAt:new Date(Date.now()-120*864e5).toISOString(),lastUsed:new Date(Date.now()-864e5).toISOString(),scopes:["read","write"]},{id:"key-3",name:"Monitoring Dashboard",prefix:"pk_m",createdAt:new Date(Date.now()-10*864e5).toISOString(),lastUsed:null,scopes:["read"]}],v={read:{label:"Read",description:"View projects, status, and logs",color:"#1FC5A8"},write:{label:"Write",description:"Create and modify projects",color:"#553DE9"},admin:{label:"Admin",description:"Manage users and settings",color:"#F59E0B"},deploy:{label:"Deploy",description:"Trigger deployments",color:"#C45B5B"}};function F(s){return Math.floor((Date.now()-new Date(s).getTime())/864e5)}function w(s){if(!s)return"Never";const l=F(s);return l===0?"Today":l===1?"Yesterday":l<30?`${l}d ago`:l<365?`${Math.floor(l/30)}mo ago`:`${Math.floor(l/365)}y ago`}function Z({onSubmit:s,onCancel:l}){const[r,c]=o.useState(""),[n,x]=o.useState(new Set(["read"])),t=a=>{x(d=>{const m=new Set(d);return m.has(a)?m.delete(a):m.add(a),m})};return e.jsxs("div",{className:"border border-[#553DE9]/20 bg-[#553DE9]/5 dark:bg-[#553DE9]/10 rounded-lg p-4 space-y-4",children:[e.jsx("h4",{className:"text-sm font-semibold text-[#201515] dark:text-[#E8E6E3]",children:"Create New API Key"}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-[#6B6960] mb-1",children:"Key Name"}),e.jsx("input",{value:r,onChange:a=>c(a.target.value),placeholder:"e.g. Production CI/CD",className:"w-full px-3 py-2 text-sm rounded-lg border border-[#ECEAE3] dark:border-[#2A2A30] bg-white dark:bg-[#1A1A1E] text-[#201515] dark:text-[#E8E6E3] placeholder-[#939084]",autoFocus:!0})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-[#6B6960] mb-2",children:"Scopes"}),e.jsx("div",{className:"grid grid-cols-2 gap-2",children:Object.entries(v).map(([a,d])=>e.jsxs("button",{type:"button",onClick:()=>t(a),className:`flex items-center gap-2 px-3 py-2 rounded-lg border text-sm text-left transition-colors ${n.has(a)?"border-[#553DE9] bg-[#553DE9]/5 dark:bg-[#553DE9]/10":"border-[#ECEAE3] dark:border-[#2A2A30] hover:bg-[#F8F4F0] dark:hover:bg-[#222228]"}`,children:[e.jsx("input",{type:"checkbox",checked:n.has(a),readOnly:!0,className:"rounded border-[#ECEAE3] text-[#553DE9] focus:ring-[#553DE9]"}),e.jsxs("div",{children:[e.jsx("div",{className:"font-medium text-[#201515] dark:text-[#E8E6E3]",children:d.label}),e.jsx("div",{className:"text-xs text-[#939084]",children:d.description})]})]},a))})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(h,{size:"sm",icon:I,onClick:()=>s(r,Array.from(n)),disabled:!r.trim()||n.size===0,children:"Generate Key"}),e.jsx(h,{size:"sm",variant:"ghost",onClick:l,children:"Cancel"})]})]})}function ee({keyName:s,onConfirm:l,onCancel:r}){return e.jsx("div",{className:"border border-[#C45B5B]/30 bg-[#C45B5B]/5 rounded-lg p-4",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(D,{size:18,className:"text-[#C45B5B] flex-shrink-0 mt-0.5"}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("p",{className:"text-sm font-medium text-[#201515] dark:text-[#E8E6E3]",children:['Revoke "',s,'"?']}),e.jsx("p",{className:"text-xs text-[#939084] mt-1",children:"This action cannot be undone. Any applications using this key will immediately lose access."}),e.jsxs("div",{className:"flex items-center gap-2 mt-3",children:[e.jsx(h,{size:"sm",variant:"danger",icon:G,onClick:l,children:"Revoke Key"}),e.jsx(h,{size:"sm",variant:"ghost",onClick:r,children:"Cancel"})]})]})]})})}function te({keys:s,onCreateKey:l,onRevokeKey:r,className:c=""}){const[n,x]=o.useState(s||X),[t,a]=o.useState(!1),[d,m]=o.useState(null),[p,j]=o.useState(!1),[T,N]=o.useState(null),[A,R]=o.useState({}),O=o.useCallback(async(i,u)=>{let E;if(l)E=await l(i,u);else{const y="abcdefghijklmnopqrstuvwxyz0123456789";E=`pk_live_${Array.from({length:32},()=>y[Math.floor(Math.random()*y.length)]).join("")}`}const b={id:`key-${Date.now()}`,name:i,prefix:E.slice(0,4),createdAt:new Date().toISOString(),lastUsed:null,scopes:u};x(y=>[b,...y]),m(E),a(!1)},[l]),z=o.useCallback(async i=>{r&&await r(i),x(u=>u.filter(E=>E.id!==i)),N(null)},[r]),P=o.useCallback(async i=>{try{await navigator.clipboard.writeText(i),j(!0),setTimeout(()=>j(!1),2e3)}catch{const u=document.createElement("textarea");u.value=i,document.body.appendChild(u),u.select(),document.execCommand("copy"),document.body.removeChild(u),j(!0),setTimeout(()=>j(!1),2e3)}},[]);return e.jsxs("div",{className:`space-y-4 ${c}`,children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(I,{size:18,className:"text-[#553DE9]"}),e.jsx("h3",{className:"text-sm font-semibold text-[#201515] dark:text-[#E8E6E3] uppercase tracking-wider",children:"API Keys"})]}),!t&&!d&&e.jsx(h,{size:"sm",variant:"secondary",icon:L,onClick:()=>a(!0),children:"New Key"})]}),d&&e.jsx("div",{className:"border border-[#1FC5A8]/30 bg-[#1FC5A8]/5 rounded-lg p-4",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(g,{size:18,className:"text-[#1FC5A8] flex-shrink-0 mt-0.5"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm font-medium text-[#201515] dark:text-[#E8E6E3]",children:"API Key Created"}),e.jsx("p",{className:"text-xs text-[#939084] mt-1",children:"Copy this key now. You will not be able to see it again."}),e.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[e.jsx("code",{className:"flex-1 px-3 py-2 text-sm font-mono bg-[#36342E] text-[#1FC5A8] rounded-lg truncate",children:d}),e.jsx(h,{size:"sm",variant:"secondary",icon:p?g:U,onClick:()=>P(d),children:p?"Copied":"Copy"})]}),e.jsx("button",{onClick:()=>m(null),className:"text-xs text-[#553DE9] hover:underline mt-2",children:"I have saved this key"})]})]})}),t&&e.jsx(Z,{onSubmit:O,onCancel:()=>a(!1)}),e.jsx("div",{className:"border border-[#ECEAE3] dark:border-[#2A2A30] rounded-lg overflow-hidden",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"bg-[#F8F4F0] dark:bg-[#222228]",children:[e.jsx("th",{className:"text-left px-4 py-2.5 text-xs font-medium text-[#6B6960]",children:"Name"}),e.jsx("th",{className:"text-left px-4 py-2.5 text-xs font-medium text-[#6B6960]",children:"Key"}),e.jsx("th",{className:"text-left px-4 py-2.5 text-xs font-medium text-[#6B6960]",children:"Scopes"}),e.jsx("th",{className:"text-left px-4 py-2.5 text-xs font-medium text-[#6B6960]",children:"Created"}),e.jsx("th",{className:"text-left px-4 py-2.5 text-xs font-medium text-[#6B6960]",children:"Last Used"}),e.jsx("th",{className:"text-right px-4 py-2.5 text-xs font-medium text-[#6B6960]",children:"Actions"})]})}),e.jsxs("tbody",{children:[n.map(i=>{const u=F(i.createdAt),E=u>=90;return e.jsxs("tr",{className:"border-t border-[#ECEAE3] dark:border-[#2A2A30] hover:bg-[#F8F4F0] dark:hover:bg-[#222228] transition-colors",children:[e.jsx("td",{className:"px-4 py-3",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(C,{size:14,className:"text-[#553DE9] flex-shrink-0"}),e.jsx("span",{className:"text-[#201515] dark:text-[#E8E6E3] font-medium",children:i.name}),E&&e.jsxs("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] bg-[#F59E0B]/10 text-[#F59E0B]",title:"This key is over 90 days old. Consider rotating it.",children:[e.jsx(q,{size:10}),u,"d old"]})]})}),e.jsx("td",{className:"px-4 py-3",children:e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("code",{className:"text-xs font-mono text-[#939084]",children:A[i.id]?`${i.prefix}****...`:`${i.prefix}****...`}),e.jsx("button",{onClick:()=>R(b=>({...b,[i.id]:!b[i.id]})),className:"text-[#939084] hover:text-[#36342E] dark:hover:text-[#E8E6E3]",title:A[i.id]?"Hide":"Show",children:A[i.id]?e.jsx(B,{size:12}):e.jsx(S,{size:12})})]})}),e.jsx("td",{className:"px-4 py-3",children:e.jsx("div",{className:"flex flex-wrap gap-1",children:i.scopes.map(b=>e.jsx("span",{className:"px-1.5 py-0.5 rounded text-[10px] font-medium",style:{backgroundColor:`${v[b].color}15`,color:v[b].color},children:v[b].label},b))})}),e.jsx("td",{className:"px-4 py-3",children:e.jsxs("div",{className:"flex items-center gap-1 text-xs text-[#939084]",children:[e.jsx($,{size:12}),w(i.createdAt)]})}),e.jsx("td",{className:"px-4 py-3",children:e.jsx("span",{className:"text-xs text-[#939084]",children:w(i.lastUsed)})}),e.jsx("td",{className:"px-4 py-3 text-right",children:T===i.id?e.jsx(ee,{keyName:i.name,onConfirm:()=>z(i.id),onCancel:()=>N(null)}):e.jsx("button",{onClick:()=>N(i.id),className:"text-xs text-[#C45B5B] hover:underline",children:"Revoke"})})]},i.id)}),n.length===0&&e.jsx("tr",{children:e.jsx("td",{colSpan:6,className:"px-4 py-8 text-center text-sm text-[#939084]",children:"No API keys yet. Create one to get started."})})]})]})})]})}const se=[{id:"claude",name:"Claude",apiKeySet:!0,model:"claude-opus-4-7",fallbackOrder:1,enabled:!0},{id:"codex",name:"Codex",apiKeySet:!1,model:"gpt-5.3-codex",fallbackOrder:2,enabled:!0},{id:"gemini",name:"Gemini",apiKeySet:!1,model:"gemini-3-pro-medium",fallbackOrder:3,enabled:!1}],ae={maxIterations:25,timeoutMinutes:60,qualityGateThreshold:80,autoReview:!0,parallelAgents:3},re={sessionTimeoutMinutes:30,allowedOrigins:"*",rateLimitPerMinute:100,requireMFA:!1,ipAllowlist:""},ne={emailEnabled:!1,emailAddress:"",browserEnabled:!0,slackEnabled:!1,slackWebhookUrl:"",notifyOnBuildComplete:!0,notifyOnBuildFailure:!0,notifyOnBudgetAlert:!0,notifyOnSecurityEvent:!0},le={logRetentionDays:30,auditRetentionDays:365,sessionRetentionDays:90,autoCleanupEnabled:!0,lastCleanup:new Date(Date.now()-864e5).toISOString()};function ie(){const[s,l]=o.useState(se),[r,c]=o.useState({}),[n,x]=o.useState(!1),t=()=>{x(!0),setTimeout(()=>x(!1),2e3)};return e.jsxs("div",{className:"space-y-4",children:[e.jsx("p",{className:"text-xs text-[#6B6960]",children:"Configure AI provider API keys, model preferences, and fallback chain."}),s.map((a,d)=>e.jsxs("div",{className:"border border-[#ECEAE3] dark:border-[#2A2A30] rounded-lg p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"w-6 h-6 rounded-full bg-[#553DE9]/10 flex items-center justify-center text-xs font-bold text-[#553DE9]",children:a.fallbackOrder}),e.jsx("span",{className:"text-sm font-medium text-[#201515] dark:text-[#E8E6E3]",children:a.name}),a.apiKeySet&&e.jsx("span",{className:"px-1.5 py-0.5 rounded text-[10px] font-medium bg-[#1FC5A8]/10 text-[#1FC5A8]",children:"Configured"})]}),e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("span",{className:"text-xs text-[#939084]",children:a.enabled?"Enabled":"Disabled"}),e.jsx("input",{type:"checkbox",checked:a.enabled,onChange:m=>{const p=[...s];p[d]={...p[d],enabled:m.target.checked},l(p)},className:"rounded border-[#ECEAE3] text-[#553DE9] focus:ring-[#553DE9]"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-[#6B6960] mb-1",children:"API Key"}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:r[a.id]?"text":"password",value:a.apiKeySet?"sk-****************************":"",placeholder:"Enter API key...",className:"w-full px-3 py-2 pr-10 text-sm rounded-lg border border-[#ECEAE3] dark:border-[#2A2A30] bg-white dark:bg-[#1A1A1E] text-[#201515] dark:text-[#E8E6E3] placeholder-[#939084] font-mono",readOnly:!0}),e.jsx("button",{onClick:()=>c(m=>({...m,[a.id]:!m[a.id]})),className:"absolute right-3 top-1/2 -translate-y-1/2 text-[#939084] hover:text-[#36342E]",children:r[a.id]?e.jsx(B,{size:14}):e.jsx(S,{size:14})})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-[#6B6960] mb-1",children:"Model"}),e.jsx("input",{value:a.model,onChange:m=>{const p=[...s];p[d]={...p[d],model:m.target.value},l(p)},className:"w-full px-3 py-2 text-sm rounded-lg border border-[#ECEAE3] dark:border-[#2A2A30] bg-white dark:bg-[#1A1A1E] text-[#201515] dark:text-[#E8E6E3] font-mono"})]})]})]},a.id)),e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(h,{size:"sm",icon:n?g:f,onClick:t,children:n?"Saved":"Save Provider Config"})})]})}function de(){const[s,l]=o.useState(ae),[r,c]=o.useState(!1),n=(t,a)=>{l(d=>({...d,[t]:a}))},x=()=>{c(!0),setTimeout(()=>c(!1),2e3)};return e.jsxs("div",{className:"space-y-4",children:[e.jsx("p",{className:"text-xs text-[#6B6960]",children:"Default settings for new builds. Individual projects can override these."}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-[#6B6960] mb-1",children:"Max Iterations"}),e.jsx("input",{type:"number",value:s.maxIterations,onChange:t=>n("maxIterations",parseInt(t.target.value)||0),min:1,max:100,className:"w-full px-3 py-2 text-sm rounded-lg border border-[#ECEAE3] dark:border-[#2A2A30] bg-white dark:bg-[#1A1A1E] text-[#201515] dark:text-[#E8E6E3]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-[#6B6960] mb-1",children:"Timeout (minutes)"}),e.jsx("input",{type:"number",value:s.timeoutMinutes,onChange:t=>n("timeoutMinutes",parseInt(t.target.value)||0),min:5,max:480,className:"w-full px-3 py-2 text-sm rounded-lg border border-[#ECEAE3] dark:border-[#2A2A30] bg-white dark:bg-[#1A1A1E] text-[#201515] dark:text-[#E8E6E3]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-[#6B6960] mb-1",children:"Quality Gate Threshold (%)"}),e.jsx("input",{type:"number",value:s.qualityGateThreshold,onChange:t=>n("qualityGateThreshold",parseInt(t.target.value)||0),min:0,max:100,className:"w-full px-3 py-2 text-sm rounded-lg border border-[#ECEAE3] dark:border-[#2A2A30] bg-white dark:bg-[#1A1A1E] text-[#201515] dark:text-[#E8E6E3]"}),e.jsx("div",{className:"mt-1 h-1.5 bg-[#F8F4F0] dark:bg-[#1A1A1E] rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full transition-all",style:{width:`${s.qualityGateThreshold}%`,background:s.qualityGateThreshold>=80?"#1FC5A8":s.qualityGateThreshold>=60?"#F59E0B":"#C45B5B"}})})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-[#6B6960] mb-1",children:"Parallel Agents"}),e.jsx("input",{type:"number",value:s.parallelAgents,onChange:t=>n("parallelAgents",parseInt(t.target.value)||1),min:1,max:10,className:"w-full px-3 py-2 text-sm rounded-lg border border-[#ECEAE3] dark:border-[#2A2A30] bg-white dark:bg-[#1A1A1E] text-[#201515] dark:text-[#E8E6E3]"})]})]}),e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:s.autoReview,onChange:t=>n("autoReview",t.target.checked),className:"rounded border-[#ECEAE3] text-[#553DE9] focus:ring-[#553DE9]"}),e.jsx("span",{className:"text-sm text-[#201515] dark:text-[#E8E6E3]",children:"Auto-run code review after each build"})]}),e.jsx(h,{size:"sm",icon:r?g:f,onClick:x,children:r?"Saved":"Save Build Defaults"})]})}function oe(){const[s,l]=o.useState(re),[r,c]=o.useState(!1),n=(t,a)=>{l(d=>({...d,[t]:a}))},x=()=>{c(!0),setTimeout(()=>c(!1),2e3)};return e.jsxs("div",{className:"space-y-4",children:[e.jsx("p",{className:"text-xs text-[#6B6960]",children:"Security settings for session management, rate limiting, and access control."}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-[#6B6960] mb-1",children:"Session Timeout (minutes)"}),e.jsx("input",{type:"number",value:s.sessionTimeoutMinutes,onChange:t=>n("sessionTimeoutMinutes",parseInt(t.target.value)||0),min:5,max:1440,className:"w-full px-3 py-2 text-sm rounded-lg border border-[#ECEAE3] dark:border-[#2A2A30] bg-white dark:bg-[#1A1A1E] text-[#201515] dark:text-[#E8E6E3]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-[#6B6960] mb-1",children:"Rate Limit (requests/minute)"}),e.jsx("input",{type:"number",value:s.rateLimitPerMinute,onChange:t=>n("rateLimitPerMinute",parseInt(t.target.value)||0),min:10,max:1e4,className:"w-full px-3 py-2 text-sm rounded-lg border border-[#ECEAE3] dark:border-[#2A2A30] bg-white dark:bg-[#1A1A1E] text-[#201515] dark:text-[#E8E6E3]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-[#6B6960] mb-1",children:"Allowed Origins"}),e.jsx("input",{type:"text",value:s.allowedOrigins,onChange:t=>n("allowedOrigins",t.target.value),placeholder:"* or comma-separated origins",className:"w-full px-3 py-2 text-sm rounded-lg border border-[#ECEAE3] dark:border-[#2A2A30] bg-white dark:bg-[#1A1A1E] text-[#201515] dark:text-[#E8E6E3] placeholder-[#939084] font-mono"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-[#6B6960] mb-1",children:"IP Allowlist"}),e.jsx("input",{type:"text",value:s.ipAllowlist,onChange:t=>n("ipAllowlist",t.target.value),placeholder:"Leave empty for no restriction",className:"w-full px-3 py-2 text-sm rounded-lg border border-[#ECEAE3] dark:border-[#2A2A30] bg-white dark:bg-[#1A1A1E] text-[#201515] dark:text-[#E8E6E3] placeholder-[#939084] font-mono"})]})]}),e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:s.requireMFA,onChange:t=>n("requireMFA",t.target.checked),className:"rounded border-[#ECEAE3] text-[#553DE9] focus:ring-[#553DE9]"}),e.jsx("span",{className:"text-sm text-[#201515] dark:text-[#E8E6E3]",children:"Require MFA for all users"}),!s.requireMFA&&e.jsxs("span",{className:"text-xs text-[#F59E0B] flex items-center gap-1",children:[e.jsx(D,{size:12}),"Not recommended for production"]})]}),e.jsx(h,{size:"sm",icon:r?g:f,onClick:x,children:r?"Saved":"Save Security Settings"})]})}function ce(){const[s,l]=o.useState(ne),[r,c]=o.useState(!1),n=(t,a)=>{l(d=>({...d,[t]:a}))},x=()=>{c(!0),setTimeout(()=>c(!1),2e3)};return e.jsxs("div",{className:"space-y-4",children:[e.jsx("p",{className:"text-xs text-[#6B6960]",children:"Configure how and when you receive notifications about system events."}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h4",{className:"text-xs font-semibold text-[#6B6960] uppercase tracking-wider",children:"Channels"}),e.jsxs("div",{className:"border border-[#ECEAE3] dark:border-[#2A2A30] rounded-lg divide-y divide-[#ECEAE3] dark:divide-[#2A2A30]",children:[e.jsxs("div",{className:"p-3 flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-[#201515] dark:text-[#E8E6E3]",children:"Browser Notifications"}),e.jsx("p",{className:"text-xs text-[#939084]",children:"Show desktop notifications"})]}),e.jsx("input",{type:"checkbox",checked:s.browserEnabled,onChange:t=>n("browserEnabled",t.target.checked),className:"rounded border-[#ECEAE3] text-[#553DE9] focus:ring-[#553DE9]"})]}),e.jsxs("div",{className:"p-3 space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-[#201515] dark:text-[#E8E6E3]",children:"Email Notifications"}),e.jsx("p",{className:"text-xs text-[#939084]",children:"Send email for important events"})]}),e.jsx("input",{type:"checkbox",checked:s.emailEnabled,onChange:t=>n("emailEnabled",t.target.checked),className:"rounded border-[#ECEAE3] text-[#553DE9] focus:ring-[#553DE9]"})]}),s.emailEnabled&&e.jsx("input",{type:"email",value:s.emailAddress,onChange:t=>n("emailAddress",t.target.value),placeholder:"notifications@company.com",className:"w-full px-3 py-2 text-sm rounded-lg border border-[#ECEAE3] dark:border-[#2A2A30] bg-white dark:bg-[#1A1A1E] text-[#201515] dark:text-[#E8E6E3] placeholder-[#939084]"})]}),e.jsxs("div",{className:"p-3 space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-[#201515] dark:text-[#E8E6E3]",children:"Slack Webhook"}),e.jsx("p",{className:"text-xs text-[#939084]",children:"Post to a Slack channel"})]}),e.jsx("input",{type:"checkbox",checked:s.slackEnabled,onChange:t=>n("slackEnabled",t.target.checked),className:"rounded border-[#ECEAE3] text-[#553DE9] focus:ring-[#553DE9]"})]}),s.slackEnabled&&e.jsx("input",{type:"url",value:s.slackWebhookUrl,onChange:t=>n("slackWebhookUrl",t.target.value),placeholder:"https://hooks.slack.com/services/...",className:"w-full px-3 py-2 text-sm rounded-lg border border-[#ECEAE3] dark:border-[#2A2A30] bg-white dark:bg-[#1A1A1E] text-[#201515] dark:text-[#E8E6E3] placeholder-[#939084] font-mono"})]})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h4",{className:"text-xs font-semibold text-[#6B6960] uppercase tracking-wider",children:"Events"}),e.jsx("div",{className:"border border-[#ECEAE3] dark:border-[#2A2A30] rounded-lg divide-y divide-[#ECEAE3] dark:divide-[#2A2A30]",children:[{key:"notifyOnBuildComplete",label:"Build Complete",desc:"When a build finishes successfully"},{key:"notifyOnBuildFailure",label:"Build Failure",desc:"When a build fails or times out"},{key:"notifyOnBudgetAlert",label:"Budget Alert",desc:"When spending approaches the limit"},{key:"notifyOnSecurityEvent",label:"Security Event",desc:"Login from new device, key rotation, etc."}].map(t=>e.jsxs("div",{className:"p-3 flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-[#201515] dark:text-[#E8E6E3]",children:t.label}),e.jsx("p",{className:"text-xs text-[#939084]",children:t.desc})]}),e.jsx("input",{type:"checkbox",checked:s[t.key],onChange:a=>n(t.key,a.target.checked),className:"rounded border-[#ECEAE3] text-[#553DE9] focus:ring-[#553DE9]"})]},t.key))})]}),e.jsx(h,{size:"sm",icon:r?g:f,onClick:x,children:r?"Saved":"Save Notifications"})]})}function xe(){const[s,l]=o.useState(le),[r,c]=o.useState(!1),n=(t,a)=>{l(d=>({...d,[t]:a}))},x=()=>{c(!0),setTimeout(()=>c(!1),2e3)};return e.jsxs("div",{className:"space-y-4",children:[e.jsx("p",{className:"text-xs text-[#6B6960]",children:"Configure how long different types of data are retained before automatic cleanup."}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-[#6B6960] mb-1",children:"Log Retention (days)"}),e.jsx("input",{type:"number",value:s.logRetentionDays,onChange:t=>n("logRetentionDays",parseInt(t.target.value)||0),min:7,max:365,className:"w-full px-3 py-2 text-sm rounded-lg border border-[#ECEAE3] dark:border-[#2A2A30] bg-white dark:bg-[#1A1A1E] text-[#201515] dark:text-[#E8E6E3]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-[#6B6960] mb-1",children:"Audit Retention (days)"}),e.jsx("input",{type:"number",value:s.auditRetentionDays,onChange:t=>n("auditRetentionDays",parseInt(t.target.value)||0),min:30,max:3650,className:"w-full px-3 py-2 text-sm rounded-lg border border-[#ECEAE3] dark:border-[#2A2A30] bg-white dark:bg-[#1A1A1E] text-[#201515] dark:text-[#E8E6E3]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-[#6B6960] mb-1",children:"Session Retention (days)"}),e.jsx("input",{type:"number",value:s.sessionRetentionDays,onChange:t=>n("sessionRetentionDays",parseInt(t.target.value)||0),min:7,max:365,className:"w-full px-3 py-2 text-sm rounded-lg border border-[#ECEAE3] dark:border-[#2A2A30] bg-white dark:bg-[#1A1A1E] text-[#201515] dark:text-[#E8E6E3]"})]})]}),e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:s.autoCleanupEnabled,onChange:t=>n("autoCleanupEnabled",t.target.checked),className:"rounded border-[#ECEAE3] text-[#553DE9] focus:ring-[#553DE9]"}),e.jsx("span",{className:"text-sm text-[#201515] dark:text-[#E8E6E3]",children:"Enable automatic cleanup"})]}),s.lastCleanup&&e.jsxs("p",{className:"text-xs text-[#939084]",children:["Last cleanup: ",new Date(s.lastCleanup).toLocaleString()]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(h,{size:"sm",icon:r?g:f,onClick:x,children:r?"Saved":"Save Retention Settings"}),e.jsx(h,{size:"sm",variant:"ghost",icon:_,children:"Run Cleanup Now"})]})]})}const k=[{id:"providers",label:"Providers",icon:W},{id:"builds",label:"Build Defaults",icon:V},{id:"security",label:"Security",icon:C},{id:"api-keys",label:"API Keys",icon:C},{id:"notifications",label:"Notifications",icon:Y},{id:"retention",label:"Data Retention",icon:H}];function me(){return e.jsxs("div",{className:"max-w-[500px] mx-auto px-6 py-20 text-center",children:[e.jsx(Q,{size:48,className:"mx-auto text-[#C45B5B] mb-4"}),e.jsx("h1",{className:"font-heading text-h1 text-[#36342E] dark:text-[#E8E6E3] mb-2",children:"Access Denied"}),e.jsx("p",{className:"text-sm text-[#6B6960]",children:"You do not have permission to access system settings. Contact your organization administrator for access."})]})}function De(){var x,t;const{user:s,isLocalMode:l}=K(),[r,c]=o.useState("providers");return l||(s==null?void 0:s.authenticated)===!0?e.jsxs("div",{className:"max-w-[1000px] mx-auto px-6 py-8",children:[e.jsx("h1",{className:"font-heading text-h1 text-[#36342E] dark:text-[#E8E6E3] mb-6",children:"System Settings"}),e.jsxs("div",{className:"flex gap-6",children:[e.jsx("nav",{className:"w-48 flex-shrink-0 space-y-1",children:k.map(a=>e.jsxs("button",{onClick:()=>c(a.id),className:`w-full flex items-center gap-2 px-3 py-2 text-sm rounded-lg text-left transition-colors ${r===a.id?"bg-[#553DE9]/8 text-[#553DE9] font-medium":"text-[#6B6960] hover:bg-[#F8F4F0] dark:hover:bg-[#222228] hover:text-[#36342E] dark:hover:text-[#E8E6E3]"}`,children:[e.jsx(a.icon,{size:16}),a.label]},a.id))}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsxs("div",{className:"card p-6",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[((x=k.find(a=>a.id===r))==null?void 0:x.icon)&&(()=>{const a=k.find(d=>d.id===r).icon;return e.jsx(a,{size:18,className:"text-[#553DE9]"})})(),e.jsx("h2",{className:"text-sm font-semibold text-[#201515] dark:text-[#E8E6E3] uppercase tracking-wider",children:(t=k.find(a=>a.id===r))==null?void 0:t.label})]}),r==="providers"&&e.jsx(ie,{}),r==="builds"&&e.jsx(de,{}),r==="security"&&e.jsx(oe,{}),r==="api-keys"&&e.jsx(te,{}),r==="notifications"&&e.jsx(ce,{}),r==="retention"&&e.jsx(xe,{})]})})]})]}):e.jsx(me,{})}export{De as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as P,r,j as e,U as w,X as B,
|
|
1
|
+
import{c as P,r,j as e,U as w,X as B,i as z,y as U,a as F,x as O,b as V,h as H,M as q,R as K,m as Y,Y as G,$ as X}from"./index-CM_b_EhP.js";import{B as N}from"./Button-CFLVoduT.js";import{U as M,A as D}from"./Avatar-CL9Id9Hi.js";import{M as J}from"./mail-CzMRod6m.js";import{L as Q}from"./lock-DbJ9zxbw.js";import{A as k}from"./activity-DH3ih2nS.js";import{P as _}from"./plus-j08lFR-K.js";import{S as W}from"./save-B8fV_ZpE.js";import{T as Z}from"./trash-2-DEKSVae5.js";import{U as ee}from"./user-BB5J8wAF.js";import{C as $}from"./clock-IW4Wq86N.js";import{F as te}from"./file-code-corner-Box4IwG1.js";import{F as se}from"./file-plus-DpGqlXF8.js";import{H as ae}from"./hammer-DRbIQ4QU.js";/**
|
|
2
2
|
* @license lucide-react v0.577.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|