Aurora AI Commit
aurora-dinglebear-ai/aurora-ai-commitFreeBlock
Aurora-native commit parity surface from AI Elements.
Install it
npx shadcn@latest add https://aurora.dinglebear.ai/r/aurora-ai-commit.jsonSource
1"use client"23import * as React from "react"4import { Check, GitBranch, GitCommitHorizontal } from "lucide-react"5import { cn } from "@/lib/utils"6import { useClipboard } from "@/registry/aurora/lib/use-clipboard"78export type CommitVariant = "default" | "compact"910export interface CommitProps extends React.HTMLAttributes<HTMLDivElement> {11 /** Short commit hash, e.g. `ca8cb38`. */12 hash: string13 /** Commit subject line. */14 message: string15 /** Author handle; first letter seeds the avatar. */16 author?: string17 /** Relative timestamp, e.g. `4m ago`. */18 time?: string19 /** Branch name shown in the diffstat row. */20 branch?: string21 /** Files touched. */22 files?: number23 /** Lines added. */24 additions?: number25 /** Lines removed. */26 deletions?: number27 /** Render the AI authorship badge next to the subject. */28 badge?: boolean29 /** Density. `compact` collapses to a single row (avatar · message · hash). */30 variant?: CommitVariant31}3233// ── Aurora token panel surface (mirrors the elements panelStyle) ───────────────34function commitPanelStyle(style?: React.CSSProperties): React.CSSProperties {35 return {36 background: "var(--aurora-surface-raised)",37 border: "1px solid var(--aurora-border-strong)",38 borderRadius: "var(--aurora-radius-1)",39 boxShadow: "var(--aurora-shadow-medium), var(--aurora-highlight-medium)",40 ...style,41 }42}4344function CommitAvatar({ seed, size }: { seed: string; size: number }) {45 const initial = (seed.trim()[0] ?? "?").toUpperCase()46 return (47 <span48 aria-hidden49 className="grid place-items-center rounded-full"50 style={{51 width: size,52 height: size,53 color: "var(--aurora-accent-primary)",54 border: "1.5px solid color-mix(in srgb, var(--aurora-accent-primary) 60%, transparent)",55 background: "color-mix(in srgb, var(--aurora-accent-primary) 12%, transparent)",56 fontFamily: "var(--aurora-font-display)",57 fontWeight: 700,58 fontSize: size * 0.4,59 lineHeight: 1,60 }}61 >62 {initial}63 </span>64 )65}6667function HashChip({ hash }: { hash: string }) {68 const { copied, error, copy } = useClipboard(1200)69 const handleCopy = React.useCallback(() => void copy(hash), [copy, hash])7071 return (72 <button73 type="button"74 onClick={handleCopy}75 aria-label={copied ? `Copied ${hash}` : error ? `Unable to copy ${hash}` : `Copy commit ${hash}`}76// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from aurora
All 176 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Aurora AI Actionaurora-ai-action | aurora | Blocks | Paid | 1 dep | |
| Aurora AI Actionsaurora-ai-actions | aurora | Blocks | Paid | 1 dep | |
| Aurora AI Agentaurora-ai-agent | aurora | Blocks | Free | 1 dep | |
| Aurora AI Image Gridaurora-ai-ai-image-grid | aurora | Blocks | Paid | 1 dep | |
| Aurora AI Attachmentsaurora-ai-attachments | aurora | Blocks | Free | 1 dep | |
| Aurora AI Audio Playeraurora-ai-audio-player | aurora | Blocks | Free | 1 dep | |
| Aurora AI Branchaurora-ai-branch | aurora | Blocks | Paid | 1 dep | |
| Aurora AI Canvasaurora-ai-canvas | aurora | Blocks | Free | 1 dep |
