@agent-factory-platform/ui-kit
v0.18.1
Published
Themeable, product-neutral React components and semantic styles for Agent and Docs applications.
Readme
@agent-factory-platform/ui-kit
Themeable, product-neutral React components and semantic styles for Agent and Docs applications.
Install
npm install @agent-factory-platform/ui-kitUse the exact Agent Factory version across packages in one application.
Scope
The public root exports retain module boundaries: importing shell components
does not force engines from a separately lazy-loaded chart into the initial
bundle. Continue importing the public package; private dist paths are not API.
TagList defaults to pills. Use variant="dot" with toneForItem returning
up | down | accent | warning | muted for a compact semantic row; the caller
supplies labelForItem, while limit and the overflow count remain shared.
OhlcChart.annotations accepts neutral OhlcAnnotation levels (price), bands
(from/to prices, optional opacity), and segments (from/to time-price
points). Levels/segments accept lineStyle and widths 1–4; callers supply colors
and labels. Times are epoch milliseconds and non-bar times use the engine's
nearest bar. Annotation prices participate in autoscaling; updating annotations
preserves the chart instance. markers[].price optionally anchors a marker at
its price instead of the bottom event track, including its keyboard target.
Both lists are limited to 256 entries; geometry must be finite and marker IDs
unique. The existing engine owns zoom, resize, theme, drawing and cleanup.
This package owns reusable, business-free infrastructure and lifecycle contracts. Product prompts, domain tools, policies, credentials, data, and deployment configuration remain in the consuming application.
The package root exports OhlcChart, SignedAreaChart, MultiLineChart,
TimeBarChart, TimeComboChart, DepthChart, DivergingBarChart,
DualAxisLineChart, DualAxisBarChart, GroupedBarChart, and WeightedHeatmap.
Hosts supply samples, labels, formatting, links, event content, and domain field
mapping. The package does not fetch data, calculate strategies, or submit orders.
readChartPalette and observeChartPalette bridge semantic CSS roles to canvas
engines. Pass the chart's element for scoped themes; dispose the returned observer
when the chart unmounts. ChartEngineThemeAdapters supplies theme configuration
for Lightweight Charts, TradingView, ECharts, and KLineCharts. OHLC rendering uses
Lightweight Charts and keeps its attribution visible.
WorkspaceGrid owns panel movement, resize, keyboard interaction and optional
layout persistence. DataTable owns sorting, paired column resize, optional
leading-column pinning and row activation. CalendarPeriodNavigator composes
existing date/tabs controls; hosts own date arithmetic and navigation state.
OHLC timestamps are milliseconds, strictly increasing at second precision;
invalid OHLC bounds, nonfinite values, negative volume and precision outside
0–12 are rejected before engine dispatch. Independent line series require unique
IDs other than reserved timestamp/value and prototype keys. TimeBarChart
is for nonnegative measurements; use TimeComboChart for signed bars.
The Y-axis gutter is capped at 120 pixels: use a compact formatter for longer
labels. Table pinning supports the leading identity column only.
Documentation
API and package documentation: https://www.npmjs.com/package/@agent-factory-platform/ui-kit
PieChart accepts per-slice color and opacity overrides. Omitted fields keep
the categorical palette and opacity 1; opacity 0 remains transparent. These are
presentation fields, so consumers can preserve their own semantic color mapping.
