Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Biome formatter migration — bulk formatting changes
# To use: git config blame.ignoreRevsFile .git-blame-ignore-revs
# GitHub uses this file automatically.
f2f648acfa64e14f9fabb51419e6b0922adb60fe
8 changes: 4 additions & 4 deletions apps/docs/app/(home)/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { HomeLayout } from 'fumadocs-ui/layouts/home';
import { baseOptions } from '@/lib/layout.shared';
import type { ReactNode } from 'react';
import { HomeLayout } from 'fumadocs-ui/layouts/home'
import type { ReactNode } from 'react'
import { baseOptions } from '@/lib/layout.shared'

export default function Layout({ children }: { children: ReactNode }) {
return <HomeLayout {...baseOptions()}>{children}</HomeLayout>;
return <HomeLayout {...baseOptions()}>{children}</HomeLayout>
}
27 changes: 8 additions & 19 deletions apps/docs/app/(home)/page.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
import Link from 'next/link';
import Link from 'next/link'

export default function HomePage() {
return (
<main className="flex flex-1 flex-col items-center justify-center px-4 py-16 text-center">
<h1 className="mb-4 text-4xl font-bold tracking-tight sm:text-5xl">
surf-kit
</h1>
<p className="mb-2 text-xl text-fd-muted-foreground">
AI-First Design System
</p>
<h1 className="mb-4 text-4xl font-bold tracking-tight sm:text-5xl">surf-kit</h1>
<p className="mb-2 text-xl text-fd-muted-foreground">AI-First Design System</p>
<p className="mb-8 max-w-xl text-fd-muted-foreground">
Purpose-built components for agent interfaces. Trust through
transparency, accessible by default, enterprise-grade theming, and a
composable architecture.
Purpose-built components for agent interfaces. Trust through transparency, accessible by
default, enterprise-grade theming, and a composable architecture.
</p>
<div className="flex gap-4">
<Link
Expand Down Expand Up @@ -56,20 +51,14 @@ export default function HomePage() {
/>
</div>
</main>
);
)
}

function FeatureCard({
title,
description,
}: {
title: string;
description: string;
}) {
function FeatureCard({ title, description }: { title: string; description: string }) {
return (
<div className="rounded-lg border border-fd-border p-4 text-left">
<h3 className="mb-1 font-semibold">{title}</h3>
<p className="text-sm text-fd-muted-foreground">{description}</p>
</div>
);
)
}
37 changes: 16 additions & 21 deletions apps/docs/app/docs/[[...slug]]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,20 @@
import { source } from '@/lib/source';
import {
DocsPage,
DocsBody,
DocsDescription,
DocsTitle,
} from 'fumadocs-ui/page';
import { notFound } from 'next/navigation';
import defaultMdxComponents from 'fumadocs-ui/mdx';
import type { Metadata } from 'next';
import defaultMdxComponents from 'fumadocs-ui/mdx'
import { DocsBody, DocsDescription, DocsPage, DocsTitle } from 'fumadocs-ui/page'
import type { Metadata } from 'next'
import { notFound } from 'next/navigation'
import { source } from '@/lib/source'

interface PageProps {
params: Promise<{ slug?: string[] }>;
params: Promise<{ slug?: string[] }>
}

export default async function Page(props: PageProps) {
const params = await props.params;
const page = source.getPage(params.slug);
const params = await props.params
const page = source.getPage(params.slug)

if (!page) notFound();
if (!page) notFound()

const MDX = page.data.body;
const MDX = page.data.body

return (
<DocsPage toc={page.data.toc} full={page.data.full}>
Expand All @@ -29,21 +24,21 @@ export default async function Page(props: PageProps) {
<MDX components={{ ...defaultMdxComponents }} />
</DocsBody>
</DocsPage>
);
)
}

export async function generateStaticParams() {
return source.generateParams();
return source.generateParams()
}

export async function generateMetadata(props: PageProps): Promise<Metadata> {
const params = await props.params;
const page = source.getPage(params.slug);
const params = await props.params
const page = source.getPage(params.slug)

if (!page) notFound();
if (!page) notFound()

return {
title: page.data.title,
description: page.data.description,
};
}
}
10 changes: 5 additions & 5 deletions apps/docs/app/docs/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { DocsLayout } from 'fumadocs-ui/layouts/docs';
import { baseOptions } from '@/lib/layout.shared';
import { source } from '@/lib/source';
import type { ReactNode } from 'react';
import { DocsLayout } from 'fumadocs-ui/layouts/docs'
import type { ReactNode } from 'react'
import { baseOptions } from '@/lib/layout.shared'
import { source } from '@/lib/source'

export default function Layout({ children }: { children: ReactNode }) {
return (
<DocsLayout {...baseOptions()} tree={source.pageTree}>
{children}
</DocsLayout>
);
)
}
14 changes: 7 additions & 7 deletions apps/docs/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { RootProvider } from 'fumadocs-ui/provider';
import 'fumadocs-ui/style.css';
import './globals.css';
import type { ReactNode } from 'react';
import type { Metadata } from 'next';
import { RootProvider } from 'fumadocs-ui/provider'
import 'fumadocs-ui/style.css'
import './globals.css'
import type { Metadata } from 'next'
import type { ReactNode } from 'react'

