# @viamrobotics/prime-blocks

> ## Getting started

Latest version **0.1.11** (published 2025-07-25) · 0 weekly downloads

## Install

```sh
npm install @viamrobotics/prime-blocks
pnpm add @viamrobotics/prime-blocks
yarn add @viamrobotics/prime-blocks
bun add @viamrobotics/prime-blocks
```

## Health

**Score 50/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities; high maintenance score.

Warnings: low downloads; pre 1.0.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 0.1.11 |
| Published | 2025-07-25 |
| First published | 2023-08-14 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM |
| Dependencies | 0 |
| Unpacked size | 5.7 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 11 |
| Maintainers | cheukt, mcous, stevebriskin, viambot, micheal.parks, mpviam, njooma |

## Links

- npm: https://www.npmjs.com/package/@viamrobotics/prime-blocks
- Repository: https://github.com/viamrobotics/prime
- Homepage: https://github.com/viamrobotics/prime#readme
- Issues: https://github.com/viamrobotics/prime/issues
- npm.io page: https://npm.io/package/@viamrobotics/prime-blocks

## Recent versions

- 0.1.11 (latest) — 2025-07-25
- 0.1.10 — 2025-07-17
- 0.1.9 — 2025-07-08
- 0.1.8 — 2024-11-13
- 0.1.7 — 2024-11-06
- 0.1.6 — 2024-09-04
- 0.1.5 — 2024-08-29
- 0.1.4 — 2024-08-22
- 0.1.3 — 2024-08-19
- 0.1.2 — 2024-08-13
- 0.1.1 — 2024-07-25
- 0.1.0 — 2024-07-24
- 0.0.30 — 2024-05-08
- 0.0.29 — 2024-04-23
- 0.0.28 — 2024-02-27
- … 26 more at https://npm.io/package/@viamrobotics/prime-blocks/versions

## README

# `@viamrobotics/prime-blocks`

## Getting started

`@viamrobotics/prime-blocks` is a collection of Svelte components that host more complex behaviors than `prime-core`. These components may be able to do many things, but are able to be self-contained to a single component with the intention of being dropped into any environment easily. If `prime-core` is on the atoms / molecules side of atomic design then `prime-blocks` is on the organisms side.

## Installation

Add PRIME blocks using your package manager of choice:

```
pnpm add --save-dev @viamrobotics/prime-blocks
```

Additionally, `@viamrobotics/prime-core` must be installed, and all of its installation steps must be followed.

Import the stylesheet. If you are using [SvelteKit][], you can do this in `src/routes/+layout.svelte`.

```js
import '@viamrobotics/prime-blocks/prime.css';
```

You can now use the components in your app:

```html
<script lang="ts">
  import { SlamMap } from '@viamrobotics/prime-blocks';
</script>

<SlamMap {cloud} />
```

[sveltekit]: https://kit.svelte.dev/

## Environment Variables

Google maps requires an API key `VITE_GOOGLE_MAPS_API_KEY` to be defined in .env
We support Google Maps for rendering maps. If no API key is provided, we fall back to OpenStreet even if Google Maps is selected

## Playground

The playground can be used during development but is not used outside of the package.

```bash
pnpm install
pnpm -C packages/blocks dev
```

## Linting

To lint and typecheck:

```bash
pnpm -C packages/blocks check        # check svelte and lint
pnpm -C packages/blocks check-svelte # check svelte only
pnpm -C packages/blocks check-lint   # check lint only with prettier and eslint
pnpm -C packages/blocks format       # format with prettier
```

## Testing

To test with [vitest][]:

```bash
pnpm -C packages/blocks test        # run once
pnpm -C packages/blocks test:watch  # watch tests
```

[vitest]: https://vitest.dev/

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