Version 1, Update 54
This release adds support for four new APIs:
InstanceNode.overrides
returns a list of overrides on an instance.InstanceNode.resetOverrides
resets all of the overrides on an instance.editComponentProperty
for component set nodes now supports renaming variant properties.- new
documentchange
option infigma.on
documentchange
will trigger when a node or style change is made to the currently open file.
The callback will be passed with a DocumentChangeEvent with the below interface:
interface DocumentChangeEvent {
documentChanges: DocumentChange[]
}
Example:
figma.on("documentchange", (event) => {
for (const change of event.documentChanges) {
console.log("document changes: ", change.id, change.origin, change.type);
// Node changes also have change.node, style changes have change.style
}
})