Version 1, Update 21
New:
- Added
commitUndoto commit new undo states to undo history. This does not trigger an undo. - Added
triggerUndoto trigger an undo action. This reverts to the last state in undo history.
New:
commitUndo to commit new undo states to undo history. This does not trigger an undo.triggerUndo to trigger an undo action. This reverts to the last state in undo history.New:
moveLocalPaintStyleAfter, moveLocalTextStyleAfter, moveLocalEffectStyleAfter, and moveLocalGridStyleAfter to reorder local styles within folders.moveLocalPaintFolderAfter, moveLocalTextFolderAfter, moveLocalEffectFolderAfter, and moveLocalGridFolderAfter to reorder style folders that share the same parent folder.New:
primaryAxisSizingMode, primaryAxisAlignItems, counterAxisAlignItems properties have been added on frame-like nodes.horizontalPadding and verticalPadding properties are now deprecated. Use paddingLeft, paddingRight, paddingTop and paddingBottom instead.layoutGrow property has been added on all nodes (except documents & page nodes).layoutAlign has changed. It now supports the values "STRETCH" | "INHERIT".Fixed:
getPluginData and getSharedPluginData APIs now properly inherit from components when accessed from an instance.setRelaunchData APIs is now able to override relaunch data on instances.New:
combineAsVariants and importComponentSetByKeyAsync to support variants.Fixed:
instance.children would not return any children when the instance was invisible_ to the style name) did not stop it from being publishedtextNode.textAutoResize would crashrelativeTransform to some value where the two axes had zero dot productfigma.getLocal*Styles() would return an array containing null or invalid style nodesNew:
enablePrivatePluginApi option in manifest.json to enable Private Plugin specific APIsfigma.fileKey will be set to the key of the current file.ui property in the plugin manifest can now either contain a filename in the form of a string. Or a list of filenames in the form of a map.// either
"ui": "ui.html"
// or
"ui": {
"loginPage": "login.html",
"main": "ui.html",
}
__html__ property. If you use the latter, then the files are available through a new __uiFiles__ property (eg.__uiFiles__.loginPage, __uiFiles__.main etc)Fixed:
InstanceNode.mainComponent now returns null instead of raising an exception if the underlying component doesn't actually exist.setPluginData and setSharedPluginData now removes the the relevant entries when the value is set to the empty string "", which is the default value returned by getPluginData and getSharedPluginData.New:
reactions property returns multiple reactions to support this newly launched feature.spread property in ShadowEffect to match the newly released spread feature.rescale function to match to toolbar's Scale Tool.masterComponent property has been renamed to mainComponentFixed:
(new Error()).stack). Note that you could previously get stack traces using the Developer VM, which also supports the debugger keyword.setSharedPluginData namespace argument now supports the characters _, . and uppercase characters.exportAsImage API would sometimes would fail to render nodes correctly due to instances not being updated.relativeTransform..clone() would not trigger library updates for publishing.New:
getPublishStatusAsync to components and styles.Last update erroneously set the typings file to update 13, so this skips ahead to update 14.
New:
setRelaunchData API is now available on the DocumentNode. Relaunch buttons set on this node will appear on every page when nothing is selected.New:
selectedTextRange API that allows you to get and set the current text selection.insertCharacters and deleteCharacters that make it easier to edit text while preserving existing styles.setRelaunchData API (plugin inspector) introduced at Config."STRETCH" is now a valid value for layoutAlign in children of frames.Fixed:
clipsContent, guides, layoutGrids, gridStyleId.New:
figma.root.name.findChild and findChildren to search immediate children.constrainProportions as a node property.strokeMiterLimit property and outlineStroke() method as node properties.scaleFactor as an instance property.expanded property on nodes with children.Rect (x, y, width, height) to the typings.Fixed:
getRange/setRange functions handle unicode characters. Previously, those function took a start and end parameter which were interpreted as unicode code points (UCS4). However, node.characters returns a JavaScript string which is encoded as UTF16. This created an inconsistency where calling getRange/setRange could end up referencing a different range than the one you would expect, if characters that encode differently were present in your strings (such as emojis). Most plugins should simply work better as a result of this change. If you had added workaround code in your plugin, you may now need to remove the workaround.We also recently released a new version of the desktop app, which uses Electron 6 and Chrome 76. This gives you access to newer Chrome APIs that weren't previously available in the desktop app.