* ✨ Batch multiple thumbnail deletions into a single RPC call
Replace the old per-object immediate thumbnail deletion with a
debounced batched approach. The frontend queues object-ids in state
and waits 200ms before sending a single RPC request with up to 200
object-ids. The backend deletes all matching thumbnails in one SQL
statement with a single RETURNING clause, then touches the affected
media objects.
This reduces RPC overhead when rapidly clearing thumbnails (e.g.
navigating pages) and makes deletions more efficient.
Signed-off-by: Andrey Antukh <niwi@niwi.nz>
* 📎 Fix missing issues
---------
Signed-off-by: Andrey Antukh <niwi@niwi.nz>
The get-frame-ids function could enter infinite recursion when:
1. There's a circular reference in the frame hierarchy
2. A shape's frame-id points to itself (corrupt data)
The fix uses the cached version (get-frame-ids-cached) in recursive calls
and adds a guard to prevent self-referencing.
Cache in-progress frame traversals before following parent frame links so thumbnail updates stop recursing forever on cyclic or transiently inconsistent shape graphs.
Add a regression test that covers cyclic frame-id chains and keeps the expected frame/component extraction behavior intact.
Signed-off-by: Andrey Antukh <niwi@niwi.nz>
* ✨ Use reduce-kv for creating tokens tree
Instead of reduce
* ⚡ Avoid double iteration on spliting text shapes from shapes
On processing color changes
* ♻️ Move the undo transaction out of transform-fill
The undo transaction is a high level construct and it should
be called from the first level events. Low level impl should
not handle transactions at all
* ⚡ Use low-level primitives for update-fill token event
* 📎 Add performance logging for style dictionary resolution
* 📎 Replace inline code with a helper
* ♻️ Refactor how fill and stroke color is applied on tokens
* 💄 Fix call convention for component-item-thumbnail component
* ✨ Clean component thumbnail when frame change received
* 📎 Fix tests
---------
Co-authored-by: Eva Marco <evamarcod@gmail.com>
Mainly always resolve the public uri at frontend, making the
PENPOT_PUBLIC_URI less necessary to be changed. This improves
the experience of on-premise configuration.
Also removes unnecesary calls for thumbnail generation
on components.