Commit graph

1 commit

Author SHA1 Message Date
delibae
c5c3085626 feat: extract template gallery into dedicated components with expanded template library
Refactor the project wizard's inline template grid into a full-featured
template gallery system with search, category filtering, and rich previews.

Template data architecture (template-registry.ts):
- Define TemplateDefinition schema with categories, subcategories, tags,
  packages, accent colors, and bibliography flag
- Expand from 8 to 12 templates: add IEEE, ACM, Technical Report, Newsletter
- Provide registry API: getAllTemplates, getTemplateById, searchTemplates,
  getTemplatesByCategory

Template gallery UI (components/template-gallery/):
- template-gallery.tsx: main layout with search bar (Cmd+K), category
  sidebar, responsive grid, grouped-by-category default view, empty state
- template-card.tsx: cards with 9 CSS-based document thumbnail layouts
  (paper, slides, poster, CV, letter, book, report, newsletter, blank)
  and hover preview button
- category-sidebar.tsx: category navigation with per-category template counts
- template-preview.tsx: dialog showing LaTeX source, package list, tags,
  document class metadata, and "Use Template" CTA

State management (template-store.ts):
- Zustand store for gallery state: search query, category filter, template
  selection, and preview modal state with computed filtered results

Project wizard refactor (project-wizard.tsx):
- Replace inline TemplateGrid and hardcoded template array with the new
  TemplateGallery component
- Use template.hasBibliography flag instead of hardcoded ID check for
  references.bib generation
- Fix overflow handling for step 2 scrollable content
2026-02-22 06:15:12 +09:00