Symbol override target resolution.
Figma override paths point at source component nodes. For populated instances the resolver should patch the corresponding cloned node, not the source node. This module validates source paths when possible and resolves them through the graph clone index.
Summary
Functions
Resolves an override guid_path for an instance/source node.
Returns :ok when guid_path is a valid parent/child path in the source graph.
Types
@type resolution() :: {:ok, Figler.Scene.Graph.GUID.graph_guid()} | {:error, atom()}
Functions
@spec resolve(Figler.Scene.Graph.t(), Figler.Scene.Graph.GUID.graph_guid(), [ Figler.Scene.Graph.GUID.figma_guid() ]) :: resolution()
Resolves an override guid_path for an instance/source node.
@spec validate_source_path(Figler.Scene.Graph.t(), [ Figler.Scene.Graph.GUID.figma_guid() ]) :: :ok | {:error, atom()}
Returns :ok when guid_path is a valid parent/child path in the source graph.
Single-segment paths are accepted if the source node exists; multi-segment
paths must follow graph.children exactly.