UI: Make neutral the default theme of Fumadocs UI

This commit is contained in:
Fuma Nama
2024-11-11 21:53:57 +08:00
parent 44d0d83409
commit 8a3f5b09a2
21 changed files with 103 additions and 107 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'fumadocs-ui': minor
---
Make `neutral` the default theme of Fumadocs UI
+1 -1
View File
@@ -1,4 +1,4 @@
import { DocsLayout, type DocsLayoutProps } from 'fumadocs-ui/layouts/notebook';
import { DocsLayout, type DocsLayoutProps } from 'fumadocs-ui/layouts/docs';
import type { ReactNode } from 'react';
import { MessageCircle } from 'lucide-react';
import { Slot } from '@radix-ui/react-slot';
+4
View File
@@ -134,6 +134,10 @@ export default {
![Neutral](/themes/neutral.png)
#### `black`
![Black](/themes/black.png)
#### `vitepress`
![Vitepress](/themes/vitepress.png)
+2 -2
View File
@@ -29,7 +29,7 @@
"geist": "^1.3.1",
"hast-util-to-jsx-runtime": "^2.3.2",
"katex": "^0.16.11",
"lucide-react": "^0.455.0",
"lucide-react": "^0.456.0",
"next": "15.0.3",
"phenomenon": "^1.6.0",
"react": "^18.3.1",
@@ -61,7 +61,7 @@
"fast-glob": "^3.3.1",
"gray-matter": "^4.0.3",
"next-validate-link": "^1.4.0",
"postcss": "^8.4.47",
"postcss": "^8.4.48",
"tailwindcss": "^3.4.14",
"tailwindcss-animate": "^1.0.7",
"ts-morph": "^24.0.0",
Binary file not shown.

After

Width:  |  Height:  |  Size: 538 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 MiB

After

Width:  |  Height:  |  Size: 577 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 MiB

After

Width:  |  Height:  |  Size: 573 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 MiB

After

Width:  |  Height:  |  Size: 533 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 MiB

After

Width:  |  Height:  |  Size: 611 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 MiB

After

Width:  |  Height:  |  Size: 600 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 MiB

After

Width:  |  Height:  |  Size: 588 KiB

+1 -2
View File
@@ -1,5 +1,5 @@
// @ts-check
import { createPreset, presets } from 'fumadocs-ui/tailwind-plugin';
import { createPreset } from 'fumadocs-ui/tailwind-plugin';
import animate from 'tailwindcss-animate';
/** @type {import('tailwindcss').Config} */
@@ -14,7 +14,6 @@ export default {
presets: [
createPreset({
addGlobalColors: true,
preset: 'neutral',
}),
],
theme: {
+1 -14
View File
@@ -2,19 +2,6 @@
@tailwind components;
@tailwind utilities;
body {
background-image: radial-gradient(
800px 500px at 90% 0%,
theme('colors.fd-primary.DEFAULT / 10%'),
transparent
),
radial-gradient(
800px 500px at 50% 0%,
theme('colors.blue.300 / 5%'),
transparent
);
}
.prose {
--tw-prose-body: hsl(var(--muted-foreground));
/* --tw-prose-body: hsl(var(--muted-foreground)); */
}
+1 -1
View File
@@ -9,7 +9,7 @@ const inter = Inter({
export default function Layout({ children }: { children: ReactNode }) {
return (
<html lang="en" className={inter.className}>
<html lang="en" className={inter.className} suppressHydrationWarning>
<body className="flex flex-col min-h-screen">
<RootProvider>{children}</RootProvider>
</body>
+1 -1
View File
@@ -15,7 +15,7 @@
"fumadocs-openapi": "workspace:*",
"fumadocs-ui": "workspace:*",
"next": "15.0.3",
"postcss": "^8.4.47",
"postcss": "^8.4.48",
"react": "18.3.1",
"react-dom": "18.3.1",
"shiki": "^1.22.2",
+1 -1
View File
@@ -14,7 +14,7 @@
"@types/react-dom": "^18.3.1",
"autoprefixer": "^10.4.20",
"next": "15.0.3",
"postcss": "^8.4.47",
"postcss": "^8.4.48",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"tailwindcss": "^3.4.14",
+2 -2
View File
@@ -50,7 +50,7 @@
"hast-util-to-jsx-runtime": "^2.3.2",
"js-yaml": "^4.1.0",
"openapi-sampler": "^1.5.1",
"react-hook-form": "^7.53.1",
"react-hook-form": "^7.53.2",
"remark": "^15.0.1",
"remark-rehype": "^11.1.1",
"shiki": "^1.22.2"
@@ -62,7 +62,7 @@
"@types/react": "^18.3.12",
"bunchee": "^5.6.1",
"eslint-config-custom": "workspace:*",
"lucide-react": "^0.455.0",
"lucide-react": "^0.456.0",
"next": "15.0.3",
"openapi-types": "^12.1.3",
"tsconfig": "workspace:*"
+1 -1
View File
@@ -50,7 +50,7 @@
"@types/react": "^18.3.12",
"eslint-config-custom": "workspace:*",
"fumadocs-ui": "workspace:*",
"postcss": "^8.4.47",
"postcss": "^8.4.48",
"postcss-lightningcss": "^1.0.1",
"shiki": "^1.22.2",
"tailwindcss": "^3.4.14",
+2 -2
View File
@@ -74,7 +74,7 @@
"@tailwindcss/typography": "^0.5.15",
"class-variance-authority": "^0.7.0",
"fumadocs-core": "workspace:*",
"lucide-react": "^0.455.0",
"lucide-react": "^0.456.0",
"next-themes": "^0.4.3",
"react-medium-image-zoom": "^5.2.10",
"tailwind-merge": "^2.5.4"
@@ -86,7 +86,7 @@
"@types/react-dom": "^18.3.1",
"eslint-config-custom": "workspace:*",
"next": "15.0.3",
"postcss": "^8.4.47",
"postcss": "^8.4.48",
"postcss-cli": "^11.0.0",
"postcss-lightningcss": "^1.0.1",
"tailwindcss": "^3.4.13",
+15 -14
View File
@@ -1,6 +1,6 @@
import type { Preset } from '@/tailwind-plugin';
const defaultPreset: Preset = {
const black: Preset = {
light: {
background: '0 0% 98%',
foreground: '0 0% 3.9%',
@@ -20,26 +20,26 @@ const defaultPreset: Preset = {
ring: '0 0% 63.9%',
},
dark: {
background: '0 0% 3.9%',
foreground: '0 0% 94%',
muted: '0 0% 12.9%',
'muted-foreground': '0 0% 60.9%',
popover: '0 0% 7%',
'popover-foreground': '0 0% 88%',
card: '0 0% 6.0%',
'card-foreground': '0 0% 98%',
border: '0 0% 15%',
primary: '0 0% 98%',
'primary-foreground': '0 0% 9%',
secondary: '0 0% 12.9%',
'secondary-foreground': '0 0% 98%',
accent: '0 0% 12.9%',
'accent-foreground': '0 0% 98%',
ring: '0 0% 14.9%',
background: '0 0% 2%',
foreground: '0 0% 98%',
popover: '0 0% 4%',
card: '0 0% 4%',
muted: '0 0% 8%',
border: '0 0% 14%',
accent: '0 0% 15%',
'accent-foreground': '0 0% 100%',
'muted-foreground': '0 0% 60%',
},
};
const oceanPreset: Preset = {
const ocean: Preset = {
light: {
background: '0 0% 98%',
foreground: '0 0% 3.9%',
@@ -273,7 +273,7 @@ const dusk: Preset = {
const vitepress: Preset = {
light: {
...defaultPreset.light,
...black.light,
background: '0 0% 100%',
card: '0 0% 100%',
foreground: '240 6% 25%',
@@ -330,8 +330,9 @@ const vitepress: Preset = {
export const presets = {
vitepress,
purple,
default: defaultPreset,
ocean: oceanPreset,
black,
default: neutral,
ocean,
catppuccin,
neutral,
dusk,
+66 -66
View File
@@ -40,7 +40,7 @@ importers:
version: 6.0.1
tsup:
specifier: 8.3.5
version: 8.3.5(@swc/[email protected](@swc/[email protected]))([email protected])([email protected]7)([email protected])([email protected])([email protected])
version: 8.3.5(@swc/[email protected](@swc/[email protected]))([email protected])([email protected]8)([email protected])([email protected])([email protected])
turbo:
specifier: 2.2.3
version: 2.2.3
@@ -108,8 +108,8 @@ importers:
specifier: ^0.16.11
version: 0.16.11
lucide-react:
specifier: ^0.455.0
version: 0.455.0([email protected])
specifier: ^0.456.0
version: 0.456.0([email protected])
next:
specifier: 15.0.3
version: 15.0.3([email protected]([email protected]))([email protected])
@@ -185,7 +185,7 @@ importers:
version: 18.3.1
autoprefixer:
specifier: ^10.4.20
version: 10.4.20([email protected]7)
version: 10.4.20([email protected]8)
eslint-config-custom:
specifier: workspace:*
version: link:../../packages/eslint-config-custom
@@ -199,8 +199,8 @@ importers:
specifier: ^1.4.0
version: 1.4.0
postcss:
specifier: ^8.4.47
version: 8.4.47
specifier: ^8.4.48
version: 8.4.48
tailwindcss:
specifier: ^3.4.14
version: 3.4.14
@@ -358,8 +358,8 @@ importers:
specifier: 15.0.3
version: 15.0.3([email protected]([email protected]))([email protected])
postcss:
specifier: ^8.4.47
version: 8.4.47
specifier: ^8.4.48
version: 8.4.48
react:
specifier: 18.3.1
version: 18.3.1
@@ -661,13 +661,13 @@ importers:
version: 18.3.1
autoprefixer:
specifier: ^10.4.20
version: 10.4.20([email protected]7)
version: 10.4.20([email protected]8)
next:
specifier: 15.0.3
version: 15.0.3([email protected]([email protected]))([email protected])
postcss:
specifier: ^8.4.47
version: 8.4.47
specifier: ^8.4.48
version: 8.4.48
react:
specifier: ^18.3.1
version: 18.3.1
@@ -917,8 +917,8 @@ importers:
specifier: '>= 18'
version: 18.3.1([email protected])
react-hook-form:
specifier: ^7.53.1
version: 7.53.1([email protected])
specifier: ^7.53.2
version: 7.53.2([email protected])
remark:
specifier: ^15.0.1
version: 15.0.1
@@ -948,8 +948,8 @@ importers:
specifier: workspace:*
version: link:../eslint-config-custom
lucide-react:
specifier: ^0.455.0
version: 0.455.0([email protected])
specifier: ^0.456.0
version: 0.456.0([email protected])
next:
specifier: 15.0.3
version: 15.0.3([email protected]([email protected]))([email protected])
@@ -1005,11 +1005,11 @@ importers:
specifier: workspace:*
version: link:../ui
postcss:
specifier: ^8.4.47
version: 8.4.47
specifier: ^8.4.48
version: 8.4.48
postcss-lightningcss:
specifier: ^1.0.1
version: 1.0.1([email protected]7)
version: 1.0.1([email protected]8)
shiki:
specifier: ^1.22.2
version: 1.22.2
@@ -1114,8 +1114,8 @@ importers:
specifier: workspace:*
version: link:../core
lucide-react:
specifier: ^0.455.0
version: 0.455.0([email protected])
specifier: ^0.456.0
version: 0.456.0([email protected])
next-themes:
specifier: ^0.4.3
version: 0.4.3([email protected]([email protected]))([email protected])
@@ -1151,14 +1151,14 @@ importers:
specifier: 15.0.3
version: 15.0.3([email protected]([email protected]))([email protected])
postcss:
specifier: ^8.4.47
version: 8.4.47
specifier: ^8.4.48
version: 8.4.48
postcss-cli:
specifier: ^11.0.0
version: 11.0.0([email protected])([email protected]7)
version: 11.0.0([email protected])([email protected]8)
postcss-lightningcss:
specifier: ^1.0.1
version: 1.0.1([email protected]7)
version: 1.0.1([email protected]8)
tailwindcss:
specifier: ^3.4.13
version: 3.4.14
@@ -4482,8 +4482,8 @@ packages:
[email protected]:
resolution: {integrity: sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==}
[email protected]5.0:
resolution: {integrity: sha512-XQoi58X4COfjy6s1P4TVsXMhU2r1KsfUTRFyds/yJvdzBNOfu0F9RRIas626T8UaNZzEv4llF7ivh4uLkYp3rw==}
[email protected]6.0:
resolution: {integrity: sha512-DIIGJqTT5X05sbAsQ+OhA8OtJYyD4NsEMCA/HQW/Y6ToPQ7gwbtujIoeAaup4HpHzV35SQOarKAWH8LYglB6eA==}
peerDependencies:
react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0-rc
@@ -5106,8 +5106,8 @@ packages:
resolution: {integrity: sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==}
engines: {node: ^10 || ^12 || >=14}
[email protected]7:
resolution: {integrity: sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==}
[email protected]8:
resolution: {integrity: sha512-GCRK8F6+Dl7xYniR5a4FYbpBzU8XnZVeowqsQFYdcXuSbChgiks7qybSkbvnaeqv0G0B+dd9/jJgH8kkLDQeEA==}
engines: {node: ^10 || ^12 || >=14}
[email protected]:
@@ -5167,8 +5167,8 @@ packages:
peerDependencies:
react: ^18.3.1
[email protected].1:
resolution: {integrity: sha512-6aiQeBda4zjcuaugWvim9WsGqisoUk+etmFEsSUMm451/Ic8L/UAb7sRtMj3V+Hdzm6mMjU1VhiSzYUZeBm0Vg==}
[email protected].2:
resolution: {integrity: sha512-YVel6fW5sOeedd1524pltpHX+jgU2u3DSDtXEaBORNdqiNrsX/nUI/iGXONegttg0mJVnfrIkiV0cmTU6Oo2xw==}
engines: {node: '>=18.0.0'}
peerDependencies:
react: ^16.8.0 || ^17 || ^18 || ^19
@@ -7933,7 +7933,7 @@ snapshots:
'@vue/shared': 3.5.12
estree-walker: 2.0.2
magic-string: 0.30.12
postcss: 8.4.47
postcss: 8.4.48
source-map-js: 1.2.1
'@vue/[email protected]':
@@ -8187,14 +8187,14 @@ snapshots:
[email protected]: {}
[email protected]([email protected]7):
[email protected]([email protected]8):
dependencies:
browserslist: 4.24.0
caniuse-lite: 1.0.30001679
fraction.js: 4.3.7
normalize-range: 0.1.2
picocolors: 1.1.1
postcss: 8.4.47
postcss: 8.4.48
postcss-value-parser: 4.2.0
[email protected]:
@@ -8758,7 +8758,7 @@ snapshots:
[email protected]([email protected]):
dependencies:
fast-glob: 3.3.2
postcss: 8.4.47
postcss: 8.4.48
tailwindcss: 3.4.14
[email protected]:
@@ -9654,7 +9654,7 @@ snapshots:
pseudomap: 1.0.2
yallist: 2.1.2
[email protected]5.0([email protected]):
[email protected]6.0([email protected]):
dependencies:
react: 18.3.1
@@ -10460,7 +10460,7 @@ snapshots:
[email protected]: {}
[email protected]([email protected])([email protected]7):
[email protected]([email protected])([email protected]8):
dependencies:
chokidar: 3.6.0
dependency-graph: 0.11.0
@@ -10468,9 +10468,9 @@ snapshots:
get-stdin: 9.0.0
globby: 14.0.0
picocolors: 1.1.1
postcss: 8.4.47
postcss-load-config: 5.0.2([email protected])([email protected]7)
postcss-reporter: 7.0.5([email protected]7)
postcss: 8.4.48
postcss-load-config: 5.0.2([email protected])([email protected]8)
postcss-reporter: 7.0.5([email protected]8)
pretty-hrtime: 1.0.3
read-cache: 1.0.0
slash: 5.1.0
@@ -10478,57 +10478,57 @@ snapshots:
transitivePeerDependencies:
- jiti
[email protected]([email protected]7):
[email protected]([email protected]8):
dependencies:
postcss: 8.4.47
postcss: 8.4.48
postcss-value-parser: 4.2.0
read-cache: 1.0.0
resolve: 1.22.8
[email protected]([email protected]7):
[email protected]([email protected]8):
dependencies:
camelcase-css: 2.0.1
postcss: 8.4.47
postcss: 8.4.48
[email protected]([email protected]7):
[email protected]([email protected]8):
dependencies:
browserslist: 4.24.0
lightningcss: 1.27.0
postcss: 8.4.47
postcss: 8.4.48
[email protected]([email protected]7):
[email protected]([email protected]8):
dependencies:
lilconfig: 3.1.2
yaml: 2.6.0
optionalDependencies:
postcss: 8.4.47
postcss: 8.4.48
[email protected]([email protected])([email protected]7):
[email protected]([email protected])([email protected]8):
dependencies:
lilconfig: 3.1.2
yaml: 2.6.0
optionalDependencies:
jiti: 2.2.1
postcss: 8.4.47
postcss: 8.4.48
[email protected]([email protected])([email protected]7)([email protected])([email protected]):
[email protected]([email protected])([email protected]8)([email protected])([email protected]):
dependencies:
lilconfig: 3.1.2
optionalDependencies:
jiti: 2.2.1
postcss: 8.4.47
postcss: 8.4.48
tsx: 4.19.2
yaml: 2.6.0
[email protected]([email protected]7):
[email protected]([email protected]8):
dependencies:
postcss: 8.4.47
postcss: 8.4.48
postcss-selector-parser: 6.1.2
[email protected]([email protected]7):
[email protected]([email protected]8):
dependencies:
picocolors: 1.1.1
postcss: 8.4.47
postcss: 8.4.48
thenby: 1.3.4
[email protected]:
@@ -10549,7 +10549,7 @@ snapshots:
picocolors: 1.1.1
source-map-js: 1.2.1
[email protected]7:
[email protected]8:
dependencies:
nanoid: 3.3.7
picocolors: 1.1.1
@@ -10599,7 +10599,7 @@ snapshots:
react: 18.3.1
scheduler: 0.23.2
[email protected].1([email protected]):
[email protected].2([email protected]):
dependencies:
react: 18.3.1
@@ -11200,11 +11200,11 @@ snapshots:
normalize-path: 3.0.0
object-hash: 3.0.0
picocolors: 1.1.1
postcss: 8.4.47
postcss-import: 15.1.0([email protected]7)
postcss-js: 4.0.1([email protected]7)
postcss-load-config: 4.0.2([email protected]7)
postcss-nested: 6.2.0([email protected]7)
postcss: 8.4.48
postcss-import: 15.1.0([email protected]8)
postcss-js: 4.0.1([email protected]8)
postcss-load-config: 4.0.2([email protected]8)
postcss-nested: 6.2.0([email protected]8)
postcss-selector-parser: 6.1.2
resolve: 1.22.8
sucrase: 3.35.0
@@ -11307,7 +11307,7 @@ snapshots:
[email protected]: {}
[email protected](@swc/[email protected](@swc/[email protected]))([email protected])([email protected]7)([email protected])([email protected])([email protected]):
[email protected](@swc/[email protected](@swc/[email protected]))([email protected])([email protected]8)([email protected])([email protected])([email protected]):
dependencies:
bundle-require: 5.0.0([email protected])
cac: 6.7.14
@@ -11317,7 +11317,7 @@ snapshots:
esbuild: 0.24.0
joycon: 3.1.1
picocolors: 1.1.1
postcss-load-config: 6.0.1([email protected])([email protected]7)([email protected])([email protected])
postcss-load-config: 6.0.1([email protected])([email protected]8)([email protected])([email protected])
resolve-from: 5.0.0
rollup: 4.24.3
source-map: 0.8.0-beta.0
@@ -11327,7 +11327,7 @@ snapshots:
tree-kill: 1.2.2
optionalDependencies:
'@swc/core': 1.7.42(@swc/[email protected])
postcss: 8.4.47
postcss: 8.4.48
typescript: 5.6.3
transitivePeerDependencies:
- jiti
@@ -11558,7 +11558,7 @@ snapshots:
[email protected](@types/[email protected])([email protected])([email protected]):
dependencies:
esbuild: 0.21.5
postcss: 8.4.47
postcss: 8.4.48
rollup: 4.24.3
optionalDependencies:
'@types/node': 22.9.0