Internal GUID representation for Elixir graph resolution.
Public scene APIs expose GUIDs as strings like "1:23". The graph resolver
keeps real Figma GUIDs as {session_id, local_id} tuples and synthetic clone
IDs as {:clone, root_instance_guid, source_path} tagged tuples.
Summary
Functions
Appends a source GUID or source clone path to a clone path.
Builds a synthetic clone graph GUID under a root instance.
Formats an internal graph GUID for public scene APIs.
Converts a generated schema GUID struct to an internal tuple.
Parses a public GUID string or returns an already parsed graph GUID.
Parses a public GUID string, raising when it is invalid.
Returns the root instance GUID for graph GUIDs.
Types
@type clone_path() :: [figma_guid()] | {clone_path(), figma_guid()}
@type figma_guid() :: {non_neg_integer(), non_neg_integer()}
@type graph_guid() :: figma_guid() | {:clone, figma_guid(), clone_path()}
Functions
@spec append(graph_guid(), graph_guid()) :: graph_guid()
Appends a source GUID or source clone path to a clone path.
@spec clone(figma_guid(), figma_guid()) :: graph_guid()
Builds a synthetic clone graph GUID under a root instance.
@spec format(graph_guid() | nil) :: String.t() | nil
Formats an internal graph GUID for public scene APIs.
@spec from_schema(Figler.Schema.GUID.t() | nil) :: figma_guid() | nil
Converts a generated schema GUID struct to an internal tuple.
@spec parse(String.t() | graph_guid() | nil) :: graph_guid() | nil
Parses a public GUID string or returns an already parsed graph GUID.
@spec parse!(String.t() | graph_guid()) :: graph_guid()
Parses a public GUID string, raising when it is invalid.
@spec root(graph_guid()) :: figma_guid()
Returns the root instance GUID for graph GUIDs.