mirror of
https://github.com/penpot/penpot.git
synced 2026-10-29 22:10:34 +00:00
* 🐛 Fix restrict per-side stroke width tokens to rectangles in plugins API * ♻️ Reuse per-side stroke restriction check across plugin API Move the per-side stroke width restriction into the public `per-side-stroke-attrs-restricted?` helper, now taking `page-id`, and reuse it from both `shape.applyToken` and the token application path. Keep the error message in a single `per-side-stroke-widths-message` def used by all three rejection sites. Wait for token resolution in the uniform stroke width regression test instead of relying on a bare `settle`, which could assert before the applied token lands. AI-assisted-by: deepseek-v4.1-flash --------- Co-authored-by: Luis de Dios <luis.dedios@kaieldos.net>
Penpot plugin-types
The @penpot/plugin-types package provides TypeScript type definitions for the Penpot Plugin API, making it easier to develop plugins for the Penpot design platform with full type safety and IDE support. It streamlines the development process by ensuring that your code is well-typed and less prone to errors.
Getting started
Installation
To add penpot's plugin-types to your project, use the following command:
npm install @penpot/plugin-types
Configuration
To ensure the typings work correctly in your project, update your tsconfig.json as follows:
"typeRoots": [
"./node_modules/@types",
"./node_modules/@penpot"
],
"types": ["plugin-types"],
Learn more
For more information on how to build plugins using the Penpot PLugin API, refer to the official documentation. You can also explore practical examples in the samples repository to see real-world implementations.