mirror of
https://github.com/temetro/temetro.git
synced 2026-08-08 09:43:13 +00:00
4d6a5dc008
Components: - Replace components/ui primitives with COSS equivalents from the @coss/* shadcn registry. Add menu/preview-card/group; remove the superseded dropdown-menu, hover-card, button-group; keep carousel (no COSS equivalent). - Migrate live call sites to canonical COSS APIs preserving layout/behavior: sidebar menus (nav-user, team-switcher, nav-notifications), chat-input radio menu, patient dialogs/cards, auth forms (FieldGroup -> flex column), settings. - ai-elements: migrate the live conversation/message with behavior parity (Tooltip via render, Group/GroupText); repoint dormant files (hover-card -> preview-card, dropdown-menu -> menu, button-group -> group, InputGroupButton -> Button). Residual pre-existing Base UI type drift stays behind ignoreBuildErrors. Theme: - Adopt COSS default neutral tokens in globals.css with light + dark palettes. - Add next-themes (defaultTheme=dark, enableSystem) and drop the forced dark class. Align font variables to the COSS contract (--font-sans/-heading/-mono). Make scrollbars theme-aware. i18n: - Add i18next + react-i18next (lib/i18n/config.ts, locales/en/translation.json, components/i18n-provider.tsx mounted in layout). Convert auth forms, sidebar nav, and settings tabs to useTranslation() as the reference pattern. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
57 lines
1.7 KiB
TypeScript
57 lines
1.7 KiB
TypeScript
import type { Metadata } from "next";
|
|
import { Geist_Mono, Inter } from "next/font/google";
|
|
import "./globals.css";
|
|
import { cn } from "@/lib/utils";
|
|
import { ThemeProvider } from "@/components/theme-provider";
|
|
import { I18nProvider } from "@/components/i18n-provider";
|
|
|
|
// COSS font-variable contract: --font-sans, --font-heading, --font-mono.
|
|
const inter = Inter({ subsets: ["latin"], variable: "--font-sans" });
|
|
const interHeading = Inter({ subsets: ["latin"], variable: "--font-heading" });
|
|
const geistMono = Geist_Mono({ subsets: ["latin"], variable: "--font-mono" });
|
|
|
|
export const metadata: Metadata = {
|
|
title: "temetro — AI assistant for clinicians",
|
|
description:
|
|
"Retrieve patient information by simply asking. The open-source AI assistant for clinicians.",
|
|
};
|
|
|
|
export default function RootLayout({
|
|
children,
|
|
}: Readonly<{
|
|
children: React.ReactNode;
|
|
}>) {
|
|
return (
|
|
<html
|
|
lang="en"
|
|
suppressHydrationWarning
|
|
className={cn(
|
|
"h-full",
|
|
"antialiased",
|
|
inter.variable,
|
|
interHeading.variable,
|
|
geistMono.variable,
|
|
"font-sans"
|
|
)}
|
|
>
|
|
{/* suppressHydrationWarning: next-themes sets the theme class on <html>
|
|
before hydration, and browser extensions (e.g. ColorZilla's
|
|
cz-shortcut-listen) mutate <body>. Only ignores attribute diffs on
|
|
those elements, not their children. */}
|
|
<body
|
|
className="h-dvh overflow-hidden flex flex-col"
|
|
suppressHydrationWarning
|
|
>
|
|
<ThemeProvider
|
|
attribute="class"
|
|
defaultTheme="dark"
|
|
enableSystem
|
|
disableTransitionOnChange
|
|
>
|
|
<I18nProvider>{children}</I18nProvider>
|
|
</ThemeProvider>
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|