more updates
This commit is contained in:
parent
c7f353f657
commit
ac318f51f2
|
|
@ -18,13 +18,12 @@ export type Endpoint<TInputSchema extends ZodType, TResponse> = {
|
|||
) => Promise<TResponse>;
|
||||
};
|
||||
|
||||
export const createEndpoint = <
|
||||
TInputSchema extends ZodType,
|
||||
TResponse,
|
||||
TInput = z.infer<TInputSchema>,
|
||||
>(
|
||||
export const createEndpoint = <TInputSchema extends ZodType, TResponse>(
|
||||
validate: TInputSchema,
|
||||
handler: (input: TInput, context: RequestContext) => Promise<TResponse>,
|
||||
handler: (
|
||||
input: z.infer<TInputSchema>,
|
||||
context: RequestContext,
|
||||
) => Promise<TResponse>,
|
||||
): Endpoint<TInputSchema, TResponse> => {
|
||||
return { validate, handler };
|
||||
};
|
||||
|
|
|
|||
30
package.json
30
package.json
|
|
@ -24,8 +24,8 @@
|
|||
"@radix-ui/react-popover": "^1.1.15",
|
||||
"@radix-ui/react-switch": "^1.2.6",
|
||||
"@radix-ui/react-tooltip": "^1.2.8",
|
||||
"@tanstack/react-query": "^5.59.11",
|
||||
"@tanstack/react-query-devtools": "^5.59.11",
|
||||
"@tanstack/react-query": "^5.87.4",
|
||||
"@tanstack/react-query-devtools": "^5.87.4",
|
||||
"@tsparticles/engine": "^3.9.1",
|
||||
"@tsparticles/preset-sea-anemone": "^3.2.0",
|
||||
"@tsparticles/react": "^3.0.0",
|
||||
|
|
@ -34,8 +34,8 @@
|
|||
"class-variance-authority": "^0.7.1",
|
||||
"clsx": "^2.1.1",
|
||||
"dayjs": "^1.11.18",
|
||||
"drizzle-orm": "0.33.0",
|
||||
"jotai": "^2.10.0",
|
||||
"drizzle-orm": "0.44.5",
|
||||
"jotai": "^2.14.0",
|
||||
"lucide-react": "^0.544.0",
|
||||
"motion": "^12.23.12",
|
||||
"pixi-viewport": "^5.0.3",
|
||||
|
|
@ -43,12 +43,12 @@
|
|||
"pixi.js-legacy": "^7.4.2",
|
||||
"prom-client": "^15.1.3",
|
||||
"random-seed": "^0.3.0",
|
||||
"react": "^18.3.1",
|
||||
"react": "^19.1.1",
|
||||
"react-confetti-boom": "^2.0.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"react-dom": "^19.1.1",
|
||||
"tailwind-merge": "^3.3.1",
|
||||
"wouter": "^3.3.5",
|
||||
"zod": "^3.23.8"
|
||||
"wouter": "^3.7.1",
|
||||
"zod": "^4.1.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/compat": "^1.3.2",
|
||||
|
|
@ -56,10 +56,10 @@
|
|||
"@tailwindcss/vite": "next",
|
||||
"@types/bun": "latest",
|
||||
"@types/random-seed": "^0.3.5",
|
||||
"@types/react": "^18.3.11",
|
||||
"@types/react-dom": "^18.3.1",
|
||||
"@vitejs/plugin-react-swc": "^3.7.1",
|
||||
"drizzle-kit": "0.24.2",
|
||||
"@types/react": "^19.1.13",
|
||||
"@types/react-dom": "^19.1.9",
|
||||
"@vitejs/plugin-react-swc": "^4.0.1",
|
||||
"drizzle-kit": "0.31.4",
|
||||
"eslint": "^9.35.0",
|
||||
"eslint-plugin-react": "^7.37.5",
|
||||
"eslint-plugin-react-hooks": "5.2.0",
|
||||
|
|
@ -67,8 +67,8 @@
|
|||
"tailwindcss": "^4.1.13",
|
||||
"typescript": "^5.9.2",
|
||||
"typescript-eslint": "^8.44.0",
|
||||
"vite": "^5.4.8",
|
||||
"vite-bundle-analyzer": "^0.22.3",
|
||||
"vite-imagetools": "^7.0.4"
|
||||
"vite": "^7.1.5",
|
||||
"vite-bundle-analyzer": "^1.2.3",
|
||||
"vite-imagetools": "^8.0.0"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ export interface ViewportProps {
|
|||
};
|
||||
clampZoom?: IClampZoomOptions;
|
||||
onViewportChange?: (viewport: PixiViewport) => void;
|
||||
viewportRef?: React.RefObject<PixiViewport>;
|
||||
viewportRef?: React.RefObject<PixiViewport | null>;
|
||||
}
|
||||
|
||||
export interface PixiComponentViewportProps extends ViewportProps {
|
||||
|
|
@ -62,7 +62,6 @@ const PixiComponentViewport = PixiComponent("Viewport", {
|
|||
});
|
||||
|
||||
if (props.viewportRef) {
|
||||
// @ts-expect-error We dont care since this is internal api
|
||||
props.viewportRef.current = viewport;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ export const useWSQuery = <
|
|||
// @ts-expect-error We dont care since this is internal api
|
||||
Awaited<ReturnType<Routes[TController][TAction]["handler"]>>
|
||||
> => {
|
||||
// @ts-expect-error We dont care since this is internal api
|
||||
return useQuery({
|
||||
queryKey: [action, payload],
|
||||
queryFn: async () => {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ const TouchTooltip = ({
|
|||
}) => {
|
||||
const [isOpen, setIsOpen] = useState(false);
|
||||
const [isTouchDevice, setIsTouchDevice] = useState(false);
|
||||
const timeoutRef = useRef<Timer>();
|
||||
const timeoutRef = useRef<Timer | null>(null);
|
||||
|
||||
useEffect(() => {
|
||||
// Detect if device supports touch
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ const createWSClient = () => {
|
|||
>(
|
||||
action: `${TController}.${TAction}`,
|
||||
// @ts-expect-error We dont care since this is internal api
|
||||
payload: Routes[TController][TAction]["validate"]["_input"],
|
||||
payload: z.input<Routes[TController][TAction]["validate"]>,
|
||||
// @ts-expect-error We dont care since this is internal api
|
||||
): Promise<Awaited<ReturnType<Routes[TController][TAction]["handler"]>>> => {
|
||||
if (ws.readyState !== WebSocket.OPEN) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue