@vedapointe-shared/vedapointe-ui
v2.4.1
Published
Component library for VedaPointe products
Readme
@vedapointe-shared/vedapointe-ui
Shared component library and theme for VedaPointe products. Re-exports MUI with VedaPointe theme overrides and custom components.
Installation
npm i @vedapointe-shared/vedapointe-uiUsage
Import MUI components and the VedaPointe theme through this package:
import { Typography } from '@vedapointe-shared/vedapointe-ui';
function Example() {
return <Typography>Hello</Typography>;
}Extending the theme locally
import {
createTheme,
vpTheme,
type ThemeOptions,
type DeepPartial,
} from '@vedapointe-shared/vedapointe-ui';
declare module '@vedapointe-shared/vedapointe-ui' {
interface Palette {
brand: Palette['primary'];
}
interface PaletteOptions {
brand: PaletteOptions['primary'];
}
interface ButtonPropsColorOverrides {
brand: true;
}
}
export const theme = createTheme(vpTheme, {
palette: {
brand: { main: '#00FF0F' },
},
} satisfies DeepPartial<ThemeOptions>);Development
Prerequisites
- Node >= 18, npm >= 10
- Run
npm install
Scripts
| Command | Description |
| ---------------------- | ----------------------------------- |
| npm run build | Compile src/ to lib/ |
| npm test | Run tests (Vitest) |
| npm run test:watch | Run tests in watch mode |
| npm run lint | Type-check + ESLint (zero warnings) |
| npm run lint:fix | Auto-fix ESLint issues |
| npm run format | Format all files with Prettier |
| npm run format:check | Check formatting without writing |
Local development with a consuming app
Instead of npm link, use a Vite alias in the consuming app's vite.config to point at your local copy:
// vite.config.mts (in the consuming app)
import path from 'node:path';
export default defineConfig({
resolve: {
alias: {
'@vedapointe-shared/vedapointe-ui': path.resolve(
__dirname,
'../vedapointe-ui/src',
),
},
},
});This way the consuming app imports directly from your local source — no build step, no linking, and changes are picked up by HMR instantly. Remove the alias before committing.
Commit conventions
This repo uses commitizen via Husky git hooks to enforce conventional commits. To disable Husky locally, see the Husky docs.
Publishing
Make sure you're logged in to npm (npm whoami) and have publish access to the @vedapointe-shared scope.
Quick release (patch)
npm run releaseThis bumps the patch version, creates a git commit + tag, then builds, lints, tests, and publishes.
Minor or major release
npm version minor # or: npm version major
npm publish --access publicprepublishOnly runs automatically before publish — it lints, tests, and builds.
Preview what gets published
npm pack --dry-runOnly lib/ is included in the published package (controlled by the files field in package.json).
