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:
@@ -8,7 +8,7 @@
|
||||
|
||||
(defhandler ref-time (&key)
|
||||
(let ((now (helper "now" "%H:%M:%S")))
|
||||
(span :class "text-stone-800 text-sm"
|
||||
(span (~tw :tokens "text-stone-800 text-sm")
|
||||
"Server time: " (strong now))))
|
||||
|
||||
;; ---------------------------------------------------------------------------
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
(defhandler ref-greet (&key)
|
||||
(let ((name (or (form-data "name") "stranger")))
|
||||
(span :class "text-stone-800 text-sm"
|
||||
(span (~tw :tokens "text-stone-800 text-sm")
|
||||
"Hello, " (strong name) "!")))
|
||||
|
||||
;; ---------------------------------------------------------------------------
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
(defhandler ref-status (&key)
|
||||
(let ((status (or (form-data "status") "unknown")))
|
||||
(span :class "text-stone-700 text-sm"
|
||||
(span (~tw :tokens "text-stone-700 text-sm")
|
||||
"Status: " (strong status) " — updated via PUT")))
|
||||
|
||||
;; ---------------------------------------------------------------------------
|
||||
@@ -51,8 +51,8 @@
|
||||
(defhandler ref-trigger-search (&key)
|
||||
(let ((q (helper "request-arg" "q" "")))
|
||||
(if (empty? q)
|
||||
(span :class "text-stone-400 text-sm" "Start typing to trigger a search.")
|
||||
(span :class "text-stone-800 text-sm"
|
||||
(span (~tw :tokens "text-stone-400 text-sm") "Start typing to trigger a search.")
|
||||
(span (~tw :tokens "text-stone-800 text-sm")
|
||||
"Results for: " (strong q)))))
|
||||
|
||||
;; ---------------------------------------------------------------------------
|
||||
@@ -61,7 +61,7 @@
|
||||
|
||||
(defhandler ref-swap-item (&key)
|
||||
(let ((now (helper "now" "%H:%M:%S")))
|
||||
(div :class "text-sm text-violet-700"
|
||||
(div (~tw :tokens "text-sm text-violet-700")
|
||||
"New item (" now ")")))
|
||||
|
||||
;; ---------------------------------------------------------------------------
|
||||
@@ -71,10 +71,10 @@
|
||||
(defhandler ref-oob (&key)
|
||||
(let ((now (helper "now" "%H:%M:%S")))
|
||||
(<>
|
||||
(span :class "text-emerald-700 text-sm"
|
||||
(span (~tw :tokens "text-emerald-700 text-sm")
|
||||
"Main updated at " now)
|
||||
(div :id "ref-oob-side" :sx-swap-oob "innerHTML"
|
||||
(span :class "text-violet-700 text-sm"
|
||||
(span (~tw :tokens "text-violet-700 text-sm")
|
||||
"OOB updated at " now)))))
|
||||
|
||||
;; ---------------------------------------------------------------------------
|
||||
@@ -87,7 +87,7 @@
|
||||
(div :id "the-header"
|
||||
(h3 "Page header — not selected"))
|
||||
(div :id "the-content"
|
||||
(span :class "text-emerald-700 text-sm"
|
||||
(span (~tw :tokens "text-emerald-700 text-sm")
|
||||
"This fragment was selected from a larger response. Time: " now))
|
||||
(div :id "the-footer"
|
||||
(p "Page footer — not selected")))))
|
||||
@@ -99,7 +99,7 @@
|
||||
(defhandler ref-slow-echo (&key)
|
||||
(sleep 800)
|
||||
(let ((q (helper "request-arg" "q" "")))
|
||||
(span :class "text-stone-800 text-sm"
|
||||
(span (~tw :tokens "text-stone-800 text-sm")
|
||||
"Echo: " (strong q))))
|
||||
|
||||
;; ---------------------------------------------------------------------------
|
||||
@@ -108,7 +108,7 @@
|
||||
|
||||
(defhandler ref-upload-name (&key)
|
||||
(let ((name (or (file-name "file") "(no file)")))
|
||||
(span :class "text-stone-800 text-sm"
|
||||
(span (~tw :tokens "text-stone-800 text-sm")
|
||||
"Received: " (strong name))))
|
||||
|
||||
;; ---------------------------------------------------------------------------
|
||||
@@ -118,8 +118,8 @@
|
||||
(defhandler ref-echo-headers (&key)
|
||||
(let ((headers (helper "request-headers" :prefix "X-")))
|
||||
(if (empty? headers)
|
||||
(span :class "text-stone-400 text-sm" "No custom headers received.")
|
||||
(ul :class "text-sm text-stone-700 space-y-1"
|
||||
(span (~tw :tokens "text-stone-400 text-sm") "No custom headers received.")
|
||||
(ul (~tw :tokens "text-sm text-stone-700 space-y-1")
|
||||
(map (fn (h)
|
||||
(li (strong (first h)) ": " (last h)))
|
||||
headers)))))
|
||||
@@ -131,8 +131,8 @@
|
||||
(defhandler ref-echo-vals (&key)
|
||||
(let ((vals (helper "request-args")))
|
||||
(if (empty? vals)
|
||||
(span :class "text-stone-400 text-sm" "No values received.")
|
||||
(ul :class "text-sm text-stone-700 space-y-1"
|
||||
(span (~tw :tokens "text-stone-400 text-sm") "No values received.")
|
||||
(ul (~tw :tokens "text-sm text-stone-700 space-y-1")
|
||||
(map (fn (v)
|
||||
(li (strong (first v)) ": " (last v)))
|
||||
vals)))))
|
||||
@@ -145,5 +145,5 @@
|
||||
(let ((n (inc-counter "ref-flaky")))
|
||||
(if (!= (mod n 3) 0)
|
||||
(error 503)
|
||||
(span :class "text-emerald-700 text-sm"
|
||||
(span (~tw :tokens "text-emerald-700 text-sm")
|
||||
"Success on attempt " n "!"))))
|
||||
|
||||
Reference in New Issue
Block a user