# Third-Party Vendor Libraries
This directory contains third-party JavaScript libraries used across solstone apps.
## Purpose
The `vendor/` directory provides:
- Centralized location for third-party libraries
- Version tracking and documentation
- Consistent access pattern for all apps
- Local copies for reliability (no CDN dependencies)
## Available Libraries
### marked (v15.0.12)
**Purpose**: Markdown parsing and rendering
**License**: MIT (included in file header)
**Source**: https://github.com/markedjs/marked
**CDN Alternative**: `https://cdn.jsdelivr.net/npm/marked/marked.min.js`
**Usage in App Templates**:
```html
```
**Example**:
```javascript
// Basic markdown rendering
const html = marked.parse('# Hello World');
// With options
const html = marked.parse(markdown, {
breaks: true, // Convert \n to
gfm: true, // GitHub Flavored Markdown
headerIds: false, // Disable auto-generated header IDs
mangle: false // Disable email mangling
});
```
**Currently Used By** (legacy references):
- `convey/templates/chat.html` (via `convey/static/marked.min.js`)
- `convey/templates/facet_detail.html` (via CDN)
- `convey/templates/agents.html` (via CDN)
### DOMPurify (v3.4.0)
**Purpose**: HTML sanitization for untrusted markdown output (defense against XSS in rendered model-emitted content).
**License**: Apache-2.0 OR MPL-2.0 (dual-licensed; either license can be chosen. Compatible with AGPL-3.0-only via MPL-2.0.)
**Source**: https://github.com/cure53/DOMPurify (v3.4.0 — `dist/purify.min.js`, renamed to `dompurify.min.js`)
**CDN Alternative**: `https://cdn.jsdelivr.net/npm/dompurify@3.4.0/dist/purify.min.js`
**Usage in App Templates**:
```html
```
**Example**:
```javascript
const dirty = 'Hello ';
const clean = DOMPurify.sanitize(marked.parse(dirty));
// clean => '
Hello