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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as F,r as o,j as e,b as q,U as V,d as O,
|
|
1
|
+
import{c as F,r as o,j as e,b as q,U as V,d as O,w as B,R as D,u as z,a as J,X as P,y as K,F as T,v as Z,J as X,A as ee,n as W,k as te}from"./index-CM_b_EhP.js";import{B as N}from"./Button-CFLVoduT.js";import{u as se}from"./usePolling-PiRLqNu6.js";import{C as ie}from"./chevron-left-D2jcWDll.js";import{C as I}from"./clock-IW4Wq86N.js";import{L as ae}from"./lightbulb-B-Itbm9g.js";import{L as le}from"./layers-B78BiFiU.js";import{C as S}from"./check-nIAqa-kf.js";import{P as L}from"./package-WZ5osvej.js";import{G as re}from"./globe-BkOnKl4x.js";import{S as ne}from"./server-D5dO1paz.js";import{B as oe}from"./bot-Cbycc3VE.js";import{D as ce}from"./database-CKSReqa5.js";import{P as de}from"./plus-j08lFR-K.js";/**
|
|
2
2
|
* @license lucide-react v0.577.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -13,7 +13,7 @@ import{c as F,r as o,j as e,b as q,U as V,d as O,v as B,R as D,u as z,a as J,X a
|
|
|
13
13
|
*
|
|
14
14
|
* This source code is licensed under the ISC license.
|
|
15
15
|
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/const pe=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],fe=F("settings",pe),A={"saas-starter.md":{uses:2847,rating:4.9,avgTime:"12 min"},"rest-api-auth.md":{uses:1923,rating:4.8,avgTime:"8 min"},"discord-bot.md":{uses:1654,rating:4.7,avgTime:"6 min"},"full-stack-demo.md":{uses:1432,rating:4.8,avgTime:"15 min"},"data-pipeline.md":{uses:1198,rating:4.6,avgTime:"10 min"},"cli-tool.md":{uses:987,rating:4.7,avgTime:"7 min"},"e-commerce.md":{uses:2156,rating:4.8,avgTime:"18 min"},"blog-platform.md":{uses:1345,rating:4.5,avgTime:"11 min"}},_={Website:"from-violet-600 via-purple-500 to-indigo-500",API:"from-teal-600 via-emerald-500 to-cyan-500",CLI:"from-slate-600 via-gray-500 to-blue-500",Bot:"from-orange-500 via-rose-500 to-pink-500",Data:"from-blue-600 via-indigo-500 to-purple-500",Other:"from-gray-500 via-slate-500 to-zinc-500"};function ue(i){return i>=1e3?`${(i/1e3).toFixed(1)}k`:String(i)}function ge(i){return i.replace(/\.md$/i,"").replace(/[-_]/g," ").replace(/\b\w/g,r=>r.toUpperCase())}function be({templates:i,onSelect:r,onPreview:c}){const p=o.useRef(null),[g,w]=o.useState(!1),[h,E]=o.useState(!0),d=i.filter(l=>l.filename in A).slice(0,6),v=d.length>=4?d:[...d,...i.filter(l=>!(l.filename in A))].slice(0,6),x=()=>{const l=p.current;l&&(w(l.scrollLeft>10),E(l.scrollLeft<l.scrollWidth-l.clientWidth-10))};o.useEffect(()=>{const l=p.current;if(l)return x(),l.addEventListener("scroll",x,{passive:!0}),()=>l.removeEventListener("scroll",x)},[v]);const f=l=>{const a=p.current;if(!a)return;const s=340;a.scrollBy({left:l==="left"?-s:s,behavior:"smooth"})};return v.length===0?null:e.jsxs("div",{className:"mb-8",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(R,{size:18,className:"text-[#D4A03C]"}),e.jsx("h2",{className:"text-lg font-bold text-[#36342E]",children:"Staff Picks"}),e.jsx("span",{className:"text-xs text-[#6B6960] bg-[#D4A03C]/10 text-[#D4A03C] font-semibold px-2 py-0.5 rounded",children:"Featured"})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("button",{onClick:()=>f("left"),disabled:!g,className:`p-1.5 rounded-lg transition-colors ${g?"hover:bg-[#F8F4F0] text-[#6B6960]":"text-[#ECEAE3] cursor-not-allowed"}`,"aria-label":"Scroll left",children:e.jsx(ie,{size:18})}),e.jsx("button",{onClick:()=>f("right"),disabled:!h,className:`p-1.5 rounded-lg transition-colors ${h?"hover:bg-[#F8F4F0] text-[#6B6960]":"text-[#ECEAE3] cursor-not-allowed"}`,"aria-label":"Scroll right",children:e.jsx(q,{size:18})})]})]}),e.jsx("div",{ref:p,className:"flex gap-4 overflow-x-auto pb-2 scrollbar-hide",style:{scrollbarWidth:"none",msOverflowStyle:"none"},children:v.map(l=>{const a=l.category||"Other",s=_[a]||_.Other,u=A[l.filename]||{uses:Math.floor(Math.random()*1500)+200,rating:4.5,avgTime:l.build_time||"8 min"},j=l.tech_stack||[];return e.jsxs("div",{className:"flex-shrink-0 w-[320px] bg-white border border-[#ECEAE3] rounded-xl shadow-card hover:shadow-card-hover transition-all duration-200 overflow-hidden cursor-pointer group",onClick:()=>c(l),children:[e.jsxs("div",{className:`h-36 bg-gradient-to-br ${s} relative overflow-hidden`,children:[e.jsxs("svg",{className:"absolute inset-0 w-full h-full opacity-[0.12]",viewBox:"0 0 320 144",children:[e.jsx("circle",{cx:"60",cy:"40",r:"25",fill:"none",stroke:"white",strokeWidth:"2"}),e.jsx("circle",{cx:"260",cy:"110",r:"35",fill:"none",stroke:"white",strokeWidth:"2"}),e.jsx("circle",{cx:"180",cy:"25",r:"10",fill:"white"}),e.jsx("rect",{x:"220",y:"15",width:"30",height:"30",rx:"6",fill:"none",stroke:"white",strokeWidth:"1.5",transform:"rotate(20 235 30)"}),e.jsx("line",{x1:"40",y1:"120",x2:"120",y2:"80",stroke:"white",strokeWidth:"1"}),e.jsx("circle",{cx:"100",cy:"100",r:"6",fill:"white",fillOpacity:"0.4"}),e.jsx("circle",{cx:"280",cy:"50",r:"15",fill:"none",stroke:"white",strokeWidth:"1",strokeDasharray:"3 3"})]}),e.jsx("div",{className:"absolute top-3 left-3",children:e.jsxs("span",{className:"flex items-center gap-1 text-[10px] font-bold text-white bg-white/25 backdrop-blur-sm px-2.5 py-1 rounded-full uppercase tracking-wider",children:[e.jsx(R,{size:11}),"Featured"]})}),e.jsx("div",{className:"absolute top-3 right-3",children:e.jsx("span",{className:"text-[10px] font-semibold text-white/90 bg-white/20 backdrop-blur-sm px-2 py-0.5 rounded",children:a})}),j.length>0&&e.jsx("div",{className:"absolute bottom-3 left-3 right-3 flex flex-wrap gap-1",children:j.slice(0,4).map(t=>e.jsx("span",{className:"text-[10px] font-semibold text-white/90 bg-white/20 backdrop-blur-sm px-2 py-0.5 rounded",children:t},t))})]}),e.jsxs("div",{className:"p-4",children:[e.jsx("h3",{className:"text-base font-bold text-[#36342E] mb-1 group-hover:text-[#553DE9] transition-colors",children:ge(l.name)}),e.jsx("p",{className:"text-xs text-[#6B6960] line-clamp-2 mb-3 min-h-[2.4em]",children:l.description||l.filename}),e.jsxs("div",{className:"flex items-center gap-3 mb-3 text-[10px] text-[#6B6960]",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(V,{size:11,className:"text-[#553DE9]"}),ue(u.uses)," uses"]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(O,{size:11,className:"text-[#D4A03C]",fill:"#D4A03C"}),u.rating]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(P,{size:11}),u.avgTime]})]}),e.jsxs("div",{className:"flex items-center justify-between pt-3 border-t border-[#ECEAE3]",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(B,{size:12,className:l.difficulty==="beginner"?"text-green-500":l.difficulty==="advanced"?"text-red-400":"text-yellow-500"}),e.jsx("span",{className:`text-[10px] font-medium capitalize ${l.difficulty==="beginner"?"text-green-500":l.difficulty==="advanced"?"text-red-400":"text-yellow-500"}`,children:l.difficulty||"Intermediate"})]}),e.jsx(N,{size:"sm",icon:D,onClick:t=>{t.stopPropagation(),r(l.filename)},className:"opacity-0 group-hover:opacity-100 transition-opacity",children:"Use"})]})]})]},l.filename)})})]})}const $={Website:"from-violet-600 via-purple-500 to-indigo-600",API:"from-teal-600 via-emerald-500 to-cyan-600",CLI:"from-slate-600 via-gray-500 to-blue-600",Bot:"from-orange-500 via-rose-500 to-pink-600",Data:"from-blue-600 via-indigo-500 to-purple-600",Other:"from-slate-500 via-gray-500 to-zinc-600"},ye={React:"Component-based UI library","Node.js":"Server-side JavaScript runtime",Python:"General-purpose programming language",TypeScript:"Type-safe JavaScript superset",PostgreSQL:"Advanced relational database",MongoDB:"Document-oriented NoSQL database",Docker:"Container platform",Redis:"In-memory data store",Express:"Minimal Node.js web framework",FastAPI:"Modern async Python web framework",SQLite:"Lightweight embedded database",Tailwind:"Utility-first CSS framework",Discord:"Discord API integration",Slack:"Slack API integration",CLI:"Command-line interface tooling",Playwright:"End-to-end testing framework",Vite:"Next-gen frontend build tool",Next:"React framework with SSR/SSG",Prisma:"Type-safe ORM for Node.js",Stripe:"Payment processing platform"},M={beginner:{label:"Beginner",color:"text-green-500",bars:1,description:"Suitable for developers new to this stack. Simple setup and straightforward concepts."},intermediate:{label:"Intermediate",color:"text-yellow-500",bars:2,description:"Assumes familiarity with the core technologies. Moderate complexity with several integrated features."},advanced:{label:"Advanced",color:"text-red-400",bars:3,description:"Complex architecture with multiple services. Best for experienced developers comfortable with infrastructure."}},U={Website:["src/"," app/"," layout.tsx"," page.tsx"," globals.css"," components/"," Header.tsx"," Footer.tsx"," lib/"," utils.ts","public/"," favicon.ico","package.json","tailwind.config.ts","tsconfig.json"],API:["src/"," routes/"," index.ts"," users.ts"," auth.ts"," middleware/"," auth.ts"," validation.ts"," models/"," user.ts"," config/"," database.ts","tests/"," api.test.ts","package.json","Dockerfile"],CLI:["src/"," commands/"," init.ts"," run.ts"," config.ts"," utils/"," logger.ts"," parser.ts"," index.ts","bin/"," cli.js","tests/"," cli.test.ts","package.json","tsconfig.json"],Bot:["src/"," commands/"," help.ts"," moderate.ts"," settings.ts"," events/"," ready.ts"," messageCreate.ts"," utils/"," embed.ts"," permissions.ts"," index.ts",".env.example","package.json","Dockerfile"],Data:["src/"," pipelines/"," extract.py"," transform.py"," load.py"," models/"," schema.py"," utils/"," database.py"," logger.py","tests/"," test_pipeline.py","config.yaml","requirements.txt","Dockerfile"],Other:["src/"," main.ts"," config.ts"," utils/"," helpers.ts","tests/"," main.test.ts","package.json","tsconfig.json","README.md"]},G={Website:["Responsive layout with mobile-first design","SEO-optimized pages with meta tags","Modern component architecture","Production build configuration","Styling system with design tokens","Type-safe development setup"],API:["RESTful endpoint structure","Authentication and authorization middleware","Database models and migrations","Input validation and error handling","API documentation generation","Docker deployment configuration"],CLI:["Subcommand architecture with help text","Configuration file management","Colored terminal output","Progress indicators and spinners","Error handling with helpful messages","Cross-platform compatibility"],Bot:["Slash command registration and handling","Event-driven architecture","Permissions and role checking","Rich embed message formatting","Configuration persistence","Graceful shutdown handling"],Data:["Extract-Transform-Load pipeline","Data validation and cleaning","Database connection pooling","Logging and monitoring","Scheduled job execution","Error recovery and retry logic"],Other:["Clean project structure","Type-safe configuration","Comprehensive test setup","Build and deployment scripts","Documentation templates","Linting and formatting rules"]};function je({template:i,onClose:r}){const c=z(),[p,g]=o.useState(null),[w,h]=o.useState(!1);o.useEffect(()=>{J.getTemplateContent(i.filename).then(a=>g(a.content)).catch(()=>g(null))},[i.filename]);const E=o.useCallback(()=>{sessionStorage.setItem("pl_template",i.filename),c("/"),r()},[i.filename,c,r]);o.useEffect(()=>{const a=s=>{s.key==="Escape"&&r()};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[r]),o.useEffect(()=>(document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}),[]);const d=i.category||"Other",v=$[d]||$.Other,x=M[i.difficulty]||M.intermediate,f=U[d]||U.Other,l=G[d]||G.Other;return e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",onClick:a=>{a.target===a.currentTarget&&r()},children:[e.jsxs("div",{className:"relative bg-white rounded-xl shadow-2xl w-[95vw] max-w-[1100px] max-h-[90vh] overflow-hidden animate-in",style:{animation:"modal-enter 0.25s ease-out"},children:[e.jsx("button",{onClick:r,className:"absolute top-4 right-4 z-10 p-2 rounded-lg bg-white/90 hover:bg-white text-[#6B6960] hover:text-[#36342E] shadow-sm","aria-label":"Close preview",children:e.jsx(I,{size:18})}),e.jsxs("div",{className:"flex flex-col lg:flex-row h-full max-h-[90vh]",children:[e.jsxs("div",{className:"flex-1 lg:w-[60%] overflow-y-auto p-6 lg:p-8",children:[e.jsxs("div",{className:"mb-6",children:[e.jsx("div",{className:"flex items-center gap-2 mb-2",children:e.jsx("span",{className:"text-xs font-semibold text-[#553DE9] bg-[#553DE9]/10 px-2 py-0.5 rounded",children:d})}),e.jsx("h2",{className:"text-2xl font-bold text-[#36342E] mb-2",children:i.name.replace(/\.md$/i,"").replace(/[-_]/g," ").replace(/\b\w/g,a=>a.toUpperCase())}),e.jsx("p",{className:"text-[#6B6960] leading-relaxed",children:i.description||"A ready-to-use template to kickstart your project."})]}),e.jsxs("div",{className:"mb-6",children:[e.jsxs("h3",{className:"flex items-center gap-2 text-sm font-semibold text-[#36342E] mb-3",children:[e.jsx(O,{size:15,className:"text-[#553DE9]"}),"What You Get"]}),e.jsx("ul",{className:"space-y-2",children:l.map((a,s)=>e.jsxs("li",{className:"flex items-start gap-2 text-sm text-[#6B6960]",children:[e.jsx(q,{size:14,className:"text-[#553DE9] mt-0.5 flex-shrink-0"}),e.jsx("span",{children:a})]},s))})]}),e.jsxs("div",{className:"mb-6",children:[e.jsxs("h3",{className:"flex items-center gap-2 text-sm font-semibold text-[#36342E] mb-3",children:[e.jsx(he,{size:15,className:"text-[#553DE9]"}),"Project Structure"]}),e.jsx("div",{className:"bg-[#FAF9F6] rounded-lg border border-[#ECEAE3] p-4 font-mono text-xs text-[#6B6960] leading-relaxed",children:f.map((a,s)=>e.jsx("div",{className:a.startsWith(" ")?"ml-4":"",children:a.includes("/")&&!a.includes(".")?e.jsx("span",{className:"text-[#553DE9]",children:a}):a.includes(".")?e.jsx("span",{className:"text-[#36342E]",children:a}):a},s))})]}),e.jsxs("div",{className:"bg-[#553DE9]/5 rounded-lg border border-[#553DE9]/10 p-4",children:[e.jsxs("h3",{className:"flex items-center gap-2 text-sm font-semibold text-[#553DE9] mb-2",children:[e.jsx(ae,{size:15}),"How to Customize"]}),e.jsx("p",{className:"text-sm text-[#6B6960]",children:'After selecting this template, describe your specific requirements in the prompt. For example: "Add user authentication with Google OAuth" or "Change the database to MongoDB". The AI will adapt the template to your needs.'})]})]}),e.jsxs("div",{className:"lg:w-[40%] bg-[#FAF9F6] border-t lg:border-t-0 lg:border-l border-[#ECEAE3] p-6 lg:p-8 overflow-y-auto flex flex-col",children:[e.jsxs("div",{className:`h-40 rounded-xl bg-gradient-to-br ${v} relative overflow-hidden mb-6 shadow-lg`,children:[e.jsxs("svg",{className:"absolute inset-0 w-full h-full opacity-10",viewBox:"0 0 400 200",children:[e.jsx("circle",{cx:"50",cy:"50",r:"30",fill:"none",stroke:"white",strokeWidth:"2"}),e.jsx("circle",{cx:"350",cy:"150",r:"45",fill:"none",stroke:"white",strokeWidth:"2"}),e.jsx("circle",{cx:"200",cy:"30",r:"15",fill:"white"}),e.jsx("rect",{x:"300",y:"20",width:"40",height:"40",rx:"8",fill:"none",stroke:"white",strokeWidth:"2",transform:"rotate(15 320 40)"}),e.jsx("line",{x1:"50",y1:"180",x2:"150",y2:"120",stroke:"white",strokeWidth:"1.5"}),e.jsx("circle",{cx:"100",cy:"140",r:"8",fill:"white",fillOpacity:"0.5"}),e.jsx("circle",{cx:"250",cy:"100",r:"20",fill:"none",stroke:"white",strokeWidth:"1.5",strokeDasharray:"4 4"})]}),e.jsx("div",{className:"absolute bottom-3 left-4 right-4",children:e.jsxs("span",{className:"text-white/90 text-xs font-semibold bg-white/20 backdrop-blur-sm px-3 py-1 rounded-full",children:[d," Template"]})})]}),e.jsxs("div",{className:"mb-6",children:[e.jsx("h4",{className:"text-xs font-semibold text-[#36342E] uppercase tracking-wider mb-3",children:"Tech Stack"}),e.jsxs("div",{className:"space-y-2",children:[(i.tech_stack||[]).map(a=>e.jsxs("div",{className:"flex items-center justify-between bg-white rounded-lg border border-[#ECEAE3] px-3 py-2",children:[e.jsx("span",{className:"text-sm font-medium text-[#36342E]",children:a}),e.jsx("span",{className:"text-xs text-[#6B6960]",children:ye[a]||"Development tool"})]},a)),(!i.tech_stack||i.tech_stack.length===0)&&e.jsx("p",{className:"text-xs text-[#6B6960]",children:"Tech stack details available after selection"})]})]}),e.jsxs("div",{className:"flex items-center gap-3 bg-white rounded-lg border border-[#ECEAE3] px-4 py-3 mb-3",children:[e.jsx(P,{size:16,className:"text-[#553DE9]"}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-[#6B6960]",children:"Estimated Build Time"}),e.jsx("div",{className:"text-sm font-semibold text-[#36342E]",children:i.build_time||"5-10 min"})]})]}),e.jsxs("div",{className:"bg-white rounded-lg border border-[#ECEAE3] px-4 py-3 mb-6",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx(B,{size:16,className:x.color}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-[#6B6960]",children:"Difficulty"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:`text-sm font-semibold ${x.color}`,children:x.label}),e.jsx("div",{className:"flex gap-0.5",children:[1,2,3].map(a=>e.jsx("div",{className:`w-2 h-4 rounded-sm ${a<=x.bars?"bg-current "+x.color:"bg-[#ECEAE3]"}`},a))})]})]})]}),e.jsx("p",{className:"text-xs text-[#6B6960] leading-relaxed",children:x.description})]}),e.jsxs("div",{className:"mt-auto space-y-3",children:[e.jsx(N,{variant:"primary",size:"lg",icon:D,onClick:E,className:"w-full justify-center text-base",children:"Use This Template"}),e.jsx(N,{variant:"secondary",size:"md",icon:w?K:T,onClick:()=>h(!w),className:"w-full justify-center",children:w?"Hide PRD":"View PRD"})]})]})]}),w&&e.jsxs("div",{className:"absolute inset-0 bg-white z-20 overflow-y-auto",children:[e.jsxs("div",{className:"sticky top-0 bg-white border-b border-[#ECEAE3] px-6 py-4 flex items-center justify-between z-10",children:[e.jsxs("h3",{className:"text-lg font-semibold text-[#36342E]",children:["Template PRD: ",i.name.replace(/\.md$/i,"").replace(/[-_]/g," ").replace(/\b\w/g,a=>a.toUpperCase())]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(N,{variant:"ghost",size:"sm",onClick:()=>h(!1),children:"Back to Preview"}),e.jsx("button",{onClick:r,className:"p-2 rounded-lg hover:bg-[#F8F4F0] text-[#6B6960]","aria-label":"Close",children:e.jsx(I,{size:18})})]})]}),e.jsx("div",{className:"p-6 lg:p-8 max-w-4xl mx-auto",children:p?e.jsx("pre",{className:"whitespace-pre-wrap text-sm text-[#36342E] font-mono leading-relaxed",children:p}):e.jsxs("div",{className:"text-center py-12 text-[#6B6960]",children:[e.jsx(T,{size:32,className:"mx-auto mb-3 opacity-30"}),e.jsx("p",{className:"text-sm",children:"Loading template content..."})]})})]})]}),e.jsx("style",{children:`
|
|
16
|
+
*/const pe=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],fe=F("settings",pe),A={"saas-starter.md":{uses:2847,rating:4.9,avgTime:"12 min"},"rest-api-auth.md":{uses:1923,rating:4.8,avgTime:"8 min"},"discord-bot.md":{uses:1654,rating:4.7,avgTime:"6 min"},"full-stack-demo.md":{uses:1432,rating:4.8,avgTime:"15 min"},"data-pipeline.md":{uses:1198,rating:4.6,avgTime:"10 min"},"cli-tool.md":{uses:987,rating:4.7,avgTime:"7 min"},"e-commerce.md":{uses:2156,rating:4.8,avgTime:"18 min"},"blog-platform.md":{uses:1345,rating:4.5,avgTime:"11 min"}},_={Website:"from-violet-600 via-purple-500 to-indigo-500",API:"from-teal-600 via-emerald-500 to-cyan-500",CLI:"from-slate-600 via-gray-500 to-blue-500",Bot:"from-orange-500 via-rose-500 to-pink-500",Data:"from-blue-600 via-indigo-500 to-purple-500",Other:"from-gray-500 via-slate-500 to-zinc-500"};function ue(i){return i>=1e3?`${(i/1e3).toFixed(1)}k`:String(i)}function ge(i){return i.replace(/\.md$/i,"").replace(/[-_]/g," ").replace(/\b\w/g,r=>r.toUpperCase())}function be({templates:i,onSelect:r,onPreview:c}){const p=o.useRef(null),[g,w]=o.useState(!1),[h,E]=o.useState(!0),d=i.filter(l=>l.filename in A).slice(0,6),v=d.length>=4?d:[...d,...i.filter(l=>!(l.filename in A))].slice(0,6),x=()=>{const l=p.current;l&&(w(l.scrollLeft>10),E(l.scrollLeft<l.scrollWidth-l.clientWidth-10))};o.useEffect(()=>{const l=p.current;if(l)return x(),l.addEventListener("scroll",x,{passive:!0}),()=>l.removeEventListener("scroll",x)},[v]);const f=l=>{const a=p.current;if(!a)return;const s=340;a.scrollBy({left:l==="left"?-s:s,behavior:"smooth"})};return v.length===0?null:e.jsxs("div",{className:"mb-8",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(R,{size:18,className:"text-[#D4A03C]"}),e.jsx("h2",{className:"text-lg font-bold text-[#36342E]",children:"Staff Picks"}),e.jsx("span",{className:"text-xs text-[#6B6960] bg-[#D4A03C]/10 text-[#D4A03C] font-semibold px-2 py-0.5 rounded",children:"Featured"})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("button",{onClick:()=>f("left"),disabled:!g,className:`p-1.5 rounded-lg transition-colors ${g?"hover:bg-[#F8F4F0] text-[#6B6960]":"text-[#ECEAE3] cursor-not-allowed"}`,"aria-label":"Scroll left",children:e.jsx(ie,{size:18})}),e.jsx("button",{onClick:()=>f("right"),disabled:!h,className:`p-1.5 rounded-lg transition-colors ${h?"hover:bg-[#F8F4F0] text-[#6B6960]":"text-[#ECEAE3] cursor-not-allowed"}`,"aria-label":"Scroll right",children:e.jsx(q,{size:18})})]})]}),e.jsx("div",{ref:p,className:"flex gap-4 overflow-x-auto pb-2 scrollbar-hide",style:{scrollbarWidth:"none",msOverflowStyle:"none"},children:v.map(l=>{const a=l.category||"Other",s=_[a]||_.Other,u=A[l.filename]||{uses:Math.floor(Math.random()*1500)+200,rating:4.5,avgTime:l.build_time||"8 min"},j=l.tech_stack||[];return e.jsxs("div",{className:"flex-shrink-0 w-[320px] bg-white border border-[#ECEAE3] rounded-xl shadow-card hover:shadow-card-hover transition-all duration-200 overflow-hidden cursor-pointer group",onClick:()=>c(l),children:[e.jsxs("div",{className:`h-36 bg-gradient-to-br ${s} relative overflow-hidden`,children:[e.jsxs("svg",{className:"absolute inset-0 w-full h-full opacity-[0.12]",viewBox:"0 0 320 144",children:[e.jsx("circle",{cx:"60",cy:"40",r:"25",fill:"none",stroke:"white",strokeWidth:"2"}),e.jsx("circle",{cx:"260",cy:"110",r:"35",fill:"none",stroke:"white",strokeWidth:"2"}),e.jsx("circle",{cx:"180",cy:"25",r:"10",fill:"white"}),e.jsx("rect",{x:"220",y:"15",width:"30",height:"30",rx:"6",fill:"none",stroke:"white",strokeWidth:"1.5",transform:"rotate(20 235 30)"}),e.jsx("line",{x1:"40",y1:"120",x2:"120",y2:"80",stroke:"white",strokeWidth:"1"}),e.jsx("circle",{cx:"100",cy:"100",r:"6",fill:"white",fillOpacity:"0.4"}),e.jsx("circle",{cx:"280",cy:"50",r:"15",fill:"none",stroke:"white",strokeWidth:"1",strokeDasharray:"3 3"})]}),e.jsx("div",{className:"absolute top-3 left-3",children:e.jsxs("span",{className:"flex items-center gap-1 text-[10px] font-bold text-white bg-white/25 backdrop-blur-sm px-2.5 py-1 rounded-full uppercase tracking-wider",children:[e.jsx(R,{size:11}),"Featured"]})}),e.jsx("div",{className:"absolute top-3 right-3",children:e.jsx("span",{className:"text-[10px] font-semibold text-white/90 bg-white/20 backdrop-blur-sm px-2 py-0.5 rounded",children:a})}),j.length>0&&e.jsx("div",{className:"absolute bottom-3 left-3 right-3 flex flex-wrap gap-1",children:j.slice(0,4).map(t=>e.jsx("span",{className:"text-[10px] font-semibold text-white/90 bg-white/20 backdrop-blur-sm px-2 py-0.5 rounded",children:t},t))})]}),e.jsxs("div",{className:"p-4",children:[e.jsx("h3",{className:"text-base font-bold text-[#36342E] mb-1 group-hover:text-[#553DE9] transition-colors",children:ge(l.name)}),e.jsx("p",{className:"text-xs text-[#6B6960] line-clamp-2 mb-3 min-h-[2.4em]",children:l.description||l.filename}),e.jsxs("div",{className:"flex items-center gap-3 mb-3 text-[10px] text-[#6B6960]",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(V,{size:11,className:"text-[#553DE9]"}),ue(u.uses)," uses"]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(O,{size:11,className:"text-[#D4A03C]",fill:"#D4A03C"}),u.rating]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(I,{size:11}),u.avgTime]})]}),e.jsxs("div",{className:"flex items-center justify-between pt-3 border-t border-[#ECEAE3]",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(B,{size:12,className:l.difficulty==="beginner"?"text-green-500":l.difficulty==="advanced"?"text-red-400":"text-yellow-500"}),e.jsx("span",{className:`text-[10px] font-medium capitalize ${l.difficulty==="beginner"?"text-green-500":l.difficulty==="advanced"?"text-red-400":"text-yellow-500"}`,children:l.difficulty||"Intermediate"})]}),e.jsx(N,{size:"sm",icon:D,onClick:t=>{t.stopPropagation(),r(l.filename)},className:"opacity-0 group-hover:opacity-100 transition-opacity",children:"Use"})]})]})]},l.filename)})})]})}const $={Website:"from-violet-600 via-purple-500 to-indigo-600",API:"from-teal-600 via-emerald-500 to-cyan-600",CLI:"from-slate-600 via-gray-500 to-blue-600",Bot:"from-orange-500 via-rose-500 to-pink-600",Data:"from-blue-600 via-indigo-500 to-purple-600",Other:"from-slate-500 via-gray-500 to-zinc-600"},ye={React:"Component-based UI library","Node.js":"Server-side JavaScript runtime",Python:"General-purpose programming language",TypeScript:"Type-safe JavaScript superset",PostgreSQL:"Advanced relational database",MongoDB:"Document-oriented NoSQL database",Docker:"Container platform",Redis:"In-memory data store",Express:"Minimal Node.js web framework",FastAPI:"Modern async Python web framework",SQLite:"Lightweight embedded database",Tailwind:"Utility-first CSS framework",Discord:"Discord API integration",Slack:"Slack API integration",CLI:"Command-line interface tooling",Playwright:"End-to-end testing framework",Vite:"Next-gen frontend build tool",Next:"React framework with SSR/SSG",Prisma:"Type-safe ORM for Node.js",Stripe:"Payment processing platform"},M={beginner:{label:"Beginner",color:"text-green-500",bars:1,description:"Suitable for developers new to this stack. Simple setup and straightforward concepts."},intermediate:{label:"Intermediate",color:"text-yellow-500",bars:2,description:"Assumes familiarity with the core technologies. Moderate complexity with several integrated features."},advanced:{label:"Advanced",color:"text-red-400",bars:3,description:"Complex architecture with multiple services. Best for experienced developers comfortable with infrastructure."}},U={Website:["src/"," app/"," layout.tsx"," page.tsx"," globals.css"," components/"," Header.tsx"," Footer.tsx"," lib/"," utils.ts","public/"," favicon.ico","package.json","tailwind.config.ts","tsconfig.json"],API:["src/"," routes/"," index.ts"," users.ts"," auth.ts"," middleware/"," auth.ts"," validation.ts"," models/"," user.ts"," config/"," database.ts","tests/"," api.test.ts","package.json","Dockerfile"],CLI:["src/"," commands/"," init.ts"," run.ts"," config.ts"," utils/"," logger.ts"," parser.ts"," index.ts","bin/"," cli.js","tests/"," cli.test.ts","package.json","tsconfig.json"],Bot:["src/"," commands/"," help.ts"," moderate.ts"," settings.ts"," events/"," ready.ts"," messageCreate.ts"," utils/"," embed.ts"," permissions.ts"," index.ts",".env.example","package.json","Dockerfile"],Data:["src/"," pipelines/"," extract.py"," transform.py"," load.py"," models/"," schema.py"," utils/"," database.py"," logger.py","tests/"," test_pipeline.py","config.yaml","requirements.txt","Dockerfile"],Other:["src/"," main.ts"," config.ts"," utils/"," helpers.ts","tests/"," main.test.ts","package.json","tsconfig.json","README.md"]},G={Website:["Responsive layout with mobile-first design","SEO-optimized pages with meta tags","Modern component architecture","Production build configuration","Styling system with design tokens","Type-safe development setup"],API:["RESTful endpoint structure","Authentication and authorization middleware","Database models and migrations","Input validation and error handling","API documentation generation","Docker deployment configuration"],CLI:["Subcommand architecture with help text","Configuration file management","Colored terminal output","Progress indicators and spinners","Error handling with helpful messages","Cross-platform compatibility"],Bot:["Slash command registration and handling","Event-driven architecture","Permissions and role checking","Rich embed message formatting","Configuration persistence","Graceful shutdown handling"],Data:["Extract-Transform-Load pipeline","Data validation and cleaning","Database connection pooling","Logging and monitoring","Scheduled job execution","Error recovery and retry logic"],Other:["Clean project structure","Type-safe configuration","Comprehensive test setup","Build and deployment scripts","Documentation templates","Linting and formatting rules"]};function je({template:i,onClose:r}){const c=z(),[p,g]=o.useState(null),[w,h]=o.useState(!1);o.useEffect(()=>{J.getTemplateContent(i.filename).then(a=>g(a.content)).catch(()=>g(null))},[i.filename]);const E=o.useCallback(()=>{sessionStorage.setItem("pl_template",i.filename),c("/"),r()},[i.filename,c,r]);o.useEffect(()=>{const a=s=>{s.key==="Escape"&&r()};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[r]),o.useEffect(()=>(document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}),[]);const d=i.category||"Other",v=$[d]||$.Other,x=M[i.difficulty]||M.intermediate,f=U[d]||U.Other,l=G[d]||G.Other;return e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",onClick:a=>{a.target===a.currentTarget&&r()},children:[e.jsxs("div",{className:"relative bg-white rounded-xl shadow-2xl w-[95vw] max-w-[1100px] max-h-[90vh] overflow-hidden animate-in",style:{animation:"modal-enter 0.25s ease-out"},children:[e.jsx("button",{onClick:r,className:"absolute top-4 right-4 z-10 p-2 rounded-lg bg-white/90 hover:bg-white text-[#6B6960] hover:text-[#36342E] shadow-sm","aria-label":"Close preview",children:e.jsx(P,{size:18})}),e.jsxs("div",{className:"flex flex-col lg:flex-row h-full max-h-[90vh]",children:[e.jsxs("div",{className:"flex-1 lg:w-[60%] overflow-y-auto p-6 lg:p-8",children:[e.jsxs("div",{className:"mb-6",children:[e.jsx("div",{className:"flex items-center gap-2 mb-2",children:e.jsx("span",{className:"text-xs font-semibold text-[#553DE9] bg-[#553DE9]/10 px-2 py-0.5 rounded",children:d})}),e.jsx("h2",{className:"text-2xl font-bold text-[#36342E] mb-2",children:i.name.replace(/\.md$/i,"").replace(/[-_]/g," ").replace(/\b\w/g,a=>a.toUpperCase())}),e.jsx("p",{className:"text-[#6B6960] leading-relaxed",children:i.description||"A ready-to-use template to kickstart your project."})]}),e.jsxs("div",{className:"mb-6",children:[e.jsxs("h3",{className:"flex items-center gap-2 text-sm font-semibold text-[#36342E] mb-3",children:[e.jsx(O,{size:15,className:"text-[#553DE9]"}),"What You Get"]}),e.jsx("ul",{className:"space-y-2",children:l.map((a,s)=>e.jsxs("li",{className:"flex items-start gap-2 text-sm text-[#6B6960]",children:[e.jsx(q,{size:14,className:"text-[#553DE9] mt-0.5 flex-shrink-0"}),e.jsx("span",{children:a})]},s))})]}),e.jsxs("div",{className:"mb-6",children:[e.jsxs("h3",{className:"flex items-center gap-2 text-sm font-semibold text-[#36342E] mb-3",children:[e.jsx(he,{size:15,className:"text-[#553DE9]"}),"Project Structure"]}),e.jsx("div",{className:"bg-[#FAF9F6] rounded-lg border border-[#ECEAE3] p-4 font-mono text-xs text-[#6B6960] leading-relaxed",children:f.map((a,s)=>e.jsx("div",{className:a.startsWith(" ")?"ml-4":"",children:a.includes("/")&&!a.includes(".")?e.jsx("span",{className:"text-[#553DE9]",children:a}):a.includes(".")?e.jsx("span",{className:"text-[#36342E]",children:a}):a},s))})]}),e.jsxs("div",{className:"bg-[#553DE9]/5 rounded-lg border border-[#553DE9]/10 p-4",children:[e.jsxs("h3",{className:"flex items-center gap-2 text-sm font-semibold text-[#553DE9] mb-2",children:[e.jsx(ae,{size:15}),"How to Customize"]}),e.jsx("p",{className:"text-sm text-[#6B6960]",children:'After selecting this template, describe your specific requirements in the prompt. For example: "Add user authentication with Google OAuth" or "Change the database to MongoDB". The AI will adapt the template to your needs.'})]})]}),e.jsxs("div",{className:"lg:w-[40%] bg-[#FAF9F6] border-t lg:border-t-0 lg:border-l border-[#ECEAE3] p-6 lg:p-8 overflow-y-auto flex flex-col",children:[e.jsxs("div",{className:`h-40 rounded-xl bg-gradient-to-br ${v} relative overflow-hidden mb-6 shadow-lg`,children:[e.jsxs("svg",{className:"absolute inset-0 w-full h-full opacity-10",viewBox:"0 0 400 200",children:[e.jsx("circle",{cx:"50",cy:"50",r:"30",fill:"none",stroke:"white",strokeWidth:"2"}),e.jsx("circle",{cx:"350",cy:"150",r:"45",fill:"none",stroke:"white",strokeWidth:"2"}),e.jsx("circle",{cx:"200",cy:"30",r:"15",fill:"white"}),e.jsx("rect",{x:"300",y:"20",width:"40",height:"40",rx:"8",fill:"none",stroke:"white",strokeWidth:"2",transform:"rotate(15 320 40)"}),e.jsx("line",{x1:"50",y1:"180",x2:"150",y2:"120",stroke:"white",strokeWidth:"1.5"}),e.jsx("circle",{cx:"100",cy:"140",r:"8",fill:"white",fillOpacity:"0.5"}),e.jsx("circle",{cx:"250",cy:"100",r:"20",fill:"none",stroke:"white",strokeWidth:"1.5",strokeDasharray:"4 4"})]}),e.jsx("div",{className:"absolute bottom-3 left-4 right-4",children:e.jsxs("span",{className:"text-white/90 text-xs font-semibold bg-white/20 backdrop-blur-sm px-3 py-1 rounded-full",children:[d," Template"]})})]}),e.jsxs("div",{className:"mb-6",children:[e.jsx("h4",{className:"text-xs font-semibold text-[#36342E] uppercase tracking-wider mb-3",children:"Tech Stack"}),e.jsxs("div",{className:"space-y-2",children:[(i.tech_stack||[]).map(a=>e.jsxs("div",{className:"flex items-center justify-between bg-white rounded-lg border border-[#ECEAE3] px-3 py-2",children:[e.jsx("span",{className:"text-sm font-medium text-[#36342E]",children:a}),e.jsx("span",{className:"text-xs text-[#6B6960]",children:ye[a]||"Development tool"})]},a)),(!i.tech_stack||i.tech_stack.length===0)&&e.jsx("p",{className:"text-xs text-[#6B6960]",children:"Tech stack details available after selection"})]})]}),e.jsxs("div",{className:"flex items-center gap-3 bg-white rounded-lg border border-[#ECEAE3] px-4 py-3 mb-3",children:[e.jsx(I,{size:16,className:"text-[#553DE9]"}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-[#6B6960]",children:"Estimated Build Time"}),e.jsx("div",{className:"text-sm font-semibold text-[#36342E]",children:i.build_time||"5-10 min"})]})]}),e.jsxs("div",{className:"bg-white rounded-lg border border-[#ECEAE3] px-4 py-3 mb-6",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx(B,{size:16,className:x.color}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-[#6B6960]",children:"Difficulty"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:`text-sm font-semibold ${x.color}`,children:x.label}),e.jsx("div",{className:"flex gap-0.5",children:[1,2,3].map(a=>e.jsx("div",{className:`w-2 h-4 rounded-sm ${a<=x.bars?"bg-current "+x.color:"bg-[#ECEAE3]"}`},a))})]})]})]}),e.jsx("p",{className:"text-xs text-[#6B6960] leading-relaxed",children:x.description})]}),e.jsxs("div",{className:"mt-auto space-y-3",children:[e.jsx(N,{variant:"primary",size:"lg",icon:D,onClick:E,className:"w-full justify-center text-base",children:"Use This Template"}),e.jsx(N,{variant:"secondary",size:"md",icon:w?K:T,onClick:()=>h(!w),className:"w-full justify-center",children:w?"Hide Spec":"View Spec"})]})]})]}),w&&e.jsxs("div",{className:"absolute inset-0 bg-white z-20 overflow-y-auto",children:[e.jsxs("div",{className:"sticky top-0 bg-white border-b border-[#ECEAE3] px-6 py-4 flex items-center justify-between z-10",children:[e.jsxs("h3",{className:"text-lg font-semibold text-[#36342E]",children:["Template Spec: ",i.name.replace(/\.md$/i,"").replace(/[-_]/g," ").replace(/\b\w/g,a=>a.toUpperCase())]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(N,{variant:"ghost",size:"sm",onClick:()=>h(!1),children:"Back to Preview"}),e.jsx("button",{onClick:r,className:"p-2 rounded-lg hover:bg-[#F8F4F0] text-[#6B6960]","aria-label":"Close",children:e.jsx(P,{size:18})})]})]}),e.jsx("div",{className:"p-6 lg:p-8 max-w-4xl mx-auto",children:p?e.jsx("pre",{className:"whitespace-pre-wrap text-sm text-[#36342E] font-mono leading-relaxed",children:p}):e.jsxs("div",{className:"text-center py-12 text-[#6B6960]",children:[e.jsx(T,{size:32,className:"mx-auto mb-3 opacity-30"}),e.jsx("p",{className:"text-sm",children:"Loading template content..."})]})})]})]}),e.jsx("style",{children:`
|
|
17
17
|
@keyframes modal-enter {
|
|
18
18
|
from { opacity: 0; transform: scale(0.95) translateY(10px); }
|
|
19
19
|
to { opacity: 1; transform: scale(1) translateY(0); }
|
|
@@ -26,4 +26,4 @@ Features: ${n.join(", ")}`:""].join("");sessionStorage.setItem("pl_custom_prompt
|
|
|
26
26
|
from { opacity: 0; transform: scale(0.95) translateY(10px); }
|
|
27
27
|
to { opacity: 1; transform: scale(1) translateY(0); }
|
|
28
28
|
}
|
|
29
|
-
`})]})}const ve=[{key:"all",label:"All",icon:L},{key:"Website",label:"Web Apps",icon:re},{key:"API",label:"APIs",icon:ne},{key:"CLI",label:"CLIs",icon:te},{key:"Bot",label:"Bots",icon:oe},{key:"Data",label:"Data",icon:ce},{key:"Other",label:"Other",icon:L}],Q={Website:"from-violet-500 via-purple-500 to-indigo-500",API:"from-teal-500 via-emerald-500 to-cyan-500",CLI:"from-slate-500 via-gray-500 to-blue-500",Bot:"from-orange-500 via-rose-500 to-pink-500",Data:"from-blue-500 via-indigo-500 to-purple-500",Other:"from-slate-400 via-gray-400 to-zinc-500"},Ne={React:"bg-sky-500/10 text-sky-600","Node.js":"bg-green-500/10 text-green-600",Python:"bg-yellow-500/10 text-yellow-700",TypeScript:"bg-blue-500/10 text-blue-600",PostgreSQL:"bg-indigo-500/10 text-indigo-600",MongoDB:"bg-green-600/10 text-green-700",Docker:"bg-cyan-500/10 text-cyan-600",Redis:"bg-red-500/10 text-red-600",Express:"bg-gray-500/10 text-gray-600",FastAPI:"bg-teal-500/10 text-teal-600",SQLite:"bg-blue-400/10 text-blue-500",Tailwind:"bg-cyan-400/10 text-cyan-600",Discord:"bg-indigo-400/10 text-indigo-500",Slack:"bg-purple-500/10 text-purple-600",CLI:"bg-amber-500/10 text-amber-600",Playwright:"bg-green-500/10 text-green-600",Vite:"bg-purple-400/10 text-purple-500",Next:"bg-gray-600/10 text-gray-700"},H={beginner:{label:"Beginner",color:"text-green-500",bars:1},intermediate:{label:"Intermediate",color:"text-yellow-500",bars:2},advanced:{label:"Advanced",color:"text-red-400",bars:3}},Ee={"saas-starter.md":{uses:2847,rating:4.9},"rest-api-auth.md":{uses:1923,rating:4.8},"discord-bot.md":{uses:1654,rating:4.7},"full-stack-demo.md":{uses:1432,rating:4.8},"data-pipeline.md":{uses:1198,rating:4.6},"cli-tool.md":{uses:987,rating:4.7},"e-commerce.md":{uses:2156,rating:4.8},"blog-platform.md":{uses:1345,rating:4.5},"rest-api.md":{uses:1567,rating:4.6},"slack-bot.md":{uses:876,rating:4.4},"dashboard.md":{uses:1789,rating:4.7},"web-scraper.md":{uses:654,rating:4.3},"chrome-extension.md":{uses:543,rating:4.5},"microservice.md":{uses:1123,rating:4.6},"mobile-app.md":{uses:932,rating:4.4},"game.md":{uses:765,rating:4.5},"npm-library.md":{uses:445,rating:4.3},"static-landing-page.md":{uses:1876,rating:4.6},"simple-todo-app.md":{uses:2345,rating:4.7},"ai-chatbot.md":{uses:1234,rating:4.8}};function ke(i){return i>=1e3?`${(i/1e3).toFixed(1)}k`:String(i)}function Ce({category:i}){switch(i){case"Website":return e.jsxs("svg",{className:"absolute inset-0 w-full h-full opacity-[0.15]",viewBox:"0 0 400 120",children:[e.jsx("rect",{x:"40",y:"15",width:"160",height:"90",rx:"6",fill:"none",stroke:"white",strokeWidth:"1.5"}),e.jsx("line",{x1:"40",y1:"30",x2:"200",y2:"30",stroke:"white",strokeWidth:"1.5"}),e.jsx("circle",{cx:"52",cy:"22",r:"3",fill:"white",fillOpacity:"0.6"}),e.jsx("circle",{cx:"62",cy:"22",r:"3",fill:"white",fillOpacity:"0.6"}),e.jsx("circle",{cx:"72",cy:"22",r:"3",fill:"white",fillOpacity:"0.6"}),e.jsx("rect",{x:"50",y:"38",width:"80",height:"8",rx:"2",fill:"white",fillOpacity:"0.4"}),e.jsx("rect",{x:"50",y:"52",width:"140",height:"5",rx:"1.5",fill:"white",fillOpacity:"0.25"}),e.jsx("rect",{x:"50",y:"62",width:"120",height:"5",rx:"1.5",fill:"white",fillOpacity:"0.25"}),e.jsx("rect",{x:"50",y:"78",width:"45",height:"16",rx:"4",fill:"white",fillOpacity:"0.35"}),e.jsx("circle",{cx:"300",cy:"30",r:"20",fill:"none",stroke:"white",strokeWidth:"1.5"}),e.jsx("rect",{x:"270",y:"70",width:"25",height:"25",rx:"5",fill:"none",stroke:"white",strokeWidth:"1",transform:"rotate(15 282 82)"}),e.jsx("circle",{cx:"350",cy:"90",r:"8",fill:"white",fillOpacity:"0.3"})]});case"API":return e.jsxs("svg",{className:"absolute inset-0 w-full h-full opacity-[0.15]",viewBox:"0 0 400 120",children:[e.jsx("rect",{x:"30",y:"10",width:"180",height:"100",rx:"6",fill:"none",stroke:"white",strokeWidth:"1.5"}),e.jsx("line",{x1:"30",y1:"25",x2:"210",y2:"25",stroke:"white",strokeWidth:"1.5"}),e.jsx("circle",{cx:"42",cy:"17",r:"3",fill:"white",fillOpacity:"0.6"}),e.jsx("circle",{cx:"52",cy:"17",r:"3",fill:"white",fillOpacity:"0.6"}),e.jsx("text",{x:"40",y:"42",fill:"white",fillOpacity:"0.5",fontSize:"8",fontFamily:"monospace",children:"{"}),e.jsx("text",{x:"48",y:"54",fill:"white",fillOpacity:"0.4",fontSize:"7",fontFamily:"monospace",children:'"status": 200,'}),e.jsx("text",{x:"48",y:"66",fill:"white",fillOpacity:"0.4",fontSize:"7",fontFamily:"monospace",children:'"data": [...]'}),e.jsx("text",{x:"40",y:"80",fill:"white",fillOpacity:"0.5",fontSize:"8",fontFamily:"monospace",children:"}"}),e.jsx("circle",{cx:"290",cy:"35",r:"12",fill:"none",stroke:"white",strokeWidth:"1.5"}),e.jsx("circle",{cx:"340",cy:"60",r:"12",fill:"none",stroke:"white",strokeWidth:"1.5"}),e.jsx("circle",{cx:"290",cy:"85",r:"12",fill:"none",stroke:"white",strokeWidth:"1.5"}),e.jsx("line",{x1:"302",y1:"35",x2:"328",y2:"60",stroke:"white",strokeWidth:"1"}),e.jsx("line",{x1:"302",y1:"85",x2:"328",y2:"60",stroke:"white",strokeWidth:"1"}),e.jsx("circle",{cx:"290",cy:"35",r:"4",fill:"white",fillOpacity:"0.4"}),e.jsx("circle",{cx:"340",cy:"60",r:"4",fill:"white",fillOpacity:"0.4"}),e.jsx("circle",{cx:"290",cy:"85",r:"4",fill:"white",fillOpacity:"0.4"})]});case"CLI":return e.jsxs("svg",{className:"absolute inset-0 w-full h-full opacity-[0.15]",viewBox:"0 0 400 120",children:[e.jsx("rect",{x:"40",y:"12",width:"170",height:"96",rx:"6",fill:"none",stroke:"white",strokeWidth:"1.5"}),e.jsx("line",{x1:"40",y1:"27",x2:"210",y2:"27",stroke:"white",strokeWidth:"1.5"}),e.jsx("circle",{cx:"52",cy:"19",r:"3",fill:"white",fillOpacity:"0.6"}),e.jsx("circle",{cx:"62",cy:"19",r:"3",fill:"white",fillOpacity:"0.6"}),e.jsx("text",{x:"50",y:"42",fill:"white",fillOpacity:"0.5",fontSize:"7",fontFamily:"monospace",children:"$ myapp --help"}),e.jsx("text",{x:"50",y:"54",fill:"white",fillOpacity:"0.35",fontSize:"7",fontFamily:"monospace",children:"Usage: myapp [cmd]"}),e.jsx("text",{x:"50",y:"66",fill:"white",fillOpacity:"0.35",fontSize:"7",fontFamily:"monospace",children:" init Setup"}),e.jsx("text",{x:"50",y:"78",fill:"white",fillOpacity:"0.35",fontSize:"7",fontFamily:"monospace",children:" run Execute"}),e.jsx("rect",{x:"50",y:"88",width:"6",height:"10",fill:"white",fillOpacity:"0.6"}),e.jsx("text",{x:"270",y:"50",fill:"white",fillOpacity:"0.3",fontSize:"24",fontFamily:"monospace",children:">_"}),e.jsx("circle",{cx:"350",cy:"80",r:"15",fill:"none",stroke:"white",strokeWidth:"1",strokeDasharray:"4 4"})]});case"Bot":return e.jsxs("svg",{className:"absolute inset-0 w-full h-full opacity-[0.15]",viewBox:"0 0 400 120",children:[e.jsx("rect",{x:"40",y:"15",width:"120",height:"28",rx:"14",fill:"white",fillOpacity:"0.2"}),e.jsx("rect",{x:"50",y:"22",width:"60",height:"5",rx:"2",fill:"white",fillOpacity:"0.4"}),e.jsx("rect",{x:"80",y:"55",width:"130",height:"28",rx:"14",fill:"white",fillOpacity:"0.3"}),e.jsx("rect",{x:"90",y:"62",width:"80",height:"5",rx:"2",fill:"white",fillOpacity:"0.4"}),e.jsx("rect",{x:"50",y:"93",width:"100",height:"20",rx:"10",fill:"white",fillOpacity:"0.15"}),e.jsx("rect",{x:"60",y:"99",width:"50",height:"5",rx:"2",fill:"white",fillOpacity:"0.35"}),e.jsx("circle",{cx:"310",cy:"55",r:"25",fill:"none",stroke:"white",strokeWidth:"1.5"}),e.jsx("circle",{cx:"302",cy:"50",r:"4",fill:"white",fillOpacity:"0.5"}),e.jsx("circle",{cx:"318",cy:"50",r:"4",fill:"white",fillOpacity:"0.5"}),e.jsx("path",{d:"M300 62 Q310 70 320 62",fill:"none",stroke:"white",strokeWidth:"1.5"}),e.jsx("line",{x1:"310",y1:"30",x2:"310",y2:"22",stroke:"white",strokeWidth:"1.5"}),e.jsx("circle",{cx:"310",cy:"20",r:"3",fill:"white",fillOpacity:"0.5"})]});case"Data":return e.jsxs("svg",{className:"absolute inset-0 w-full h-full opacity-[0.15]",viewBox:"0 0 400 120",children:[e.jsx("ellipse",{cx:"80",cy:"30",rx:"35",ry:"10",fill:"none",stroke:"white",strokeWidth:"1.5"}),e.jsx("line",{x1:"45",y1:"30",x2:"45",y2:"85",stroke:"white",strokeWidth:"1.5"}),e.jsx("line",{x1:"115",y1:"30",x2:"115",y2:"85",stroke:"white",strokeWidth:"1.5"}),e.jsx("ellipse",{cx:"80",cy:"85",rx:"35",ry:"10",fill:"none",stroke:"white",strokeWidth:"1.5"}),e.jsx("ellipse",{cx:"80",cy:"55",rx:"35",ry:"10",fill:"none",stroke:"white",strokeWidth:"0.8",strokeDasharray:"3 3"}),e.jsx("line",{x1:"140",y1:"55",x2:"200",y2:"55",stroke:"white",strokeWidth:"1.5"}),e.jsx("polygon",{points:"200,50 210,55 200,60",fill:"white",fillOpacity:"0.5"}),e.jsx("rect",{x:"230",y:"70",width:"15",height:"35",rx:"3",fill:"white",fillOpacity:"0.25"}),e.jsx("rect",{x:"255",y:"50",width:"15",height:"55",rx:"3",fill:"white",fillOpacity:"0.3"}),e.jsx("rect",{x:"280",y:"60",width:"15",height:"45",rx:"3",fill:"white",fillOpacity:"0.25"}),e.jsx("rect",{x:"305",y:"40",width:"15",height:"65",rx:"3",fill:"white",fillOpacity:"0.35"}),e.jsx("rect",{x:"330",y:"55",width:"15",height:"50",rx:"3",fill:"white",fillOpacity:"0.2"})]});default:return e.jsxs("svg",{className:"absolute inset-0 w-full h-full opacity-[0.12]",viewBox:"0 0 400 120",children:[e.jsx("circle",{cx:"60",cy:"40",r:"25",fill:"none",stroke:"white",strokeWidth:"1.5"}),e.jsx("circle",{cx:"340",cy:"80",r:"30",fill:"none",stroke:"white",strokeWidth:"1.5"}),e.jsx("rect",{x:"170",y:"20",width:"35",height:"35",rx:"8",fill:"none",stroke:"white",strokeWidth:"1.5",transform:"rotate(15 187 37)"}),e.jsx("circle",{cx:"260",cy:"30",r:"10",fill:"white",fillOpacity:"0.3"}),e.jsx("circle",{cx:"120",cy:"90",r:"15",fill:"none",stroke:"white",strokeWidth:"1",strokeDasharray:"4 4"})]})}}function Se({level:i}){const r=H[i]||H.intermediate;return e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(B,{size:12,className:r.color}),e.jsx("div",{className:"flex gap-0.5",children:[1,2,3].map(c=>e.jsx("div",{className:`w-1.5 h-3 rounded-sm ${c<=r.bars?"bg-current "+r.color:"bg-[#ECEAE3]"}`},c))}),e.jsx("span",{className:`text-[10px] font-medium ${r.color}`,children:r.label})]})}function De(i){return i.replace(/\.md$/i,"").replace(/[-_]/g," ").replace(/\b\w/g,r=>r.toUpperCase())}function Ue(){const i=z(),[r,c]=o.useState("all"),[p,g]=o.useState(""),[w,h]=o.useState(null),[E,d]=o.useState(!1),v=o.useCallback(()=>J.getTemplates(),[]),{data:x}=se(v,6e4,!0),f=x,l=o.useMemo(()=>{if(!f)return[];let s=f;if(r!=="all"&&(s=s.filter(u=>(u.category||"Other")===r)),p.trim()){const u=p.toLowerCase();s=s.filter(j=>j.name.toLowerCase().includes(u)||(j.description||"").toLowerCase().includes(u)||(j.tech_stack||[]).some(t=>t.toLowerCase().includes(u)))}return s},[f,r,p]),a=s=>{sessionStorage.setItem("pl_template",s),i("/")};return e.jsxs("div",{className:"max-w-[1400px] mx-auto px-6 py-8",children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsx("h1",{className:"text-3xl font-bold mb-2",children:e.jsx("span",{className:"bg-gradient-to-r from-[#553DE9] via-[#7B6BEF] to-[#553DE9] bg-clip-text text-transparent",children:"Start with a Template"})}),e.jsx("p",{className:"text-[#6B6960] text-sm max-w-lg mx-auto mb-6",children:"Choose a starting point and customize with AI. Each template is a complete PRD ready to become your next project."}),e.jsxs("div",{className:"relative max-w-xl mx-auto mb-5",children:[e.jsx(W,{size:18,className:"absolute left-4 top-1/2 -translate-y-1/2 text-[#6B6960]"}),e.jsx("input",{type:"text",value:p,onChange:s=>g(s.target.value),placeholder:"Search templates by name, tech, or category...",className:"w-full pl-11 pr-4 py-3 text-sm bg-white border border-[#ECEAE3] rounded-xl outline-none focus:border-[#553DE9] focus:ring-2 focus:ring-[#553DE9]/10 transition-all shadow-sm"}),p&&e.jsx("button",{onClick:()=>g(""),className:"absolute right-3 top-1/2 -translate-y-1/2 text-xs text-[#6B6960] hover:text-[#36342E] bg-[#F8F4F0] px-2 py-0.5 rounded",children:"Clear"})]}),e.jsx("div",{className:"flex items-center justify-center gap-1.5 flex-wrap",role:"tablist",children:ve.map(s=>{const u=s.icon,j=f?s.key==="all"?f.length:f.filter(t=>(t.category||"Other")===s.key).length:0;return e.jsxs("button",{role:"tab","aria-selected":r===s.key,onClick:()=>c(s.key),className:`flex items-center gap-1.5 px-3.5 py-2 text-xs font-semibold rounded-lg transition-all whitespace-nowrap ${r===s.key?"bg-[#553DE9] text-white shadow-sm":"text-[#6B6960] hover:text-[#36342E] hover:bg-[#F8F4F0] bg-white border border-[#ECEAE3]"}`,children:[e.jsx(u,{size:14}),s.label,f&&e.jsx("span",{className:`text-[10px] font-medium px-1.5 py-0.5 rounded-full ${r===s.key?"bg-white/20 text-white":"bg-[#F8F4F0] text-[#6B6960]"}`,children:j})]},s.key)})})]}),!p&&r==="all"&&f&&f.length>0&&e.jsx(be,{templates:f,onSelect:a,onPreview:h}),f?l.length===0?e.jsxs("div",{className:"py-16 text-center",children:[e.jsx(W,{size:32,className:"mx-auto text-[#ECEAE3] mb-3"}),e.jsx("p",{className:"text-sm text-[#6B6960] mb-1",children:"No templates match your search."}),e.jsx("p",{className:"text-xs text-[#939084] mb-3",children:"Try different keywords or browse a category."}),p&&e.jsx("button",{onClick:()=>{g(""),c("all")},className:"text-xs text-[#553DE9] hover:underline font-medium",children:"Clear all filters"})]}):e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5",children:[l.map(s=>{const u=s.category||"Other",j=Q[u]||Q.Other,t=s.tech_stack||[],n=s.difficulty||"intermediate",m=s.build_time||"5-10 min",b=Ee[s.filename]||{uses:Math.floor(Math.random()*800)+100,rating:(Math.random()*.7+4).toFixed(1)};return e.jsxs("div",{role:"button",tabIndex:0,onClick:()=>h(s),onKeyDown:y=>{(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),h(s))},className:"bg-white border border-[#ECEAE3] rounded-xl shadow-card hover:shadow-card-hover hover:-translate-y-0.5 transition-all duration-200 cursor-pointer overflow-hidden group",children:[e.jsxs("div",{className:`h-32 bg-gradient-to-br ${j} relative overflow-hidden`,children:[e.jsx(Ce,{category:u}),e.jsx("div",{className:"absolute top-3 right-3",children:e.jsx("span",{className:"text-[10px] font-semibold text-white/90 bg-white/20 backdrop-blur-sm px-2 py-0.5 rounded",children:u})}),t.length>0&&e.jsxs("div",{className:"absolute bottom-3 left-3 right-3 flex items-center gap-1.5",children:[t.slice(0,3).map(y=>e.jsx("span",{className:"text-[10px] font-semibold text-white/90 bg-white/20 backdrop-blur-sm px-2 py-0.5 rounded",children:y},y)),t.length>3&&e.jsxs("span",{className:"text-[10px] text-white/70 bg-white/15 backdrop-blur-sm px-1.5 py-0.5 rounded",children:["+",t.length-3]})]})]}),e.jsxs("div",{className:"p-4",children:[e.jsx("h3",{className:"text-sm font-bold text-[#36342E] mb-1 group-hover:text-[#553DE9] transition-colors",children:De(s.name)}),e.jsx("p",{className:"text-xs text-[#6B6960] line-clamp-2 mb-3 min-h-[2.4em]",children:s.description||s.filename}),t.length>0&&e.jsx("div",{className:"flex flex-wrap gap-1 mb-3",children:t.map(y=>e.jsx("span",{className:`inline-flex items-center px-1.5 py-0.5 text-[10px] font-medium rounded ${Ne[y]||"bg-[#F8F4F0] text-[#6B6960]"}`,children:y},y))}),e.jsxs("div",{className:"flex items-center gap-3 mb-3 text-[10px] text-[#6B6960]",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(V,{size:10}),ke(typeof b.uses=="number"?b.uses:0)," uses"]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(O,{size:10,className:"text-[#D4A03C]",fill:"#D4A03C"}),b.rating]})]}),e.jsxs("div",{className:"flex items-center justify-between pt-3 border-t border-[#ECEAE3]",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(Se,{level:n}),e.jsxs("div",{className:"flex items-center gap-1 text-[10px] text-[#6B6960]",children:[e.jsx(P,{size:11}),e.jsx("span",{children:m})]})]}),e.jsx(N,{size:"sm",icon:D,onClick:y=>{y.stopPropagation(),a(s.filename)},className:"opacity-0 group-hover:opacity-100 transition-opacity",children:"Use"})]})]})]},s.filename)}),e.jsxs("div",{role:"button",tabIndex:0,onClick:()=>d(!0),onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),d(!0))},className:"bg-white border-2 border-dashed border-[#ECEAE3] rounded-xl hover:border-[#553DE9]/30 hover:bg-[#553DE9]/[0.02] transition-all duration-200 cursor-pointer overflow-hidden group flex flex-col items-center justify-center min-h-[320px]",children:[e.jsx("div",{className:"w-14 h-14 rounded-2xl bg-[#553DE9]/10 flex items-center justify-center mb-4 group-hover:bg-[#553DE9]/15 transition-colors",children:e.jsx(de,{size:28,className:"text-[#553DE9]"})}),e.jsx("h3",{className:"text-sm font-bold text-[#36342E] mb-1 group-hover:text-[#553DE9] transition-colors",children:"Create Your Own"}),e.jsx("p",{className:"text-xs text-[#6B6960] text-center px-6 max-w-[200px]",children:"Design a custom template with your preferred stack and features"})]})]}):e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5",children:[1,2,3,4,5,6].map(s=>e.jsxs("div",{className:"bg-white border border-[#ECEAE3] rounded-xl shadow-card overflow-hidden animate-pulse",children:[e.jsx("div",{className:"h-32 bg-gradient-to-br from-[#ECEAE3]/30 to-[#ECEAE3]/10"}),e.jsxs("div",{className:"p-4 space-y-2",children:[e.jsx("div",{className:"h-4 bg-[#ECEAE3]/40 rounded w-3/4"}),e.jsx("div",{className:"h-3 bg-[#ECEAE3]/30 rounded w-full"}),e.jsx("div",{className:"h-3 bg-[#ECEAE3]/20 rounded w-1/2"}),e.jsxs("div",{className:"flex gap-1 mt-2",children:[e.jsx("div",{className:"h-5 w-14 bg-[#ECEAE3]/30 rounded"}),e.jsx("div",{className:"h-5 w-14 bg-[#ECEAE3]/30 rounded"})]})]})]},s))}),w&&e.jsx(je,{template:w,onClose:()=>h(null)}),E&&e.jsx(we,{onClose:()=>d(!1)})]})}export{Ue as default};
|
|
29
|
+
`})]})}const ve=[{key:"all",label:"All",icon:L},{key:"Website",label:"Web Apps",icon:re},{key:"API",label:"APIs",icon:ne},{key:"CLI",label:"CLIs",icon:te},{key:"Bot",label:"Bots",icon:oe},{key:"Data",label:"Data",icon:ce},{key:"Other",label:"Other",icon:L}],Q={Website:"from-violet-500 via-purple-500 to-indigo-500",API:"from-teal-500 via-emerald-500 to-cyan-500",CLI:"from-slate-500 via-gray-500 to-blue-500",Bot:"from-orange-500 via-rose-500 to-pink-500",Data:"from-blue-500 via-indigo-500 to-purple-500",Other:"from-slate-400 via-gray-400 to-zinc-500"},Ne={React:"bg-sky-500/10 text-sky-600","Node.js":"bg-green-500/10 text-green-600",Python:"bg-yellow-500/10 text-yellow-700",TypeScript:"bg-blue-500/10 text-blue-600",PostgreSQL:"bg-indigo-500/10 text-indigo-600",MongoDB:"bg-green-600/10 text-green-700",Docker:"bg-cyan-500/10 text-cyan-600",Redis:"bg-red-500/10 text-red-600",Express:"bg-gray-500/10 text-gray-600",FastAPI:"bg-teal-500/10 text-teal-600",SQLite:"bg-blue-400/10 text-blue-500",Tailwind:"bg-cyan-400/10 text-cyan-600",Discord:"bg-indigo-400/10 text-indigo-500",Slack:"bg-purple-500/10 text-purple-600",CLI:"bg-amber-500/10 text-amber-600",Playwright:"bg-green-500/10 text-green-600",Vite:"bg-purple-400/10 text-purple-500",Next:"bg-gray-600/10 text-gray-700"},H={beginner:{label:"Beginner",color:"text-green-500",bars:1},intermediate:{label:"Intermediate",color:"text-yellow-500",bars:2},advanced:{label:"Advanced",color:"text-red-400",bars:3}},Ee={"saas-starter.md":{uses:2847,rating:4.9},"rest-api-auth.md":{uses:1923,rating:4.8},"discord-bot.md":{uses:1654,rating:4.7},"full-stack-demo.md":{uses:1432,rating:4.8},"data-pipeline.md":{uses:1198,rating:4.6},"cli-tool.md":{uses:987,rating:4.7},"e-commerce.md":{uses:2156,rating:4.8},"blog-platform.md":{uses:1345,rating:4.5},"rest-api.md":{uses:1567,rating:4.6},"slack-bot.md":{uses:876,rating:4.4},"dashboard.md":{uses:1789,rating:4.7},"web-scraper.md":{uses:654,rating:4.3},"chrome-extension.md":{uses:543,rating:4.5},"microservice.md":{uses:1123,rating:4.6},"mobile-app.md":{uses:932,rating:4.4},"game.md":{uses:765,rating:4.5},"npm-library.md":{uses:445,rating:4.3},"static-landing-page.md":{uses:1876,rating:4.6},"simple-todo-app.md":{uses:2345,rating:4.7},"ai-chatbot.md":{uses:1234,rating:4.8}};function ke(i){return i>=1e3?`${(i/1e3).toFixed(1)}k`:String(i)}function Ce({category:i}){switch(i){case"Website":return e.jsxs("svg",{className:"absolute inset-0 w-full h-full opacity-[0.15]",viewBox:"0 0 400 120",children:[e.jsx("rect",{x:"40",y:"15",width:"160",height:"90",rx:"6",fill:"none",stroke:"white",strokeWidth:"1.5"}),e.jsx("line",{x1:"40",y1:"30",x2:"200",y2:"30",stroke:"white",strokeWidth:"1.5"}),e.jsx("circle",{cx:"52",cy:"22",r:"3",fill:"white",fillOpacity:"0.6"}),e.jsx("circle",{cx:"62",cy:"22",r:"3",fill:"white",fillOpacity:"0.6"}),e.jsx("circle",{cx:"72",cy:"22",r:"3",fill:"white",fillOpacity:"0.6"}),e.jsx("rect",{x:"50",y:"38",width:"80",height:"8",rx:"2",fill:"white",fillOpacity:"0.4"}),e.jsx("rect",{x:"50",y:"52",width:"140",height:"5",rx:"1.5",fill:"white",fillOpacity:"0.25"}),e.jsx("rect",{x:"50",y:"62",width:"120",height:"5",rx:"1.5",fill:"white",fillOpacity:"0.25"}),e.jsx("rect",{x:"50",y:"78",width:"45",height:"16",rx:"4",fill:"white",fillOpacity:"0.35"}),e.jsx("circle",{cx:"300",cy:"30",r:"20",fill:"none",stroke:"white",strokeWidth:"1.5"}),e.jsx("rect",{x:"270",y:"70",width:"25",height:"25",rx:"5",fill:"none",stroke:"white",strokeWidth:"1",transform:"rotate(15 282 82)"}),e.jsx("circle",{cx:"350",cy:"90",r:"8",fill:"white",fillOpacity:"0.3"})]});case"API":return e.jsxs("svg",{className:"absolute inset-0 w-full h-full opacity-[0.15]",viewBox:"0 0 400 120",children:[e.jsx("rect",{x:"30",y:"10",width:"180",height:"100",rx:"6",fill:"none",stroke:"white",strokeWidth:"1.5"}),e.jsx("line",{x1:"30",y1:"25",x2:"210",y2:"25",stroke:"white",strokeWidth:"1.5"}),e.jsx("circle",{cx:"42",cy:"17",r:"3",fill:"white",fillOpacity:"0.6"}),e.jsx("circle",{cx:"52",cy:"17",r:"3",fill:"white",fillOpacity:"0.6"}),e.jsx("text",{x:"40",y:"42",fill:"white",fillOpacity:"0.5",fontSize:"8",fontFamily:"monospace",children:"{"}),e.jsx("text",{x:"48",y:"54",fill:"white",fillOpacity:"0.4",fontSize:"7",fontFamily:"monospace",children:'"status": 200,'}),e.jsx("text",{x:"48",y:"66",fill:"white",fillOpacity:"0.4",fontSize:"7",fontFamily:"monospace",children:'"data": [...]'}),e.jsx("text",{x:"40",y:"80",fill:"white",fillOpacity:"0.5",fontSize:"8",fontFamily:"monospace",children:"}"}),e.jsx("circle",{cx:"290",cy:"35",r:"12",fill:"none",stroke:"white",strokeWidth:"1.5"}),e.jsx("circle",{cx:"340",cy:"60",r:"12",fill:"none",stroke:"white",strokeWidth:"1.5"}),e.jsx("circle",{cx:"290",cy:"85",r:"12",fill:"none",stroke:"white",strokeWidth:"1.5"}),e.jsx("line",{x1:"302",y1:"35",x2:"328",y2:"60",stroke:"white",strokeWidth:"1"}),e.jsx("line",{x1:"302",y1:"85",x2:"328",y2:"60",stroke:"white",strokeWidth:"1"}),e.jsx("circle",{cx:"290",cy:"35",r:"4",fill:"white",fillOpacity:"0.4"}),e.jsx("circle",{cx:"340",cy:"60",r:"4",fill:"white",fillOpacity:"0.4"}),e.jsx("circle",{cx:"290",cy:"85",r:"4",fill:"white",fillOpacity:"0.4"})]});case"CLI":return e.jsxs("svg",{className:"absolute inset-0 w-full h-full opacity-[0.15]",viewBox:"0 0 400 120",children:[e.jsx("rect",{x:"40",y:"12",width:"170",height:"96",rx:"6",fill:"none",stroke:"white",strokeWidth:"1.5"}),e.jsx("line",{x1:"40",y1:"27",x2:"210",y2:"27",stroke:"white",strokeWidth:"1.5"}),e.jsx("circle",{cx:"52",cy:"19",r:"3",fill:"white",fillOpacity:"0.6"}),e.jsx("circle",{cx:"62",cy:"19",r:"3",fill:"white",fillOpacity:"0.6"}),e.jsx("text",{x:"50",y:"42",fill:"white",fillOpacity:"0.5",fontSize:"7",fontFamily:"monospace",children:"$ myapp --help"}),e.jsx("text",{x:"50",y:"54",fill:"white",fillOpacity:"0.35",fontSize:"7",fontFamily:"monospace",children:"Usage: myapp [cmd]"}),e.jsx("text",{x:"50",y:"66",fill:"white",fillOpacity:"0.35",fontSize:"7",fontFamily:"monospace",children:" init Setup"}),e.jsx("text",{x:"50",y:"78",fill:"white",fillOpacity:"0.35",fontSize:"7",fontFamily:"monospace",children:" run Execute"}),e.jsx("rect",{x:"50",y:"88",width:"6",height:"10",fill:"white",fillOpacity:"0.6"}),e.jsx("text",{x:"270",y:"50",fill:"white",fillOpacity:"0.3",fontSize:"24",fontFamily:"monospace",children:">_"}),e.jsx("circle",{cx:"350",cy:"80",r:"15",fill:"none",stroke:"white",strokeWidth:"1",strokeDasharray:"4 4"})]});case"Bot":return e.jsxs("svg",{className:"absolute inset-0 w-full h-full opacity-[0.15]",viewBox:"0 0 400 120",children:[e.jsx("rect",{x:"40",y:"15",width:"120",height:"28",rx:"14",fill:"white",fillOpacity:"0.2"}),e.jsx("rect",{x:"50",y:"22",width:"60",height:"5",rx:"2",fill:"white",fillOpacity:"0.4"}),e.jsx("rect",{x:"80",y:"55",width:"130",height:"28",rx:"14",fill:"white",fillOpacity:"0.3"}),e.jsx("rect",{x:"90",y:"62",width:"80",height:"5",rx:"2",fill:"white",fillOpacity:"0.4"}),e.jsx("rect",{x:"50",y:"93",width:"100",height:"20",rx:"10",fill:"white",fillOpacity:"0.15"}),e.jsx("rect",{x:"60",y:"99",width:"50",height:"5",rx:"2",fill:"white",fillOpacity:"0.35"}),e.jsx("circle",{cx:"310",cy:"55",r:"25",fill:"none",stroke:"white",strokeWidth:"1.5"}),e.jsx("circle",{cx:"302",cy:"50",r:"4",fill:"white",fillOpacity:"0.5"}),e.jsx("circle",{cx:"318",cy:"50",r:"4",fill:"white",fillOpacity:"0.5"}),e.jsx("path",{d:"M300 62 Q310 70 320 62",fill:"none",stroke:"white",strokeWidth:"1.5"}),e.jsx("line",{x1:"310",y1:"30",x2:"310",y2:"22",stroke:"white",strokeWidth:"1.5"}),e.jsx("circle",{cx:"310",cy:"20",r:"3",fill:"white",fillOpacity:"0.5"})]});case"Data":return e.jsxs("svg",{className:"absolute inset-0 w-full h-full opacity-[0.15]",viewBox:"0 0 400 120",children:[e.jsx("ellipse",{cx:"80",cy:"30",rx:"35",ry:"10",fill:"none",stroke:"white",strokeWidth:"1.5"}),e.jsx("line",{x1:"45",y1:"30",x2:"45",y2:"85",stroke:"white",strokeWidth:"1.5"}),e.jsx("line",{x1:"115",y1:"30",x2:"115",y2:"85",stroke:"white",strokeWidth:"1.5"}),e.jsx("ellipse",{cx:"80",cy:"85",rx:"35",ry:"10",fill:"none",stroke:"white",strokeWidth:"1.5"}),e.jsx("ellipse",{cx:"80",cy:"55",rx:"35",ry:"10",fill:"none",stroke:"white",strokeWidth:"0.8",strokeDasharray:"3 3"}),e.jsx("line",{x1:"140",y1:"55",x2:"200",y2:"55",stroke:"white",strokeWidth:"1.5"}),e.jsx("polygon",{points:"200,50 210,55 200,60",fill:"white",fillOpacity:"0.5"}),e.jsx("rect",{x:"230",y:"70",width:"15",height:"35",rx:"3",fill:"white",fillOpacity:"0.25"}),e.jsx("rect",{x:"255",y:"50",width:"15",height:"55",rx:"3",fill:"white",fillOpacity:"0.3"}),e.jsx("rect",{x:"280",y:"60",width:"15",height:"45",rx:"3",fill:"white",fillOpacity:"0.25"}),e.jsx("rect",{x:"305",y:"40",width:"15",height:"65",rx:"3",fill:"white",fillOpacity:"0.35"}),e.jsx("rect",{x:"330",y:"55",width:"15",height:"50",rx:"3",fill:"white",fillOpacity:"0.2"})]});default:return e.jsxs("svg",{className:"absolute inset-0 w-full h-full opacity-[0.12]",viewBox:"0 0 400 120",children:[e.jsx("circle",{cx:"60",cy:"40",r:"25",fill:"none",stroke:"white",strokeWidth:"1.5"}),e.jsx("circle",{cx:"340",cy:"80",r:"30",fill:"none",stroke:"white",strokeWidth:"1.5"}),e.jsx("rect",{x:"170",y:"20",width:"35",height:"35",rx:"8",fill:"none",stroke:"white",strokeWidth:"1.5",transform:"rotate(15 187 37)"}),e.jsx("circle",{cx:"260",cy:"30",r:"10",fill:"white",fillOpacity:"0.3"}),e.jsx("circle",{cx:"120",cy:"90",r:"15",fill:"none",stroke:"white",strokeWidth:"1",strokeDasharray:"4 4"})]})}}function Se({level:i}){const r=H[i]||H.intermediate;return e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(B,{size:12,className:r.color}),e.jsx("div",{className:"flex gap-0.5",children:[1,2,3].map(c=>e.jsx("div",{className:`w-1.5 h-3 rounded-sm ${c<=r.bars?"bg-current "+r.color:"bg-[#ECEAE3]"}`},c))}),e.jsx("span",{className:`text-[10px] font-medium ${r.color}`,children:r.label})]})}function De(i){return i.replace(/\.md$/i,"").replace(/[-_]/g," ").replace(/\b\w/g,r=>r.toUpperCase())}function Ue(){const i=z(),[r,c]=o.useState("all"),[p,g]=o.useState(""),[w,h]=o.useState(null),[E,d]=o.useState(!1),v=o.useCallback(()=>J.getTemplates(),[]),{data:x}=se(v,6e4,!0),f=x,l=o.useMemo(()=>{if(!f)return[];let s=f;if(r!=="all"&&(s=s.filter(u=>(u.category||"Other")===r)),p.trim()){const u=p.toLowerCase();s=s.filter(j=>j.name.toLowerCase().includes(u)||(j.description||"").toLowerCase().includes(u)||(j.tech_stack||[]).some(t=>t.toLowerCase().includes(u)))}return s},[f,r,p]),a=s=>{sessionStorage.setItem("pl_template",s),i("/")};return e.jsxs("div",{className:"max-w-[1400px] mx-auto px-6 py-8",children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsx("h1",{className:"text-3xl font-bold mb-2",children:e.jsx("span",{className:"bg-gradient-to-r from-[#553DE9] via-[#7B6BEF] to-[#553DE9] bg-clip-text text-transparent",children:"Start with a Template"})}),e.jsx("p",{className:"text-[#6B6960] text-sm max-w-lg mx-auto mb-6",children:"Choose a starting point and customize with AI. Each template is a complete spec ready to become your next project."}),e.jsxs("div",{className:"relative max-w-xl mx-auto mb-5",children:[e.jsx(W,{size:18,className:"absolute left-4 top-1/2 -translate-y-1/2 text-[#6B6960]"}),e.jsx("input",{type:"text",value:p,onChange:s=>g(s.target.value),placeholder:"Search templates by name, tech, or category...",className:"w-full pl-11 pr-4 py-3 text-sm bg-white border border-[#ECEAE3] rounded-xl outline-none focus:border-[#553DE9] focus:ring-2 focus:ring-[#553DE9]/10 transition-all shadow-sm"}),p&&e.jsx("button",{onClick:()=>g(""),className:"absolute right-3 top-1/2 -translate-y-1/2 text-xs text-[#6B6960] hover:text-[#36342E] bg-[#F8F4F0] px-2 py-0.5 rounded",children:"Clear"})]}),e.jsx("div",{className:"flex items-center justify-center gap-1.5 flex-wrap",role:"tablist",children:ve.map(s=>{const u=s.icon,j=f?s.key==="all"?f.length:f.filter(t=>(t.category||"Other")===s.key).length:0;return e.jsxs("button",{role:"tab","aria-selected":r===s.key,onClick:()=>c(s.key),className:`flex items-center gap-1.5 px-3.5 py-2 text-xs font-semibold rounded-lg transition-all whitespace-nowrap ${r===s.key?"bg-[#553DE9] text-white shadow-sm":"text-[#6B6960] hover:text-[#36342E] hover:bg-[#F8F4F0] bg-white border border-[#ECEAE3]"}`,children:[e.jsx(u,{size:14}),s.label,f&&e.jsx("span",{className:`text-[10px] font-medium px-1.5 py-0.5 rounded-full ${r===s.key?"bg-white/20 text-white":"bg-[#F8F4F0] text-[#6B6960]"}`,children:j})]},s.key)})})]}),!p&&r==="all"&&f&&f.length>0&&e.jsx(be,{templates:f,onSelect:a,onPreview:h}),f?l.length===0?e.jsxs("div",{className:"py-16 text-center",children:[e.jsx(W,{size:32,className:"mx-auto text-[#ECEAE3] mb-3"}),e.jsx("p",{className:"text-sm text-[#6B6960] mb-1",children:"No templates match your search."}),e.jsx("p",{className:"text-xs text-[#939084] mb-3",children:"Try different keywords or browse a category."}),p&&e.jsx("button",{onClick:()=>{g(""),c("all")},className:"text-xs text-[#553DE9] hover:underline font-medium",children:"Clear all filters"})]}):e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5",children:[l.map(s=>{const u=s.category||"Other",j=Q[u]||Q.Other,t=s.tech_stack||[],n=s.difficulty||"intermediate",m=s.build_time||"5-10 min",b=Ee[s.filename]||{uses:Math.floor(Math.random()*800)+100,rating:(Math.random()*.7+4).toFixed(1)};return e.jsxs("div",{role:"button",tabIndex:0,onClick:()=>h(s),onKeyDown:y=>{(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),h(s))},className:"bg-white border border-[#ECEAE3] rounded-xl shadow-card hover:shadow-card-hover hover:-translate-y-0.5 transition-all duration-200 cursor-pointer overflow-hidden group",children:[e.jsxs("div",{className:`h-32 bg-gradient-to-br ${j} relative overflow-hidden`,children:[e.jsx(Ce,{category:u}),e.jsx("div",{className:"absolute top-3 right-3",children:e.jsx("span",{className:"text-[10px] font-semibold text-white/90 bg-white/20 backdrop-blur-sm px-2 py-0.5 rounded",children:u})}),t.length>0&&e.jsxs("div",{className:"absolute bottom-3 left-3 right-3 flex items-center gap-1.5",children:[t.slice(0,3).map(y=>e.jsx("span",{className:"text-[10px] font-semibold text-white/90 bg-white/20 backdrop-blur-sm px-2 py-0.5 rounded",children:y},y)),t.length>3&&e.jsxs("span",{className:"text-[10px] text-white/70 bg-white/15 backdrop-blur-sm px-1.5 py-0.5 rounded",children:["+",t.length-3]})]})]}),e.jsxs("div",{className:"p-4",children:[e.jsx("h3",{className:"text-sm font-bold text-[#36342E] mb-1 group-hover:text-[#553DE9] transition-colors",children:De(s.name)}),e.jsx("p",{className:"text-xs text-[#6B6960] line-clamp-2 mb-3 min-h-[2.4em]",children:s.description||s.filename}),t.length>0&&e.jsx("div",{className:"flex flex-wrap gap-1 mb-3",children:t.map(y=>e.jsx("span",{className:`inline-flex items-center px-1.5 py-0.5 text-[10px] font-medium rounded ${Ne[y]||"bg-[#F8F4F0] text-[#6B6960]"}`,children:y},y))}),e.jsxs("div",{className:"flex items-center gap-3 mb-3 text-[10px] text-[#6B6960]",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(V,{size:10}),ke(typeof b.uses=="number"?b.uses:0)," uses"]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(O,{size:10,className:"text-[#D4A03C]",fill:"#D4A03C"}),b.rating]})]}),e.jsxs("div",{className:"flex items-center justify-between pt-3 border-t border-[#ECEAE3]",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(Se,{level:n}),e.jsxs("div",{className:"flex items-center gap-1 text-[10px] text-[#6B6960]",children:[e.jsx(I,{size:11}),e.jsx("span",{children:m})]})]}),e.jsx(N,{size:"sm",icon:D,onClick:y=>{y.stopPropagation(),a(s.filename)},className:"opacity-0 group-hover:opacity-100 transition-opacity",children:"Use"})]})]})]},s.filename)}),e.jsxs("div",{role:"button",tabIndex:0,onClick:()=>d(!0),onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),d(!0))},className:"bg-white border-2 border-dashed border-[#ECEAE3] rounded-xl hover:border-[#553DE9]/30 hover:bg-[#553DE9]/[0.02] transition-all duration-200 cursor-pointer overflow-hidden group flex flex-col items-center justify-center min-h-[320px]",children:[e.jsx("div",{className:"w-14 h-14 rounded-2xl bg-[#553DE9]/10 flex items-center justify-center mb-4 group-hover:bg-[#553DE9]/15 transition-colors",children:e.jsx(de,{size:28,className:"text-[#553DE9]"})}),e.jsx("h3",{className:"text-sm font-bold text-[#36342E] mb-1 group-hover:text-[#553DE9] transition-colors",children:"Create Your Own"}),e.jsx("p",{className:"text-xs text-[#6B6960] text-center px-6 max-w-[200px]",children:"Design a custom template with your preferred stack and features"})]})]}):e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5",children:[1,2,3,4,5,6].map(s=>e.jsxs("div",{className:"bg-white border border-[#ECEAE3] rounded-xl shadow-card overflow-hidden animate-pulse",children:[e.jsx("div",{className:"h-32 bg-gradient-to-br from-[#ECEAE3]/30 to-[#ECEAE3]/10"}),e.jsxs("div",{className:"p-4 space-y-2",children:[e.jsx("div",{className:"h-4 bg-[#ECEAE3]/40 rounded w-3/4"}),e.jsx("div",{className:"h-3 bg-[#ECEAE3]/30 rounded w-full"}),e.jsx("div",{className:"h-3 bg-[#ECEAE3]/20 rounded w-1/2"}),e.jsxs("div",{className:"flex gap-1 mt-2",children:[e.jsx("div",{className:"h-5 w-14 bg-[#ECEAE3]/30 rounded"}),e.jsx("div",{className:"h-5 w-14 bg-[#ECEAE3]/30 rounded"})]})]})]},s))}),w&&e.jsx(je,{template:w,onClose:()=>h(null)}),E&&e.jsx(we,{onClose:()=>d(!1)})]})}export{Ue as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as f,r as l,j as e,T as k,
|
|
1
|
+
import{c as f,r as l,j as e,T as k,i as y,b as N}from"./index-CM_b_EhP.js";import{L as S}from"./lock-DbJ9zxbw.js";/**
|
|
2
2
|
* @license lucide-react v0.577.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|