From 346e77ed0cc93f85a83389535c7aef29c02ede7c Mon Sep 17 00:00:00 2001 From: Danijel Martinek Date: Tue, 5 May 2026 09:11:23 +0200 Subject: [PATCH] build(storybook): migrate from @repo/ui to @repo/core-ui --- apps/storybook/AGENTS.md | 16 ++++++++-------- apps/storybook/package.json | 2 +- pnpm-lock.yaml | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/apps/storybook/AGENTS.md b/apps/storybook/AGENTS.md index c7fe00b..9e3ca7f 100644 --- a/apps/storybook/AGENTS.md +++ b/apps/storybook/AGENTS.md @@ -2,7 +2,7 @@ ## Purpose -Centralized Storybook instance that pulls and renders all stories from `packages/ui`. Provides a visual development environment, component documentation, and MCP integration for AI agents. +Centralized Storybook instance that pulls and renders all stories from `packages/core-ui`. Provides a visual development environment, component documentation, and MCP integration for AI agents. ## Port: 6006 @@ -19,7 +19,7 @@ import type { StorybookConfig } from "@storybook/react-vite"; const config: StorybookConfig = { framework: "@storybook/react-vite", - stories: ["../../../packages/ui/src/**/*.stories.@(ts|tsx)"], + stories: ["../../../packages/core-ui/src/**/*.stories.@(ts|tsx)"], addons: ["@storybook/addon-essentials"], docs: { autodocs: "tag", @@ -36,7 +36,7 @@ const config: StorybookConfig = { ``` Key configuration details: -- **`stories`** glob reaches into `packages/ui/src/` to find all `.stories.tsx` files +- **`stories`** glob reaches into `packages/core-ui/src/` to find all `.stories.tsx` files - **`viteFinal`** adds the `@tailwindcss/vite` plugin so Tailwind v4 classes render correctly in stories - **`autodocs: "tag"`** generates documentation pages for stories tagged with `"autodocs"` - **`@storybook/addon-essentials`** includes Controls, Actions, Backgrounds, Viewport, Docs @@ -45,7 +45,7 @@ Key configuration details: ```typescript import type { Preview } from "@storybook/react"; -import "../../../packages/ui/src/styles/globals.css"; +import "../../../packages/core-ui/src/styles/globals.css"; const preview: Preview = { parameters: { @@ -78,7 +78,7 @@ Stories are organized by Atomic Design level via the `title` field in story meta ### Existing Stories -| Story title | Component | Location in `@repo/ui` | +| Story title | Component | Location in `@repo/core-ui` | |---|---|---| | `Atoms/Button` | Button (5 variants: Default, Secondary, Destructive, Outline, Ghost) | `src/atoms/button/button.stories.tsx` | | `Atoms/Input` | Input (Default, Disabled) | `src/atoms/input/input.stories.tsx` | @@ -120,7 +120,7 @@ Always query MCP before creating new UI components: | Dependency | Purpose | |---|---| -| `@repo/ui` | Source of all component stories | +| `@repo/core-ui` | Source of all component stories | | `@storybook/react-vite` | Storybook framework using Vite bundler | | `@storybook/addon-essentials` | Controls, Actions, Docs, Backgrounds, Viewport | | `@tailwindcss/vite` | Vite plugin for Tailwind CSS v4 | @@ -131,5 +131,5 @@ Always query MCP before creating new UI components: ## Cross-References -- **Component source:** `packages/ui/` -- see `packages/ui/AGENTS.md` -- **Tailwind tokens:** `packages/ui/src/styles/globals.css` +- **Component source:** `packages/core-ui/` -- see `packages/core-ui/AGENTS.md` +- **Tailwind tokens:** `packages/core-ui/src/styles/globals.css` diff --git a/apps/storybook/package.json b/apps/storybook/package.json index 2af43f8..0dc1cab 100644 --- a/apps/storybook/package.json +++ b/apps/storybook/package.json @@ -10,7 +10,7 @@ "lint": "eslint ." }, "dependencies": { - "@repo/ui": "workspace:*" + "@repo/core-ui": "workspace:*" }, "devDependencies": { "@repo/eslint-config": "workspace:*", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f14b2bd..1528748 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -69,9 +69,9 @@ importers: apps/storybook: dependencies: - '@repo/ui': + '@repo/core-ui': specifier: workspace:* - version: link:../../packages/ui + version: link:../../packages/core-ui devDependencies: '@repo/eslint-config': specifier: workspace:*