Replace text sentinels %%SEAM:path%% with slot markers <!--seam:path-->.
Also handle attribute sentinels: attr="%%SEAM:path%%" inside tags
becomes a <!--seam:path:attr:attrName--> comment before the tag.
Style sentinels: style="margin-top:%%SEAM:mt%%" inside tags
becomes <!--seam:mt:style:margin-top--> comment before the tag.
Wrap a skeleton HTML fragment in a compact HTML5 document with asset references.
Produces minimal single-line output for production templates.
When dev_mode is true, injects a live reload SSE script before </body>.
When vite is Some, replaces static CSS/JS refs with Vite dev server scripts.