| name | add-registry-component |
| description | Add a reusable Oriant component to the horisont-components GitHub-backed shadcn registry. Use when extracting, registering, documenting, or validating a component for `shadcn add 4ug-aug/horisont-components/<item>`. |
Add Registry Component
Use this repository as the canonical source for published components. Extract only presentational, reusable code; leave product data fetching, routes, copy tied to Oriant, and credentials in Oriant.
Workflow
-
Inspect registry.json and each included registry before editing. Every include and every declared file must exist; repair stale scaffold entries as part of the change when they block validation.
-
Check the Oriant source and every caller. Preserve accessibility, reduced-motion handling, cleanup, and real dependency requirements. Do not copy upstream shadcn primitives that users can install directly.
-
Put the source beside its registry file. UI components belong in components/ui/<name>.tsx; add its item to components/ui/registry.json. Paths in that file are relative to components/ui/registry.json.
-
Keep the public API small. Use standard shadcn imports such as @/lib/utils, never Oriant aliases such as #/. Add 'use client' when the component uses hooks or browser APIs.
-
Declare the complete item: name, type, title, description, and files. List shadcn items in registryDependencies and npm packages in dependencies; include every source file needed by the item. Do not add a target unless the default shadcn destination is wrong.
-
Add the install command and requirements to README.md when publishing a new public item:
pnpm dlx shadcn@latest add 4ug-aug/horisont-components/<item>
Validation
Before push, parse every edited JSON file and confirm each registry path exists. After the change is pushed to the public repository, run:
pnpm dlx shadcn@latest registry validate 4ug-aug/horisont-components
pnpm dlx shadcn@latest view 4ug-aug/horisont-components/<item>
pnpm dlx shadcn@latest add 4ug-aug/horisont-components/<item> --dry-run
Report the exact install command and any required package/theme assumptions. Do not create a registry server or generated registry output: GitHub is the distribution channel.