A complete decoded boundary for a Figma document.
This representation preserves archive entries and rendering assets alongside
the raw Kiwi payload and document metadata. open/1 leaves :message as
nil for analysis and rendering; Figler.decode/1 additionally fills it
with a complete generated message for ordinary Elixir transformations.
Summary
Functions
Opens an exported .fig archive, fig-kiwi container, or raw Kiwi payload.
Like open/1, but raises Figler.Error when the input cannot be decoded.
Types
@type source() :: :archive | :container | :payload
@type t() :: %Figler.Document{ blobs: [binary()], canvas: binary() | nil, canvas_path: String.t() | nil, entries: %{optional(String.t()) => binary()}, images: %{optional(String.t()) => binary()}, message: Figler.Schema.Message.t() | nil, pages: [Figler.Document.Page.t()], payload: binary(), source: source() }
Functions
@spec open(binary()) :: {:ok, t()} | {:error, Figler.Error.t()}
Opens an exported .fig archive, fig-kiwi container, or raw Kiwi payload.
Returns {:error, %Figler.Error{}} for malformed input.
Like open/1, but raises Figler.Error when the input cannot be decoded.