diff --git a/.syncpackrc.json b/.syncpackrc.json index 96c40c68..a8ec0c49 100644 --- a/.syncpackrc.json +++ b/.syncpackrc.json @@ -1,9 +1,9 @@ { "versionGroups": [ { - "label": "React is pinned for all demos (19.x is required by @react-three/fiber 9)", + "label": "React is pinned for all examples (19.x is required by @react-three/fiber 9)", "packages": [ - "@demo/**" + "@example/**" ], "dependencies": [ "react", @@ -12,9 +12,9 @@ "pinVersion": "19.2.8" }, { - "label": "React types are pinned for all demos", + "label": "React types are pinned for all examples", "packages": [ - "@demo/**" + "@example/**" ], "dependencies": [ "@types/react" @@ -22,9 +22,9 @@ "pinVersion": "19.2.17" }, { - "label": "React DOM types are pinned for all demos", + "label": "React DOM types are pinned for all examples", "packages": [ - "@demo/**" + "@example/**" ], "dependencies": [ "@types/react-dom" @@ -34,7 +34,7 @@ { "label": "three is pinned: the @splinetool/loader patch is keyed to r165, and postprocessing 6.36.6 needs < 0.173", "packages": [ - "@demo/**" + "@example/**" ], "dependencies": [ "three" @@ -44,7 +44,7 @@ { "label": "@react-three/fiber is pinned: 9.x is the React 19 line, and a caret could raise the three floor", "packages": [ - "@demo/**" + "@example/**" ], "dependencies": [ "@react-three/fiber" @@ -54,7 +54,7 @@ { "label": "@react-three/drei is pinned: 10.x is the line matching @react-three/fiber 9", "packages": [ - "@demo/**" + "@example/**" ], "dependencies": [ "@react-three/drei" @@ -62,9 +62,9 @@ "pinVersion": "10.7.7" }, { - "label": "Update lamina to 1.2.2 for all demos.", + "label": "Update lamina to 1.2.2 for all examples.", "packages": [ - "@demo/**" + "@example/**" ], "dependencies": [ "lamina" @@ -74,7 +74,7 @@ { "label": "postprocessing is pinned to the last release accepting three 0.165 (6.36.7+ needs >= 0.174); pnpm.overrides pins the transitive copy too", "packages": [ - "@demo/**" + "@example/**" ], "dependencies": [ "postprocessing" @@ -82,9 +82,9 @@ "pinVersion": "6.36.6" }, { - "label": "suspend-react is pinned for all demos (the suspend(promise) pattern requires >= 0.1.3)", + "label": "suspend-react is pinned for all examples (the suspend(promise) pattern requires >= 0.1.3)", "packages": [ - "@demo/**" + "@example/**" ], "dependencies": [ "suspend-react" @@ -94,7 +94,7 @@ { "label": "@splinetool/loader is pinned to the last release that parses the repo's 2022-era .splinecode scenes (0.9.156+ silently fall back to a default gray material or crash; the three-r165 pnpm patch is keyed to this exact version)", "packages": [ - "@demo/**" + "@example/**" ], "dependencies": [ "@splinetool/loader" @@ -102,9 +102,9 @@ "pinVersion": "0.9.153" }, { - "label": "Demos must use identical versions of shared dependencies", + "label": "Examples must use identical versions of shared dependencies", "packages": [ - "@demo/**" + "@example/**" ], "dependencies": [ "@react-three/postprocessing", @@ -145,7 +145,7 @@ { "label": "Workspace deps use workspace protocol", "dependencies": [ - "@demo/**" + "@example/**" ], "dependencyTypes": [ "prod" diff --git a/AGENTS.md b/AGENTS.md index 842c66f2..457b564f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -22,7 +22,7 @@ Single-context: one `CONTEXT.md` + `docs/adr/` at the repo root (created lazily **`components/ui/*` is vendored, not ours — never edit it.** Those files must stay what the registry emits (modulo `prettier`, which the repo runs over everything), so that `shadcn@latest add --overwrite` is always a safe no-op and any of them can be swapped for the stock version tomorrow. If a component doesn't do what you need, the fix goes at the call site — `className` for layout, the built-in `variant`/`size` props for looks, composition (wrap it, or use `asChild`) for behaviour — or into the theme tokens in `app/globals.css`. Never into the component file. If you genuinely cannot express it from outside, write your own component next to it under `components/` rather than forking the vendored one. -**The colour tokens are Material Design 3.** Every shadcn token in `app/globals.css` reads an `--md-sys-color-*` role, and [`material-theme-builder`](https://github.com/abernier/material-theme-builder) derives all of them from one source hex. Retuning the palette means changing `MCU_SOURCE` in `app/layout.tsx` — or the `scheme` / `contrast` / core-colour overrides in the `builder()` call next to it — never editing a token by hand. The site runs `scheme: "monochrome"`, which derives every role from the source's _tone_ alone and discards its hue: the chrome is greyscale on purpose, so that the only colour on a demo page is the demo. `MCU_SOURCE` still matters — swap the scheme and the mint comes straight back. Anything the m3 roles don't cover belongs in that call's `customColors`, which mints `--md-sys-color-` and a matching `-on-` foreground. +**The colour tokens are Material Design 3.** Every shadcn token in `app/globals.css` reads an `--md-sys-color-*` role, and [`material-theme-builder`](https://github.com/abernier/material-theme-builder) derives all of them from one source hex. Retuning the palette means changing `MCU_SOURCE` in `app/layout.tsx` — or the `scheme` / `contrast` / core-colour overrides in the `builder()` call next to it — never editing a token by hand. The site runs `scheme: "monochrome"`, which derives every role from the source's _tone_ alone and discards its hue: the chrome is greyscale on purpose, so that the only colour on a example page is the example. `MCU_SOURCE` still matters — swap the scheme and the mint comes straight back. Anything the m3 roles don't cover belongs in that call's `customColors`, which mints `--md-sys-color-` and a matching `-on-` foreground. **It has to stay a build-time call.** `layout.tsx` is a server component, so `builder(...).toCss()` runs once at build and the CSS ships inside the prerendered HTML. Don't move it into a client component, and don't reach for the package's ``: this app is `output: "export"`, so the browser paints the whole page well before hydration, and anything that supplies the colours later gives you a frame with none of them. Verify a change here by grepping the built `out/index.html` for `--md-sys-color-surface:` — not just by looking at the running app, where hydration hides the gap. @@ -30,6 +30,6 @@ Two things to know before styling: - **The whole app is on Tailwind.** There is no `