This module provides several data structures to describe a Figma document and functions which operate on it.
Represents a multiway tree made of Node's.
A value which uniquely identifies a node in the document.
The root node of a document.
A single page in a document.
A node of fixed size containing other nodes.
A logical grouping of nodes.
A group that has a boolean operation (union, intersection, subtraction and exlusion) applied to it.
Type of boolean operation applied to the boolean group children.
A vector network, consisting of vertices and edges. This data structure is reused multiple times to represent lines, regular polygons, stars and other document elements.
A rectangular vector shape.
A rectangular region of the canvas that can be exported.
A text box.
A reusable component node. It has the same fields of Frame.
An instance of a component. Changes to the original component result in the same changes applied to the instance.
Sizing constraint for exports.
Format and size to export an asset at.
Format to export an asset to.
Fold over all the nodes in a tree, left to right, depth first.
Return a Rosetree data structure, which can be used with the Elm Rosetree package.
A Figma document consists as tree of nodes. It starts with a
DocumentNode, which has one or moreCanvasNode's children — called Pages in the UI — which in turn contain nodes for frames, images, vector shapes, etc.