# @pablolabs/registry

Pablo UI の唯一のレジストリ配布パッケージです。JSON レジストリ、.astro 実体、型/API を提供します。

## 提供物
- JSON: `dist/registry/r/{registry.json, components/*.json)`
- .astro: `@pablolabs/registry/example/*`, `@pablolabs/registry/ui/*`
- API: `getAllRegistryItems()`, `getRegistryItem(name)`

## 必須依存関係
このパッケージの `.astro` 実体では以下のパッケージを前提としています（peerDependencies）。

- `astro-icon@^1.1.5`
- `class-variance-authority@^0.7.1`

## プロジェクト設定のヒント
`.astro` ファイルは `@/` エイリアスでアプリ側の `src` ディレクトリを参照する想定です。Astro/Vite プロジェクトでは次のように設定してください。

```ts
// astro.config.mjs
import { defineConfig } from 'astro/config';

export default defineConfig({
  alias: {
    '@': './src',
  },
});
```

## ビルド
```bash
pnpm --filter @pablolabs/registry build
```

## 使い方
```ts
import { getAllRegistryItems } from '@pablolabs/registry';
const items = getAllRegistryItems();
```

```ts
// .astro 実体の参照（Astro/Vite）
const exampleComponents = import.meta.glob('@pablolabs/registry/example/**/*.astro', { eager: true });
```


