feat(ui): render application templates as Vue views mounted before wiring

Templates listed in build/applicationViews.js expand to mount hosts, and
mountApplicationViews() renders them before translation and wiring. Markup
tests read the page through a server-side render helper, the i18n scanner
reads view templates, and Vue preserves whitespace so views keep the exact
DOM. No template is converted yet.
This commit is contained in:
Sameh Khamis committed 2026-10-30 17:23:45 -07:00
1 parent b7e7058a5c
commit 9d24945143
32 files changed
+243 -63

No files matched your search

+16 -4
View File
@@ -1,13 +1,25 @@
import { createApp } from 'vue';
import { createPinia } from 'pinia';
let pagePinia = null;
/**
* Create the application's Vue runtime: one Pinia instance shared by every
* view the shell mounts, and the mounts themselves for teardown.
* The page's Pinia instance, shared by the application views and the shell,
* so a view and a shell control read the same stores.
* @returns {import('pinia').Pinia}
*/
export function applicationPinia() {
pagePinia ??= createPinia();
return pagePinia;
}
/**
* Create a Vue runtime: one Pinia instance shared by every view it mounts,
* and the mounts themselves for teardown.
* @param {{pinia?: import('pinia').Pinia}} [options]
* @returns {{pinia: import('pinia').Pinia, mount: Function, destroy: Function}}
*/
export function createUiRuntime() {
const pinia = createPinia();
export function createUiRuntime({ pinia = createPinia() } = {}) {
const apps = new Set();
return {
pinia,