From 42eb89f0ec0227276270053bb156a67b65fd2311 Mon Sep 17 00:00:00 2001
From: Yurii Palamarchuk
Date: Tue, 15 Sep 2026 13:40:46 +0200
Subject: [PATCH 1/7] Migrate to new libraries
---
.github/workflows/website.yaml | 4 +-
.../app/components/docs/layout/docs/index.tsx | 3 +-
.../docs/layout/docs/page/client.tsx | 24 +-
.../docs/layout/docs/page/index.tsx | 6 +-
.../docs/layout/language-toggle.tsx | 6 +-
.../app/components/docs/layout/link-item.tsx | 6 +-
.../components/docs/layout/search-toggle.tsx | 8 +-
.../app/components/docs/search/create-db.ts | 56 +-
.../docs/search/create-from-source.ts | 21 +-
.../components/docs/search/docs-search.tsx | 6 +-
.../app/components/docs/search/static.ts | 40 +-
.../app/components/docs/toc/clerk.tsx | 5 +-
.../app/components/docs/toc/default.tsx | 5 +-
.../app/components/docs/toc/index.tsx | 4 +-
zookeeper-website/app/components/links.ts | 10 +-
.../_docs/docs/_mdx/developer/recipes.mdx | 2 +-
.../app/pages/_docs/docs/index.tsx | 3 +-
zookeeper-website/app/root.tsx | 5 +-
zookeeper-website/e2e-tests/docs.spec.ts | 7 +-
zookeeper-website/eslint.config.js | 67 +-
zookeeper-website/package-lock.json | 9726 +++++++----------
zookeeper-website/package.json | 58 +-
zookeeper-website/pom.xml | 2 +-
zookeeper-website/react-router.config.ts | 7 -
.../unit-tests/root-error-boundary.test.tsx | 29 +
zookeeper-website/vite.config.ts | 11 +-
zookeeper-website/vitest.config.ts | 3 +-
27 files changed, 4011 insertions(+), 6113 deletions(-)
create mode 100644 zookeeper-website/unit-tests/root-error-boundary.test.tsx
diff --git a/.github/workflows/website.yaml b/.github/workflows/website.yaml
index c379163e7a0..d9cf4e0c741 100644
--- a/.github/workflows/website.yaml
+++ b/.github/workflows/website.yaml
@@ -39,10 +39,10 @@ jobs:
java-version: 25
distribution: temurin
cache: 'maven'
- - name: Set up Node.js 22
+ - name: Set up Node.js 24
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
- node-version: 22
+ node-version: 24.18.1
cache: 'npm'
cache-dependency-path: zookeeper-website/package-lock.json
- name: Show the first log message
diff --git a/zookeeper-website/app/components/docs/layout/docs/index.tsx b/zookeeper-website/app/components/docs/layout/docs/index.tsx
index 0bf6e17334e..4388b372f6f 100644
--- a/zookeeper-website/app/components/docs/layout/docs/index.tsx
+++ b/zookeeper-website/app/components/docs/layout/docs/index.tsx
@@ -75,7 +75,8 @@ export interface DocsLayoutProps extends BaseLayoutProps {
}
interface SidebarOptions
- extends ComponentProps<"aside">,
+ extends
+ ComponentProps<"aside">,
Pick, "defaultOpenLevel" | "prefetch"> {
enabled?: boolean;
component?: ReactNode;
diff --git a/zookeeper-website/app/components/docs/layout/docs/page/client.tsx b/zookeeper-website/app/components/docs/layout/docs/page/client.tsx
index affc22a8428..b954cb84269 100644
--- a/zookeeper-website/app/components/docs/layout/docs/page/client.tsx
+++ b/zookeeper-website/app/components/docs/layout/docs/page/client.tsx
@@ -29,8 +29,8 @@ import {
} from "react";
import { ChevronDown, ChevronLeft, ChevronRight } from "lucide-react";
import Link from "fumadocs-core/link";
-import { useI18n } from "fumadocs-ui/contexts/i18n";
import { useTreeContext, useTreePath } from "fumadocs-ui/contexts/tree";
+import { T } from "@fuma-translate/react";
import type * as PageTree from "fumadocs-core/page-tree";
import { usePathname } from "fumadocs-core/framework";
import {
@@ -75,7 +75,7 @@ export function PageTOCPopover({
return () => {
window.removeEventListener("click", onClick);
};
- }, [onClick]);
+ }, []);
return (
) {
- const { text } = useI18n();
const { open } = use(TocPopoverContext)!;
const items = useTOCItems();
const active = useActiveAnchor();
@@ -149,7 +148,7 @@ export function PageTOCPopoverTrigger({
showItem && "pointer-events-none -translate-y-full opacity-0"
)}
>
- {path?.name ?? text.toc}
+ {path?.name ?? }
, "strokeWidth"> {
+interface ProgressCircleProps extends Omit<
+ React.ComponentProps<"svg">,
+ "strokeWidth"
+> {
value: number;
strokeWidth?: number;
size?: number;
@@ -244,7 +245,6 @@ export function PageLastUpdate({
date: value,
...props
}: Omit, "children"> & { date: Date }) {
- const { text } = useI18n();
const [date, setDate] = useState("");
useEffect(() => {
@@ -257,7 +257,7 @@ export function PageLastUpdate({
{...props}
className={cn("text-fd-muted-foreground text-sm", props.className)}
>
- {text.lastUpdate} {date}
+ {date}
);
}
@@ -314,7 +314,6 @@ export function PageFooter({
}
function FooterItem({ item, index }: { item: Item; index: 0 | 1 }) {
- const { text } = useI18n();
const Icon = index === 0 ? ChevronLeft : ChevronRight;
return (
@@ -335,7 +334,12 @@ function FooterItem({ item, index }: { item: Item; index: 0 | 1 }) {
{item.name}
- {item.description ?? (index === 0 ? text.previousPage : text.nextPage)}
+ {item.description ??
+ (index === 0 ? (
+
+ ) : (
+
+ ))}
);
diff --git a/zookeeper-website/app/components/docs/layout/docs/page/index.tsx b/zookeeper-website/app/components/docs/layout/docs/page/index.tsx
index 05c0fde3f20..2a66c2508c7 100644
--- a/zookeeper-website/app/components/docs/layout/docs/page/index.tsx
+++ b/zookeeper-website/app/components/docs/layout/docs/page/index.tsx
@@ -19,7 +19,7 @@
import type { ComponentProps, ReactNode } from "react";
import { buttonVariants } from "../../../../../ui/button";
import { Edit, Text } from "lucide-react";
-import { I18nLabel } from "fumadocs-ui/contexts/i18n";
+import { T } from "@fuma-translate/react";
import {
type BreadcrumbProps,
type FooterProps,
@@ -193,7 +193,7 @@ export function DocsPage({
className="text-fd-muted-foreground inline-flex items-center gap-1.5 text-sm"
>
-
+
{tocOptions.style === "clerk" ? (
@@ -227,7 +227,7 @@ export function EditOnGitHub(props: ComponentProps<"a">) {
{props.children ?? (
<>
-
+
>
)}
diff --git a/zookeeper-website/app/components/docs/layout/language-toggle.tsx b/zookeeper-website/app/components/docs/layout/language-toggle.tsx
index 6b423932043..d676ed8f599 100644
--- a/zookeeper-website/app/components/docs/layout/language-toggle.tsx
+++ b/zookeeper-website/app/components/docs/layout/language-toggle.tsx
@@ -18,6 +18,7 @@
import type { ComponentProps } from "react";
import { useI18n } from "fumadocs-ui/contexts/i18n";
+import { T, useTranslations } from "@fuma-translate/react";
import { Popover, PopoverContent, PopoverTrigger } from "../../../ui/popover";
import { buttonVariants } from "../../../ui/button";
import { cn } from "@/lib/utils";
@@ -26,12 +27,13 @@ export type LanguageSelectProps = ComponentProps<"button">;
export function LanguageToggle(props: LanguageSelectProps): React.ReactElement {
const context = useI18n();
+ const t = useTranslations();
if (!context.locales) throw new Error("Missing ``");
return (
- {context.text.chooseLanguage}
+
{context.locales.map((item) => (