export const metadata: Metadata = {
title: {
Expand All @@ -11,7 +11,7 @@ export const metadata: Metadata = {
},
description:
'Purpose-built component library for agent interfaces. Trust, transparency, and accessibility by default.',
};
}

export default function RootLayout({ children }: { children: ReactNode }) {
return (
Expand All @@ -20,5 +20,5 @@ export default function RootLayout({ children }: { children: ReactNode }) {
<RootProvider>{children}</RootProvider>
</body>
</html>
);
)
}
14 changes: 13 additions & 1 deletion apps/docs/content/docs/components/core/meta.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
{
"title": "Core",
"pages": ["button", "text-input", "select", "badge", "spinner", "alert", "dialog", "tabs", "table", "card", "accordion"]
"pages": [
"button",
"text-input",
"select",
"badge",
"spinner",
"alert",
"dialog",
"tabs",
"table",
"card",
"accordion"
]
}
10 changes: 9 additions & 1 deletion apps/docs/content/docs/meta.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
{
"title": "Documentation",
"pages": ["getting-started", "design-principles", "tokens", "components", "patterns", "theming", "recipes"]
"pages": [
"getting-started",
"design-principles",
"tokens",
"components",
"patterns",
"theming",
"recipes"
]
}
10 changes: 9 additions & 1 deletion apps/docs/content/docs/patterns/meta.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
{
"title": "Patterns",
"pages": ["agent-chat", "source-attribution", "confidence-display", "multi-agent", "streaming", "error-handling", "accessibility"]
"pages": [
"agent-chat",
"source-attribution",
"confidence-display",
"multi-agent",
"streaming",
"error-handling",
"accessibility"
]
}
2 changes: 1 addition & 1 deletion apps/docs/global.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
declare module '*.css';
declare module '*.css'
4 changes: 2 additions & 2 deletions apps/docs/lib/layout.shared.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { BaseLayoutProps } from 'fumadocs-ui/layouts/shared';
import type { BaseLayoutProps } from 'fumadocs-ui/layouts/shared'

export function baseOptions(): BaseLayoutProps {
return {
Expand All @@ -17,5 +17,5 @@ export function baseOptions(): BaseLayoutProps {
external: true,
},
],
};
}
}
6 changes: 3 additions & 3 deletions apps/docs/lib/source.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { docs } from '@/.source';
import { loader } from 'fumadocs-core/source';
import { loader } from 'fumadocs-core/source'
import { docs } from '@/.source'

export const source = loader({
baseUrl: '/docs',
source: docs.toFumadocsSource(),
});
})
14 changes: 7 additions & 7 deletions apps/docs/next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { createMDX } from 'fumadocs-mdx/next';
import { fileURLToPath } from 'url';
import path from 'path';
import path from 'node:path'
import { fileURLToPath } from 'node:url'
import { createMDX } from 'fumadocs-mdx/next'

const __dirname = path.dirname(fileURLToPath(import.meta.url));
const __dirname = path.dirname(fileURLToPath(import.meta.url))

/** @type {import('next').NextConfig} */
const config = {
reactStrictMode: true,
outputFileTracingRoot: path.resolve(__dirname, '../../'),
};
}

const withMDX = createMDX();
const withMDX = createMDX()

export default withMDX(config);
export default withMDX(config)
4 changes: 2 additions & 2 deletions apps/docs/postcss.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ const config = {
plugins: {
'@tailwindcss/postcss': {},
},
};
}

export default config;
export default config
6 changes: 3 additions & 3 deletions apps/docs/source.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { defineDocs, defineConfig } from 'fumadocs-mdx/config';
import { defineConfig, defineDocs } from 'fumadocs-mdx/config'

export const docs = defineDocs({
dir: 'content/docs',
});
})

export default defineConfig();
export default defineConfig()
8 changes: 4 additions & 4 deletions apps/docs/tailwind.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createPreset } from 'fumadocs-ui/tailwind-plugin';
import type { Config } from 'tailwindcss';
import { createPreset } from 'fumadocs-ui/tailwind-plugin'
import type { Config } from 'tailwindcss'

const config: Config = {
content: [
Expand All @@ -9,6 +9,6 @@ const config: Config = {
'./node_modules/fumadocs-ui/dist/**/*.js',
],
presets: [createPreset()],
};
}

export default config;
export default config
14 changes: 3 additions & 11 deletions apps/docs/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,8 @@
}
],
"paths": {
"@/*": [
"./*"
],
"@/.source": [
"./.source"
]
"@/*": ["./*"],
"@/.source": ["./.source"]
},
"allowJs": true,
"incremental": true,
Expand All @@ -33,9 +29,5 @@
"next-env.d.ts",
".next/types/**/*.ts"
],
"exclude": [
"node_modules",
".next",
"dist"
]
"exclude": ["node_modules", ".next", "dist"]
}
Loading