Skip to content

Commit 0049343

Browse files
kiwicoppleclaude
andcommitted
Update website dependencies to latest versions
- Upgraded Next.js from 15.2.4 to 15.4.5 - Updated React and React-DOM to 18.3.1 - Upgraded TypeScript from 4.9.5 to 5.9.2 - Updated all Radix UI components to latest versions - Upgraded Supabase client from 2.49.8 to 2.53.0 - Updated TanStack React Query from 4.24.6 to 4.40.1 - Updated all other dependencies to compatible latest versions Breaking changes resolved: - Fixed react-markdown v9 compatibility (removed inline/linkTarget props) - Fixed TypeScript strict mode issues in zod form validator - Corrected HTML element types in typography components - Updated A component to handle target="_blank" by default 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent e723d1d commit 0049343

File tree

8 files changed

+12908
-9258
lines changed

8 files changed

+12908
-9258
lines changed

website/components/ui/Markdown.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,10 @@ const DEFAULT_COMPONENTS: MarkdownProps['components'] = {
4040
</pre>
4141
)
4242
},
43-
code({ node, inline, className, children, ...props }) {
43+
code({ node, className, children, ...props }) {
44+
const isInline = !className?.includes('language-')
4445
return (
45-
<code {...props} className={cn(inline && 'dark:text-white', className)}>
46+
<code {...props} className={cn(isInline && 'dark:text-white', className)}>
4647
{children}
4748
</code>
4849
)
@@ -85,10 +86,11 @@ const DEFAULT_COMPONENTS: MarkdownProps['components'] = {
8586
}
8687

8788
const COPYABLE_CODE_COMPONENTS: MarkdownProps['components'] = {
88-
code({ node, inline, className, children, ...props }) {
89+
code({ node, className, children, ...props }) {
90+
const isInline = !className?.includes('language-')
8991
return (
90-
<code {...props} className={cn(inline && 'dark:text-white', className)}>
91-
{!inline && (
92+
<code {...props} className={cn(isInline && 'dark:text-white', className)}>
93+
{!isInline && (
9294
<CopyButton
9395
getValue={() => childrenToText(children)}
9496
className="absolute top-2 right-2"
@@ -106,16 +108,14 @@ const Markdown = ({
106108
className,
107109
remarkPlugins = [],
108110
rehypePlugins = [],
109-
linkTarget = '_blank',
110111
components,
111112
copyableCode = true,
112113
children,
113114
...props
114115
}: MarkdownProps) => (
115116
<ReactMarkdown
116-
remarkPlugins={[remarkGfm, ...remarkPlugins]}
117-
rehypePlugins={[rehypeHighlight, ...rehypePlugins]}
118-
linkTarget={linkTarget}
117+
remarkPlugins={[remarkGfm, ...(remarkPlugins || [])]}
118+
rehypePlugins={[rehypeHighlight, ...(rehypePlugins || [])]}
119119
className={cn('prose lg:prose-xl max-w-none', className)}
120120
components={{
121121
...DEFAULT_COMPONENTS,

website/components/ui/typography/A.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ import { cn } from '~/lib/utils'
44
export interface AProps extends ComponentPropsWithoutRef<'a'> {}
55

66
const A = forwardRef<HTMLAnchorElement, AProps>(
7-
({ className, children, ...props }) => (
7+
({ className, children, target = '_blank', ...props }) => (
88
<a
99
className={cn('tracking-tight dark:text-white break-words', className)}
10+
target={target}
1011
{...props}
1112
>
1213
{children}

website/components/ui/typography/Li.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { cn } from '~/lib/utils'
33

44
export interface LiProps extends ComponentPropsWithoutRef<'li'> {}
55

6-
const Li = forwardRef<HTMLHeadingElement, LiProps>(
6+
const Li = forwardRef<HTMLLIElement, LiProps>(
77
({ className, children, ...props }) => (
88
<li className={cn('tracking-tight dark:text-white', className)} {...props}>
99
{children}

website/components/ui/typography/Strong.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { cn } from '~/lib/utils'
33

44
export interface StrongProps extends ComponentPropsWithoutRef<'strong'> {}
55

6-
const Strong = forwardRef<HTMLHeadingElement, StrongProps>(
6+
const Strong = forwardRef<HTMLElement, StrongProps>(
77
({ className, children, ...props }, ref) => (
88
<strong
99
className={cn('tracking-tight dark:text-white', className)}

website/lib/zod-form-validator-utils.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import type { ZodError } from 'zod'
44

55
export type ParserType = 'sync' | 'async'
66

7-
export function recursiveFormatZodErrors(errors: any) {
8-
let formattedErrors: Record<string, any> = {}
7+
export function recursiveFormatZodErrors(errors: any): any {
8+
let formattedErrors: any[] | Record<string, any> = {}
99

1010
for (const key in errors) {
1111
if (key === '_errors') {
@@ -16,12 +16,12 @@ export function recursiveFormatZodErrors(errors: any) {
1616
if (!isNaN(key as any) && !Array.isArray(formattedErrors)) {
1717
formattedErrors = []
1818
}
19-
formattedErrors[key] = errors[key]._errors[0]
19+
(formattedErrors as any)[key] = errors[key]._errors[0]
2020
} else {
2121
if (!isNaN(key as any) && !Array.isArray(formattedErrors)) {
2222
formattedErrors = []
2323
}
24-
formattedErrors[key] = recursiveFormatZodErrors(errors[key])
24+
(formattedErrors as any)[key] = recursiveFormatZodErrors(errors[key])
2525
}
2626
}
2727

0 commit comments

Comments
 (0)