107 Commits

Author SHA1 Message Date
Andrey Antukh
c4e72fd7f9 Merge remote-tracking branch 'origin/staging' into develop 2026-06-30 16:23:23 +02:00
Andrey Antukh
1c02810b83 📎 Fix fmt issues on plugins 2026-06-30 16:15:30 +02:00
Andrey Antukh
92035ebd94 ⬆️ Update and fixed warnings on plugins module 2026-06-30 16:15:30 +02:00
Andrey Antukh
e2b52d88fc ⬆️ Update dependencies 2026-06-30 16:15:30 +02:00
Alonso Torres
8823f7ac4d
Make v2 plugins default throw on error (#10433) 2026-06-30 14:50:50 +02:00
Andrew Barnes
b3b3ea97db
📚 Fix Angular plugin usage doc link (#10349) 2026-06-30 14:35:55 +02:00
Alonso Torres
e0be9f7ade
Plugin for api testing (#10410) 2026-06-30 14:01:38 +02:00
Alonso Torres
f993f203bd
🐛 Fix problems with plugins API (#10412)
*  Adds static dispatch safe stubs in tests

* 🐛 Fix shapesColors metadata key to match ColorShapeInfo

* 🐛 Fix CommentThread.remove rejecting the owner's own threads

* 🐛 Fix page.removeCommentThread throwing on a spurious Promise

*  Implement ShapeBase.swapComponent in the plugin API

*  Expose File.revn in the plugin API

* 🐛 Fix FileVersion.createdAt calling Luxon method on a js/Date

* 🐛 Fix plugin font/typography application to text and ranges

* 🐛 Default plugin overlay interaction position for non-manual types

* 🐛 Fix plugin interaction setters passing an id-only shape

* 🐛 Fix grid addColumnAtIndex rejecting valid track types

* 🐛 Expose libraryId on library color/typography/component proxies

*  Implement LibraryTypography.setFont in the plugin API

* 🐛 Fix typography.applyToTextRange reading unexposed range bounds

* 🐛 Fix utils.geometry.center argument mismatch

* 🐛 Fix localStorage.removeItem calling getItem

* 🐛 Fix shape backgroundBlur proxy key casing

* 🐛 Report boolean shape type as 'boolean' in the plugin API

* 🐛 Return the resulting paths from plugin flatten

* 🐛 Make plugin z-order methods act on the target shape

* 🐛 Make is-variant-container? return a boolean

*  Implement Group.isMask in the plugin API

* 🐛 Return a shape proxy from TextRange.shape

* 🐛 Return the duplicated set from TokenSet.duplicate

* 🐛 Fix theme addSet/removeSet reading set name with a keyword

* 🐛 Accept string fontFamilies token value in the plugin API

* 🐛 Fix combineAsVariants ignoring the passed component ids

* 🐛 Fix board removeRulerGuide ignoring its argument

* 🐛 Fix board guides setter schema and parser

* 🐛 Avoid 0-byte allocation when syncing empty grid tracks

* 🐛 Validate grid track indices in the plugin API

* 🐛 Return null for empty input in group() and centerShapes()

* 🐛 Return TokenTypographyValue[] from a typography token's resolvedValue

* 🐛 Return TokenShadowValue[] from a shadow token's resolvedValue

* 🐛 Return string[] from a fontFamilies token's resolvedValue

* 🐛 Clear mutually-exclusive reps when setting LibraryColor gradient/image

* 🐛 Add readonly tags to types, deprecate Image type

* 📚 Update plugins changelog
2026-06-29 17:32:15 +02:00
Alonso Torres
bbf63e1136
🐛 Fix array format in plugins properties (#10246) 2026-06-19 00:59:47 +02:00
Alonso Torres
ecabe7ec32
🐛 Fix token creation fail when set inactive (#10297)
* 🐛 Fix token creatin fail when set inactive

* 🎉 Add a enable flag to addSet to enable the token set
2026-06-19 00:58:45 +02:00
Alonso Torres
75e23cb9a3
🐛 Fix problem with plugins creating interactions always added a new flow (#10231) 2026-06-18 18:00:19 +02:00
Alonso Torres
5eb9753278
🐛 Fix problem with empty strings on createText plugins method (#10219) 2026-06-18 15:30:53 +02:00
Alonso Torres
68dd8ecdf5
🐛 Add fixedWhenScrolling to API (#10218) 2026-06-18 15:29:47 +02:00
Alonso Torres
b573a71017
🐛 Fix numeric values for tokens (#10270) 2026-06-18 11:05:14 +02:00
Alonso Torres
a7e57c78cf
🐛 Add validation for current page on plugins API (#10271) 2026-06-18 11:04:35 +02:00
David Barragán Merino
25484f53e7
🔧 Fix pnpm-workspace settings to allow the installation of wrangler (#10241) 2026-06-17 16:14:02 +02:00
Eva Marco
2a098e5b16
🎉 Add background blur (#10034)
* 🎉 Add background blur

* 🎉 Add test

* 🎉 Add background blur info to plugins API

* 🎉 Suport in wasm for both layer and background blur

* 🐛 Fix failing test

* ♻️ Fix comments

---------

Co-authored-by: alonso.torres <alonso.torres@kaleidos.net>
2026-06-16 19:46:03 +02:00
Andrey Antukh
03341ed857
⬆️ Update npm deps and pnpm on all subpackages (#10183) 2026-06-15 13:57:29 +02:00
Alonso Torres
92cf0cda7b
🐛 Fix openPage plugin problem (#10085)
* 🐛 Fix openPage plugin problem

* 🐛 Make history safer for tests
2026-06-15 11:27:35 +02:00
Alonso Torres
6cc1c1596f
📚 Improve plugin api docs (#10142) 2026-06-11 15:51:03 +02:00
Alonso Torres
d249fd106a
🐛 Fix theme problem after update (#9955) 2026-06-09 11:17:06 +02:00
Andrey Antukh
4a8fb5af53 Merge remote-tracking branch 'origin/staging' into develop 2026-06-01 13:15:57 +02:00
Andrey Antukh
c5de4c27b0 Merge remote-tracking branch 'origin/main' into staging 2026-06-01 12:57:39 +02:00
Andrey Antukh
a9c0b5394c
Refresh dependencies on plugins directory (#9935) 2026-06-01 10:07:06 +02:00
Yamila Moreno
ddba2ffa75
📎 Update Kaleidos Copyright (#9929) 2026-05-29 11:24:58 +02:00
Dominik Jain
94a5c6c4fd Add optional parameter throwOnError to penpot.ui.sendMessage
This provides more flexibility to callers, who may need to react
to a failure appropriately.
2026-05-14 22:19:25 +02:00
Dominik Jain
ed935e533f Expose variants retrieval via isVariant() type guard on LibraryComponent
Change isVariant() return type from boolean to 'this is LibraryVariantComponent',
enabling TypeScript users to directly access variants, variantProps, and
variantError after a type-narrowing check. Update MCP instructions with
improved variant navigation guidance.

Closes #9185

Co-authored-by: Claude (Anthropic) <noreply@anthropic.com>
2026-05-06 11:28:15 +02:00
wdeveloper16
50bee5e176
Add clipboard:read/write permissions to plugin system (#6980) (#9053)
*  Add clipboard:read/write permissions to plugin system (#6980)

* 🔧 Fix prettier formatting in clipboard permission files

---------

Co-authored-by: wdeveloper16 <wdeveloer16@protonmail.com>
Co-authored-by: Andrey Antukh <niwi@niwi.nz>
2026-04-24 09:07:58 +02:00
Andrey Antukh
3a39676969 Backport MCP from staging (part 1) 2026-04-20 19:37:02 +02:00
Andrey Antukh
9106a994f1 Merge remote-tracking branch 'origin/staging' into develop 2026-04-13 18:31:50 +02:00
Andrey Antukh
bc47b992eb Merge remote-tracking branch 'origin/main' into staging 2026-04-13 18:31:32 +02:00
Marek Hrabe
9785a13e67
🐛 Add webp export format to plugin types (#8870)
* 🐛 Add webp export format to plugin types

Align plugin API typings with runtime export support by including 'webp' in
'Export.type' and updating the exported formats documentation.

Signed-off-by: Marek Hrabe <marekhrabe@me.com>

* 📚 Add plugin-types changelog entry for missing webp export format

Signed-off-by: Marek Hrabe <marekhrabe@me.com>

---------

Signed-off-by: Marek Hrabe <marekhrabe@me.com>
Co-authored-by: Andrey Antukh <niwi@niwi.nz>
2026-04-10 11:22:20 +02:00
Marek Hrabe
a803bde2ff
🐛 Fix plugin modal dragging bugs (#8871)
* 🐛 Fix plugin modal drag and close interactions

Switch plugin modal dragging to pointer-capture semantics from the header so drag state remains stable when crossing iframe boundaries. Prevent drag start from close-button pointerdown and add regression tests for both non-draggable close-button interaction and close-event dispatch.

Signed-off-by: Marek Hrabe <marekhrabe@me.com>

* 📚 Update changelog for plugin modal drag fix

Document plugin modal drag and close-button interaction fixes in the unreleased changelog.

Signed-off-by: Marek Hrabe <marekhrabe@me.com>

* 🐛 Simplify plugin modal drag CSS selection rules

Keep user-select disabled at the modal wrapper level and keep touch-action scoped to the header drag handle to remove redundant declarations while preserving drag behavior.

Signed-off-by: Marek Hrabe <marekhrabe@me.com>

---------

Signed-off-by: Marek Hrabe <marekhrabe@me.com>
2026-04-09 21:13:10 +02:00
Andrey Antukh
f7e1bcf87f
🐛 Handle plugin errors gracefully without crashing the UI (#8810)
* 🐛 Handle plugin errors gracefully without crashing the UI

Plugin errors (like 'Set is not a constructor') were propagating to the
global error handler and showing the exception page. This fix:

- Uses a WeakMap to track plugin errors (works in SES hardened environment)
- Wraps setTimeout/setInterval handlers to mark errors and re-throw them
- Frontend global handler checks isPluginError and logs to console

Plugin errors are now logged to console with 'Plugin Error' prefix but
don't crash the main application or show the exception page.

Signed-off-by: AI Agent <agent@penpot.app>

*  Improved handling of plugin errors on initialization

*  Fix test and linter

---------

Signed-off-by: AI Agent <agent@penpot.app>
Co-authored-by: alonso.torres <alonso.torres@kaleidos.net>
2026-04-01 11:37:27 +02:00
alonso.torres
a1a469449e Add throwValidationErrors flag for plugins 2026-03-19 15:37:08 +01:00
Alonso Torres
a4ad940177
Add version property to plugins API (#8676) 2026-03-18 16:03:17 +01:00
Andrés Moya
8e2a52af50 💄 Change function names 2026-03-18 15:30:04 +01:00
alonso.torres
4e1b940e04 Remap token properties for usability 2026-03-18 15:30:04 +01:00
Andrey Antukh
cf94b56154 Merge remote-tracking branch 'origin/staging' into develop 2026-03-13 11:41:56 +01:00
Andrey Antukh
33c5f82c43 🐛 Fix penpot.openPage() to navigate in same tab by default
- Change the default for the newWindow param from true to false, so
  openPage() navigates in the same tab instead of opening a new one
- Accept a UUID string as the page argument in addition to a Page object,
  avoiding the need to call penpot.getPage(uuid) first
- Add validation error when an invalid page argument is passed

Signed-off-by: Andrey Antukh <niwi@niwi.nz>
2026-03-13 09:19:50 +01:00
David Barragán Merino
3eabbffb0e 🔧 Change the assets dir to fix deployment with Wrangler 2026-03-12 19:50:46 +01:00
Andrey Antukh
dbe8304f0c Include plugins on the frontend bundle 2026-03-12 19:07:44 +01:00
Andrey Antukh
87488f4a98 Make the rename-layers-plugin work correctly on subpath 2026-03-12 19:07:44 +01:00
Andrey Antukh
f6259708ca Make the create-palette-plugin work correctly on subpath 2026-03-12 19:07:44 +01:00
Andrey Antukh
1229c2a5e5 Make the constrast-plugin work correctly on subpath 2026-03-12 19:07:44 +01:00
Andrey Antukh
4a6e6fce5b Make the lorem-ipsum-plugin work correctly on subpath 2026-03-12 19:07:44 +01:00
Andrey Antukh
b8c319aa61 Make the poc-tokens-plugin work correctly on subpath 2026-03-12 19:07:44 +01:00
Andrey Antukh
2d0058ef3b Make the poc-state-plugin work correctly on subpath 2026-03-12 19:07:44 +01:00
Andrey Antukh
d14e3a9914 Make the colors-to-tokens-plugin work correctly on subpath 2026-03-12 19:07:44 +01:00
Andrey Antukh
eebe90b2cd Make the table-plugin work correctly on subpath 2026-03-12 19:07:44 +01:00