openpencil/packages/fig
Danila Poyarkov f9e2588b84 refactor(fig): own full archive parsing
- Move ZIP canvas and image discovery from Kiwi into @open-pencil/fig\n- Keep Kiwi focused on raw fig-kiwi payload decoding\n- Rewire core and fixture consumers through the public Fig package API
2026-07-18 01:17:21 +03:00
..
scripts refactor(fig): own full archive parsing 2026-07-18 01:17:21 +03:00
src refactor(fig): own full archive parsing 2026-07-18 01:17:21 +03:00
tests refactor(fig): own full archive parsing 2026-07-18 01:17:21 +03:00
package.json refactor(fig): own full archive parsing 2026-07-18 01:17:21 +03:00
README.md refactor(fig): own full archive parsing 2026-07-18 01:17:21 +03:00
tsconfig.json chore(tools): harden package and dependency checks 2026-07-01 12:56:45 +03:00
tsconfig.test.json feat(fig): scaffold package shell 2026-06-30 10:51:36 +03:00
tsdown.config.ts chore(tools): harden package and dependency checks 2026-07-01 12:56:45 +03:00

@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()
  • Canvas payload and image resource discovery
  • readFigContainer() / writeFigContainer() helpers for raw fig-kiwi payloads
  • .fig source and archive result types

Planned ownership:

  • .fig archive assembly
  • SceneGraph ⇄ Figma NodeChange conversion
  • Raw Figma metadata precedence and invalidation policy
  • Component and instance interpretation
  • Oracle-backed .fig fixtures and package-local tests

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

cd packages/fig
bun run check