create-claudeportal 0.3.1 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -32,7 +32,7 @@ Present findings in a structured format with specific references.`},{key:"transf
|
|
|
32
32
|
Restructure and reformat the information while preserving all key content. If extracting to a table or spreadsheet format, use CSV with the first row as column headers.`}],wS=[{key:"understand",label:"Understand",description:"Tell me what's in here"},{key:"create",label:"Create",description:"Make something from this"}],CS=`IMPORTANT: Do NOT modify, move, rename, or delete any of the original files. Only create new files in the output/ directory.
|
|
33
33
|
If you cannot read a file, note it as skipped in the output with the filename and reason.`,kS="If the folder has more files than you can process in one pass, focus on the most relevant files based on their names and types, and note which files were not reviewed.";function ES(e){const{folderPath:i,templateKey:n,freeformText:l,context:o,fileCount:h}=e,d=n?oo.find(x=>x.key===n):null,_=d?.format||"md",p=new Date().toISOString().slice(0,10),f=d?.key||"output",S=`${i}/output/${f}-${p}.${_}`,y=[CS,""];return h>50&&y.push(kS,""),d&&y.push(`Scan all documents in ${i} and ${d.prompt}`),l&&y.push(d?`
|
|
34
34
|
Also: ${l}`:`Scan all documents in ${i} and ${l}`),o&&y.push("",`Additional instructions: ${o}`),e.styleReference&&(y.push("","Use the following document as a style, tone, and format reference. Match its structure, headings, voice, and level of detail:"),y.push("---BEGIN STYLE REFERENCE---"),y.push(e.styleReference.slice(0,8e3)),y.push("---END STYLE REFERENCE---")),y.push("",`Save the output to ${S}`),y.join(`
|
|
35
|
-
`)}function TS(e){const i=z.useRef(e);i.current=e;const n=z.useRef(null),l=z.useRef(null),o=z.useCallback(()=>{n.current?.close(),n.current=null,l.current&&(clearTimeout(l.current),l.current=null)},[]),h=z.useCallback((d,_)=>{o();const p=`/api/doc-events?folderPath=${encodeURIComponent(d)}`,f=new EventSource(p);n.current=f,f.addEventListener("output-created",S=>{i.current(JSON.parse(S.data)),o()}),l.current=setTimeout(()=>{o(),_()},600*1e3)},[o]);return z.useEffect(()=>o,[o]),{listen:h,close:o}}const Dm=z.createContext(null);function RS({children:e}){const[i,n]=z.useState(null),[l,o]=z.useState(null),[h,d]=z.useState(!1),[_,p]=z.useState(null),[f,S]=z.useState(""),[y,x]=z.useState(""),[C,b]=z.useState({status:"empty"}),[T,M]=z.useState(null),[A,O]=z.useState(!1),{sendPrompt:D}=en(),{path:L,mode:H}=Et(),X=z.useCallback(async de=>{let Z=await _i(`/api/read-output?path=${encodeURIComponent(de)}`);Z||(Z=await _i(`/api/read-file?path=${encodeURIComponent(de)}`)),Z?(b({status:"complete",...Z}),O(!1)):(b({status:"error",message:"Failed to load file"}),O(!1))},[]),V=TS(de=>X(de.path)),ue=z.useCallback(async de=>{n(de),d(!0);const Z=await _i(`/api/folder-scan?folderPath=${encodeURIComponent(de)}`);o(Z||null),d(!1)},[]);z.useEffect(()=>{H==="document"&&L&&!i&&ue(L)},[H,L,i,ue]);const ge=z.useCallback(()=>{n(null),o(null),b({status:"empty"}),O(!1),V.close()},[V]),Ye=z.useCallback(async()=>{if(A||!i||!_&&!f.trim())return;if(O(!0),!(await fetch(`/api/ensure-output-dir?folderPath=${encodeURIComponent(i)}`,{method:"POST"})).ok){b({status:"error",message:"Failed to create output directory"}),O(!1);return}const Z=l?.summary.total||0,G=ES({folderPath:i,templateKey:_||void 0,freeformText:f.trim()||void 0,context:y.trim()||void 0,styleReference:T||void 0,fileCount:Z}),ie=_?oo.find(ee=>ee.key===_)?.name||_:"Custom";b({status:"processing",outcome:ie,fileCount:Z}),V.listen(i,()=>{b({status:"error",message:"Timed out waiting for output. Check the terminal for details, or try again with fewer files."}),O(!1)}),D(G)},[A,i,_,f,y,T,l,D,V]);return g.jsx(Dm.Provider,{value:{folderPath:i,folderScan:l,scanLoading:h,scanFolder:ue,clearFolder:ge,selectedOutcome:_,setSelectedOutcome:p,freeformText:f,setFreeformText:S,contextText:y,setContextText:x,styleExampleContent:T,setStyleExampleContent:M,output:C,run:Ye,loadOutput:X,canRun:!!i&&(!!_||!!f.trim())&&!A,isRunning:A},children:e})}function ji(){const e=z.useContext(Dm);if(!e)throw new Error("useDocModeContext must be used within DocModeProvider");return e}function DS(){const{path:e,setGitInfo:i}=Et();z.useEffect(()=>{e&&_i(Rm("/api/project-info",e)).then(n=>{n&&i(n.gitBranch,n.gitRemote)})},[e,i])}function BS({onAllReady:e,onNeedInstall:i}){const[n,l]=z.useState([]),[o,h]=z.useState(!0);z.useEffect(()=>{d()},[]);async function d(){h(!0);const _=await _i("/api/detect");_&&(l(_.tools),_.tools.filter(f=>f.required&&!f.installed).length===0?setTimeout(e,600):i(_.tools)),h(!1)}return g.jsxs("div",{className:"text-center",children:[g.jsx("h2",{className:"text-2xl font-bold text-[var(--text-primary)] mb-3",children:"Getting things ready..."}),g.jsx("p",{className:"text-[var(--text-secondary)] text-base mb-10",children:"Checking what's installed on your machine"}),o?g.jsxs("div",{className:"flex items-center justify-center gap-4 text-[var(--text-secondary)] text-base",children:[g.jsx("div",{className:"w-6 h-6 border-2 border-[#5e17eb]/30 border-t-[#5e17eb] rounded-full animate-spin"}),g.jsx("span",{children:"Scanning..."})]}):g.jsx("div",{className:"space-y-3 text-left",children:n.map(_=>g.jsxs("div",{className:"flex items-center gap-5 px-6 py-5 bg-[var(--bg-secondary)] rounded-2xl border border-[var(--border)]",style:{boxShadow:"0 4px 12px rgba(0,0,0,0.06)"},children:[g.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center text-base font-bold ${_.installed?"bg-[#30d158]/15 text-[#30d158]":"bg-[#ff453a]/15 text-[#ff453a]"}`,children:_.installed?"✓":"✗"}),g.jsx("span",{className:"text-[var(--text-primary)] text-lg font-semibold",children:_.name}),_.version&&g.jsx("span",{className:"text-[var(--text-secondary)] text-sm font-mono ml-auto",children:_.version})]},_.name))})]})}const MS={node:{steps:["Download from nodejs.org (LTS recommended)","Run the installer and follow the prompts","Restart your terminal after installing"],link:"https://nodejs.org",linkLabel:"Download Node.js"},npm:{steps:["npm comes bundled with Node.js","Install Node.js first and npm will be included"]},git:{steps:["
|
|
35
|
+
`)}function TS(e){const i=z.useRef(e);i.current=e;const n=z.useRef(null),l=z.useRef(null),o=z.useCallback(()=>{n.current?.close(),n.current=null,l.current&&(clearTimeout(l.current),l.current=null)},[]),h=z.useCallback((d,_)=>{o();const p=`/api/doc-events?folderPath=${encodeURIComponent(d)}`,f=new EventSource(p);n.current=f,f.addEventListener("output-created",S=>{i.current(JSON.parse(S.data)),o()}),l.current=setTimeout(()=>{o(),_()},600*1e3)},[o]);return z.useEffect(()=>o,[o]),{listen:h,close:o}}const Dm=z.createContext(null);function RS({children:e}){const[i,n]=z.useState(null),[l,o]=z.useState(null),[h,d]=z.useState(!1),[_,p]=z.useState(null),[f,S]=z.useState(""),[y,x]=z.useState(""),[C,b]=z.useState({status:"empty"}),[T,M]=z.useState(null),[A,O]=z.useState(!1),{sendPrompt:D}=en(),{path:L,mode:H}=Et(),X=z.useCallback(async de=>{let Z=await _i(`/api/read-output?path=${encodeURIComponent(de)}`);Z||(Z=await _i(`/api/read-file?path=${encodeURIComponent(de)}`)),Z?(b({status:"complete",...Z}),O(!1)):(b({status:"error",message:"Failed to load file"}),O(!1))},[]),V=TS(de=>X(de.path)),ue=z.useCallback(async de=>{n(de),d(!0);const Z=await _i(`/api/folder-scan?folderPath=${encodeURIComponent(de)}`);o(Z||null),d(!1)},[]);z.useEffect(()=>{H==="document"&&L&&!i&&ue(L)},[H,L,i,ue]);const ge=z.useCallback(()=>{n(null),o(null),b({status:"empty"}),O(!1),V.close()},[V]),Ye=z.useCallback(async()=>{if(A||!i||!_&&!f.trim())return;if(O(!0),!(await fetch(`/api/ensure-output-dir?folderPath=${encodeURIComponent(i)}`,{method:"POST"})).ok){b({status:"error",message:"Failed to create output directory"}),O(!1);return}const Z=l?.summary.total||0,G=ES({folderPath:i,templateKey:_||void 0,freeformText:f.trim()||void 0,context:y.trim()||void 0,styleReference:T||void 0,fileCount:Z}),ie=_?oo.find(ee=>ee.key===_)?.name||_:"Custom";b({status:"processing",outcome:ie,fileCount:Z}),V.listen(i,()=>{b({status:"error",message:"Timed out waiting for output. Check the terminal for details, or try again with fewer files."}),O(!1)}),D(G)},[A,i,_,f,y,T,l,D,V]);return g.jsx(Dm.Provider,{value:{folderPath:i,folderScan:l,scanLoading:h,scanFolder:ue,clearFolder:ge,selectedOutcome:_,setSelectedOutcome:p,freeformText:f,setFreeformText:S,contextText:y,setContextText:x,styleExampleContent:T,setStyleExampleContent:M,output:C,run:Ye,loadOutput:X,canRun:!!i&&(!!_||!!f.trim())&&!A,isRunning:A},children:e})}function ji(){const e=z.useContext(Dm);if(!e)throw new Error("useDocModeContext must be used within DocModeProvider");return e}function DS(){const{path:e,setGitInfo:i}=Et();z.useEffect(()=>{e&&_i(Rm("/api/project-info",e)).then(n=>{n&&i(n.gitBranch,n.gitRemote)})},[e,i])}function BS({onAllReady:e,onNeedInstall:i}){const[n,l]=z.useState([]),[o,h]=z.useState(!0);z.useEffect(()=>{d()},[]);async function d(){h(!0);const _=await _i("/api/detect");_&&(l(_.tools),_.tools.filter(f=>f.required&&!f.installed).length===0?setTimeout(e,600):i(_.tools)),h(!1)}return g.jsxs("div",{className:"text-center",children:[g.jsx("h2",{className:"text-2xl font-bold text-[var(--text-primary)] mb-3",children:"Getting things ready..."}),g.jsx("p",{className:"text-[var(--text-secondary)] text-base mb-10",children:"Checking what's installed on your machine"}),o?g.jsxs("div",{className:"flex items-center justify-center gap-4 text-[var(--text-secondary)] text-base",children:[g.jsx("div",{className:"w-6 h-6 border-2 border-[#5e17eb]/30 border-t-[#5e17eb] rounded-full animate-spin"}),g.jsx("span",{children:"Scanning..."})]}):g.jsx("div",{className:"space-y-3 text-left",children:n.map(_=>g.jsxs("div",{className:"flex items-center gap-5 px-6 py-5 bg-[var(--bg-secondary)] rounded-2xl border border-[var(--border)]",style:{boxShadow:"0 4px 12px rgba(0,0,0,0.06)"},children:[g.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center text-base font-bold ${_.installed?"bg-[#30d158]/15 text-[#30d158]":"bg-[#ff453a]/15 text-[#ff453a]"}`,children:_.installed?"✓":"✗"}),g.jsx("span",{className:"text-[var(--text-primary)] text-lg font-semibold",children:_.name}),_.version&&g.jsx("span",{className:"text-[var(--text-secondary)] text-sm font-mono ml-auto",children:_.version})]},_.name))})]})}const MS={node:{steps:["Download from nodejs.org (LTS recommended)","Run the installer and follow the prompts","Restart your terminal after installing"],link:"https://nodejs.org",linkLabel:"Download Node.js"},npm:{steps:["npm comes bundled with Node.js","Install Node.js first and npm will be included"]},git:{steps:["Click Install below","Look for a pop-up on your screen and click 'Install'","Wait for it to finish (this can take a few minutes)","Once done, click Retry below to verify"]},claude:{steps:["Click Install below to download Claude Code","Once installed, you'll sign in when the terminal opens"]}};function zS({tools:e,onDone:i}){const[n,l]=z.useState(null),[o,h]=z.useState({}),[d,_]=z.useState(null),[p,f]=z.useState(null),[S,y]=z.useState(()=>{const M={};for(const A of e)M[A.id]=A.installed?"done":"pending";return M}),x=e.filter(M=>!M.installed&&M.required);async function C(M){l(M),y(A=>({...A,[M]:"installing"})),h(A=>{const O={...A};return delete O[M],O});try{const A=await fetch(`/api/install/${encodeURIComponent(M)}`,{method:"POST"});if(!A.ok){const H=await A.text().catch(()=>"Server error");h(X=>({...X,[M]:`Install failed (${A.status}): ${H}`})),y(X=>({...X,[M]:"error"})),l(null);return}const O=A.body?.getReader(),D=new TextDecoder;let L=!1;if(O){let H="";for(;;){const{done:X,value:V}=await O.read();if(X)break;H+=D.decode(V,{stream:!0});const ue=H.split(`
|
|
36
36
|
`);H=ue.pop()??"";for(const ge of ue)if(ge.startsWith("data: "))try{const Ye=JSON.parse(ge.slice(6));Ye.tool===M&&Ye.status==="done"&&(L=!0),Ye.tool===M&&Ye.status==="error"&&(L=!1,Ye.error&&h(de=>({...de,[M]:Ye.error})))}catch{}}}y(H=>({...H,[M]:L?"done":"error"}))}catch{y(A=>({...A,[M]:"error"}))}l(null)}const b=x.every(M=>S[M.id]==="done"),T=M=>{switch(M){case"done":return{symbol:"✓",color:"#22c55e"};case"error":return{symbol:"✗",color:"#ef4444"};case"installing":return{symbol:"⏳",color:"#f59e0b"};default:return{symbol:"○",color:"#9ca3af"}}};return g.jsxs("div",{className:"space-y-4",children:[g.jsx("h2",{style:{fontSize:"20px",fontWeight:600,color:"var(--text-primary)"},children:"Install missing tools"}),g.jsx("p",{style:{fontSize:"14px",color:"var(--text-secondary)",marginTop:"-8px"},children:"We'll help you get everything set up step by step."}),g.jsx("div",{className:"space-y-2",children:x.map(M=>{const A=MS[M.id],O=T(S[M.id]),D=d===M.id;return g.jsxs("div",{children:[g.jsx("div",{style:{padding:"16px 20px",background:"var(--bg-secondary)",border:"1px solid var(--border)",borderRadius:D?"12px 12px 0 0":"12px",boxShadow:"0 2px 8px rgba(0,0,0,0.04)"},children:g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[g.jsx("span",{style:{color:O.color,fontSize:"16px"},children:O.symbol}),g.jsx("div",{style:{flex:1},children:g.jsx("span",{style:{color:"var(--text-primary)",fontSize:"15px",fontWeight:500},children:M.name})}),S[M.id]==="pending"&&g.jsxs("div",{style:{display:"flex",gap:"6px"},children:[A&&g.jsx("button",{onClick:()=>_(D?null:M.id),style:{padding:"8px 12px",background:"transparent",color:"#6b7280",fontSize:"12px",fontWeight:500,borderRadius:"8px",border:"1px solid #e5e7eb",cursor:"pointer"},children:"Guide"}),g.jsx("button",{onClick:()=>C(M.id),disabled:n!==null,style:{padding:"8px 16px",background:"#22c55e",color:"#fff",fontSize:"13px",fontWeight:600,borderRadius:"8px",border:"none",cursor:"pointer",opacity:n?.5:1},children:"Install"})]}),S[M.id]==="error"&&g.jsx("button",{onClick:()=>C(M.id),disabled:n!==null,style:{padding:"8px 16px",background:"#ef4444",color:"#fff",fontSize:"13px",fontWeight:600,borderRadius:"8px",border:"none",cursor:"pointer"},children:"Retry"}),S[M.id]==="installing"&&g.jsx("span",{style:{fontSize:"13px",color:"#f59e0b",fontWeight:500},children:"Installing..."})]})}),D&&A&&g.jsxs("div",{style:{padding:"16px 20px",background:"rgba(94, 23, 235, 0.03)",border:"1px solid var(--border)",borderTop:"none",borderRadius:"0 0 12px 12px"},children:[g.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:A.steps.map((L,H)=>g.jsxs("div",{style:{display:"flex",gap:"10px",alignItems:"flex-start"},children:[g.jsx("span",{style:{width:"20px",height:"20px",borderRadius:"50%",background:"#5e17eb",color:"#fff",fontSize:"11px",fontWeight:700,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:H+1}),g.jsx("span",{style:{fontSize:"13px",color:"var(--text-primary)",lineHeight:1.5},children:L})]},H))}),A.link&&g.jsxs("a",{href:A.link,target:"_blank",rel:"noopener noreferrer",style:{display:"inline-block",marginTop:"12px",padding:"8px 16px",background:"#5e17eb",color:"#fff",fontSize:"13px",fontWeight:600,borderRadius:"8px",textDecoration:"none"},children:[A.linkLabel||"Open"," →"]})]}),S[M.id]==="error"&&o[M.id]&&g.jsx("div",{style:{marginTop:"4px",padding:"8px 12px",background:"rgba(239, 68, 68, 0.08)",borderRadius:"8px",fontSize:"12px",color:"#ef4444",lineHeight:1.4,fontFamily:"monospace",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:o[M.id]})]},M.id)})}),b&&g.jsx("button",{onClick:i,style:{width:"100%",padding:"16px",background:"linear-gradient(135deg, #5e17eb, #8b5cf6)",color:"#fff",borderRadius:"12px",fontSize:"16px",fontWeight:700,border:"none",cursor:"pointer",boxShadow:"0 4px 12px rgba(94,23,235,0.3)"},children:"Continue →"})]})}function AS({onProjectSelected:e,mode:i="developer"}){const n=i==="document",[l,o]=z.useState(n?"open":"choose"),[h,d]=z.useState(""),[_,p]=z.useState(!1),[f,S]=z.useState(""),[y,x]=z.useState(""),[C,b]=z.useState(null),[T,M]=z.useState(!1),A=km();async function O(){if(!f.trim())return;M(!0),b(null);const H=await _i("/api/scaffold",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectName:f.trim()})});H?.projectDir?e(H.projectDir):b("Failed to create project"),M(!1)}async function D(){if(!y.trim())return;M(!0),b(null);const H=await _i("/api/scaffold",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectName:y.trim().split("/").pop()?.replace(/\.git$/,"")||"cloned-repo"})});H?.projectDir?e(H.projectDir):b("Failed to clone repository"),M(!1)}const L={padding:"36px",background:"var(--bg-secondary)",borderRadius:"24px",textAlign:"center",border:"1px solid var(--border)",boxShadow:"0 8px 24px rgba(0,0,0,0.08)",cursor:"pointer",transition:"all 0.3s ease"};return l==="choose"?g.jsxs("div",{className:"animate-in",children:[g.jsx("h2",{style:{fontSize:"28px",fontWeight:700,color:"var(--text-primary)",marginBottom:"8px",textAlign:"center"},children:"Choose a folder"}),g.jsx("p",{style:{color:"var(--text-secondary)",fontSize:"17px",marginBottom:"48px",textAlign:"center"},children:"Where would you like to work?"}),A.length>0&&g.jsxs("div",{style:{marginBottom:"48px"},children:[g.jsx("p",{style:{fontSize:"13px",color:"var(--text-secondary)",fontWeight:600,textTransform:"uppercase",letterSpacing:"0.08em",marginBottom:"16px"},children:"Recent"}),g.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"12px"},children:A.map(H=>g.jsx("button",{onClick:()=>e(H),className:"transition-all duration-300 hover:-translate-y-0.5 active:scale-[0.98]",style:{width:"100%",textAlign:"left",padding:"20px 24px",background:"var(--bg-secondary)",borderRadius:"16px",color:"var(--text-primary)",fontSize:"15px",fontFamily:"'SF Mono', Menlo, monospace",border:"1px solid var(--border)",boxShadow:"0 4px 12px rgba(0,0,0,0.06)",cursor:"pointer",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:H},H))})]}),g.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr 1fr",gap:"20px"},children:[g.jsxs("button",{onClick:async()=>{p(!0);const H=await _i("/api/pick-folder");p(!1),H?.path&&e(H.path)},disabled:_,className:"transition-all duration-300 hover:-translate-y-1 active:scale-[0.97]",style:L,children:[g.jsx("div",{style:{fontSize:"44px",marginBottom:"16px"},children:_?"⏳":"📂"}),g.jsx("div",{style:{color:"var(--text-primary)",fontSize:"16px",fontWeight:700,marginBottom:"6px"},children:_?"Choosing...":"Open existing"}),g.jsx("div",{style:{color:"var(--text-secondary)",fontSize:"14px"},children:"Browse in Finder"})]}),[{m:"create",icon:"✨",label:"Create new",desc:"Start from scratch"},{m:"clone",icon:"📦",label:"Clone repo",desc:"From GitHub"}].map(({m:H,icon:X,label:V,desc:ue})=>g.jsxs("button",{onClick:()=>o(H),className:"transition-all duration-300 hover:-translate-y-1 active:scale-[0.97]",style:L,children:[g.jsx("div",{style:{fontSize:"44px",marginBottom:"16px"},children:X}),g.jsx("div",{style:{color:"var(--text-primary)",fontSize:"16px",fontWeight:700,marginBottom:"6px"},children:V}),g.jsx("div",{style:{color:"var(--text-secondary)",fontSize:"14px"},children:ue})]},H))]}),g.jsx("div",{style:{marginTop:"28px",textAlign:"center"},children:g.jsx("button",{onClick:()=>o("open"),className:"transition-colors",style:{color:"var(--text-secondary)",fontSize:"14px",background:"none",border:"none",cursor:"pointer"},children:"Or enter a path manually →"})})]}):g.jsxs("div",{className:"animate-in",children:[!n&&g.jsx("button",{onClick:()=>o("choose"),className:"text-[var(--text-secondary)] text-base hover:text-[var(--text-primary)] transition-colors mb-8 block",children:"← Back"}),l==="open"&&g.jsxs("div",{children:[g.jsx("h2",{style:{fontSize:"28px",fontWeight:700,color:"var(--text-primary)",marginBottom:"8px"},children:n?"What folder can Claude find your work?":"Open existing project"}),g.jsx("p",{style:{color:"var(--text-secondary)",fontSize:"17px",marginBottom:"40px"},children:n?"Browse to the folder with your documents.":"Enter the path to your project."}),n?g.jsx("button",{onClick:async()=>{p(!0);const H=await _i("/api/pick-folder");p(!1),H?.path&&e(H.path)},disabled:_,className:"w-full hover:-translate-y-0.5 transition-all active:scale-[0.98]",style:{padding:"20px",background:"linear-gradient(135deg, #5e17eb, #8b5cf6)",color:"white",borderRadius:"16px",fontSize:"18px",fontWeight:700,border:"none",cursor:"pointer",boxShadow:"0 4px 12px rgba(94,23,235,0.3)",marginBottom:"40px"},children:_?"⏳ Choosing...":"📂 Browse for folder"}):g.jsxs(g.Fragment,{children:[g.jsx("input",{type:"text",value:h,onChange:H=>d(H.target.value),placeholder:"/path/to/your/project",autoFocus:!0,className:"w-full focus:outline-none transition-all",style:{padding:"20px 24px",background:"var(--bg-secondary)",border:"1px solid var(--border)",borderRadius:"16px",color:"var(--text-primary)",fontFamily:"'SF Mono', Menlo, monospace",fontSize:"15px",boxShadow:"0 4px 12px rgba(0,0,0,0.06)",marginBottom:"16px"}}),g.jsx("button",{onClick:()=>h.trim()&&e(h.trim()),disabled:!h.trim(),className:"w-full hover:-translate-y-0.5 disabled:opacity-30 transition-all active:scale-[0.98]",style:{padding:"20px",background:"linear-gradient(135deg, #5e17eb, #8b5cf6)",color:"white",borderRadius:"16px",fontSize:"18px",fontWeight:700,border:"none",cursor:"pointer",boxShadow:"0 4px 12px rgba(94,23,235,0.3)",marginBottom:"40px"},children:"Open project"})]}),n&&A.length>0&&g.jsxs("div",{style:{marginTop:n?"0":"40px"},children:[g.jsx("p",{style:{fontSize:"13px",color:"var(--text-secondary)",fontWeight:600,textTransform:"uppercase",letterSpacing:"0.08em",marginBottom:"16px"},children:"Recent"}),g.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"12px"},children:A.map(H=>g.jsx("button",{onClick:()=>e(H),className:"transition-all duration-200 hover:-translate-y-0.5 active:scale-[0.98]",style:{width:"100%",textAlign:"left",padding:"20px 24px",background:"var(--bg-secondary)",borderRadius:"16px",color:"var(--text-primary)",fontSize:"15px",fontFamily:"'SF Mono', Menlo, monospace",border:"1px solid var(--border)",cursor:"pointer",boxShadow:"0 4px 12px rgba(0,0,0,0.06)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:H},H))})]})]}),l==="create"&&g.jsxs("div",{className:"space-y-6",children:[g.jsx("h2",{className:"text-2xl font-bold text-[var(--text-primary)]",children:"Create new project"}),g.jsx("input",{type:"text",value:f,onChange:H=>S(H.target.value),placeholder:"my-app",autoFocus:!0,className:"w-full px-6 py-5 bg-[var(--bg-secondary)] border border-[var(--border)] rounded-xl text-[var(--text-primary)] font-mono text-base placeholder:text-[#86868b] focus:outline-none focus:border-[#5e17eb]/50 focus:ring-2 focus:ring-[#5e17eb]/10 transition-all",style:{boxShadow:"0 4px 12px rgba(0,0,0,0.06)"}}),g.jsx("button",{onClick:O,disabled:!f.trim()||T,className:"w-full py-5 bg-gradient-to-r from-[#5e17eb] to-[#8b5cf6] text-white rounded-xl text-lg font-bold hover:-translate-y-0.5 disabled:opacity-30 transition-all active:scale-[0.98]",style:{boxShadow:"0 4px 12px rgba(94,23,235,0.3)"},children:T?"Creating...":"Create project"})]}),l==="clone"&&g.jsxs("div",{className:"space-y-6",children:[g.jsx("h2",{className:"text-2xl font-bold text-[var(--text-primary)]",children:"Clone from GitHub"}),g.jsx("input",{type:"text",value:y,onChange:H=>x(H.target.value),placeholder:"https://github.com/user/repo",autoFocus:!0,className:"w-full px-6 py-5 bg-[var(--bg-secondary)] border border-[var(--border)] rounded-xl text-[var(--text-primary)] font-mono text-base placeholder:text-[#86868b] focus:outline-none focus:border-[#5e17eb]/50 focus:ring-2 focus:ring-[#5e17eb]/10 transition-all",style:{boxShadow:"0 4px 12px rgba(0,0,0,0.06)"}}),g.jsx("button",{onClick:D,disabled:!y.trim()||T,className:"w-full py-5 bg-gradient-to-r from-[#5e17eb] to-[#8b5cf6] text-white rounded-xl text-lg font-bold hover:-translate-y-0.5 disabled:opacity-30 transition-all active:scale-[0.98]",style:{boxShadow:"0 4px 12px rgba(94,23,235,0.3)"},children:T?"Cloning...":"Clone repository"})]}),C&&g.jsx("p",{className:"text-[#ff453a] text-base bg-[#ff453a]/10 px-6 py-4 rounded-xl mt-6",children:C})]})}const Wh=[{type:"image-text",title:"Most people:",content:"See a terminal and think...",imageUrl:"https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExMG0wamx1NWUwOGcxN2F6ejBva3p3OW5peG5qdWlrcjI1d3JyM2l0dyZlcD12MV9naWZzX3NlYXJjaCZjdD1n/NRXleEopnqL3a/giphy.gif"},{type:"text",title:"What even is the terminal?",content:"Terminal = using our computer without the mouse"},{type:"text",title:"The magic of Claude Code",content:`Once we set it up, we're no longer actually talking directly to our computer.
|
|
37
37
|
|
|
38
38
|
We're talking to Claude.
|
package/dist/index.html
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>Claude Portal</title>
|
|
7
|
-
<script type="module" crossorigin src="/assets/index-
|
|
7
|
+
<script type="module" crossorigin src="/assets/index-CaQcd3YT.js"></script>
|
|
8
8
|
<link rel="stylesheet" crossorigin href="/assets/index-DuJJJuzg.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
package/package.json
CHANGED
|
@@ -3,6 +3,11 @@ const { getPlatform } = require('./platform')
|
|
|
3
3
|
const { getExpandedPath } = require('./detect-tools')
|
|
4
4
|
|
|
5
5
|
const INSTALL_COMMANDS = {
|
|
6
|
+
git: {
|
|
7
|
+
mac: { type: 'shell', command: 'xcode-select --install' },
|
|
8
|
+
windows: { type: 'manual', message: 'Download Git from git-scm.com/downloads' },
|
|
9
|
+
linux: { type: 'shell', command: 'sudo apt-get install -y git' },
|
|
10
|
+
},
|
|
6
11
|
claude: {
|
|
7
12
|
mac: { type: 'npm', package: '@anthropic-ai/claude-code' },
|
|
8
13
|
windows: { type: 'npm', package: '@anthropic-ai/claude-code' },
|
|
@@ -35,6 +40,10 @@ async function installTool(toolId, onProgress) {
|
|
|
35
40
|
case 'shell':
|
|
36
41
|
return await installViaShell(osConfig.command, onProgress)
|
|
37
42
|
|
|
43
|
+
case 'manual':
|
|
44
|
+
onProgress(osConfig.message)
|
|
45
|
+
return { success: false, error: osConfig.message }
|
|
46
|
+
|
|
38
47
|
default:
|
|
39
48
|
return { success: false, error: `Unknown install type: ${osConfig.type}` }
|
|
40
49
|
}
|