# @cue-ai/embedded

> React library for the Cue Analytics

Latest version **0.0.0-alpha.27** (published 2024-01-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install @cue-ai/embedded
pnpm add @cue-ai/embedded
yarn add @cue-ai/embedded
bun add @cue-ai/embedded
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.0-alpha.27 |
| Published | 2024-01-10 |
| First published | 2023-12-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 26 |
| Unpacked size | 566.7 KB |
| Known vulnerabilities | 0 (+2 in 2 direct dependencies) |
| Install scripts | no |
| Author | @caelinsutch |
| Maintainers | anirudh-ramprasad, caelinsutch |
| Keywords | sdk, api, analytics |

## Links

- npm: https://www.npmjs.com/package/@cue-ai/embedded
- Homepage: https://trycue.ai
- npm.io page: https://npm.io/package/@cue-ai/embedded

## Dependencies (26)

- [zod](https://npm.io/package/zod.md) ^3.22.4
- [clsx](https://npm.io/package/clsx.md) ^2.0.0
- [cmdk](https://npm.io/package/cmdk.md) ^0.2.0
- [uuid](https://npm.io/package/uuid.md) ^9.0.1
- [dayjs](https://npm.io/package/dayjs.md) ^1.11.10
- [jotai](https://npm.io/package/jotai.md) ^2.6.0
- [recharts](https://npm.io/package/recharts.md) ^2.10.3
- [lucide-react](https://npm.io/package/lucide-react.md) ^0.299.0
- [react-markdown](https://npm.io/package/react-markdown.md) ^9.0.1
- [tailwind-merge](https://npm.io/package/tailwind-merge.md) ^2.2.0
- [react-day-picker](https://npm.io/package/react-day-picker.md) ^8.2.0
- [random-word-slugs](https://npm.io/package/random-word-slugs.md) ^0.1.7
- [react-grid-layout](https://npm.io/package/react-grid-layout.md) ^1.4.4
- [tailwindcss-animate](https://npm.io/package/tailwindcss-animate.md) ^1.0.7
- [@radix-ui/react-slot](https://npm.io/package/@radix-ui/react-slot.md) ^1.0.2
- [@radix-ui/react-icons](https://npm.io/package/@radix-ui/react-icons.md) ^1.3.0
- [@tanstack/react-query](https://npm.io/package/@tanstack/react-query.md) ^5.15.0
- [@tanstack/react-table](https://npm.io/package/@tanstack/react-table.md) ^8.11.3
- [@radix-ui/react-dialog](https://npm.io/package/@radix-ui/react-dialog.md) ^1.0.5
- [@radix-ui/react-popover](https://npm.io/package/@radix-ui/react-popover.md) ^1.0.7
- [@radix-ui/react-checkbox](https://npm.io/package/@radix-ui/react-checkbox.md) ^1.0.4
- [class-variance-authority](https://npm.io/package/class-variance-authority.md) ^0.7.0
- [@radix-ui/react-separator](https://npm.io/package/@radix-ui/react-separator.md) ^1.0.3
- [@radix-ui/react-alert-dialog](https://npm.io/package/@radix-ui/react-alert-dialog.md) ^1.0.5
- [@radix-ui/react-context-menu](https://npm.io/package/@radix-ui/react-context-menu.md) ^2.1.5
- [@radix-ui/react-dropdown-menu](https://npm.io/package/@radix-ui/react-dropdown-menu.md) ^2.0.6

## Recent versions

- 0.0.0-alpha.27 (latest) — 2024-01-10
- 0.0.0-alpha.7 (development) — 2024-01-06
- 0.0.0-alpha.26 — 2024-01-09
- 0.0.0-alpha.25 — 2024-01-07
- 0.0.0-alpha.24 — 2024-01-07
- 0.0.0-alpha.23 — 2024-01-07
- 0.0.0-alpha.22 — 2024-01-07
- 0.0.0-alpha.21 — 2024-01-07
- 0.0.0-alpha.20 — 2024-01-07
- 0.0.0-alpha.19 — 2024-01-07
- 0.0.0-alpha.18 — 2024-01-07
- 0.0.0-alpha.17 — 2024-01-07
- 0.0.0-alpha.16 — 2024-01-07
- 0.0.0-alpha.15 — 2024-01-07
- 0.0.0-alpha.14 — 2024-01-07
- … 13 more at https://npm.io/package/@cue-ai/embedded/versions

## README

# @cue-ai/embedded

Charts provide out-of-the-box visualizations for your data that are fully compatible with the Cue AI platform.

## Installation

```bash
yarn add @cue-ai/embedded
```

### Release Channels

The `@cue-ai/embedded` package is released on two main channels:
- Production - Published from `main`
- Development - Published from `development`

## Developing

### Running the Dev Server

If you'd like to run the embedded example, first start the `next` package:

```bash
yarn workspace @cue-ai/next dev
```

Then, start the embedded package dev environment:
```bash
yarn workspace @cue-ai/embedded dev
```

which starts up a Vite React application.

### Running Storybook

To run the storybook (which contains all the individual chart components), run:

```bash
yarn storybook
```

## Component Information

### Embedded Dashboard Provider

- Fetches both dataset data and dashboard data
- Initializes `controlVariableAtoms`
- Initializes and sets `organizationAtom`
- Initializes and sets `themeMergeAtom`
- Initializes and sets `customerAtom`
- Initializes and sets `dashboardAtom`
- Initializes and sets `dashboardItems` (which is an atom array)
- Initializes and sets `datasetData` (which contains dataset data and associated loading state)

### Embedded Dashboard Renderer

- Reads data from `dashboardAtom` and `dashboardItems` to render the dashboard

---
_Source: https://npm.io/package/@cue-ai/embedded · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
