@pstdio/ui
v0.2.3
Published
Shared React UI package for Prompt Studio apps. This package owns:
Readme
@pstdio/ui
Shared React UI package for Prompt Studio apps. This package owns:
- reusable components
- design tokens and Chakra theme configuration
- Storybook stories used as UI test cases
Run Locally
From repo root:
bun run storybook:uiFrom packages/ui:
bun run storybookBuild distributable package:
bun run --cwd packages/ui buildRun Storybook tests:
bun run --cwd packages/ui test-storybookPackage Layout
src/components/*: components and colocated stories (*.stories.tsx)src/theme/*: theme, recipes, tokens, and theme helperssrc/index.ts: public exports for@pstdio/ui.storybook/*: Storybook configuration and Vitest setup
Contributor Workflow
- Implement or update the component in
src/components. - Add or update stories next to the component to cover important user-visible states.
- If the component is public, export it from
src/index.ts. - If you add a new package entrypoint, update
package.json#exports. - Run validations before opening a PR.
Validation Checklist
From repo root:
bun run format
bun run lint
bun run build
bun run testUI-specific check:
bun run --cwd packages/ui test-storybookStory Guidelines
- Treat each story as a reproducible test case for a real UI state.
- Include states like default, loading, empty, error, long content, and disabled where relevant.
- For non-visual behavior, add
playinteractions and assertions in the story. - Keep stories deterministic: avoid real network calls.
