@pablolabs/registry
v0.1.0
Published
Single source registry for Pablo UI (JSON, .astro, and APIs)
Readme
@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.5class-variance-authority@^0.7.1
プロジェクト設定のヒント
.astro ファイルは @/ エイリアスでアプリ側の src ディレクトリを参照する想定です。Astro/Vite プロジェクトでは次のように設定してください。
// astro.config.mjs
import { defineConfig } from 'astro/config';
export default defineConfig({
alias: {
'@': './src',
},
});ビルド
pnpm --filter @pablolabs/registry build使い方
import { getAllRegistryItems } from '@pablolabs/registry';
const items = getAllRegistryItems();// .astro 実体の参照(Astro/Vite)
const exampleComponents = import.meta.glob('@pablolabs/registry/example/**/*.astro', { eager: true });