Commit Graph

20901 Commits

Author SHA1 Message Date
Belén Albeza
fc64dfe9d6 Revert " Add regression test for token highlight bug (13302) (#8573)"
This reverts commit d8249cc3db.
2026-03-13 12:12:15 +01:00
Andrey Antukh
6d30989a2d Merge remote-tracking branch 'origin/staging-render' into develop 2026-03-13 11:54:04 +01:00
Andrey Antukh
50ce8c4739 Merge remote-tracking branch 'origin/staging' into staging-render 2026-03-13 11:53:20 +01:00
Andrey Antukh
cf94b56154 Merge remote-tracking branch 'origin/staging' into develop 2026-03-13 11:41:56 +01:00
Andrey Antukh
5d931d1614 Merge remote-tracking branch 'origin/main' into staging 2.14.0-RC4 2026-03-13 09:20:30 +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
Pablo Alba
08845ad2d4 Add organization selection for nitrate (#8619) 2026-03-13 09:16:12 +01:00
Alejandro Alonso
fe9f1d63ad Merge pull request #8616 from penpot/alotor-fix-live-update-pvalues
🐛 Fix problem with update live sidebar values
2026-03-13 08:38:09 +01:00
Alejandro Alonso
ebd17974a6 Merge pull request #8580 from penpot/niwinz-staging-fix-paste-issue
🐛 Fix crash when pasting non-map transit clipboard data
2026-03-13 08:33:19 +01:00
Andrey Antukh
eecb51ecc1 🐛 Fix clipboard getType error when no allowed types found (#8609)
When clipboard items have types that don't match the allowed types
list, the filtering results in an empty array. Calling getType with
undefined throws a NotFoundError. This change adds a check for null/undefined
types and filters them from the result.

Signed-off-by: Andrey Antukh <niwi@niwi.nz>
2026-03-13 08:24:36 +01:00
Andrey Antukh
e7e6303184 🐛 Make ct/format-inst nil safe (#8612)
Prevent JS TypeError when date is nil in date formatting.

Signed-off-by: Andrey Antukh <niwi@niwi.nz>
2026-03-12 19:55:51 +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
Andrey Antukh
9fb6a3ab0e Make the icons-plugin work correctly on subpath 2026-03-12 19:07:44 +01:00
Andrey Antukh
207bc795c0 Add minor changes on plugins examples-style 2026-03-12 19:07:44 +01:00
Andrey Antukh
4ccbc612cb Add the ability to accept plugin permission pressing enter 2026-03-12 19:07:44 +01:00
Andrey Antukh
b56885b8be 💄 Add cosmetic changes to workspace plugins dialog components 2026-03-12 19:07:44 +01:00
Andrey Antukh
a6e0113b25 Install plugin by pressing enter on plugins dialog 2026-03-12 19:07:44 +01:00
Andrey Antukh
24fc84054d Append manifest.json to plugin uri if it comes without it 2026-03-12 19:07:44 +01:00
Andrey Antukh
e841dc60b7 Make penpot depend on local plugins runtime
This removes the need to publish versions to pnpn
2026-03-12 19:07:44 +01:00
Andrey Antukh
85ffadf8d7 Add better approach for handling plugin iframe url
Ensure params are passed correctly to plugins declared to be version
2 and are prepared to run in a subpath.
2026-03-12 19:07:44 +01:00
Andrey Antukh
bb651e0c4e Update devenv nginx to serve locally builded plugins 2026-03-12 19:07:44 +01:00
alonso.torres
99151fe530 🐛 Fix problem with update live sidebar values 2026-03-12 17:30:57 +01:00
Andrey Antukh
ec4f685aac 🐛 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-12 15:53:32 +01:00
Andrey Antukh
25df9f2f83 🐛 Fix DataCloneError in plugin postMessage communication
Fixes a crash where plugins sending messages via 'penpot.ui.sendMessage()'
could fail if their message payload contained non-serializable values like
functions or closures.

The fix adds validation using 'structuredClone()' to catch these messages
early with a helpful error message, and adds a defensive try/catch in the
modal's message handler as a safety net.

Fixes the error: 'Failed to execute postMessage on Window: ... could not
be cloned.'

Signed-off-by: Andrey Antukh <niwi@niwi.nz>
2026-03-12 15:26:00 +01:00
Andrey Antukh
8d5450391e 🐛 Fix crash when pasting non-map transit clipboard data
Guard against transit-decoded clipboard content that is not a map
before calling assoc, which caused a runtime crash ('No protocol
method IAssociative.-assoc defined for type number').

Also route :copied-props paste data to paste-transit-props instead
of incorrectly sending it to paste-transit-shapes.

Signed-off-by: Andrey Antukh <niwi@niwi.nz>
2026-03-12 15:05:22 +01:00
Aitor Moreno
c76985abee Merge pull request #8585 from penpot/superalex-fix-first-width-change-ignored-on-auto-width-text-in-wasm-render
🐛 Fix auto width text issues
2026-03-12 14:01:11 +01:00
Alejandro Alonso
be9b1158ed Merge pull request #8588 from penpot/niwinz-staging-abort-signal-fix
🐛 Fix unhandled AbortError in HTTP fetch requests
2026-03-12 13:53:18 +01:00
Eva Marco
8f5c38d476 🐛 Fix scroll on colorpicker (#8595) 2026-03-12 13:36:38 +01:00
Andrey Antukh
80d165ed5b 🐛 Fix unhandled AbortError in HTTP fetch requests
Identify and silence "signal is aborted without reason" errors by:
- Providing an explicit reason to AbortController when subscriptions are disposed.
- Updating the global error handler to ignore AbortError exceptions.
- Ensuring unhandled rejections use the ignorable exception filter.

The root cause was RxJS disposal calling .abort() without a reason, combined
with the on-unhandled-rejection handler missing the ignorable error filter.

Signed-off-by: Andrey Antukh <niwi@niwi.nz>
2026-03-12 13:31:58 +01:00
Alejandro Alonso
4b330e7b50 Merge pull request #8596 from penpot/niwinz-staging-fix-max-recursion
🐛 Fix RangeError (stack overflow) in find-component-main
2026-03-12 13:30:16 +01:00
Alejandro Alonso
f5cabac5f3 Merge pull request #8583 from penpot/niwinz-staging-ignore-extensions-exceptions
🐛 Ignore browser extension errors in unhandled exception handler
2026-03-12 13:20:11 +01:00
Alejandro Alonso
1487386fbb Merge pull request #8582 from penpot/niwinz-staging-bugfix-path-plain-content
🐛 Fix plain vector leaking into shape :content from shape-to-path
2026-03-12 13:15:14 +01:00
Andrey Antukh
b68e400cc1 🐛 Fix crash in select* when options vector is empty (#8578)
Guard get-option fallback with (when (seq options) ...) to avoid
"No item 0 in vector of length 0" when options is an empty vector.
Also guard the selected-option memo in select* to mirror the same
pattern already present in combobox*.

Signed-off-by: Andrey Antukh <niwi@niwi.nz>
2026-03-12 13:06:25 +01:00
Alejandro Alonso
50c27aecc7 Merge pull request #8574 from penpot/niwinz-staging-unmount-fixes
🐛 Fix removeChild crash on portal-on-document* unmount
2026-03-12 13:06:00 +01:00
Andrey Antukh
37cf099126 🐛 Fix number token applying rotation when line-height attr is specified (#8557)
* 💄 Removed forgotten print (#8594)

* 🐛 Fix number token applying rotation when line-height attr is specified

toggle-token always used the on-update-shape from token-properties,
which for :number tokens is unconditionally update-rotation. So calling
applyToken(token, ["line-height"]) on a :number token would correctly
set the line-height text attribute but also invoke update-rotation with
the token value, silently rotating the shape.

Added an :on-update-shape-per-attr map to the :number token properties
entry mapping each valid attribute subset to its correct update function.
toggle-token now resolves the update function from that map when explicit
attrs are provided, falling back to the default on-update-shape otherwise.

Signed-off-by: Andrey Antukh <niwi@niwi.nz>

* ♻️ Centralise attr->update-fn map and use it generically in toggle-token

The attributes->shape-update map was only defined in propagation.cljs.
Move it to application.cljs (where all the update functions live) and
have propagation.cljs reference it via dwta/attributes->shape-update,
eliminating the duplication.

Build a private flattened attr->shape-update map (one entry per
individual keyword) from that same source of truth. toggle-token now
uses it to resolve the correct on-update-shape when explicit attrs are
passed, instead of always taking the default from token-properties.
This fixes the :number token side-effect without any per-type special
casing: any token type whose explicit attrs map to a different update
function than the type default will now dispatch correctly.

Signed-off-by: Andrey Antukh <niwi@niwi.nz>

*  Backport obj/reify changes from develop

*  Add missing error handler on shape proxy on plugins objects

---------

Signed-off-by: Andrey Antukh <niwi@niwi.nz>
Co-authored-by: Alonso Torres <alonso.torres@kaleidos.net>
2026-03-12 12:51:26 +01:00
Alejandro Alonso
c254f88367 Merge pull request #8575 from penpot/niwinz-staging-fetch-exception
🐛 Wrap fetch TypeError into proper ex-info with :unable-to-fetch code
2026-03-12 12:48:48 +01:00
Alejandro Alonso
8f7b12dfd8 Merge pull request #8569 from penpot/niwinz-staging-bugfix-2-not-iseqable-exception
🐛 Fix 'not ISeqable' error when entering float values in layout/opacity inputs
2026-03-12 12:37:35 +01:00
Andrey Antukh
82e3a5fa53 🐛 Fix 'not ISeqable' error when entering float values in layout/opacity inputs
Replace int? with number? in on-change handlers for layout item margins,
min/max sizes, and layer opacity. Using int? caused float values like 8.5
to fall into the design token branch, calling (first 8.5) and crashing.

Signed-off-by: Andrey Antukh <niwi@niwi.nz>
2026-03-12 12:37:22 +01:00
alonso.torres
0e0029bd56 🐛 Fix MCP keep alive messages 2026-03-12 12:34:22 +01:00
Alejandro Alonso
1680be33ef Merge pull request #8568 from penpot/niwinz-staging-bugfix-1-path-get-points
🐛 Fix TypeError when path content is nil in get-points calls
2026-03-12 12:31:58 +01:00
Alejandro Alonso
a079de1305 Merge pull request #8579 from penpot/elenatorro-13619-fix-outer-non-closing-stroke
🐛 Fix stroke closing on outer strokes on paths
2026-03-12 12:24:52 +01:00