refactor: redesign spec page with clean toggle between specification and example views

- Convert to client component with useState for view toggling
- Add "Specification" view with clean schema reference and sidebar
- Add "Full Example" view with complete package.json and tool code examples
- Remove explanatory content (moved elsewhere)
- Create layout.tsx for metadata since page is client component
- Reduce page complexity from 839 to 406 lines
This commit is contained in:
Ajax Davis 2025-12-31 13:15:49 +10:00
parent 4043df2f91
commit 7edd4f43b2
2 changed files with 414 additions and 847 deletions

View file

@ -0,0 +1,21 @@
import type { Metadata } from 'next';
export const metadata: Metadata = {
title: 'TPMJS Specification',
description:
'The open standard for AI tool discovery. Complete schema reference for package.json configuration.',
openGraph: {
title: 'TPMJS Specification',
description:
'The open standard for AI tool discovery. Complete schema reference for package.json configuration.',
images: [{ url: '/api/og/spec', width: 1200, height: 630 }],
},
twitter: {
card: 'summary_large_image',
images: ['/api/og/spec'],
},
};
export default function SpecLayout({ children }: { children: React.ReactNode }) {
return children;
}

File diff suppressed because it is too large Load diff