diff --git a/demo/nextjs/app/globals.css b/demo/nextjs/app/globals.css index e5c39a10..eda0b58e 100644 --- a/demo/nextjs/app/globals.css +++ b/demo/nextjs/app/globals.css @@ -2,81 +2,78 @@ @tailwind components; @tailwind utilities; - - @layer base { - :root { - --background: 0 0% 100%; - --foreground: 20 14.3% 4.1%; - --card: 0 0% 100%; - --card-foreground: 20 14.3% 4.1%; - --popover: 0 0% 100%; - --popover-foreground: 20 14.3% 4.1%; - --primary: 24 9.8% 10%; - --primary-foreground: 60 9.1% 97.8%; - --secondary: 60 4.8% 95.9%; - --secondary-foreground: 24 9.8% 10%; - --muted: 60 4.8% 95.9%; - --muted-foreground: 25 5.3% 44.7%; - --accent: 60 4.8% 95.9%; - --accent-foreground: 24 9.8% 10%; - --destructive: 0 84.2% 60.2%; - --destructive-foreground: 60 9.1% 97.8%; - --border: 20 5.9% 90%; - --input: 20 5.9% 90%; - --ring: 20 14.3% 4.1%; - --radius: 0rem; - --chart-1: 12 76% 61%; - --chart-2: 173 58% 39%; - --chart-3: 197 37% 24%; - --chart-4: 43 74% 66%; - --chart-5: 27 87% 67%; - } + :root { + --background: 0 0% 100%; + --foreground: 20 14.3% 4.1%; + --card: 0 0% 100%; + --card-foreground: 20 14.3% 4.1%; + --popover: 0 0% 100%; + --popover-foreground: 20 14.3% 4.1%; + --primary: 24 9.8% 10%; + --primary-foreground: 60 9.1% 97.8%; + --secondary: 60 4.8% 95.9%; + --secondary-foreground: 24 9.8% 10%; + --muted: 60 4.8% 95.9%; + --muted-foreground: 25 5.3% 44.7%; + --accent: 60 4.8% 95.9%; + --accent-foreground: 24 9.8% 10%; + --destructive: 0 84.2% 60.2%; + --destructive-foreground: 60 9.1% 97.8%; + --border: 20 5.9% 90%; + --input: 20 5.9% 90%; + --ring: 20 14.3% 4.1%; + --radius: 0rem; + --chart-1: 12 76% 61%; + --chart-2: 173 58% 39%; + --chart-3: 197 37% 24%; + --chart-4: 43 74% 66%; + --chart-5: 27 87% 67%; + } - .dark { - --background: 20 14.3% 4.1%; - --foreground: 60 9.1% 97.8%; - --card: 20 14.3% 4.1%; - --card-foreground: 60 9.1% 97.8%; - --popover: 20 14.3% 4.1%; - --popover-foreground: 60 9.1% 97.8%; - --primary: 60 9.1% 97.8%; - --primary-foreground: 24 9.8% 10%; - --secondary: 12 6.5% 15.1%; - --secondary-foreground: 60 9.1% 97.8%; - --muted: 12 6.5% 15.1%; - --muted-foreground: 24 5.4% 63.9%; - --accent: 12 6.5% 15.1%; - --accent-foreground: 60 9.1% 97.8%; - --destructive: 0 62.8% 30.6%; - --destructive-foreground: 60 9.1% 97.8%; - --border: 12 6.5% 15.1%; - --input: 12 6.5% 15.1%; - --ring: 24 5.7% 82.9%; - --chart-1: 220 70% 50%; - --chart-2: 160 60% 45%; - --chart-3: 30 80% 55%; - --chart-4: 280 65% 60%; - --chart-5: 340 75% 55%; - } + .dark { + --background: 20 14.3% 4.1%; + --foreground: 60 9.1% 97.8%; + --card: 20 14.3% 4.1%; + --card-foreground: 60 9.1% 97.8%; + --popover: 20 14.3% 4.1%; + --popover-foreground: 60 9.1% 97.8%; + --primary: 60 9.1% 97.8%; + --primary-foreground: 24 9.8% 10%; + --secondary: 12 6.5% 15.1%; + --secondary-foreground: 60 9.1% 97.8%; + --muted: 12 6.5% 15.1%; + --muted-foreground: 24 5.4% 63.9%; + --accent: 12 6.5% 15.1%; + --accent-foreground: 60 9.1% 97.8%; + --destructive: 0 62.8% 30.6%; + --destructive-foreground: 60 9.1% 97.8%; + --border: 12 6.5% 15.1%; + --input: 12 6.5% 15.1%; + --ring: 24 5.7% 82.9%; + --chart-1: 220 70% 50%; + --chart-2: 160 60% 45%; + --chart-3: 30 80% 55%; + --chart-4: 280 65% 60%; + --chart-5: 340 75% 55%; + } } @layer base { - * { - @apply border-border; - } - body { - @apply bg-background text-foreground; - } + * { + @apply border-border; + } + body { + @apply bg-background text-foreground; + } } - .no-visible-scrollbar { - scrollbar-width: none; - -ms-overflow-style: none; - -webkit-overflow-scrolling: touch; + scrollbar-width: none; + -ms-overflow-style: none; + -webkit-overflow-scrolling: touch; } - + .no-visible-scrollbar::-webkit-scrollbar { - display: none; -} \ No newline at end of file + display: none; +} diff --git a/docs/.gitignore b/docs/.gitignore index 6d745e19..55a12ae7 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -2,9 +2,9 @@ /node_modules # generated content -.map.ts .contentlayer .content-collections +.source # test & build /coverage @@ -25,7 +25,4 @@ yarn-error.log* # others .env*.local .vercel -next-env.d.ts -certificates - -.source \ No newline at end of file +next-env.d.ts \ No newline at end of file diff --git a/docs/app/api/search/route.ts b/docs/app/api/search/route.ts index 5bbab2ff..d86bfc5b 100644 --- a/docs/app/api/search/route.ts +++ b/docs/app/api/search/route.ts @@ -1,11 +1,4 @@ -import { source } from "@/app/source"; -import { createSearchAPI } from "fumadocs-core/search/server"; +import { source } from "@/lib/source"; +import { createFromSource } from "fumadocs-core/search/server"; -export const { GET } = createSearchAPI("advanced", { - indexes: source.getPages().map((page) => ({ - title: page.data.title, - structuredData: page.data.structuredData, - id: page.url, - url: page.url, - })), -}); +export const { GET } = createFromSource(source); diff --git a/docs/app/changelogs/[[...slug]]/page.tsx b/docs/app/changelogs/[[...slug]]/page.tsx index 9637be3a..0ba5bc26 100644 --- a/docs/app/changelogs/[[...slug]]/page.tsx +++ b/docs/app/changelogs/[[...slug]]/page.tsx @@ -1,4 +1,4 @@ -import { changelogs } from "@/app/source"; +import { changelogs } from "@/lib/source"; import { notFound } from "next/navigation"; import { absoluteUrl, formatDate } from "@/lib/utils"; import DatabaseTable from "@/components/mdx/database-tables"; diff --git a/docs/app/docs/[[...slug]]/page.tsx b/docs/app/docs/[[...slug]]/page.tsx index fb9b472f..9938eb22 100644 --- a/docs/app/docs/[[...slug]]/page.tsx +++ b/docs/app/docs/[[...slug]]/page.tsx @@ -1,4 +1,4 @@ -import { source } from "@/app/source"; +import { source } from "@/lib/source"; import { DocsPage, DocsBody, DocsTitle } from "fumadocs-ui/page"; import { notFound } from "next/navigation"; import { absoluteUrl } from "@/lib/utils"; diff --git a/docs/app/docs/layout.tsx b/docs/app/docs/layout.tsx index 76b107dd..c5e2d4d4 100644 --- a/docs/app/docs/layout.tsx +++ b/docs/app/docs/layout.tsx @@ -3,14 +3,18 @@ import type { ReactNode } from "react"; import { docsOptions } from "../layout.config"; import ArticleLayout from "@/components/side-bar"; import { DocsNavBarMobile } from "@/components/nav-mobile"; - +import { cn } from "@/lib/utils"; export default function Layout({ children }: { children: ReactNode }) { return ( +
), diff --git a/docs/app/global.css b/docs/app/global.css index f9ca25b3..638414b2 100644 --- a/docs/app/global.css +++ b/docs/app/global.css @@ -1,76 +1,244 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; +@import "tailwindcss"; +@config "../tailwind.config.js"; +@plugin 'tailwindcss-animate'; +@custom-variant dark (&:is(.dark *)); +@import "fumadocs-ui/css/neutral.css"; +@import "fumadocs-ui/css/preset.css"; +@source '../../node_modules/fumadocs-ui/dist/**/*.js'; +@source '../node_modules/fumadocs-ui/dist/**/*.js'; +:root { + --background: oklch(1 0 0); -html { - scroll-behavior: smooth; + --foreground: oklch(0.147 0.004 49.25); + + --card: oklch(1 0 0); + + --card-foreground: oklch(0.147 0.004 49.25); + + --popover: oklch(1 0 0); + + --popover-foreground: oklch(0.147 0.004 49.25); + + --primary: oklch(0.216 0.006 56.043); + + --primary-foreground: oklch(0.985 0.001 106.423); + + --secondary: oklch(0.97 0.001 106.424); + + --secondary-foreground: oklch(0.216 0.006 56.043); + + --muted: oklch(0.97 0.001 106.424); + + --muted-foreground: oklch(0.553 0.013 58.071); + + --accent: oklch(0.97 0.001 106.424); + + --accent-foreground: oklch(0.216 0.006 56.043); + + --destructive: oklch(0.577 0.245 27.325); + + --destructive-foreground: oklch(0.577 0.245 27.325); + + --border: oklch(0.923 0.003 48.717); + + --input: oklch(0.923 0.003 48.717); + + --ring: oklch(0.709 0.01 56.259); + + --chart-1: oklch(0.646 0.222 41.116); + + --chart-2: oklch(0.6 0.118 184.704); + + --chart-3: oklch(0.398 0.07 227.392); + + --chart-4: oklch(0.828 0.189 84.429); + + --chart-5: oklch(0.769 0.188 70.08); + + --radius: 0.625rem; + + --sidebar: oklch(0.985 0.001 106.423); + + --sidebar-foreground: oklch(0.147 0.004 49.25); + + --sidebar-primary: oklch(0.216 0.006 56.043); + + --sidebar-primary-foreground: oklch(0.985 0.001 106.423); + + --sidebar-accent: oklch(0.97 0.001 106.424); + + --sidebar-accent-foreground: oklch(0.216 0.006 56.043); + + --sidebar-border: oklch(0.923 0.003 48.717); + + --sidebar-ring: oklch(0.709 0.01 56.259); } -.hljs { - background: none !important; +.dark { + --background: oklch(0.147 0.004 49.25); + + --foreground: oklch(0.985 0.001 106.423); + + --card: oklch(0.147 0.004 49.25); + + --card-foreground: oklch(0.985 0.001 106.423); + + --popover: oklch(0.147 0.004 49.25); + + --popover-foreground: oklch(0.985 0.001 106.423); + + --primary: oklch(0.985 0.001 106.423); + + --primary-foreground: oklch(0.216 0.006 56.043); + + --secondary: oklch(0.268 0.007 34.298); + + --secondary-foreground: oklch(0.985 0.001 106.423); + + --muted: oklch(0.268 0.007 34.298); + + --muted-foreground: oklch(0.709 0.01 56.259); + + --accent: oklch(0.268 0.007 34.298); + + --accent-foreground: oklch(0.985 0.001 106.423); + + --destructive: oklch(0.396 0.141 25.723); + + --destructive-foreground: oklch(0.637 0.237 25.331); + + --border: oklch(0.268 0.007 34.298); + + --input: oklch(0.268 0.007 34.298); + + --ring: oklch(0.553 0.013 58.071); + + --chart-1: oklch(0.488 0.243 264.376); + + --chart-2: oklch(0.696 0.17 162.48); + + --chart-3: oklch(0.769 0.188 70.08); + + --chart-4: oklch(0.627 0.265 303.9); + + --chart-5: oklch(0.645 0.246 16.439); + + --sidebar: oklch(0.216 0.006 56.043); + + --sidebar-foreground: oklch(0.985 0.001 106.423); + + --sidebar-primary: oklch(0.488 0.243 264.376); + + --sidebar-primary-foreground: oklch(0.985 0.001 106.423); + + --sidebar-accent: oklch(0.268 0.007 34.298); + + --sidebar-accent-foreground: oklch(0.985 0.001 106.423); + + --sidebar-border: oklch(0.268 0.007 34.298); + + --sidebar-ring: oklch(0.553 0.013 58.071); +} + +@theme inline { + --color-background: var(--background); + + --color-foreground: var(--foreground); + + --color-card: var(--card); + + --color-card-foreground: var(--card-foreground); + + --color-popover: var(--popover); + + --color-popover-foreground: var(--popover-foreground); + + --color-primary: var(--primary); + + --color-primary-foreground: var(--primary-foreground); + + --color-secondary: var(--secondary); + + --color-secondary-foreground: var(--secondary-foreground); + + --color-muted: var(--muted); + + --color-muted-foreground: var(--muted-foreground); + + --color-accent: var(--accent); + + --color-accent-foreground: var(--accent-foreground); + + --color-destructive: var(--destructive); + + --color-destructive-foreground: var(--destructive-foreground); + + --color-border: var(--border); + + --color-input: var(--input); + + --color-ring: var(--ring); + + --color-chart-1: var(--chart-1); + + --color-chart-2: var(--chart-2); + + --color-chart-3: var(--chart-3); + + --color-chart-4: var(--chart-4); + + --color-chart-5: var(--chart-5); + + --radius-sm: calc(var(--radius) - 4px); + + --radius-md: calc(var(--radius) - 2px); + + --radius-lg: var(--radius); + + --radius-xl: calc(var(--radius) + 4px); + + --color-sidebar: var(--sidebar); + + --color-sidebar-foreground: var(--sidebar-foreground); + + --color-sidebar-primary: var(--sidebar-primary); + + --color-sidebar-primary-foreground: var(--sidebar-primary-foreground); + + --color-sidebar-accent: var(--sidebar-accent); + + --color-sidebar-accent-foreground: var(--sidebar-accent-foreground); + + --color-sidebar-border: var(--sidebar-border); + + --color-sidebar-ring: var(--sidebar-ring); + --animate-accordion-down: accordion-down 0.2s ease-out; + --animate-accordion-up: accordion-up 0.2s ease-out; + + @keyframes accordion-down { + from { + height: 0; + } + to { + height: var(--radix-accordion-content-height); + } + } + + @keyframes accordion-up { + from { + height: var(--radix-accordion-content-height); + } + to { + height: 0; + } + } } @layer base { - :root { - --background: 0 0% 100%; - --foreground: 240 10% 3.9%; - --card: 0 0% 100%; - --card-foreground: 240 10% 3.9%; - --popover: 0 0% 100%; - --popover-foreground: 240 10% 3.9%; - --primary: 240 5.9% 10%; - --primary-foreground: 0 0% 98%; - --secondary: 240 4.8% 95.9%; - --secondary-foreground: 240 5.9% 10%; - --muted: 240 4.8% 95.9%; - --muted-foreground: 240 3.8% 46.1%; - --accent: 240 4.8% 95.9%; - --accent-foreground: 240 5.9% 10%; - --destructive: 0 84.2% 60.2%; - --destructive-foreground: 0 0% 98%; - --border: 240 5.9% 90%; - --input: 240 5.9% 90%; - --ring: 240 4.9% 83.9%; - --radius: 0.5rem; - --chart-1: 12 76% 61%; - --chart-2: 173 58% 39%; - --chart-3: 197 37% 24%; - --chart-4: 43 74% 66%; - --chart-5: 27 87% 67%; - } - .dark { - --background: 0 0% 2%; - --foreground: 0 0% 98%; - --card: 240 10% 0%; - --card-foreground: 0 0% 98%; - --popover: 240 10% 3.9%; - --popover-foreground: 0 0% 98%; - --primary: 0 0% 98%; - --primary-foreground: 240 5.9% 10%; - --secondary: 240 3.7% 15.9%; - --secondary-foreground: 0 0% 98%; - --muted: 240 3.7% 15.9%; - --muted-foreground: 240 5% 64.9%; - --accent: 240 3.7% 15.9%; - --accent-foreground: 0 0% 98%; - --destructive: 0 62.8% 30.6%; - --destructive-foreground: 0 0% 98%; - --border: 240 3.7% 15.9%; - --input: 240 3.7% 15.9%; - --ring: 240 4.9% 83.9%; - --chart-1: 220 70% 50%; - --chart-2: 160 60% 45%; - --chart-3: 30 80% 55%; - --chart-4: 280 65% 60%; - --chart-5: 340 75% 55%; - } -} - -@layer base { - * { - @apply border-border; - } - body { - @apply bg-background text-foreground; - } + * { + @apply border-border outline-ring/50; + } + body { + @apply bg-background text-foreground; + } } diff --git a/docs/app/layout.config.tsx b/docs/app/layout.config.tsx index 4170a6fd..eadae491 100644 --- a/docs/app/layout.config.tsx +++ b/docs/app/layout.config.tsx @@ -1,8 +1,8 @@ -import { source, changelogs } from "@/app/source"; import { DocsNavbarMobileBtn, DocsNavbarMobileTitle, } from "@/components/nav-mobile"; +import { changelogs, source } from "@/lib/source"; import { BaseLayoutProps } from "fumadocs-ui/layouts/shared"; export const baseOptions: BaseLayoutProps = { diff --git a/docs/app/layout.tsx b/docs/app/layout.tsx index 1de51ac2..83a89c33 100644 --- a/docs/app/layout.tsx +++ b/docs/app/layout.tsx @@ -6,8 +6,8 @@ import { NavbarProvider } from "@/components/nav-mobile"; import { GeistMono } from "geist/font/mono"; import { GeistSans } from "geist/font/sans"; import { baseUrl, createMetadata } from "@/lib/metadata"; -import Loglib from "@loglib/tracker/react"; import { Analytics } from "@vercel/analytics/react"; +import { ThemeProvider } from "@/components/theme-provider"; export const metadata = createMetadata({ title: { @@ -23,28 +23,40 @@ export default function Layout({ children }: { children: ReactNode }) { - - - - - - {children} - - - - + + + + + + + {children} + + + + ); diff --git a/docs/app/page.tsx b/docs/app/page.tsx index 301acbaa..9ac8e1ab 100644 --- a/docs/app/page.tsx +++ b/docs/app/page.tsx @@ -28,7 +28,7 @@ export default async function HomePage() { return (
({ - slug: page.slugs, - })); - const docs = pages.map((plugin) => ({ - url: `${WEBSITE_URL}/docs/${plugin.slug.join("/")}`, - lastModified: new Date().toISOString().split("T")[0], - })); - return [...docs]; -} diff --git a/docs/components.json b/docs/components.json index a5a05c5f..e07bd32e 100644 --- a/docs/components.json +++ b/docs/components.json @@ -4,7 +4,7 @@ "rsc": true, "tsx": true, "tailwind": { - "config": "tailwind.config.js", + "config": "", "css": "app/global.css", "baseColor": "stone", "cssVariables": true, @@ -16,5 +16,6 @@ "ui": "@/components/ui", "lib": "@/lib", "hooks": "@/hooks" - } + }, + "iconLibrary": "lucide" } diff --git a/docs/components/features.tsx b/docs/components/features.tsx index acdca621..f3115030 100644 --- a/docs/components/features.tsx +++ b/docs/components/features.tsx @@ -71,7 +71,7 @@ const features = [ export default function Features({ stars }: { stars: string | null }) { return ( -
+
diff --git a/docs/components/landing/hero.tsx b/docs/components/landing/hero.tsx index 76cc8cf9..83821c1c 100644 --- a/docs/components/landing/hero.tsx +++ b/docs/components/landing/hero.tsx @@ -49,7 +49,7 @@ function TrafficLightsIcon(props: React.ComponentPropsWithoutRef<"svg">) { export default function Hero() { return ( -
+
diff --git a/docs/components/landing/section.tsx b/docs/components/landing/section.tsx index c5fd3450..f75ef34a 100644 --- a/docs/components/landing/section.tsx +++ b/docs/components/landing/section.tsx @@ -31,11 +31,6 @@ const Section = ({ {crosses && ( <> -
)} diff --git a/docs/components/nav-bar.tsx b/docs/components/nav-bar.tsx index e9171617..7b49c0a0 100644 --- a/docs/components/nav-bar.tsx +++ b/docs/components/nav-bar.tsx @@ -6,11 +6,11 @@ import { Logo } from "./logo"; export const Navbar = () => { return ( -
+