My plugin needs to identify all libraries enabled for the current file. Currently, there is no Plugin API endpoint that provides this information.
I The Figma REST API can be used to identify libraries of the styles used in the file. However, this method has a couple of limitations:
- It is not possible to identify enabled libraries if none of their styles are currently in use in the file.
- Even if the API client has identified enabled libraries using the Figma REST API, they will not be able to detect changes to their enabled state. In other words, if the state of a library is changed to “disabled” in Figma’s UI, the API client will not be notified of this change.
A new Plugin API endpoint that lets clients know the metadata (file key, name, etc) of the libraries currently enabled for a given file would be very useful to expand Figma features to be more powerful.