import { GitBranch } from "lucide-react"; import React from "react"; // Version info - fallback to direct import if build-time replacement fails import packageJson from "../../package.json"; import { cn } from "../hooks"; declare const __PACKAGE_VERSION__: string; declare const __PACKAGE_NAME__: string; declare const __GIT_HASH__: string; const PACKAGE_VERSION = typeof __PACKAGE_VERSION__ !== "undefined" ? __PACKAGE_VERSION__ : packageJson.version; const PACKAGE_NAME = typeof __PACKAGE_NAME__ !== "undefined" ? __PACKAGE_NAME__ : packageJson.name; const GIT_HASH = typeof __GIT_HASH__ !== "undefined" ? __GIT_HASH__ : "unknown"; interface PackageBadgeProps { /** * Additional CSS classes to apply to the badge */ className?: string; /** * Package name to display (e.g., "vuer", "uikit") */ packageName?: string; /** * Full package name for npm link (e.g., "@vuer-ai/vuer-uikit") */ packageFullName?: string; /** * Version string to display (e.g., "v0.0.72" or "0.0.72") */ versionText?: string; /** * Whether the version should be clickable (links to npm) */ linkable?: boolean; /** * Git hash to display (if provided) */ gitHash?: string; } /** * Low-level badge component that displays package information with provided values */ function PackageBadge({ className, packageName, packageFullName, versionText, linkable = true, gitHash, }: PackageBadgeProps) { const npmUrl = packageFullName && versionText ? `https://www.npmjs.com/package/${packageFullName}/v/${versionText.replace("v", "")}` : undefined; return (