refactor: migrate legacy wire namespace to wrn
This commit is contained in:
@@ -4,8 +4,8 @@ import { brotliCompressSync, constants as zlibConstants } from "node:zlib";
|
||||
*
|
||||
* It owns the HTTP/WebSocket dispatch and the SSR document assembly, but knows
|
||||
* nothing about *how* modules or assets are produced — those come in via
|
||||
* `RuntimeDeps`. Dev wires in dynamic module loading + on-the-fly bundling;
|
||||
* prod wires in a static manifest + pre-built chunks on disk.
|
||||
* `RuntimeDeps`. Dev connects in dynamic module loading + on-the-fly bundling;
|
||||
* prod connects in a static manifest + pre-built chunks on disk.
|
||||
*/
|
||||
|
||||
import {
|
||||
@@ -154,7 +154,7 @@ export interface RuntimeDeps {
|
||||
assets: AssetServer;
|
||||
/** When true, inject the global stylesheet link into every page head. */
|
||||
hasStyles?: boolean;
|
||||
/** When true, inject the Wire UI stylesheet link (`/__wrnexus/ui.css`). */
|
||||
/** When true, inject the WrNexus UI stylesheet link (`/__wrnexus/ui.css`). */
|
||||
hasUi?: boolean;
|
||||
/** Production build combined theme + UI stylesheet. */
|
||||
hasFrameworkStyles?: boolean;
|
||||
@@ -705,10 +705,10 @@ export const HMR_CLIENT_JS = `
|
||||
}
|
||||
|
||||
if (
|
||||
window.wireTheme &&
|
||||
typeof window.wireTheme.bind === "function"
|
||||
window.wrnTheme &&
|
||||
typeof window.wrnTheme.bind === "function"
|
||||
) {
|
||||
window.wireTheme.bind(document);
|
||||
window.wrnTheme.bind(document);
|
||||
}
|
||||
|
||||
window.dispatchEvent(
|
||||
@@ -938,7 +938,7 @@ export function createHandlers(deps: RuntimeDeps): Handlers {
|
||||
|
||||
// Global <head> additions, identical on every page (styles are global).
|
||||
// Theme tokens load first so global.css and component styles can override them.
|
||||
// Order: theme tokens, then Wire UI, then the app stylesheet — so the app's
|
||||
// Order: theme tokens, then WrNexus UI, then the app stylesheet — so the app's
|
||||
// own CSS (loaded last) can override both the tokens and the UI classes.
|
||||
const headParts: string[] = [];
|
||||
if (!deps.theme && deps.hasFrameworkStyles && !deps.stylesIncludeFramework) {
|
||||
|
||||
Reference in New Issue
Block a user