@kivacore/ui-pro-shared
v0.1.0
Published
Kiva UI component library
Readme
@kivacore/ui-pro-shared
The shared UI layer of Kiva UI Pro. It holds one copy of the Kiva UI components and the primitives they build on (shadcn, AI Elements and the Plate editor), and the other Kiva UI Pro packages and the playground import them from here. The package ships TypeScript source, so consumers compile it with their own bundler.
Layout
| Path | Contents | Owner |
| --- | --- | --- |
| src/components/*.tsx | shadcn primitives | Kiva UI registry |
| src/components/kiva/ | Kiva UI components (form fields, value renderers, data grid, adaptive card, query builder and more) | Kiva UI registry |
| src/components/ai-elements/ | AI Elements | Kiva UI registry, except pro-tool.tsx |
| src/components/editor/ | Plate editor kits and nodes | Kiva UI registry |
| src/lib/kiva/, src/hooks/kiva/ | Helpers and hooks the Kiva components use | Kiva UI registry |
| src/ai/ | The @kivacore/ui-pro-shared/ai barrel | Kiva UI Pro |
| src/components/ai-elements/pro-tool.tsx | Kiva UI Pro's fork of the AI Elements tool (tool groups, icon resolution, name and status options), re-exported by src/ai | Kiva UI Pro |
Registry-owned files come from Kiva UI and are overwritten on every update. Change them in Kiva UI, not here. Pro-only behavior goes in its own file, as pro-tool.tsx does.
Importing
Import through the package name and the file path without its extension:
import { Button } from '@kivacore/ui-pro-shared/components/button';
import { DynamicFormField } from '@kivacore/ui-pro-shared/components/kiva/form-fields/dynamic-form-field';
import { KivaDataSourceQueryBuilder } from '@kivacore/ui-pro-shared/components/kiva/kiva-query-builder';The short primitive aliases (@kivacore/ui-pro-shared/button) still work for existing code.
Updating from Kiva UI
Run the Kiva UI CLI in this package, then regenerate the exports map:
cd packages/ui
npx @kivacore/ui-cli add @kivacore/ui-form-fields @kivacore/ui-data-grid --overwrite # or any registry items
npx @kivacore/ui-cli add sheet @ai-elements/agent @plate/caption --overwrite # vendor primitives
pnpm sync:exportscomponents.json maps the registry aliases to this package (@kivacore/ui-pro-shared/components, /lib, /hooks), so installed files import each other through the package name. pnpm sync:exports (scripts/sync-exports.mjs) adds an exports entry for every module, because those imports point at .tsx, .ts and index files that one wildcard pattern cannot cover.
The CLI adds the components' npm dependencies to this package. Host singletons such as @kivacore/api-client, @kivacore/app-utils, TanStack Query and Table, and sonner are peer dependencies that the app provides.
