Version 1, Update 81
New:
- We are introducing
NEGATEas a Prototyping ExpressionFunction type!
New:
NEGATE as a Prototyping ExpressionFunction type!New:
variableIds are now returned in a similar order to the Figma Design UI. See VariableCollection#variableIdstextRangeFills to the boundVariables structure. This will be populated on text nodes which have color variables bound to substrings.The Plugin API runtime has been updated to ensure proper usage of figma.showUI.
It is unsafe to call figma.showUI within an event handler for the figma.codegen.on("generate") event. In development, figma.showUI will now throw an error when called as a result of a figma.codegen.on("generate")
If you need to trigger code inside an iframe as the result of a generate callback, you should instead move the call to showUI outside of the event handler and use figma.ui.postMessage to communicate with the iframe from within the callback. This will ensure that your plugin can to handle concurrent generate events. Here's a code example for how to do this.
We're introducing an improved way to attach straight connectors to nodes in FigJam with a new CENTER magnet. Starting in 2024, straight connectors will only be able to attach to CENTER and NONE magnets. The magnets for elbowed connectors will remain unchanged.
Notice of breaking change:
To support CENTER magnets as the improved way for straight connectors to attach to nodes, we are making a breaking change for plugins that set straight connector endpoint magnets to AUTO, TOP, LEFT, BOTTOM, or RIGHT.
Who is affected: Anyone with a plugin/widget that touches straight connectors and sets an endpoint magnet to AUTO, TOP, LEFT, BOTTOM, or RIGHT.
What you must do: Find and update the code that sets the endpoints of straight connectors to use the CENTER or NONE magnet.
What will happen now:
What will happen starting October 25, 2023:
What will happen in 2024:
New
node.isMask == true), maskType can be used to get/modify the masking type used (alpha, vector, or luminance) for the mask operation.New:
figJamBase and figJamBaseLight, a set of official FigJam colors.Reaction object has an actions array replacing the existing action property for executing multiple actions on the same triggerAction object supports two new action types:
"SET_VARIABLE" for modifying the value of a variable based on a static value, another variable, or an expression"CONDITIONAL" for checking if a condition is met before performing an actionSee the reactions property page for more details and code samples.
Notice of breaking change:
To support multiple actions per trigger in the Reaction object, we are making a breaking change for plugins that set the reactions property.
Who is affected: Anyone with a plugin/widget with code that sets the reactions property.
What you must do: Check and update your code to use the new actions property in each Reaction object.
What will happen now:
reactions with only the action object without the new actions array will always throw an error. This is to prevent data loss on nodes that already have reactions with multiple actions.reactions with both action and actions are fine. actions will take precedence and action will be ignored.What will happen starting November 9:
actions array is not present when setting reactions.This update fixes a bug with the optional networkAccess key in the plugin manifest. Previously, we had an error where we would treat local worker scripts as well as blob: URLs as external resources. If you were affected by this, you can now update your networkAccess field.
New:
The Variable object has been extended with with the ability to read and define a variable's code syntax field. Code syntax allows you to represent design variables in code using custom, syntactically correct variable names to support a seamless handoff experience. It can be configured for different contexts, including CSS, SwiftUI, and Compose. A variable's code syntax will appear in Dev Mode's code snippets when inspecting elements using the variable.
New:
codeSyntax field.This update contains a small change for users of the Variables API public beta.
When getting or assigning elements to the Variable.scopes array, please update your code to use 'STROKE_COLOR' instead of 'STROKE'. The meaning is the same. The value 'STROKE' is deprecated and will no longer be supported in our type definitions.
For a full list of possible values, see VariableScope.
Color management is now supported within Figma! This version introduces properties for the color profiles of documents and exports.
New: