{"$schema":"https:\/\/ui.particle.academy\/schema\/registry-item.json","name":"commit-history","type":"registry:ui","title":"CommitHistory","description":"Pageable controlled commit history and selection.","package":"fancy-git-ui","dependencies":["@particle-academy\/fancy-git"],"registryDependencies":[],"files":[{"path":"components\/fancy\/commit-history\/commit-history.tsx","content":"import type { Commit } from \"@particle-academy\/fancy-git\";\n\nexport interface CommitHistoryProps {\n  value: Commit[];\n  selectedId?: string;\n  onSelectedIdChange?: (id: string) => void;\n  onLoadMore?: () => void;\n  hasMore?: boolean;\n  className?: string;\n}\n\nexport function CommitHistory({ value, selectedId, onSelectedIdChange, onLoadMore, hasMore, className }: CommitHistoryProps) {\n  return <section className={className} data-git-commit-history=\"\" aria-label=\"Commit history\">\n    <ol>{value.map((commit) => <li key={commit.id} data-git-commit-id={commit.id}>\n      <button type=\"button\" aria-pressed={selectedId === commit.id} onClick={() => onSelectedIdChange?.(commit.id)}>\n        <code>{commit.shortId}<\/code><span>{commit.subject}<\/span><small>{commit.authorName}<\/small>\n      <\/button>\n    <\/li>)}<\/ol>\n    {hasMore && <button type=\"button\" onClick={onLoadMore}>Load more<\/button>}\n  <\/section>;\n}\n","type":"registry:ui","target":"components\/fancy\/commit-history\/commit-history.tsx"}]}