chore: bump fumadocs (#4144)

This commit is contained in:
Alex Yang
2025-08-21 20:30:06 -07:00
parent cb0baf61d8
commit e25d7320f9
10 changed files with 1036 additions and 213 deletions

View File

@@ -14,7 +14,7 @@ import { ForkButton } from "@/components/fork-button";
import Link from "next/link"; import Link from "next/link";
import defaultMdxComponents from "fumadocs-ui/mdx"; import defaultMdxComponents from "fumadocs-ui/mdx";
import { File, Folder, Files } from "fumadocs-ui/components/files"; import { File, Folder, Files } from "fumadocs-ui/components/files";
import { createTypeTable } from "fumadocs-typescript/ui"; import { AutoTypeTable } from "fumadocs-typescript/ui";
import { Accordion, Accordions } from "fumadocs-ui/components/accordion"; import { Accordion, Accordions } from "fumadocs-ui/components/accordion";
import { Card, Cards } from "fumadocs-ui/components/card"; import { Card, Cards } from "fumadocs-ui/components/card";
import { ChevronLeft, ChevronRight } from "lucide-react"; import { ChevronLeft, ChevronRight } from "lucide-react";
@@ -25,8 +25,6 @@ import { APIMethod } from "@/components/api-method";
import { LLMCopyButton, ViewOptions } from "./page.client"; import { LLMCopyButton, ViewOptions } from "./page.client";
import { GenerateAppleJwt } from "@/components/generate-apple-jwt"; import { GenerateAppleJwt } from "@/components/generate-apple-jwt";
const { AutoTypeTable } = createTypeTable();
export default async function Page({ export default async function Page({
params, params,
}: { }: {

View File

@@ -1,9 +1,9 @@
@import "tailwindcss"; @import "tailwindcss";
@import "fumadocs-ui/css/black.css";
@import "fumadocs-ui/css/preset.css";
@config "../tailwind.config.js"; @config "../tailwind.config.js";
@plugin 'tailwindcss-animate'; @plugin 'tailwindcss-animate';
@custom-variant dark (&:is(.dark *)); @custom-variant dark (&:is(.dark *));
@import "fumadocs-ui/css/black.css";
@import "fumadocs-ui/css/preset.css";
@source '../../node_modules/fumadocs-ui/dist/**/*.js'; @source '../../node_modules/fumadocs-ui/dist/**/*.js';
@source '../node_modules/fumadocs-ui/dist/**/*.js'; @source '../node_modules/fumadocs-ui/dist/**/*.js';
:root { :root {

View File

@@ -10,7 +10,7 @@ import {
TableRow, TableRow,
} from "./ui/table"; } from "./ui/table";
import { Tabs, TabsContent, TabsList, TabsTrigger } from "./ui/tabs"; import { Tabs, TabsContent, TabsList, TabsTrigger } from "./ui/tabs";
import { ReactNode } from "react"; import { JSX, ReactNode } from "react";
import { Link } from "lucide-react"; import { Link } from "lucide-react";
import { Button } from "./ui/button"; import { Button } from "./ui/button";
import { cn } from "@/lib/utils"; import { cn } from "@/lib/utils";
@@ -396,7 +396,8 @@ function parseCode(children: JSX.Element) {
.map((x: any) => .map((x: any) =>
x === "\n" ? { props: { children: { props: { children: "\n" } } } } : x, x === "\n" ? { props: { children: { props: { children: "\n" } } } } : x,
) )
.map((x: any) => x.props.children); .map((x: any) => x.props.children)
.filter((x: any) => x != null);
const arrayOfCode: string[] = arrayOfJSXCode const arrayOfCode: string[] = arrayOfJSXCode
.flatMap( .flatMap(
( (

View File

@@ -35,7 +35,7 @@ export default function ArticleLayout() {
const cts = group === "docs" ? contents : examples; const cts = group === "docs" ? contents : examples;
return ( return (
<div className={cn("fixed top-0")}> <div className={cn("fixed start-0 top-0")}>
<aside <aside
className={cn( className={cn(
"md:transition-all", "md:transition-all",

View File

@@ -2,6 +2,7 @@
"name": "@better-auth/docs", "name": "@better-auth/docs",
"version": "0.0.0", "version": "0.0.0",
"private": true, "private": true,
"type": "module",
"scripts": { "scripts": {
"build": "next build", "build": "next build",
"dev": "next dev", "dev": "next dev",
@@ -44,11 +45,12 @@
"cmdk": "1.0.0", "cmdk": "1.0.0",
"date-fns": "^3.6.0", "date-fns": "^3.6.0",
"embla-carousel-react": "^8.5.1", "embla-carousel-react": "^8.5.1",
"fumadocs-core": "15.0.15", "fumadocs-core": "15.7.0",
"fumadocs-docgen": "^2.0.0", "fumadocs-docgen": "2.1.0",
"fumadocs-mdx": "11.5.6", "fumadocs-mdx": "11.8.0",
"fumadocs-typescript": "^3.1.0", "fumadocs-typescript": "4.0.6",
"fumadocs-ui": "15.0.15", "fumadocs-ui": "15.7.0",
"gray-matter": "^4.0.3",
"input-otp": "^1.4.1", "input-otp": "^1.4.1",
"jotai": "^2.12.1", "jotai": "^2.12.1",
"jsrsasign": "^11.1.0", "jsrsasign": "^11.1.0",

View File

@@ -4,7 +4,8 @@ import {
defineCollections, defineCollections,
} from "fumadocs-mdx/config"; } from "fumadocs-mdx/config";
import { z } from "zod"; import { z } from "zod";
import { remarkInstall } from "fumadocs-docgen"; import { remarkNpm } from "fumadocs-core/mdx-plugins";
import { remarkAutoTypeTable, createGenerator } from "fumadocs-typescript";
export const docs = defineDocs({ export const docs = defineDocs({
dir: "./content/docs", dir: "./content/docs",
@@ -35,17 +36,20 @@ export const blogCollection = defineCollections({
}), }),
}); });
const generator = createGenerator();
export default defineConfig({ export default defineConfig({
mdxOptions: { mdxOptions: {
remarkPlugins: [ remarkPlugins: [
[ [
remarkInstall, remarkNpm,
{ {
persist: { persist: {
id: "persist-install", id: "persist-install",
}, },
}, },
], ],
[remarkAutoTypeTable, { generator }],
], ],
}, },
}); });

View File

@@ -6,7 +6,6 @@ import svgToDataUri from "mini-svg-data-uri";
export default { export default {
darkMode: ["class"], darkMode: ["class"],
plugins: [ plugins: [
require("tailwindcss-animate"),
addVariablesForColors, addVariablesForColors,
function ({ matchUtilities, theme }) { function ({ matchUtilities, theme }) {
matchUtilities( matchUtilities(

1213
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff