toto-react
v0.1.2
Published
Shared React component library for the Toto PWA ecosystem
Readme
toto-react
A shared React component library for the Toto PWA ecosystem. It provides reusable UI components, hooks, contexts, and API clients used across Toto applications, as well as Next.js API route handlers for backend features such as speech-to-text (STT) and text-to-speech (TTS).
Installation
npm install toto-reactUsage
Client-side components, hooks and contexts
import { /* components, hooks, contexts */ } from 'toto-react';Server-side Next.js API route handlers
Re-export the handlers inside your own app/api/ routes:
// app/api/stt/route.ts
export { STTHandler as POST } from 'toto-react/server';Development
Build
npm run buildThis produces dist/ with CommonJS, ESM and TypeScript declaration files.
Local consumption
Install the package directly from the local path in another project:
npm install /path/to/toto-reactPackage structure
| Export path | Description |
| ---------------- | ------------------------------------------------------- |
| toto-react | Client-side components, hooks, contexts and API clients |
| toto-react/server | Next.js API route handlers (STT / TTS) |
