New sxc/ content tree with 120 page files across docs, examples, home, and reference demos. sx/sx/testing/ adds page-runner.sx (317L) and index-runner.sx (394L) — SX-native test runner pages for browser-based evaluation. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
21 lines
1.1 KiB
Plaintext
21 lines
1.1 KiB
Plaintext
(defcomp
|
|
()
|
|
(div
|
|
(~tw :tokens "space-y-3")
|
|
(div
|
|
:sx-sse "/sx/(geography.(hypermedia.(reference.(api.sse-time))))"
|
|
:sx-sse-swap "time"
|
|
:sx-swap "innerHTML"
|
|
:sx-on:sx:sseError "document.getElementById('ref-evt-sseerr-status').textContent = 'Disconnected'; document.getElementById('ref-evt-sseerr-status').className = 'inline-block px-2 py-0.5 rounded text-xs bg-red-100 text-red-700'"
|
|
:sx-on:sx:sseOpen "document.getElementById('ref-evt-sseerr-status').textContent = 'Connected'; document.getElementById('ref-evt-sseerr-status').className = 'inline-block px-2 py-0.5 rounded text-xs bg-emerald-100 text-emerald-700'"
|
|
(div
|
|
(~tw :tokens "flex items-center gap-3")
|
|
(span
|
|
:id "ref-evt-sseerr-status"
|
|
(~tw :tokens "inline-block px-2 py-0.5 rounded text-xs bg-amber-100 text-amber-700")
|
|
"Connecting...")
|
|
(span (~tw :tokens "text-sm text-stone-500") "SSE stream")))
|
|
(p
|
|
(~tw :tokens "text-xs text-stone-400")
|
|
"If the SSE connection drops, the badge turns red via sx:sseError.")))
|