Add CEK Machine section under Geography with live island demos

geography/cek.sx: overview page (three registers, deref-as-shift
explanation) + demo page with 5 live islands (counter, computed chain,
reactive attrs, stopwatch effect+cleanup, batch coalescing). Nav entry,
router routes, defpage definitions. CEK exports (cekRun, makeCekState,
makeReactiveResetFrame, evalExpr) added to Sx public API via
platform_js.py.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-14 01:37:16 +00:00
parent 203f9a49a1
commit f96506024e
7 changed files with 246 additions and 86 deletions

View File

@@ -650,6 +650,25 @@
:layout :sx-docs
:content (~layouts/doc :path "/sx/(geography.(marshes))" (~reactive-islands/marshes/reactive-islands-marshes-content)))
;; ---------------------------------------------------------------------------
;; CEK Machine section (under Geography)
;; ---------------------------------------------------------------------------
(defpage cek-index
:path "/geography/cek/"
:auth :public
:layout :sx-docs
:content (~layouts/doc :path "/sx/(geography.(cek))" (~geography/cek/cek-content)))
(defpage cek-page
:path "/geography/cek/<slug>"
:auth :public
:layout :sx-docs
:content (~layouts/doc :path (str "/sx/(geography.(cek." slug "))")
(case slug
"demo" (~geography/cek/cek-demo-content)
:else (~geography/cek/cek-content))))
;; ---------------------------------------------------------------------------
;; Bootstrapped page helpers demo
;; ---------------------------------------------------------------------------

View File

@@ -267,6 +267,8 @@ _REDIRECT_PATTERNS = [
lambda m: f"/sx/(geography.(reactive.{m.group(1)}))"),
(re.compile(r"^/geography/isomorphism/(.+?)/?$"),
lambda m: f"/sx/(geography.(isomorphism.{m.group(1)}))"),
(re.compile(r"^/geography/cek/(.+?)/?$"),
lambda m: f"/sx/(geography.(cek.{m.group(1)}))"),
(re.compile(r"^/geography/spreads/?$"),
"/sx/(geography.(spreads))"),
(re.compile(r"^/geography/marshes/?$"),
@@ -290,6 +292,7 @@ _REDIRECT_PATTERNS = [
(re.compile(r"^/geography/hypermedia/?$"), "/sx/(geography.(hypermedia))"),
(re.compile(r"^/geography/reactive/?$"), "/sx/(geography.(reactive))"),
(re.compile(r"^/geography/isomorphism/?$"), "/sx/(geography.(isomorphism))"),
(re.compile(r"^/geography/cek/?$"), "/sx/(geography.(cek))"),
(re.compile(r"^/geography/?$"), "/sx/(geography)"),
(re.compile(r"^/applications/cssx/?$"), "/sx/(applications.(cssx))"),
(re.compile(r"^/applications/protocols/?$"), "/sx/(applications.(protocol))"),