Issue #3558681: Add configurable transition target option (body or main)

Add a 'Transition target' setting to the SPA mode configuration that allows choosing between swapping the entire page (body) or only the main content area. When set to 'Main content only', hx-target and hx-select attributes are added to restrict HTMX swaps to the element, preserving persistent elements like audio players that live outside .

Also fixes body attribute syncing in spa.js to explicitly target document.body instead of evt.detail.target, which could reference

when using the new main-only swap mode.

Closes #3558681

Merge request reports

Loading