Skip to main content

Version 1, Update 19

New:

  • Support for the new autolayout APIs! They are available on frame nodes.
  • The primaryAxisSizingMode, primaryAxisAlignItems, counterAxisAlignItems properties have been added on frame-like nodes.
  • The horizontalPadding and verticalPadding properties are now deprecated. Use paddingLeft, paddingRight, paddingTop and paddingBottom instead.
  • The layoutGrow property has been added on all nodes (except documents & page nodes).
  • The layoutAlign has changed. It now supports the values "STRETCH" | "INHERIT".

Fixed:

  • The getPluginData and getSharedPluginData APIs now properly inherit from components when accessed from an instance.
  • The setRelaunchData APIs is now able to override relaunch data on instances.

Version 1, Update 18

New:

Fixed:

  • Fixed a bug where instance.children would not return any children when the instance was invisible
  • Fixed a bug where setting a local style to private (by prepending _ to the style name) did not stop it from being published
  • Fixed a bug where accessing textNode.textAutoResize would crash
  • Fixed a bug where it was possible to give a node invalid coordinates by setting relativeTransform to some value where the two axes had zero dot product
  • Fixed a bug where components imported from the team library became writeable
  • Fixed a bug where figma.getLocal*Styles() would return an array containing null or invalid style nodes

Version 1, Update 17

New:

  • enablePrivatePluginApi option in manifest.json to enable Private Plugin specific APIs
  • For private plugins with the above option set, figma.fileKey will be set to the key of the current file.
  • The 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",
}
  • If you use the former, the file is available through the __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.

Version 1, Update 16

New:

  • The newly released easing curves are now available in the API.
  • The existing reactions property returns multiple reactions to support this newly launched feature.
  • The spread property in ShadowEffect to match the newly released spread feature.
  • A rescale function to match to toolbar's Scale Tool.
  • The masterComponent property has been renamed to mainComponent

Fixed:

  • The QuickJS runtime used to sandbox plugin code has been upgraded to the latest version. Exceptions thrown will now contain a property stack trace (e.g. in the (new Error()).stack). Note that you could previously get stack traces using the Developer VM, which also supports the debugger keyword.
  • The setSharedPluginData namespace argument now supports the characters _, . and uppercase characters.
  • Fixed an issue where exportAsImage API would sometimes would fail to render nodes correctly due to instances not being updated.
  • Fixed an issue where plugins could sometimes set a non-invertible affine transform to relativeTransform.
  • Fixed an issue where cloning a component via .clone() would not trigger library updates for publishing.
  • Fixed an issue where very long plugin names would stretch the plugin window.

Version 1, Update 15

New:

  • As per popular request, the default typings have moved have moved to NPM. See the Typings page for more information.
  • Added getPublishStatusAsync to components and styles.

Version 1, Update 14

Last update erroneously set the typings file to update 13, so this skips ahead to update 14.

New:

  • The setRelaunchData API (plugin inspector) now supports multiple buttons.
  • The setRelaunchData API is now available on the DocumentNode. Relaunch buttons set on this node will appear on every page when nothing is selected.

Version 1, Update 12

New:

  • New selectedTextRange API that allows you to get and set the current text selection.
  • New insertCharacters and deleteCharacters that make it easier to edit text while preserving existing styles.
  • ICYM, new setRelaunchData API (plugin inspector) introduced at Config.
  • "STRETCH" is now a valid value for layoutAlign in children of frames.

Fixed:

  • The following properties have been removed on group nodes (they didn't do anything): clipsContent, guides, layoutGrids, gridStyleId.

Version 1, Update 11

New:

Fixed:

  • Fixed how the 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.

Version 1, Update 10

New:

  • Read-only access to prototyping properties is now available for all plugins

Fixed:

  • Fixed a bug where cloning a page did not clone the prototyping connections

Version 1, Update 9

New:

Fixed:

  • The FrameNode and GroupNode objects now have separate prototypes, which means that code such as 'strokes' in group will correctly return false. Note that we still recommend checking the .type property of node objects over using the in operator. We expect this to be an implementation detail -- however, let us know if this is causing you any issues.

Proposed API (how do they work?):

  • Overlay properties have been added to the proposed prototyping APIs.