# @roottale/cms-core

RootTale CMS core — Block JSON schema (Gutenberg/Tiptap-compatible), serialize, validate.

Transitive dependency of [`@roottale/cms-renderer-next`](https://www.npmjs.com/package/@roottale/cms-renderer-next) and [`@roottale/cms-renderer-astro`](https://www.npmjs.com/package/@roottale/cms-renderer-astro). You usually don't install this directly — the renderer pulls it in. Install standalone if you need the types/schema in your own pipeline (custom validators, content migrations, codegen).

See ADR-0034 §3 §5 for the schema decision context.

## Install

```bash
npm install @roottale/cms-core
```

## Exports

- Block JSON Zod schemas
- `serializeBlocks` / `parseBlocks`
- `normalizeImageAlt` / `IMAGE_ALT_MAX_LENGTH` (한 줄·최대 160자 이미지 대체 텍스트 계약)
- `sanitizeHtml` (Tiptap·가져온 HTML의 태그·속성·URL·안전한 인라인 스타일 allowlist)
- Block id stable hash helpers
- TypeScript types

## License

Proprietary (UNLICENSED). Issued under the RootTale customer contract.
