Skip to content

Retend v0.0.37

Latest

Choose a tag to compare

@github-actions github-actions released this 17 Oct 14:00
5a34136

Changelog

This release covers changes since 0.0.36.

Breaking changes

  • Router attachment is now renderer-specific. Router.attachWindowListeners(window) has been removed. Browser apps should import attachRouter from retend-web and call attachRouter(router, window); GPUI apps should import attachRouter from retend-gpui and call attachRouter(router, useWindow()). Both return a cleanup function. The core router now exposes router.sync(path) for adopting a host URL without writing it back to history (3df152d, 4e38450).
  • GPUI navigation no longer imitates the browser. The window option location has been replaced by initialPath, which sets the starting route and does not change afterward. window.host.location, window.host.history, and the host's synthetic history events are gone. Use the router to navigate, and attachRouter to load initialPath and keep route titles in sync with the native window title (4e38450, c9da01d).
  • GPUI resource events use GpuiResourceEvent instead of GpuiImageEvent. Update imports or annotations for image load/error handlers. The new class also covers audio ended and error events (5edb2a1).

GPUI: native controls and media

  • Added a non-visual <audio> element for local audio files and imported assets. It supports reactive src, autoPlay, loop, muted and volume props; play()/pause() methods; and ended/error events. Audio decoding and playback run off the UI thread. Remote streams are not supported (5edb2a1).
  • Added OS-native editing context menus for input and textarea on macOS and Windows, including Cut, Copy, Paste and Select All. macOS also integrates system spelling suggestions and supported Writing Tools. Registering onContextMenu lets an application replace the default menu (f41238d).
  • Added useWindow().showMenu({ position, items }) for native popup menus on macOS and Windows. Menus support labeled actions, disabled items and separators; the promise resolves to the selected action ID or null when dismissed. Linux popup menus are not yet supported (48291dc).
  • Ordinary rendered text can now be selected with the mouse and copied with the platform's keyboard shortcut. Use style.userSelect: 'text' | 'none' to control selection in a subtree. A selection is currently limited to one contiguous rendered text run, not multiple block elements (0839134).

GPUI: windows, input and styling

  • Added useSystem() with reactive OS theme and accentColor Cells, and useWindow().orientation as a reactive portrait/landscape Cell. macOS applications can position the traffic-light controls with system.trafficLightPosition (ef840ce).
  • Added onWheel and GpuiWheelEvent for raw wheel and trackpad input, including deltas, pointer position, modifier keys and available touch phases. Unlike onScroll, this fires without requiring a scroll container; it does not cancel native scrolling (ec54b36).
  • Added cursor and pointerEvents styles for native pointer behavior, plus style.placeholder.color for input and textarea placeholders (00d6b27, f41238d).
  • Root-relative image paths such as /logo.png now resolve against Vite's publicDir in development. Packaged applications include those public assets in their resources (6c916fb).

Router and server rendering

  • Routes containing only path and redirect can now match without a component or children (489841f).
  • Browser navigation now updates the document title when traversing history with the back and forward buttons, not just during direct navigation (dcd4d3f).
  • Separated browser history and title synchronization into retend-web; removed the server virtual DOM's browser-like location and history machinery. Updated Vite static-site generation module loading and route metadata handling (3df152d, c9da01d, 980623e).

DevTools

  • Added an Open component definition action to the inspector. The Retend Vite plugin now records component source locations so DevTools can open the selected component in the editor during development (8e51498).
  • Fixed the DevTools panel disappearing after hot module replacement, and improved component-tree scrolling, panel spacing and inspector actions, including screenshot copying feedback (897d44a, d6e55f8, ab1892c).

Oxlint plugin

  • Added jsx-props-order to the recommended rule set. It orders JSX attributes as ref/key, regular props, class, event handlers and function props, then style. A spread attribute restarts ordering for subsequent attributes (fcf8648).

Scaffolding and documentation

  • GPUI projects generated by retend-start now use attachRouter and include vite/client types. When project docs are requested, the scaffold includes a local GPUI reference for elements, styling, windows and events (4e38450, 980623e).
  • Rebuilt the documentation landing page, added dedicated GPUI reference pages, and revised the existing guides and visual components (a3a6aef, 4b6d743, e64c621).

Releases

  • Added a version-driven GitHub Actions release workflow. When the package version changes on main and AUTO_RELEASE_ENABLED is set, CI verifies the changes, builds five native addon targets, packages and publishes the eight workspace packages and five native packages through npm Trusted Publishing, then creates a GitHub release using the versioned changelog and native artifacts. Publishing can resume after a partial failure without republishing existing npm versions (f10152a, d2451b1).