sx-tools: WASM kernel updates, TW/CSSX rework, content refresh, new debugging tools

Build tooling: updated OCaml bootstrapper, compile-modules, bundle.sh, sx-build-all.
WASM browser: rebuilt sx_browser.bc.js/wasm, sx-platform-2.js, .sxbc bytecode files.
CSSX/Tailwind: reworked cssx.sx templates and tw-layout, added tw-type support.
Content: refreshed essays, plans, geography, reactive islands, docs, demos, handlers.
New tools: bisect_sxbc.sh, test-spa.js, render-trace.sx, morph playwright spec.
Tests: added test-match.sx, test-examples.sx, updated test-tw.sx and web tests.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-02 11:31:57 +00:00
parent 9ed1100ef6
commit d40a9c6796
178 changed files with 13591 additions and 9110 deletions

View File

@@ -2,63 +2,63 @@
~docs/page
(&key title &rest children)
(div
:class "max-w-4xl mx-auto px-6 pb-8 pt-4"
(div :class "prose prose-stone max-w-none space-y-6" children)))
(~tw :tokens "max-w-4xl mx-auto px-6 pb-8 pt-4")
(div (~tw :tokens "prose prose-stone max-w-none space-y-6") children)))
(defcomp
~docs/section
(&key title id &rest children)
(section
:id id
:class "space-y-4"
(h2 :class "text-2xl font-semibold text-stone-800" title)
(~tw :tokens "space-y-4")
(h2 (~tw :tokens "text-2xl font-semibold text-stone-800") title)
children))
(defcomp
~docs/subsection
(&key title &rest children)
(div
:class "space-y-3"
(h3 :class "text-xl font-semibold text-stone-700" title)
(~tw :tokens "space-y-3")
(h3 (~tw :tokens "text-xl font-semibold text-stone-700") title)
children))
(defcomp
~docs/code
(&key src)
(div
:class "not-prose bg-stone-100 rounded-lg p-5 overflow-x-auto my-6"
(~tw :tokens "not-prose bg-stone-100 rounded-lg p-5 overflow-x-auto my-6")
(pre
:class "text-sm leading-relaxed whitespace-pre-wrap break-words font-mono"
(~tw :tokens "text-sm leading-relaxed whitespace-pre-wrap break-words font-mono")
src)))
(defcomp
~docs/note
(&key &rest children)
(div
:class "border-l-4 border-violet-400 bg-violet-50 p-4 text-stone-700 text-sm"
(~tw :tokens "border-l-4 border-violet-400 bg-violet-50 p-4 text-stone-700 text-sm")
children))
(defcomp
~docs/table
(&key headers rows)
(div
:class "overflow-x-auto rounded border border-stone-200"
(~tw :tokens "overflow-x-auto rounded border border-stone-200")
(table
:class "w-full text-left text-sm"
(~tw :tokens "w-full text-left text-sm")
(thead
(tr
:class "border-b border-stone-200 bg-stone-100"
(~tw :tokens "border-b border-stone-200 bg-stone-100")
(map
(fn (h) (th :class "px-3 py-2 font-medium text-stone-600" h))
(fn (h) (th (~tw :tokens "px-3 py-2 font-medium text-stone-600") h))
headers)))
(tbody
(map
(fn
(row)
(tr
:class "border-b border-stone-100"
(~tw :tokens "border-b border-stone-100")
(map
(fn (cell) (td :class "px-3 py-2 text-stone-700" cell))
(fn (cell) (td (~tw :tokens "px-3 py-2 text-stone-700") cell))
row)))
rows)))))
@@ -66,9 +66,9 @@
~docs/attr-row
(&key attr description exists href)
(tr
:class "border-b border-stone-100"
(~tw :tokens "border-b border-stone-100")
(td
:class "px-3 py-2 font-mono text-sm whitespace-nowrap"
(~tw :tokens "px-3 py-2 font-mono text-sm whitespace-nowrap")
(if
href
(a
@@ -78,30 +78,30 @@
:sx-select "#sx-content"
:sx-swap "outerHTML"
:sx-push-url "true"
:class "text-violet-700 hover:text-violet-900 underline"
(~tw :tokens "text-violet-700 hover:text-violet-900 underline")
attr)
(span :class "text-violet-700" attr)))
(td :class "px-3 py-2 text-stone-700 text-sm" description)
(span (~tw :tokens "text-violet-700") attr)))
(td (~tw :tokens "px-3 py-2 text-stone-700 text-sm") description)
(td
:class "px-3 py-2 text-center"
(~tw :tokens "px-3 py-2 text-center")
(if
exists
(span :class "text-emerald-600 text-sm" "yes")
(span :class "text-stone-400 text-sm italic" "not yet")))))
(span (~tw :tokens "text-emerald-600 text-sm") "yes")
(span (~tw :tokens "text-stone-400 text-sm italic") "not yet")))))
(defcomp
~docs/primitives-table
(&key category primitives)
(div
:class "space-y-2"
(h4 :class "text-lg font-semibold text-stone-700" category)
(~tw :tokens "space-y-2")
(h4 (~tw :tokens "text-lg font-semibold text-stone-700") category)
(div
:class "flex flex-wrap gap-2"
(~tw :tokens "flex flex-wrap gap-2")
(map
(fn
(p)
(span
:class "inline-block px-2 py-1 rounded bg-stone-100 font-mono text-sm text-stone-700"
(~tw :tokens "inline-block px-2 py-1 rounded bg-stone-100 font-mono text-sm text-stone-700")
p))
primitives))))
@@ -109,7 +109,7 @@
~docs/nav
(&key items current)
(nav
:class "flex flex-wrap gap-2 mb-8"
(~tw :tokens "flex flex-wrap gap-2 mb-8")
(map
(fn
(item)