Next release
So far this release lets shapes decide whether they can flip, gates action execution on action predicates across menus and shortcuts, improves crop mode, and runs agent starter kit actions through tool calls. It also includes bug fixes across media asset handling, frame hit testing, text shape bounds, cursor chat, and the comment composer.
API changes
- 💥 Add
ShapeUtil.canFlip(shape), which decides whether the flip menu items and shift+H / shift+V act on a single selected shape. It defaults tofalse, so a lone custom shape no longer gets the flip menu items or shortcuts. If your shape changes when flipped (for example it handles negative scale inonResize), addoverride canFlip() { return true }to its util. Multi-shape flips are unchanged. (#11041) - 💥 Move the Cmd+G and Cmd+Alt+G shortcuts from the
groupandframe-selectionactions to newtoggle-groupandtoggle-frameactions, which pickgrouporungroup, andframe-selectionorremove-frame, from the selection.groupandframe-selectionno longer have akbd, so menus no longer show a shortcut next to them. To rebind or disable these shortcuts, overrideactions['toggle-group']oractions['toggle-frame']instead, for exampleactions['toggle-group'].kbd = 'cmd+k,ctrl+k'ordelete actions['toggle-group']; settingkbdongrouporframe-selectionnow registers a separate shortcut that only groups or frames. (#11043) - 💥 Remove unused
help-menu.discord,help-menu.github, andhelp-menu.twitterkeys fromTLUiTranslationKey. (#11258) - Actions don't run when
isAvailableorisEnabledreturns false, or when the editor is readonly and the action isn'treadonlyOk, whether they're triggered from a menu, a keyboard shortcut or anonSelectcall on an action fromuseActions(). The copy, cut and paste shortcuts still come from native clipboard events and aren't gated. If your app calls a custom action directly in readonly mode, setreadonlyOk: trueon it. An override that replaces a built-in'sonSelect, in place or by spreading it, keeps the built-in'sisEnabled, so the action no longer runs from a shortcut oruseActions()when that returns false; overrideisEnabledtoo if youronSelecthandles that case. (#11043)
Improvements
- Keyboard shortcuts no longer do things the menus don't allow: Shift+H and Shift+V no longer flip a lone text, Shift+F no longer flattens a lone image, Cmd+A and Cmd+P do nothing on an empty page, and Cmd+G no longer groups an arrow away from a shape it's bound to. (#11043)
- Add Cmd+Alt+Shift+G as an explicit Remove frame shortcut. Cmd+G and Cmd+Alt+G continue to toggle grouping and framing when the selection allows the corresponding action. (#11043)
- Cursor chat opens with
/in any tool, and its menu item shows in any tool. (#11043) - Exit crop mode when clicking any shape other than the one being cropped, instead of moving the crop to the clicked image. (#10832)
- Run agent starter kit actions through tool calls rather than plain JSON text output, with streaming partial updates and follow-up turns, and let actions provide their own results via
AgentActionUtil.getResult. (#11147) - Add OpenRouter support to the agent and branching-chat starter kits via
OPENROUTER_API_KEY. (#11103)
Bug fixes
- Fix a crash when dropping an audio-only video file (for example
.webm) or a file with no size on the canvas. (#11220) - Fix replacing an image or video when the upload fails: the shape now keeps its previous media and an error toast shows. (#11220)
- Fix clicks in the empty space above a frame selecting the frame when zoomed out. (#11253)
- Fix cursor chat closing immediately when opened from the context menu. (#11054)
- Fix the comment composer's text jumping up when a comment wraps onto a second line. (#11255)
- Fix the selection box of a text shape shrinking when an empty heading is created. (#11219)
Next
v5.6.0