open-index/open-npm huggingface dataset:
npm package: @moerie/shared
Description: Shared React components and styles for Moerie projects.
Latest version: 1.0.2

# @moerie/shared

Shared React components and styles for Moerie projects.

## Install

```bash
npm install @moerie/shared
```

## Usage

**1. Import the component(s):**

```tsx
import { Button } from "@moerie/shared";
```

**2. Import the package styles once** (required for components to look correct):

In your app’s root layout or global entry (e.g. `app/layout.tsx` or `_app.tsx`):

```tsx
import "@moerie/shared/styles.css";
```

**Next.js App Router** – in `app/layout.tsx`:

```tsx
import "@moerie/shared/styles.css";

export default function RootLayout({ children }) {
  return (
    <html>
      <body>{children}</body>
    </html>
  );
}
```

**Next.js Pages** – in `pages/_app.tsx`:

```tsx
import "@moerie/shared/styles.css";

export default function App({ Component, pageProps }) {
  return <Component {...pageProps} />;
}
```

Without this import, components will render but have no styles.

## Publishing a new version

1. **Bump the version** (from repo root):

   ```bash
   npm version patch   # 1.0.1 → 1.0.2 (bug fixes)
   npm version minor   # 1.0.1 → 1.1.0 (new features)
   npm version major   # 1.0.1 → 2.0.0 (breaking changes)
   ```

   Or set an exact version: `npm version 1.2.0`. Use `--no-git` to only update `package.json` (no commit/tag).  
   **Note:** `npm version` without `--no-git` requires a clean git working tree; commit or stash changes first.

2. **Build:**

   ```bash
   npm run build
   ```

3. **Publish:**

   ```bash
   npm publish --access public
   ```

   (`--access public` is required for scoped packages like `@moerie/shared`.)

4. **Push tags** (if you used `npm version` without `--no-git`):

   ```bash
   git push && git push --tags
   ```

   Log in first with `npm login` if needed.

## Dev app

See [dev/README.md](dev/README.md) for running the local dev app to test components.