Add reactive render stepper to home page, fix nil→NIL in platform JS
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 3m13s

Home page stepper: reactive code view with syntax colouring where
tokens highlight as you step through DOM construction. Each token
is a span with signal-driven classes — current step bold+violet,
completed steps dimmed, upcoming normal. CSSX styling via ~cssx/tw
spreads. Lake preserves imperative DOM across reactive re-renders.

Also fixes: bare lowercase 'nil' in platform_js.py eventDetail and
domGetData — should be NIL (the SX sentinel object).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-14 20:40:24 +00:00
parent 07bf5a1142
commit 93e140280b
2 changed files with 5 additions and 5 deletions

View File

@@ -14,7 +14,7 @@
// =========================================================================
var NIL = Object.freeze({ _nil: true, toString: function() { return "nil"; } });
var SX_VERSION = "2026-03-14T18:56:40Z";
var SX_VERSION = "2026-03-14T20:39:57Z";
function isNil(x) { return x === NIL || x === null || x === undefined; }
function isSxTruthy(x) { return x !== false && !isNil(x); }
@@ -5867,7 +5867,7 @@ PRIMITIVES["resource"] = resource;
}
function eventDetail(e) {
return (e && e.detail != null) ? e.detail : nil;
return (e && e.detail != null) ? e.detail : NIL;
}
function domQuery(sel) {
@@ -5912,7 +5912,7 @@ PRIMITIVES["resource"] = resource;
if (el) { if (!el._sxData) el._sxData = {}; el._sxData[key] = val; }
}
function domGetData(el, key) {
return (el && el._sxData) ? (el._sxData[key] != null ? el._sxData[key] : nil) : nil;
return (el && el._sxData) ? (el._sxData[key] != null ? el._sxData[key] : NIL) : NIL;
}
function domInnerHtml(el) {
return (el && el.innerHTML != null) ? el.innerHTML : "";

View File

@@ -1821,7 +1821,7 @@ PLATFORM_DOM_JS = """
}
function eventDetail(e) {
return (e && e.detail != null) ? e.detail : nil;
return (e && e.detail != null) ? e.detail : NIL;
}
function domQuery(sel) {
@@ -1866,7 +1866,7 @@ PLATFORM_DOM_JS = """
if (el) { if (!el._sxData) el._sxData = {}; el._sxData[key] = val; }
}
function domGetData(el, key) {
return (el && el._sxData) ? (el._sxData[key] != null ? el._sxData[key] : nil) : nil;
return (el && el._sxData) ? (el._sxData[key] != null ? el._sxData[key] : NIL) : NIL;
}
function domInnerHtml(el) {
return (el && el.innerHTML != null) ? el.innerHTML : "";