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

@@ -3076,7 +3076,7 @@ def fixups_js(has_html, has_sx, has_dom, has_signals=False, has_deps=False, has_
return "\n".join(lines)
def public_api_js(has_html, has_sx, has_dom, has_engine, has_orch, has_boot, has_parser, adapter_label, has_deps=False, has_router=False, has_signals=False, has_page_helpers=False):
def public_api_js(has_html, has_sx, has_dom, has_engine, has_orch, has_boot, has_parser, adapter_label, has_deps=False, has_router=False, has_signals=False, has_page_helpers=False, has_cek=False):
# Parser: use compiled sxParse from parser.sx, or inline a minimal fallback
if has_parser:
parser = '''
@@ -3272,6 +3272,15 @@ def public_api_js(has_html, has_sx, has_dom, has_engine, has_orch, has_boot, has
api_lines.append(' context: sxContext,')
api_lines.append(' emit: sxEmit,')
api_lines.append(' emitted: sxEmitted,')
if has_cek:
api_lines.append(' cekRun: cekRun,')
api_lines.append(' makeCekState: makeCekState,')
api_lines.append(' makeCekValue: makeCekValue,')
api_lines.append(' cekStep: cekStep,')
api_lines.append(' cekTerminal: cekTerminal_p,')
api_lines.append(' cekValue: cekValue,')
api_lines.append(' makeReactiveResetFrame: makeReactiveResetFrame,')
api_lines.append(' evalExpr: evalExpr,')
api_lines.append(f' _version: "{version}"')
api_lines.append(' };')
api_lines.append('')

View File

@@ -226,7 +226,7 @@ def compile_ref_to_js(
parts.append(CONTINUATIONS_JS)
if has_dom:
parts.append(ASYNC_IO_JS)
parts.append(public_api_js(has_html, has_sx, has_dom, has_engine, has_orch, has_boot, has_parser, adapter_label, has_deps, has_router, has_signals, has_page_helpers))
parts.append(public_api_js(has_html, has_sx, has_dom, has_engine, has_orch, has_boot, has_parser, adapter_label, has_deps, has_router, has_signals, has_page_helpers, has_cek))
parts.append(EPILOGUE)
build_ts = datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ")