Beta changelog #

Epics and highlights #
- This marks the release of version 1.0, and from this point forward, we’ll do our best to avoid making any more breaking changes (or make deprecations backward compatible).
- We’ve redone the documentation. You can check the API here: https://penpot-plugins-api-doc.pages.dev/
- New samples repository with lots of samples to use the API: https://github.com/penpot/penpot-plugins-samples

Breaking changes & Deprecations #
- Changed types names to remove the Penpot prefix. So for example:
PenpotShapebecomesShape;PenpotFilebecomesFile, and so on. Check the API documentation for more details. - Changes on the
penpot.onandpenpot.offmethods. Previously you had to send the original callback to the off method in order to remove an event listener. Now,penpot.onwill return an id that you can pass to thepenpot.offmethod in order to remove the listener.
Previously:
penpot.on(‘pagechange’, myListener); // Register an event listener
penpot.off(‘pagechange’, myListener); // Remove previously registered listener
Now:
const id = penpot.on(‘pagechange’, myListener);
penpot.off(id);
We’ve deprecated the old behavior in favor of the new one, this means that the behavior will work in the next version, but will be removed further down the line.
- Change some names to better align with the names in Penpot's UI.
- type
frameis nowboard:PenpotFrameis nowBoardpenpot.createFramechanged topenpot.createBoardshape.frameX/shape.frameYchanged toshape.boardX/shape.boardYPenpotFrameGuideXnowGuideX
- type
rectisrectanglePenpotRectangleis nowRectangle
- type
circleisellipsePenpotCircleis nowEllipsepenpot.createCirclechanged topenpot.createEllipse
- type
boolisbooleanPenpotBoolis nowBoolean
- type
- Removed the following methods
getPage, you can use now the propertycurrentPagegetFile, you can use now the propertycurrentFilegetTheme, you can use now the propertythemegetSelected, you can use the propertyselectiongetSelectedShapes, you can use the propertyselection

New features #
- Support for comments
- Support for export files
- Support for undo blocks
- Support for ruler guides
- Support for prototype functionality access
- New geometry utils:
- shape.bounds
- shape.center
- New events
- contentsave
- shapechange
- Adds property file.pages
- Adds parent reference to shape
- Add root shape reference to page
- Add detach shape to component method
- Adds method to createPage and openPage
- Adds shape.visible property
- Adds method penpot.viewport.zoomToShapes to change the viewport to the shapes.