# @lotics/ui

React DOM UI primitives with no Lotics domain coupling — no i18n, analytics, or
domain types. Consumed by `frontend` and custom-code apps.
Lotics-specific compositions live in `frontend` or `@lotics/ui-internal`, not
here.

**Start at [`llms.txt`](./llms.txt)** — every published entry with the data role it answers, its
import path, and the one question that says where it does NOT go, in one read. Then the entry's own
`dist/<module>.d.ts` for its props, and [`AGENTS.md`](./AGENTS.md) for the laws. With the Lotics CLI
installed, `lotics docs ui` is the same index and `lotics docs ui/catalog/<Entry>` is one entry's
wrong-place test.

The package ships BUILT ESM — one module per source module under `dist/`, with
declarations and each component's own stylesheet beside it. Consumers import
subpaths, e.g. `import { Button } from "@lotics/ui/button"`, and import
`@lotics/ui/styles.css` once. In this repo nothing waits on that build: every
consumer aliases `@lotics/ui/*` at `src/*`, the same `LOTICS_UI_SRC` dev-link the
kit offers apps.

## Dev harness

A standalone Vite app for developing the primitives in isolation — no Expo app,
no backend.

```bash
npm run dev          # from packages/ui — read the port off the startup line
```

It lives in `dev/`; `CLAUDE.md` in this directory is how it is built and added to.

A consuming app needs none of that: `@lotics/ui/vite` is its config —
`loticsResolve()`, and `loticsOptimizeDeps()` so no subpath is a dependency Vite
meets mid-session and reloads for.

## Checks

```bash
npm run typecheck    # tsgo (covers src + dev)
npm run lint         # oxlint
npm run test         # vitest
```
