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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .changeset/md3-tier1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@pmndrs/docs': minor
---

Take the Material Design 3 colour layer from `pmndrs/design-system` instead of maintaining it here. The hand-written `@theme` mapping and the shadcn remap — around 105 lines that had to be kept in step with the colour package by hand — are replaced by one registry item, `pmndrs/design-system/md3`, which brings its own Tailwind mapping and the config it maps. `react-mcu` gives way to `material-theme-builder`, so the CSS variables are now `--md-sys-color-*`; every `bg-surface` / `text-on-surface-variant` utility keeps working untouched, because the `--color-*` names on top of them are identical.

The seed moves to poimandres mint (`#5de4c7`) — this is the visible change — and it now lives in exactly one place, the installed `src/lib/md3.ts`, rather than being restated in the layout and in two workflows. `THEME_PRIMARY`, `THEME_SCHEME` and `THEME_CONTRAST` still override it per deployment; a site that wants its own seed sets the workflow input, and one that doesn't inherits the pmndrs default.

The five alert colours stay here, in `src/lib/mtb.ts`, which spreads the pmndrs seed and adds them. They are GitHub's palette and only this generator renders markdown alerts, so they are not the design system's to carry — but they are still harmonized against the seed, and `THEME_NOTE`, `THEME_TIP`, `THEME_IMPORTANT`, `THEME_WARNING` and `THEME_CAUTION` still work.
19 changes: 11 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,30 +34,33 @@ on:
type: string
discord:
type: string
# Left empty on purpose: the pmndrs defaults live in src/lib/md3.ts, installed
# from pmndrs/design-system. Set one of these only to override the seed for a
# site — an empty value falls through to the shared default.
theme_primary:
type: string
default: '#323e48'
default: ''
theme_scheme:
type: string
default: 'tonalSpot'
default: ''
theme_contrast:
type: string
default: '0'
default: ''
theme_note:
type: string
default: '#1f6feb'
default: ''
theme_tip:
type: string
default: '#238636'
default: ''
theme_important:
type: string
default: '#8957e5'
default: ''
theme_warning:
type: string
default: '#d29922'
default: ''
theme_caution:
type: string
default: '#da3633'
default: ''
docker_tag:
type: string
default: '3'
Expand Down
8 changes: 0 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,6 @@ jobs:
--build-env LOGO=gutenberg.jpg \
--build-env GITHUB="https://github.com/${{ github.repository }}" \
--build-env DISCORD="${{ secrets.DISCORD }}" \
--build-env THEME_PRIMARY="#323e48" \
--build-env THEME_SCHEME="tonalSpot" \
--build-env THEME_CONTRAST="0" \
--build-env THEME_NOTE="#1f6feb" \
--build-env THEME_TIP="#238636" \
--build-env THEME_IMPORTANT="#8957e5" \
--build-env THEME_WARNING="#d29922" \
--build-env THEME_CAUTION="#da3633" \
--build-env CONTRIBUTORS_PAT="${{ secrets.GITHUB_TOKEN }}" \
> deployment-url.txt

Expand Down
3 changes: 3 additions & 0 deletions components.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,8 @@
"lib": "@/lib",
"hooks": "@/hooks"
},
"rtl": false,
"menuColor": "default",
"menuAccent": "subtle",
"registries": {}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"lodash-es": "^4.17.21",
"lucide-react": "^0.563.0",
"match-sorter": "^6.3.4",
"material-theme-builder": "^3.2.0",
"mcp-handler": "^1.0.7",
"mermaid": "^11.12.2",
"next": "^16.1.3",
Expand All @@ -75,7 +76,6 @@
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-icons": "^5.5.0",
"react-mcu": "^1.1.0",
"rehype-github-alerts": "^3.0.0",
"rehype-prism-plus": "^2.0.0",
"remark-gfm": "^4.0.1",
Expand Down
46 changes: 30 additions & 16 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading