Skip to content

Commit 563d8a7

Browse files
committed
docs(shell-docs): align docs page rendering
Updates the shell-docs route wrappers, MDX component chrome, page actions, snippets, and registry rendering so content pages inherit the refreshed theme and responsive sizing consistently. Call-site enumeration: - DocsPageView and mdx-components remain the route-level rendering path for docs, framework, AG-UI, and reference pages. - CopyButton/Snippet/PropertyReference changes stay within MDX-rendered content surfaces.
1 parent f5d7a76 commit 563d8a7

19 files changed

Lines changed: 126 additions & 247 deletions

File tree

showcase/shell-docs/src/app/[[...slug]]/error.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export default function DocsError({
3838
)}
3939
<button
4040
onClick={reset}
41-
className="px-4 py-2 rounded-lg border border-[var(--border)] text-sm text-[var(--text-secondary)] hover:bg-[var(--bg-elevated)] transition-colors"
41+
className="shell-docs-radius-control h-10 border border-[var(--border)] px-4 text-sm text-[var(--text-secondary)] transition-colors hover:bg-[var(--bg-elevated)]"
4242
>
4343
Try again
4444
</button>

showcase/shell-docs/src/app/[[...slug]]/page.tsx

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import { LandingSampleTabs } from "@/components/landing-sample-tabs";
1515
import { ShellDocsLayout } from "@/components/shell-docs-layout";
1616
import { SidebarFrameworkSelector } from "@/components/sidebar-framework-selector";
1717
import { UnscopedDocsPage } from "@/components/unscoped-docs-page";
18-
import { FrameworkLogo } from "@/components/icons/framework-icons";
1918
import {
2019
buildFrameworkNav,
2120
buildFrameworkOnlyNav,
@@ -144,18 +143,7 @@ function DocsOverview() {
144143
<section className="relative border-b border-[var(--border)] pb-6 sm:pb-7">
145144
<div className="flex max-w-[765px] flex-col">
146145
<div>
147-
<div className="mb-5 flex items-center gap-3">
148-
<div className="flex h-9 w-9 items-center justify-center rounded-lg border border-[var(--border)] bg-[var(--bg-surface)] text-[var(--text)]">
149-
<FrameworkLogo
150-
slug={HOME_DEFAULT_FRAMEWORK}
151-
className="h-5 w-5"
152-
/>
153-
</div>
154-
<span className="text-sm font-semibold tracking-tight text-[var(--text)] sm:text-base">
155-
Documentation
156-
</span>
157-
</div>
158-
<h1 className="max-w-[24ch] text-[2rem] font-semibold leading-[1.08] tracking-[-0.02em] text-[var(--text)] sm:text-[2.5rem]">
146+
<h1 className="max-w-[24ch] text-[2rem] font-semibold leading-[1.08] tracking-[-0.02em] text-[var(--text)] sm:text-[2.5rem] md:mt-3">
159147
CopilotKit
160148
</h1>
161149
<p className="mt-3 max-w-[58ch] text-lg font-medium leading-snug text-[var(--text-muted)] sm:text-[1.375rem]">

showcase/shell-docs/src/app/[framework]/[[...slug]]/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ export default async function FrameworkScopedDocsPage({
355355
: [];
356356

357357
const banner = missingCell ? (
358-
<div className="mb-6 rounded-lg border border-yellow-500/40 bg-yellow-500/5 p-4">
358+
<div className="shell-docs-radius-surface shell-docs-warning-surface mb-6 border p-4 shadow-[var(--shadow-control)]">
359359
<div className="text-sm font-semibold text-[var(--text)] mb-1">
360360
Not available for {frameworkName} yet
361361
</div>
@@ -653,7 +653,7 @@ function NotAvailableForFrameworkPage({
653653
<p className="text-base text-[var(--text-muted)] mb-6 leading-relaxed">
654654
This topic isn't available for {frameworkName}.
655655
</p>
656-
<div className="rounded-lg border border-yellow-500/40 bg-yellow-500/5 p-5 mb-6">
656+
<div className="shell-docs-radius-surface shell-docs-warning-surface mb-6 border p-5 shadow-[var(--shadow-control)]">
657657
<div className="text-sm font-semibold text-[var(--text)] mb-2">
658658
Available in other integrations
659659
</div>

showcase/shell-docs/src/app/ag-ui/[[...slug]]/error.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export default function AgUiError({
3838
)}
3939
<button
4040
onClick={reset}
41-
className="px-4 py-2 rounded-lg border border-[var(--border)] text-sm text-[var(--text-secondary)] hover:bg-[var(--bg-elevated)] transition-colors"
41+
className="shell-docs-radius-control h-10 border border-[var(--border)] px-4 text-sm text-[var(--text-secondary)] transition-colors hover:bg-[var(--bg-elevated)]"
4242
>
4343
Try again
4444
</button>

showcase/shell-docs/src/app/ag-ui/[[...slug]]/page.tsx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -319,9 +319,9 @@ function OverviewContent() {
319319
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 text-left mb-10">
320320
<Link
321321
href="/ag-ui/concepts/architecture"
322-
className="group p-5 rounded-xl border border-[var(--border)] bg-[var(--bg-surface)] hover:border-[var(--violet)] transition-all"
322+
className="shell-docs-radius-surface group border border-[var(--border)] bg-[var(--bg-surface)] p-5 shadow-[var(--shadow-control)] transition-colors hover:border-[var(--accent)] hover:bg-[var(--bg-elevated)]"
323323
>
324-
<h3 className="text-sm font-semibold text-[var(--text)] group-hover:text-[var(--violet)] mb-1">
324+
<h3 className="text-sm font-semibold text-[var(--text)] group-hover:text-[var(--accent)] mb-1">
325325
Concepts
326326
</h3>
327327
<p className="text-xs text-[var(--text-muted)]">
@@ -330,9 +330,9 @@ function OverviewContent() {
330330
</Link>
331331
<Link
332332
href="/ag-ui/quickstart/introduction"
333-
className="group p-5 rounded-xl border border-[var(--border)] bg-[var(--bg-surface)] hover:border-[var(--violet)] transition-all"
333+
className="shell-docs-radius-surface group border border-[var(--border)] bg-[var(--bg-surface)] p-5 shadow-[var(--shadow-control)] transition-colors hover:border-[var(--accent)] hover:bg-[var(--bg-elevated)]"
334334
>
335-
<h3 className="text-sm font-semibold text-[var(--text)] group-hover:text-[var(--violet)] mb-1">
335+
<h3 className="text-sm font-semibold text-[var(--text)] group-hover:text-[var(--accent)] mb-1">
336336
Quick Start
337337
</h3>
338338
<p className="text-xs text-[var(--text-muted)]">
@@ -341,9 +341,9 @@ function OverviewContent() {
341341
</Link>
342342
<Link
343343
href="/ag-ui/sdk/js/core/overview"
344-
className="group p-5 rounded-xl border border-[var(--border)] bg-[var(--bg-surface)] hover:border-[var(--violet)] transition-all"
344+
className="shell-docs-radius-surface group border border-[var(--border)] bg-[var(--bg-surface)] p-5 shadow-[var(--shadow-control)] transition-colors hover:border-[var(--accent)] hover:bg-[var(--bg-elevated)]"
345345
>
346-
<h3 className="text-sm font-semibold text-[var(--text)] group-hover:text-[var(--violet)] mb-1">
346+
<h3 className="text-sm font-semibold text-[var(--text)] group-hover:text-[var(--accent)] mb-1">
347347
JavaScript SDK
348348
</h3>
349349
<p className="text-xs text-[var(--text-muted)]">
@@ -352,9 +352,9 @@ function OverviewContent() {
352352
</Link>
353353
<Link
354354
href="/ag-ui/sdk/python/core/overview"
355-
className="group p-5 rounded-xl border border-[var(--border)] bg-[var(--bg-surface)] hover:border-[var(--violet)] transition-all"
355+
className="shell-docs-radius-surface group border border-[var(--border)] bg-[var(--bg-surface)] p-5 shadow-[var(--shadow-control)] transition-colors hover:border-[var(--accent)] hover:bg-[var(--bg-elevated)]"
356356
>
357-
<h3 className="text-sm font-semibold text-[var(--text)] group-hover:text-[var(--violet)] mb-1">
357+
<h3 className="text-sm font-semibold text-[var(--text)] group-hover:text-[var(--accent)] mb-1">
358358
Python SDK
359359
</h3>
360360
<p className="text-xs text-[var(--text-muted)]">
@@ -363,9 +363,9 @@ function OverviewContent() {
363363
</Link>
364364
<Link
365365
href="/ag-ui/tutorials/cursor"
366-
className="group p-5 rounded-xl border border-[var(--border)] bg-[var(--bg-surface)] hover:border-[var(--violet)] transition-all"
366+
className="shell-docs-radius-surface group border border-[var(--border)] bg-[var(--bg-surface)] p-5 shadow-[var(--shadow-control)] transition-colors hover:border-[var(--accent)] hover:bg-[var(--bg-elevated)]"
367367
>
368-
<h3 className="text-sm font-semibold text-[var(--text)] group-hover:text-[var(--violet)] mb-1">
368+
<h3 className="text-sm font-semibold text-[var(--text)] group-hover:text-[var(--accent)] mb-1">
369369
Tutorials
370370
</h3>
371371
<p className="text-xs text-[var(--text-muted)]">
@@ -376,9 +376,9 @@ function OverviewContent() {
376376
href="https://github.com/ag-ui-protocol/ag-ui"
377377
target="_blank"
378378
rel="noopener noreferrer"
379-
className="group p-5 rounded-xl border border-[var(--border)] bg-[var(--bg-surface)] hover:border-[var(--violet)] transition-all"
379+
className="shell-docs-radius-surface group border border-[var(--border)] bg-[var(--bg-surface)] p-5 shadow-[var(--shadow-control)] transition-colors hover:border-[var(--accent)] hover:bg-[var(--bg-elevated)]"
380380
>
381-
<h3 className="text-sm font-semibold text-[var(--text)] group-hover:text-[var(--violet)] mb-1">
381+
<h3 className="text-sm font-semibold text-[var(--text)] group-hover:text-[var(--accent)] mb-1">
382382
GitHub
383383
</h3>
384384
<p className="text-xs text-[var(--text-muted)]">

showcase/shell-docs/src/app/not-found.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ export default function NotFound() {
3838
<div className="flex justify-center gap-3">
3939
<Link
4040
href="/"
41-
className="inline-flex items-center px-4 py-2 rounded-lg border border-[var(--accent)] bg-[var(--accent)] text-white text-sm font-medium hover:opacity-90 transition-opacity"
41+
className="shell-docs-radius-control inline-flex h-10 items-center border border-[var(--accent)] bg-[var(--accent)] px-4 text-sm font-medium text-[var(--primary-foreground)] transition-opacity hover:opacity-90"
4242
>
4343
Go to docs home
4444
</Link>
4545
<Link
4646
href="/reference"
47-
className="inline-flex items-center px-4 py-2 rounded-lg border border-[var(--border)] bg-[var(--bg-surface)] text-[var(--text)] text-sm font-medium hover:border-[var(--accent)] transition-colors"
47+
className="shell-docs-radius-control inline-flex h-10 items-center border border-[var(--border)] bg-[var(--bg-surface)] px-4 text-sm font-medium text-[var(--text)] transition-colors hover:border-[var(--accent)]"
4848
>
4949
API reference
5050
</Link>

showcase/shell-docs/src/app/reference/[...slug]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ const mdxComponents = {
8282
OpsPlatformCTA,
8383
LinkIcon,
8484
Frame: ({ children }: { children: React.ReactNode }) => (
85-
<div className="my-6 rounded-lg border border-[var(--border)] bg-[var(--bg-surface)] p-4">
85+
<div className="shell-docs-radius-surface my-6 border border-[var(--border)] bg-[var(--bg-surface)] p-4 shadow-[var(--shadow-control)]">
8686
{children}
8787
</div>
8888
),

showcase/shell-docs/src/app/reference/page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,13 @@ export default function ReferencePage() {
7272
<Link
7373
key={item.slug}
7474
href={item.url}
75-
className="block rounded-lg border border-[var(--border)] bg-[var(--bg-surface)] p-4 hover:bg-[var(--bg-elevated)] transition-colors"
75+
className="shell-docs-radius-surface block min-w-0 border border-[var(--border)] bg-[var(--bg-surface)] p-4 shadow-[var(--shadow-control)] transition-colors hover:border-[var(--accent)] hover:bg-[var(--bg-elevated)]"
7676
>
77-
<div className="font-mono text-sm font-semibold text-[var(--accent)]">
77+
<div className="min-w-0 break-words font-mono text-sm font-semibold text-[var(--accent)] [overflow-wrap:anywhere]">
7878
{displayTitle(item)}
7979
</div>
8080
{item.description && (
81-
<div className="text-xs text-[var(--text-muted)] mt-1">
81+
<div className="mt-1 min-w-0 break-words text-xs text-[var(--text-muted)] [overflow-wrap:anywhere]">
8282
{item.description}
8383
</div>
8484
)}

showcase/shell-docs/src/components/ai/page-actions.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ export function MarkdownCopyButton({
138138
buttonVariants({
139139
color: "secondary",
140140
size: "sm",
141-
className: "gap-2 [&_svg]:size-3.5 [&_svg]:text-fd-muted-foreground",
141+
className: "gap-2 [&_svg]:size-3.5 [&_svg]:text-[var(--text-muted)]",
142142
}),
143143
props.className,
144144
)}
@@ -280,12 +280,12 @@ export function ViewOptionsPopover({
280280
color: "secondary",
281281
size: "sm",
282282
}),
283-
"gap-2 data-[state=open]:bg-fd-accent data-[state=open]:text-fd-accent-foreground",
283+
"gap-2 data-[state=open]:border-[var(--accent)] data-[state=open]:bg-[var(--accent-dim)] data-[state=open]:text-[var(--accent)]",
284284
props.className,
285285
)}
286286
>
287287
{props.children ?? "Open"}
288-
<ChevronDown className="size-3.5 text-fd-muted-foreground" />
288+
<ChevronDown className="size-3.5 text-[var(--text-muted)]" />
289289
</PopoverTrigger>
290290
<PopoverContent className="flex flex-col">
291291
{items.map((item) => (
@@ -311,11 +311,11 @@ export function ViewOptionsPopover({
311311
path: pathname,
312312
})
313313
}
314-
className="text-sm p-2 rounded-lg inline-flex items-center gap-2 hover:text-fd-accent-foreground hover:bg-fd-accent [&_svg]:size-4"
314+
className="shell-docs-radius-control inline-flex items-center gap-2 p-2 text-sm text-[var(--text-secondary)] transition-colors hover:bg-[var(--bg-elevated)] hover:text-[var(--text)] [&_svg]:size-4"
315315
>
316316
{item.icon}
317317
{item.title}
318-
<ExternalLinkIcon className="text-fd-muted-foreground size-3.5 ms-auto" />
318+
<ExternalLinkIcon className="ms-auto size-3.5 text-[var(--text-muted)]" />
319319
</a>
320320
))}
321321
</PopoverContent>

showcase/shell-docs/src/components/copy-button.tsx

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -54,26 +54,14 @@ export function CopyButton({ text }: { text: string }) {
5454
}
5555
}}
5656
aria-label={label}
57-
style={{
58-
padding: "2px 8px",
59-
fontSize: "10px",
60-
lineHeight: 1.2,
61-
border: "1px solid var(--border)",
62-
borderRadius: "4px",
63-
background: copied
64-
? "var(--accent-light)"
57+
className={[
58+
"shell-docs-radius-control cursor-pointer border border-[var(--border)] px-2 py-0.5 text-[10px] leading-[1.2] transition-colors",
59+
copied
60+
? "bg-[var(--accent-light)] text-[var(--accent)]"
6561
: error
66-
? "var(--bg-elevated)"
67-
: "var(--bg-surface)",
68-
color: copied
69-
? "var(--accent)"
70-
: error
71-
? "var(--text)"
72-
: "var(--text-muted)",
73-
cursor: "pointer",
74-
fontFamily: "inherit",
75-
transition: "background 120ms, color 120ms",
76-
}}
62+
? "bg-[var(--bg-elevated)] text-[var(--text)]"
63+
: "bg-[var(--bg-surface)] text-[var(--text-muted)] hover:bg-[var(--bg-elevated)] hover:text-[var(--text)]",
64+
].join(" ")}
7765
>
7866
{label}
7967
</button>

0 commit comments

Comments
 (0)