diff --git a/docs/getting-started/installation.md b/docs/getting-started/installation.md index 8c0ea90..1c02262 100644 --- a/docs/getting-started/installation.md +++ b/docs/getting-started/installation.md @@ -37,18 +37,19 @@ npm install monorailphp ### Peer dependencies -Starting with `0.2.0`, Monorail's UI libraries (radix-ui, recharts, sonner, -react-day-picker, cmdk, date-fns, lucide-react, class-variance-authority, -clsx, tailwind-merge) are declared as `peerDependencies` so the host app's -versions stay authoritative and React is never duplicated. - -- **npm 7+** installs them automatically alongside `monorailphp`. -- **pnpm / yarn with strict peer resolution** require an explicit install: - - ```bash - npm install radix-ui recharts sonner react-day-picker cmdk date-fns \ - lucide-react class-variance-authority clsx tailwind-merge - ``` +Monorail ships its UI libraries (`radix-ui`, `recharts`, `sonner`, +`react-day-picker`, `cmdk`, `date-fns`, `lucide-react`, +`class-variance-authority`, `clsx`, `tailwind-merge`) as regular +`dependencies` so `npm install monorailphp` pulls them in automatically. + +Only React itself and Inertia remain as peers — these must be deduplicated +with the host app so hooks and the Inertia router stay in a single instance: + +- `react ^18 || ^19` +- `react-dom ^18 || ^19` +- `@inertiajs/react ^3.0.0` + +A standard Laravel + Inertia React app already satisfies these. ## Manual install diff --git a/package.json b/package.json index 9eb2467..e7e9673 100644 --- a/package.json +++ b/package.json @@ -26,22 +26,21 @@ }, "peerDependencies": { "@inertiajs/react": "^3.0.0", + "react": "^18 || ^19", + "react-dom": "^18 || ^19" + }, + "dependencies": { "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "cmdk": "^1.1.1", "date-fns": "^4.1.0", "lucide-react": "^0.475.0", "radix-ui": "^1.4.3", - "react": "^18 || ^19", "react-day-picker": "^9.4.3 || ^10.0.0", - "react-dom": "^18 || ^19", "recharts": "^3.8.1", "sonner": "^2.0.7", "tailwind-merge": "^3.0.1" }, - "dependencies": { - "monorailphp": "^0.1.2" - }, "devDependencies": { "shadcn": "^4.3.0" },