/** * Output list page renderer. * * Generates a browsable list page for a module's output type. * Fetches items from the module's API and renders them as a card grid * inside the standard rSpace shell. */ import type { ModuleInfo, OutputPath } from "../shared/module"; import { renderShell, escapeHtml, escapeAttr } from "./shell"; export function renderOutputListPage( space: string, mod: { id: string; name: string; icon: string; description: string }, outputPath: OutputPath, modules: ModuleInfo[], ): string { const body = `
${escapeHtml(outputPath.icon)}

${escapeHtml(outputPath.name)}

${escapeHtml(outputPath.description)}

Loading…
`; const styles = ``; return renderShell({ title: `${outputPath.name} — ${mod.name} | rSpace`, moduleId: mod.id, spaceSlug: space, body, modules, theme: "dark", styles, }); }