From f4ebcbeb753b1ff30e4a59cf50f3d78298c8e99c Mon Sep 17 00:00:00 2001 From: Taesu Date: Thu, 8 Jan 2026 15:09:20 +0900 Subject: [PATCH] docs: fix SVG attributes and fumadocs type imports --- docs/app/community/_components/stats.tsx | 4 ++-- docs/components/docs/docs.client.tsx | 6 ++++-- docs/components/docs/docs.tsx | 4 ++-- docs/components/docs/layout/toc.tsx | 2 +- docs/components/docs/page.client.tsx | 8 ++++---- docs/components/docs/page.tsx | 3 +-- docs/components/sidebar-content.tsx | 14 +++++++------- 7 files changed, 21 insertions(+), 20 deletions(-) diff --git a/docs/app/community/_components/stats.tsx b/docs/app/community/_components/stats.tsx index 806d0bc3d5..5878008321 100644 --- a/docs/app/community/_components/stats.tsx +++ b/docs/app/community/_components/stats.tsx @@ -28,8 +28,8 @@ export default function Stats({ fill="none" stroke="#ffffff" strokeLinecap="round" - stroke-linejoin="round" - stroke-width="2" + strokeLinejoin="round" + strokeWidth="2" d="M9 8a3 3 0 1 0 6 0M3 16.8V7.2c0-1.12 0-1.68.218-2.108c.192-.377.497-.682.874-.874C4.52 4 5.08 4 6.2 4h11.6c1.12 0 1.68 0 2.107.218c.377.192.683.497.875.874c.218.427.218.987.218 2.105v9.607c0 1.118 0 1.677-.218 2.104a2 2 0 0 1-.875.874c-.427.218-.986.218-2.104.218H6.197c-1.118 0-1.678 0-2.105-.218a2 2 0 0 1-.874-.874C3 18.48 3 17.92 3 16.8" /> diff --git a/docs/components/docs/docs.client.tsx b/docs/components/docs/docs.client.tsx index 911b17d828..3e79b90562 100644 --- a/docs/components/docs/docs.client.tsx +++ b/docs/components/docs/docs.client.tsx @@ -1,7 +1,9 @@ "use client"; -import { SidebarTrigger } from "fumadocs-core/sidebar"; -import { useSidebar } from "fumadocs-ui/components/sidebar/base"; +import { + SidebarTrigger, + useSidebar, +} from "fumadocs-ui/components/sidebar/base"; import { Menu, X } from "lucide-react"; import type { ComponentProps, HTMLAttributes } from "react"; import { cn } from "../../lib/utils"; diff --git a/docs/components/docs/docs.tsx b/docs/components/docs/docs.tsx index ae4ab101d7..7c28301a2f 100644 --- a/docs/components/docs/docs.tsx +++ b/docs/components/docs/docs.tsx @@ -1,4 +1,4 @@ -import type { PageTree } from "fumadocs-core/server"; +import type { Root } from "fumadocs-core/page-tree"; import { SidebarProvider } from "fumadocs-ui/components/sidebar/base"; import { TreeContextProvider } from "fumadocs-ui/contexts/tree"; import type { HTMLAttributes, ReactNode } from "react"; @@ -8,7 +8,7 @@ import { NavProvider } from "./layout/nav"; import type { BaseLayoutProps } from "./shared"; export interface DocsLayoutProps extends BaseLayoutProps { - tree: PageTree.Root; + tree: Root; containerProps?: HTMLAttributes; } diff --git a/docs/components/docs/layout/toc.tsx b/docs/components/docs/layout/toc.tsx index 04ed7439de..ba2351b652 100644 --- a/docs/components/docs/layout/toc.tsx +++ b/docs/components/docs/layout/toc.tsx @@ -3,7 +3,7 @@ import type { PopoverContentProps, PopoverTriggerProps, } from "@radix-ui/react-popover"; -import type { TOCItemType } from "fumadocs-core/server"; +import type { TOCItemType } from "fumadocs-core/toc"; import * as Primitive from "fumadocs-core/toc"; import { useI18n } from "fumadocs-ui/contexts/i18n"; import { ChevronRight, Text } from "lucide-react"; diff --git a/docs/components/docs/page.client.tsx b/docs/components/docs/page.client.tsx index 5f71688261..0854dfc2be 100644 --- a/docs/components/docs/page.client.tsx +++ b/docs/components/docs/page.client.tsx @@ -3,7 +3,7 @@ import { cva } from "class-variance-authority"; import type { BreadcrumbOptions } from "fumadocs-core/breadcrumb"; import { getBreadcrumbItemsFromPath } from "fumadocs-core/breadcrumb"; -import type { PageTree } from "fumadocs-core/server"; +import type { Item, Node, Root } from "fumadocs-core/page-tree"; import { useEffectEvent } from "fumadocs-core/utils/use-effect-event"; import { useSidebar } from "fumadocs-ui/components/sidebar/base"; import { useI18n } from "fumadocs-ui/contexts/i18n"; @@ -125,8 +125,8 @@ const itemLabel = cva( "inline-flex items-center gap-0.5 text-fd-muted-foreground", ); -function scanNavigationList(tree: PageTree.Node[]) { - const list: PageTree.Item[] = []; +function scanNavigationList(tree: Node[]) { + const list: Item[] = []; tree.forEach((node) => { if (node.type === "folder") { @@ -146,7 +146,7 @@ function scanNavigationList(tree: PageTree.Node[]) { return list; } -const listCache = new WeakMap(); +const listCache = new WeakMap(); export function Footer({ items }: FooterProps) { const { root } = useTreeContext(); diff --git a/docs/components/docs/page.tsx b/docs/components/docs/page.tsx index 7f751437a3..436de4c36c 100644 --- a/docs/components/docs/page.tsx +++ b/docs/components/docs/page.tsx @@ -1,5 +1,4 @@ -import type { TableOfContents } from "fumadocs-core/server"; -import type { AnchorProviderProps } from "fumadocs-core/toc"; +import type { AnchorProviderProps, TableOfContents } from "fumadocs-core/toc"; import { AnchorProvider } from "fumadocs-core/toc"; import { I18nLabel } from "fumadocs-ui/contexts/i18n"; import { Edit, Text } from "lucide-react"; diff --git a/docs/components/sidebar-content.tsx b/docs/components/sidebar-content.tsx index 032f0c9d9f..138eb96688 100644 --- a/docs/components/sidebar-content.tsx +++ b/docs/components/sidebar-content.tsx @@ -1,4 +1,4 @@ -import type { PageTree } from "fumadocs-core/server"; +import type { Folder, Root } from "fumadocs-core/page-tree"; import type { LucideIcon } from "lucide-react"; import { Binoculars, @@ -35,7 +35,7 @@ interface Content { }[]; } -export function getPageTree(): PageTree.Root { +export function getPageTree(): Root { return { $id: "root", name: "docs", @@ -58,7 +58,7 @@ export function getPageTree(): PageTree.Root { }; } -function contentToPageTree(content: Content): PageTree.Folder { +function contentToPageTree(content: Content): Folder { return { type: "folder", icon: , @@ -1729,10 +1729,10 @@ C0.7,239.6,62.1,0.5,62.2,0.4c0,0,54,13.8,119.9,30.8S302.1,62,302.2,62c0.2,0,0.2, ),