import pathlib lib = pathlib.Path("/root/.openclaw/workspace/pulse-libs/src") mol = { "FeatureCard.ts": """\ import { Card } from '../atoms' interface FeatureCardProps { title:string, description:string, icon?:string, delay?:number, variant?:'default'|'accent', style?:React.CSSProperties } export function FeatureCard({title,description,icon,delay=0,variant='default',style}:FeatureCardProps){ const bg = variant==='accent'?'linear-gradient(135deg,rgba(37,99,235,.06),rgba(124,58,237,.04))':'transparent' return ( {variant==='accent' &&
} {icon &&
{icon}
}

{title}

{description}

{variant==='accent' && core}
) } """, "Navbar.ts": """\ import { GradientText, Button } from '../atoms' interface NavProps { logo:string, links:{label:string,href:string}[], ctaLabel?:string, ctaHref?:string } export function Navbar({logo,links,ctaLabel,ctaHref='#'}:NavProps){ return ( ) } """, "Footer.ts": """\ interface FooterProps { brand?:string, year?:number, links:{label:string,href:string}[] } export function Footer({brand='Pulse 3D',year=__DATE__,links=[]}:FooterProps){ return ( ) } """, "index.ts": """\ export { FeatureCard } from './FeatureCard' export { Navbar } from './Navbar' export { Footer } from './Footer' """, } for name, code in mol.items(): (lib / "molecules" / name).write_text(code) print("✅ Molecules: FeatureCard, Navbar, Footer + index") # ── ORGANISMS ────────────────────────────────────────────────────── org = { "HeroSection.ts": """\ import { Card, Badge, GradientText, Button } from '../atoms' import type { JSX } from 'react' interface HeroProps { badge?:string, title:string, description:string, cta:{label:string,onClick():void}[], showScrollHint?:boolean, style?:React.CSSProperties } export function HeroSection({badge,title,description,cta=[],showScrollHint=true,style}:HeroProps){ return (
{badge && {badge}}

{title}

{description}

{cta.map((b,i)=>)}
{showScrollHint &&
scroll para explorar
}
) } """, "FeaturesGrid.ts": """\ import { Card } from '../atoms' interface Feature { icon:string, title:string, description:string } interface FeaturesProps { title?:string, features:Feature[], style?:React.CSSProperties } export function FeaturesGrid({title,features,style}:FeaturesProps){ return (
{title &&

{title}

}

Componentes que compõem o sistema — do átomo ao organismo.

{features.map((f,i)=>
{f.icon}

{f.title}

{f.description}

) }
) } """, "CtaBlock.ts": """\ import { Button, GradientText } from '../atoms' interface CtaProps { title:string, description:string, primary:{label:string,onClick():void}, secondary?:{label:string,onClick():void}, dark?:boolean } export function CtaBlock({title,description,primary,secondary,dark=false}:CtaProps){ const bg = dark ? 'rgba(5,5,16,.96)' : 'rgba(15,17,23,.5)' return (

{title}

{description}

{secondary && }

{'\\u2699'} @pulse-libs/ui — MIT — {new Date().getFullYear()}

) } """, "StatsGrid.ts": """\ interface Stat { label:string, value:string|number, color?:string } export function StatsGrid({stats}:{stats:Stat[]}){ return (
{stats.map((s,i)=>
{s.value}
{s.label}
)}
) } """, "index.ts": """\ export { HeroSection } from './HeroSection' export { FeaturesGrid } from './FeaturesGrid' export { CtaBlock } from './CtaBlock' export { StatsGrid } from './StatsGrid' """, } for name, code in org.items(): if name != "index.ts": (lib / "organisms" / name).write_text(code) else: (lib / "organisms" / name).write_text(code) print("✅ Organisms: HeroSection, FeaturesGrid, CtaBlock, StatsGrid + index") # ── TEMPLATES ────────────────────────────────────────────────────── templates = { "MainLayout.ts": """\ import { ReactNode } from 'react' import { Navbar, Footer, Divider } from './..' interface LayoutProps { children:ReactNode, nav:{logo:string,links:{label:string,href:string}[],cta?:{label:string,href:string}}, footer?:{brand:string,links:{label:string,href:string}[]} } export function MainLayout({children,nav,footer}:LayoutProps){ return (
{children}
{footer &&
}
) } """, "MinimalLayout.ts": """\ interface MinimalProps { children:React.ReactNode, centered?:boolean } export function MinimalLayout({children,centered=true}:MinimalProps){ return
{children}
} """, "index.ts": """\ export { MainLayout } from './MainLayout' export { MinimalLayout } from './MinimalLayout' """, } for name, code in templates.items(): (lib / "templates" / name).write_text(code) print("✅ Templates: MainLayout, MinimalLayout + index") PYEOF