diff --git a/.vscode/settings.json b/.vscode/settings.json index 8e47f58c..e45fd89d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,5 +4,8 @@ "editor.formatOnSave": true, "[typescriptreact]": { "editor.defaultFormatter": "biomejs.biome" + }, + "[typescript]": { + "editor.defaultFormatter": "biomejs.biome" } } diff --git a/apps/hub/src/routeTree.gen.ts b/apps/hub/src/routeTree.gen.ts index 0a92f85e..ed5c9632 100644 --- a/apps/hub/src/routeTree.gen.ts +++ b/apps/hub/src/routeTree.gen.ts @@ -39,6 +39,7 @@ import { Route as AuthenticatedLayoutGamesGameIdEnvironmentsNamespaceIdIndexImpo import { Route as AuthenticatedLayoutGamesGameIdEnvironmentsNamespaceIdVersionsImport } from './routes/_authenticated/_layout/games/$gameId_/environments/$namespaceId/versions' import { Route as AuthenticatedLayoutGamesGameIdEnvironmentsNamespaceIdTokensImport } from './routes/_authenticated/_layout/games/$gameId_/environments/$namespaceId/tokens' import { Route as AuthenticatedLayoutGamesGameIdEnvironmentsNamespaceIdServersImport } from './routes/_authenticated/_layout/games/$gameId_/environments/$namespaceId/servers' +import { Route as AuthenticatedLayoutGamesGameIdEnvironmentsNamespaceIdModulesImport } from './routes/_authenticated/_layout/games/$gameId_/environments/$namespaceId/modules' import { Route as AuthenticatedLayoutGamesGameIdEnvironmentsNamespaceIdMatchmakerImport } from './routes/_authenticated/_layout/games/$gameId_/environments/$namespaceId/matchmaker' import { Route as AuthenticatedLayoutGamesGameIdEnvironmentsNamespaceIdLobbiesImport } from './routes/_authenticated/_layout/games/$gameId_/environments/$namespaceId/lobbies' import { Route as AuthenticatedLayoutGamesGameIdEnvironmentsNamespaceIdCdnImport } from './routes/_authenticated/_layout/games/$gameId_/environments/$namespaceId/cdn' @@ -222,6 +223,13 @@ const AuthenticatedLayoutGamesGameIdEnvironmentsNamespaceIdServersRoute = AuthenticatedLayoutGamesGameIdEnvironmentsNamespaceIdRoute, } as any) +const AuthenticatedLayoutGamesGameIdEnvironmentsNamespaceIdModulesRoute = + AuthenticatedLayoutGamesGameIdEnvironmentsNamespaceIdModulesImport.update({ + path: '/modules', + getParentRoute: () => + AuthenticatedLayoutGamesGameIdEnvironmentsNamespaceIdRoute, + } as any) + const AuthenticatedLayoutGamesGameIdEnvironmentsNamespaceIdMatchmakerRoute = AuthenticatedLayoutGamesGameIdEnvironmentsNamespaceIdMatchmakerImport.update({ path: '/matchmaker', @@ -522,6 +530,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof AuthenticatedLayoutGamesGameIdEnvironmentsNamespaceIdMatchmakerImport parentRoute: typeof AuthenticatedLayoutGamesGameIdEnvironmentsNamespaceIdImport } + '/_authenticated/_layout/games/$gameId/environments/$namespaceId/modules': { + id: '/_authenticated/_layout/games/$gameId/environments/$namespaceId/modules' + path: '/modules' + fullPath: '/games/$gameId/environments/$namespaceId/modules' + preLoaderRoute: typeof AuthenticatedLayoutGamesGameIdEnvironmentsNamespaceIdModulesImport + parentRoute: typeof AuthenticatedLayoutGamesGameIdEnvironmentsNamespaceIdImport + } '/_authenticated/_layout/games/$gameId/environments/$namespaceId/servers': { id: '/_authenticated/_layout/games/$gameId/environments/$namespaceId/servers' path: '/servers' @@ -661,6 +676,7 @@ export const routeTree = rootRoute.addChildren({ }, ), AuthenticatedLayoutGamesGameIdEnvironmentsNamespaceIdMatchmakerRoute, + AuthenticatedLayoutGamesGameIdEnvironmentsNamespaceIdModulesRoute, AuthenticatedLayoutGamesGameIdEnvironmentsNamespaceIdServersRoute: AuthenticatedLayoutGamesGameIdEnvironmentsNamespaceIdServersRoute.addChildren( { @@ -819,6 +835,7 @@ export const routeTree = rootRoute.addChildren({ "/_authenticated/_layout/games/$gameId/environments/$namespaceId/cdn", "/_authenticated/_layout/games/$gameId/environments/$namespaceId/lobbies", "/_authenticated/_layout/games/$gameId/environments/$namespaceId/matchmaker", + "/_authenticated/_layout/games/$gameId/environments/$namespaceId/modules", "/_authenticated/_layout/games/$gameId/environments/$namespaceId/servers", "/_authenticated/_layout/games/$gameId/environments/$namespaceId/tokens", "/_authenticated/_layout/games/$gameId/environments/$namespaceId/versions", @@ -859,6 +876,10 @@ export const routeTree = rootRoute.addChildren({ "filePath": "_authenticated/_layout/games/$gameId_/environments/$namespaceId/matchmaker.tsx", "parent": "/_authenticated/_layout/games/$gameId/environments/$namespaceId" }, + "/_authenticated/_layout/games/$gameId/environments/$namespaceId/modules": { + "filePath": "_authenticated/_layout/games/$gameId_/environments/$namespaceId/modules.tsx", + "parent": "/_authenticated/_layout/games/$gameId/environments/$namespaceId" + }, "/_authenticated/_layout/games/$gameId/environments/$namespaceId/servers": { "filePath": "_authenticated/_layout/games/$gameId_/environments/$namespaceId/servers.tsx", "parent": "/_authenticated/_layout/games/$gameId/environments/$namespaceId", diff --git a/apps/hub/src/routes/_authenticated/_layout/games/$gameId_/environments/$namespaceId/modules.tsx b/apps/hub/src/routes/_authenticated/_layout/games/$gameId_/environments/$namespaceId/modules.tsx new file mode 100644 index 00000000..0cad7437 --- /dev/null +++ b/apps/hub/src/routes/_authenticated/_layout/games/$gameId_/environments/$namespaceId/modules.tsx @@ -0,0 +1,23 @@ +import { ModulesStore, loadModuleCategories } from "@rivet-gg/components"; +import { createFileRoute } from "@tanstack/react-router"; + +function GameIdModules() { + const { categories } = Route.useLoaderData(); + return ( + <> + + + ); +} + +export const Route = createFileRoute( + "/_authenticated/_layout/games/$gameId/environments/$namespaceId/modules", +)({ + component: GameIdModules, + loader: async () => { + const categories = await loadModuleCategories(); + return { + categories, + }; + }, +}); diff --git a/packages/components/package.json b/packages/components/package.json index 4df67955..ba7ef19b 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -64,7 +64,7 @@ "input-otp": "^1.2.3", "lucide-react": "^0.439.0", "react": "^18.2.0", - "react-day-picker": "^8.10.1", + "react-day-picker": "^9.0.9", "react-dom": "^18.2.0", "react-hook-form": "^7.51.1", "react-resizable-panels": "^2.0.19", diff --git a/packages/components/src/action-card.tsx b/packages/components/src/action-card.tsx index aeee8f49..f093b96f 100644 --- a/packages/components/src/action-card.tsx +++ b/packages/components/src/action-card.tsx @@ -1,3 +1,4 @@ +"use client"; import type { ReactNode } from "react"; import { Card, @@ -14,6 +15,7 @@ export interface ActionCardProps { children?: ReactNode; action?: ReactNode; footer?: ReactNode; + className?: string; } export const ActionCard = ({ @@ -21,10 +23,11 @@ export const ActionCard = ({ action, footer, description, + className, children, }: ActionCardProps) => { return ( - +
{title} diff --git a/packages/components/src/animated-currency.tsx b/packages/components/src/animated-currency.tsx index cc9ffe5c..8040dcc2 100644 --- a/packages/components/src/animated-currency.tsx +++ b/packages/components/src/animated-currency.tsx @@ -1,3 +1,4 @@ +"use client"; import { LazyMotion, animate, diff --git a/packages/components/src/asset-image.tsx b/packages/components/src/asset-image.tsx index 095e8d02..61e9f4b9 100644 --- a/packages/components/src/asset-image.tsx +++ b/packages/components/src/asset-image.tsx @@ -1,3 +1,4 @@ +"use client"; import { useConfig } from "./lib/config"; export function AssetImage( diff --git a/packages/components/src/auto-form/fields/file.tsx b/packages/components/src/auto-form/fields/file.tsx index 6f2390c7..a9c0925c 100644 --- a/packages/components/src/auto-form/fields/file.tsx +++ b/packages/components/src/auto-form/fields/file.tsx @@ -1,3 +1,4 @@ +"use client"; import { faTrash } from "@fortawesome/pro-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { type ChangeEvent, useState } from "react"; diff --git a/packages/components/src/auto-form/fields/union.tsx b/packages/components/src/auto-form/fields/union.tsx index 5a9db4b0..bec891a2 100644 --- a/packages/components/src/auto-form/fields/union.tsx +++ b/packages/components/src/auto-form/fields/union.tsx @@ -1,3 +1,4 @@ +"use client"; import { useState } from "react"; import type * as z from "zod"; import { FormControl, FormItem, FormMessage } from "../../ui/form"; diff --git a/packages/components/src/auto-form/index.tsx b/packages/components/src/auto-form/index.tsx index ee0136a7..2f830883 100644 --- a/packages/components/src/auto-form/index.tsx +++ b/packages/components/src/auto-form/index.tsx @@ -1,3 +1,4 @@ +"use client"; import React from "react"; import { type DefaultValues, type FormState, useForm } from "react-hook-form"; import type { z } from "zod"; diff --git a/packages/components/src/copy-area.tsx b/packages/components/src/copy-area.tsx index cc0719ee..9bce293e 100644 --- a/packages/components/src/copy-area.tsx +++ b/packages/components/src/copy-area.tsx @@ -1,3 +1,4 @@ +"use client"; import { faCopy } from "@fortawesome/pro-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { Slot } from "@radix-ui/react-slot"; diff --git a/packages/components/src/datepicker.tsx b/packages/components/src/datepicker.tsx index 4935698e..fdffff0f 100644 --- a/packages/components/src/datepicker.tsx +++ b/packages/components/src/datepicker.tsx @@ -69,12 +69,7 @@ export function DatePicker({ ) : null} - + ); @@ -143,7 +138,6 @@ export function RangeDatePicker({ ) : null} + + + Docs + + + + + Support + + + + ), }: HeaderProps) { return (
@@ -43,43 +58,20 @@ export function Header({ Toggle navigation menu - -