# @open-pencil/fig

> `.fig` file-format package for OpenPencil.

Latest version **0.15.1** (published 2026-09-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install @open-pencil/fig
pnpm add @open-pencil/fig
yarn add @open-pencil/fig
bun add @open-pencil/fig
```

## Health

**Score 70/100 (B)** — status: active.

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

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.15.1 |
| Published | 2026-09-18 |
| First published | 2026-08-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 1 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 8322 |
| Maintainers | dannote |

## Links

- npm: https://www.npmjs.com/package/@open-pencil/fig
- Repository: https://github.com/open-pencil/open-pencil
- Homepage: https://github.com/open-pencil/open-pencil#readme
- Issues: https://github.com/open-pencil/open-pencil/issues
- npm.io page: https://npm.io/package/@open-pencil/fig

## Dependencies (3)

- [fflate](https://npm.io/package/fflate.md) ^0.8.3
- [js-base64](https://npm.io/package/js-base64.md) ^3.9.3
- [es-toolkit](https://npm.io/package/es-toolkit.md) ^1.51.0

## Recent versions

- 0.15.1 (latest) — 2026-09-18
- 0.15.0 — 2026-09-16
- 0.14.0 — 2026-08-11
- 0.13.2 — 2026-08-11

## README

# @open-pencil/fig

`.fig` file-format package for OpenPencil.

The package owns the outer `.fig` archive boundary and is the staged home for Figma-specific
SceneGraph conversion policy. Production SceneGraph read/write remains available through
`@open-pencil/core/io` while conversion modules move behind this package's public API.

Current ownership:

- Complete `.fig` archive parsing through `parseFigBuffer()`
- `.fig` archive assembly through `writeFigArchive()`
- Canvas payload and image resource handling
- `readFigContainer()` / `writeFigContainer()` helpers for raw `fig-kiwi` payloads
- `.fig` source and archive result types
- NodeChange-to-SceneGraph property conversion, including styles, plugin metadata, text, paint, vector, and font policy, through `@open-pencil/fig/node-change`
- Component-property, symbol-override, derived-symbol-data, and instance synchronization policy through `@open-pencil/fig/instance-overrides`
- Effective raw-metadata precedence and invalidation over SceneGraph's format-neutral edited-field tracking
- SceneGraph-to-`NodeChange` export conversion with an explicit glyph-outline runtime service
- Package-local archive, conversion, instance, export, and dist smoke tests

Planned ownership:

- Oracle-backed `.fig` fixtures

Non-goals:

- Generic Kiwi schema/runtime internals — use `@open-pencil/kiwi`
- Format-neutral IO registration, export targeting, CanvasKit thumbnails, or browser workers — use
  `@open-pencil/core/io`
- Editor actions, renderer behavior, Vue/app UI, CLI formatting, or MCP transport

This follows the existing `@open-pencil/pen` pattern: a format package owns its source model/parser
and SceneGraph policy, while core registers it in the shared IO system.

## Checks

```sh
cd packages/fig
bun run check
```

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