Skip to content

Commit 431bc3f

Browse files
authored
Merge pull request #10 from sxjeru/dependabot/npm_and_yarn/zod-4.3.5
build(deps): bump zod from 3.25.76 to 4.3.5
2 parents f444a87 + 4c1b55b commit 431bc3f

5 files changed

Lines changed: 26 additions & 60 deletions

File tree

app/components/Modal.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use client";
22

3-
import { useEffect, useState } from "react";
3+
import { startTransition, useEffect, useState } from "react";
44
import { X } from "lucide-react";
55

66
interface ModalProps {
@@ -30,13 +30,15 @@ export function Modal({
3030
// Handle visibility transitions and initial sync
3131
useEffect(() => {
3232
if (isOpen) {
33-
setIsVisible(true);
34-
setIsClosing(false);
35-
setCachedChildren(children);
36-
setCachedTitle(title);
33+
startTransition(() => {
34+
setIsVisible(true);
35+
setIsClosing(false);
36+
setCachedChildren(children);
37+
setCachedTitle(title);
38+
});
3739
} else if (isVisible && !isClosing) {
3840
// Start closing animation if we are currently visible and not already closing
39-
setIsClosing(true);
41+
startTransition(() => setIsClosing(true));
4042
}
4143
}, [isOpen, isVisible, isClosing, children, title]);
4244

app/explore/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use client";
22

3-
import { forwardRef, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
3+
import { forwardRef, startTransition, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
44
import { Area, AreaChart, CartesianGrid, ComposedChart, ReferenceLine, ResponsiveContainer, Scatter, Tooltip, XAxis, YAxis } from "recharts";
55
import { formatCompactNumber, formatNumberWithCommas } from "@/lib/utils";
66

@@ -210,7 +210,7 @@ function useLerpYDomain(
210210
// Sync domain when target changes or animation is disabled
211211
useEffect(() => {
212212
if (!targetDomain || !enabled) {
213-
setCurrentDomain(targetDomain);
213+
startTransition(() => setCurrentDomain(targetDomain));
214214
}
215215
}, [targetDomain, enabled]);
216216

lib/usage.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,19 @@ const apiSchema = z.object({
4646
total_tokens: z.number().optional(),
4747
success_count: z.number().optional(),
4848
failure_count: z.number().optional(),
49-
models: z.record(modelSchema).optional()
49+
models: z.record(z.string(), modelSchema).optional()
5050
});
5151

5252
const usageSchema = z.object({
5353
total_requests: z.number().optional(),
5454
success_count: z.number().optional(),
5555
failure_count: z.number().optional(),
5656
total_tokens: z.number().optional(),
57-
requests_by_day: z.record(z.number()).optional(),
58-
requests_by_hour: z.record(z.number()).optional(),
59-
tokens_by_day: z.record(z.number()).optional(),
60-
tokens_by_hour: z.record(z.number()).optional(),
61-
apis: z.record(apiSchema).optional()
57+
requests_by_day: z.record(z.string(), z.number()).optional(),
58+
requests_by_hour: z.record(z.string(), z.number()).optional(),
59+
tokens_by_day: z.record(z.string(), z.number()).optional(),
60+
tokens_by_hour: z.record(z.string(), z.number()).optional(),
61+
apis: z.record(z.string(), apiSchema).optional()
6262
});
6363

6464
const responseSchema = z.object({ usage: usageSchema.optional() });

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"react": "19.2.3",
2121
"react-dom": "19.2.3",
2222
"recharts": "^3.6.0",
23-
"zod": "^3.22.4"
23+
"zod": "^4.3.5"
2424
},
2525
"devDependencies": {
2626
"@tailwindcss/postcss": "^4.1.18",

pnpm-lock.yaml

Lines changed: 9 additions & 45 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)