Fix all TypeScript errors; remove unused element/magicui components
- Add missing deps: @base-ui/react, react-hook-form, next-themes, react-is - Bump recharts to 3.9.1 and update chart.tsx to the recharts v3-compatible shadcn version - Pin react-resizable-panels to v3 (v4 renamed the PanelGroup exports) - Add showCloseButton prop to DialogContent (used by CommandDialog) - Replace custom cn with standard clsx + twMerge (fixes Base UI className types and object-syntax classes being dropped at runtime) - Clean up tsconfig (drop dead Vite project references; Next.js updated moduleResolution/jsx during build) - Remove unused components/elements and components/magicui, drop bun.lock in favor of yarn.lock, simplify app/page.tsx Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019bE5ox6WnAPgqRgkx3pLCu
This commit is contained in:
12
lib/utils.ts
12
lib/utils.ts
@@ -1,14 +1,8 @@
|
||||
import { clsx, type ClassValue } from 'clsx';
|
||||
import { twMerge } from 'tailwind-merge';
|
||||
|
||||
type ClassValue = string | undefined | null | false | Record<string, boolean>;
|
||||
type ClassArray = ClassValue[];
|
||||
|
||||
export function cn(...classes: (ClassValue | ClassArray)[]): string {
|
||||
const merged = classes
|
||||
.flat()
|
||||
.filter((cls): cls is string => typeof cls === 'string')
|
||||
.join(' ');
|
||||
return twMerge(merged);
|
||||
export function cn(...inputs: ClassValue[]): string {
|
||||
return twMerge(clsx(inputs));
|
||||
}
|
||||
|
||||
export const truncate = (text: string, maxLength: number): string => {
|
||||
|
||||
Reference in New Issue
Block a user