From 93e140280be5621e243717afbd5973a02dbc4d6d Mon Sep 17 00:00:00 2001 From: giles Date: Sat, 14 Mar 2026 20:40:24 +0000 Subject: [PATCH] =?UTF-8?q?Add=20reactive=20render=20stepper=20to=20home?= =?UTF-8?q?=20page,=20fix=20nil=E2=86=92NIL=20in=20platform=20JS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- shared/static/scripts/sx-browser.js | 6 +++--- shared/sx/ref/platform_js.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/shared/static/scripts/sx-browser.js b/shared/static/scripts/sx-browser.js index c2029ad..c04da09 100644 --- a/shared/static/scripts/sx-browser.js +++ b/shared/static/scripts/sx-browser.js @@ -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 : ""; diff --git a/shared/sx/ref/platform_js.py b/shared/sx/ref/platform_js.py index 92c8434..72ecc4c 100644 --- a/shared/sx/ref/platform_js.py +++ b/shared/sx/ref/platform_js.py @@ -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 : "";