perf(csr): load component controllers on demand

This commit is contained in:
2026-08-09 14:10:15 +05:30
parent 324928cfca
commit 1660044ed2
8 changed files with 180 additions and 11 deletions
+9
View File
@@ -2864,6 +2864,7 @@ export const REACTIVE_RUNTIME = String.raw`
* cleared, so repositioning is idempotent -- re-running it on a panel that
* is already on screen changes nothing and cannot drift.
*/
/*__WRNEXUS_CONTROLLERS_PRIMARY_START__*/
var ANCHORED_SELECTOR = "[data-wrn-anchored]";
var ANCHOR_MARGIN = 8;
var anchoredScheduled = false;
@@ -3480,6 +3481,8 @@ export const REACTIVE_RUNTIME = String.raw`
document.addEventListener("pointercancel", endDrag);
}
/*__WRNEXUS_CONTROLLERS_PRIMARY_END__*/
function hydrateScopes(root) {
var host = root || document;
@@ -3510,6 +3513,7 @@ export const REACTIVE_RUNTIME = String.raw`
/*__WRNEXUS_DEV_END__*/
}
/*__WRNEXUS_CONTROLLERS_UI_START__*/
var navbarOutsideClickBound = false;
var preferenceOutsideClickBound = false;
@@ -4028,6 +4032,8 @@ export const REACTIVE_RUNTIME = String.raw`
}
}
/*__WRNEXUS_CONTROLLERS_UI_END__*/
function invokeComponentOutput(root, name, payload) {
if (!root || !name) return undefined;
var registry = root.__wrnexusOutputHandlers;
@@ -4135,6 +4141,7 @@ export const REACTIVE_RUNTIME = String.raw`
}
}
/*__WRNEXUS_CONTROLLERS_PIN_START__*/
function setupPinInputController(root) {
if (!root || root.__wrnexusPinInputController) return;
var cells = Array.prototype.slice.call(root.querySelectorAll("[data-pin-cell]"));
@@ -4310,6 +4317,8 @@ export const REACTIVE_RUNTIME = String.raw`
inputs.forEach(setupPinInputController);
}
/*__WRNEXUS_CONTROLLERS_PIN_END__*/
function parseScopeDecl(decl) {
var initial = {};
splitTopLevel(decl, ",").forEach(function (part) {