# @duo/icons

Curated SVG set built into one module with **`icons`** (kebab-case keys → SVG strings), **`IconName`**, **`iconMetadata`**, and **`iconCategories`**.

## Source layout

| Path | Role |
|------|------|
| `src/icons/raw/` | 256×256 master SVGs (add new icons here) |
| `src/icons/processed/` | 32×32 SVGO output (generated on build; gitignored) |
| `dist/assets/` | Same 32×32 SVGs published to CDN |

## Build

```bash
pnpm --filter @duo/icons build
```

Add new `.svg` files under `src/icons/raw/` (kebab-case names), then rebuild.
New icons also need an entry in `src/metadata.js` so category and keyword metadata stays complete.

## Usage

```js
import { icons, IconName } from "@duo/icons";

const markup = icons["paper-plane"];
// or
icons[IconName["paper-plane"]];

import { iconMetadata, iconCategories } from "@duo/icons";

iconMetadata["paper-plane"].category;
iconMetadata["paper-plane"].keywords;
iconCategories;
```

## CDN

After deploy, versioned assets are published under:

```text
/cdn/duo/icons/{version}/index.js
/cdn/duo/icons/{version}/assets/{icon-name}.svg
/cdn/duo/icons/{version}/LICENSE
/cdn/duo/icons/{version}/NOTICE
```

CDN SVG files are the 32×32 processed outputs (`width`/`height` = 32, original `viewBox` preserved).

## License

Icons in this package are derived from [Phosphor Icons](https://github.com/phosphor-icons), licensed under the MIT License. See [`LICENSE`](./LICENSE) and [`NOTICE`](./NOTICE).
