openpencil/packages/fig/docs
Danila Poyarkov 67dbd7156f
feat(design-jsx): export every property the renderer accepts (#814)
* feat(design-jsx): export every property the renderer accepts

JSX export wrote only part of a layer: one solid fill, one stroke
without its alignment, shadows as repeated attributes, background blurs
as layer blurs, and nothing for hidden children, constraints, size
limits, absolute positioning, vertical text alignment, masks, or
variable bindings. Rendering an export lost those properties, and JSX
diffs could not see changes to them.

The export now writes them, using paint and effect helper calls when a
shorthand cannot express a value exactly, and leaves out values the
renderer would infer, so ordinary output stays as it was. Prop values
can now hold objects, arrays, and helper calls, printed through
@open-pencil/codegen's builders, which gain a call expression. The
language gains `visible`, `locked`, `constraints` (Figma's constraints
object with lowercase values, as `blendMode` uses), `italic`,
`strokes`, `strokeWeights`, `strokeCap`, and `strokeJoin`, and now
applies `strokeAlign`, `strokeDash`, and the size limits, which it
accepted but ignored. Per-corner radii are written even when the
uniform radius is 0. A round-trip test renders each case's export and
checks the fields and that exporting again changes nothing.

* docs(fig): name the saved-glyph fixture by its repository path

The observation note linked the fixture with a relative path climbing four directories. Other notes name fixtures by their repository path, which reads the same from anywhere.

* fix(design-jsx): export the node-level dash pattern

A node's own dashPattern was not written, so a node dashed at node level
came back solid and the DOM/CSS export chose a solid border. It now
round-trips as a separate dashPattern prop; strokeDash stays the
stroke-local dash.
2026-10-03 15:40:21 +04:00
..
observations feat(design-jsx): export every property the renderer accepts (#814) 2026-10-03 15:40:21 +04:00
architecture.md feat(fig): occurrence-scoped instance interpretation as the single .fig reader 2026-10-01 11:20:27 +04:00
document-sessions.md feat(fig): occurrence-scoped instance interpretation as the single .fig reader 2026-10-01 11:20:27 +04:00
export.md feat(fig): occurrence-scoped instance interpretation as the single .fig reader 2026-10-01 11:20:27 +04:00
instance-evaluation.md feat(fig): occurrence-scoped instance interpretation as the single .fig reader 2026-10-01 11:20:27 +04:00
materialization.md feat(fig): occurrence-scoped instance interpretation as the single .fig reader 2026-10-01 11:20:27 +04:00
README.md feat(fig): occurrence-scoped instance interpretation as the single .fig reader 2026-10-01 11:20:27 +04:00
source-model.md feat(fig): occurrence-scoped instance interpretation as the single .fig reader 2026-10-01 11:20:27 +04:00
validation.md feat(fig): occurrence-scoped instance interpretation as the single .fig reader 2026-10-01 11:20:27 +04:00

FIG package architecture

These documents explain the .fig reader and its editing/export contracts. They are package implementation documentation, not a release-status log.

Reading order

Document Question
Architecture Which package owns each stage?
Source model What are records, resources, and identities?
Instance evaluation How do bindings and overrides resolve?
Materialization How do occurrences become editable nodes?
Document sessions How do incremental loads and recovery work?
Export How are runtime identities and claims encoded?
Validation What constitutes compatibility evidence?
archive -> source model -> instance evaluation -> materialization
                                                    |
                                  document sessions + editor actions
                                                    |
                                                  export
                                                    |
                                            Figma validation

Status vocabulary

  • Required invariant: a correctness constraint, whether or not all cases satisfy it yet.
  • Implemented: behavior present in the linked modules and covered by the cited tests.
  • Known limitation: a boundary not yet implemented or validated; not a supported fallback.

Every consumer uses this reader; the previous importer and its repair pipeline are gone, so there is one interpretation path, not a legacy mode. Remaining work is fidelity and performance acceptance against Figma, tracked per document as known limitations.

Keep temporary file keys, benchmark runs, experimental findings, and current blockers in ignored scratch/ notes or the integration PR. Fixture provenance belongs alongside fixtures. The public roadmap owns product-level direction.