feat: release design system engine, studio and component contracts

This commit is contained in:
Clintchiz committed 2026-10-19 13:09:03 +05:30
1 parent ff1065fb27
commit 3943b946d6
693 files changed
+175546 -3894

No files matched your search

+8 -3
View File
@@ -73,9 +73,13 @@ function stripControllerSections(source: string): string {
const CONTROLLER_LOADER = String.raw`
var componentControllerSelector = "[data-wrn-anchored],[data-wrn-dialog],[data-wrn-roving],[data-wrn-scrollspy],[data-wrn-splitter],[data-wrn-navbar],[data-wrn-preferences],[data-wrn-select],[data-wrn-pin-input]";
var componentControllerPromise = null;
var componentControllerUrl = (document.currentScript && document.currentScript.src)
? new URL("./controllers.js", document.currentScript.src).href
: "/__wrnexus/controllers.js";
var reactiveScript = document.currentScript || document.querySelector('script[src*="/__wrnexus/reactive.js"]');
var componentControllerUrl = "/__wrnexus/controllers.js";
if (reactiveScript && reactiveScript.src) {
var controllerUrl = new URL("./controllers.js", reactiveScript.src);
controllerUrl.search = new URL(reactiveScript.src).search;
componentControllerUrl = controllerUrl.href;
}
function needsComponentControllers(root) {
var host = root || document;
return !!((host.matches && host.matches(componentControllerSelector)) ||
@@ -166,6 +170,7 @@ ${sections}
setupRovingFocus();
setupScrollspy();
setupSplitters();
startDocumentWatch();
window.__wrnexusComponentControllers = { hydrate: hydrate, reposition: repositionAnchored };
hydrate(document);
})();
+7 -1
View File
@@ -285,6 +285,11 @@ export const NAV_RUNTIME = String.raw`
return loaded;
}
// Track the original document and scripts explicitly scheduled by navigation.
// Imported page script nodes are inert; seeing them in the swapped DOM does
// not mean their code has run.
var loadedNavigationScripts = loadedScriptPaths();
function runtimeIds(root) {
var ids = {};
if (!root || !root.querySelectorAll) return ids;
@@ -330,7 +335,7 @@ export const NAV_RUNTIME = String.raw`
* currently loaded.
*/
function ensureScripts(doc) {
var loaded = loadedScriptPaths();
var loaded = loadedNavigationScripts;
doc
.querySelectorAll("script[src]")
@@ -683,6 +688,7 @@ export const NAV_RUNTIME = String.raw`
return fetch(url, {
headers: {
"x-wrnexus-nav": "1",
"x-wrnexus-behaviors": "registry-v2",
...(isPrefetch ? { "x-wrnexus-prefetch": "1" } : {}),
accept: "text/html",
},
File diff suppressed because it is too large. Load diff