Updates for 2024-07-24
New:
- CSS variables docs no longer say that FigJam semantic color tokens are in beta.
New:
Fix plugin typings bug for prototype expressions. The ExpressionFunction enum has been updated to include a previously missing value: NOT.
Fix plugin typings bug for typography variables. Instances of keyof Omit<VariableBindableTextField, '...'> have been updated to Exclude<VariableBindableTextField, '...'>, which correctly excludes values from the VariableBindableTextField enum.
VariableScopes now have support for typography variables:
STRING variable scopes: FONT_FAMILY, FONT_STYLE, TEXT_CONTENTFLOAT variable scopes: FONT_SIZE, LINE_HEIGHT, LETTER_SPACING, PARAGRAPH_SPACING, PARAGRAPH_INDENTboundVariables that contains a color field and denotes whether a variable is bound to a gradient color stop.figma.constants.colors does not exist. This object, which remains exactly the same in the API, defines color palettes. We currently support the official FigJam colors, which can be found on this Figma Learn page.
ColorPalettes to hold all the available ColorPalette objectsWith the launch of typography variables, the plugin API now supports getting and setting bound variables for text properties like font family, font style, font weight, and more. Please refer to the Working with Variables guide for how to use the variables API to control typography in Figma files.
New:
node.getRangeBoundVariable and node.setRangeBoundVariable for getting and setting bound variables on text ranges.Updated:
node.boundVariables now includes bindable text fields.node.setBoundVariable can bind variables to text fields for the full text range in a text node.TextStyle.node.getStyledTextSegments now include bound variables for text fields to let you easily identify bindings across segments of text in a text node.fontStyle.openTypeFeatures entry to the list of properties that may be reported in documentchange or nodechange events. See NodeChangeProperty.networkAccess in the plugin and widget docs.