Figler.Scene.Graph.Component.Properties (figler v0.1.0-beta.1)

Copy Markdown View Source

Component property assignment support for the graph resolver.

Summary

Functions

Applies component property assignments from an instance seed.

Applies component property assignments from all instance seeds in the graph.

Applies one instance's component property assignments to the graph.

Maps Figma component property field identifiers to scene node fields.

Indexes component property definitions to their source graph node fields.

Finds the source node and field referenced by a component property definition.

Functions

apply(graph, instance)

Applies component property assignments from an instance seed.

apply_all(graph)

@spec apply_all(Figler.Scene.Graph.t()) :: Figler.Scene.Graph.t()

Applies component property assignments from all instance seeds in the graph.

apply_assignments(graph, instance_guid, assignments)

Applies one instance's component property assignments to the graph.

Component swaps run before simple field assignments so later assignment patches target the current effective component tree.

field(arg1)

@spec field(atom() | String.t()) :: atom() | nil

Maps Figma component property field identifiers to scene node fields.

index(seed_nodes)

Indexes component property definitions to their source graph node fields.

ref(graph, def_id)

Finds the source node and field referenced by a component property definition.