SPA navigation, page component refactors, WASM rebuild

Refactor page components (docs, examples, specs, reference, layouts)
and adapters (adapter-sx, boot-helpers, orchestration) across sx/ and
web/ directories. Add Playwright SPA navigation tests. Rebuild WASM
kernel with updated bytecode. Add OCaml primitives for request handling.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-01 11:00:51 +00:00
parent 9f097026f8
commit 584445a843
38 changed files with 5854 additions and 3695 deletions

View File

@@ -282,9 +282,11 @@
(fn
(t oob (s :as string))
(dispose-islands-in t)
(swap-dom-nodes t oob s)
(sx-hydrate t)
(process-elements t)))
(swap-dom-nodes
t
(if (= s "innerHTML") (children-to-fragment oob) oob)
s)
(post-swap t)))
(let
((select-sel (dom-get-attr el "sx-select"))
(content
@@ -324,20 +326,31 @@
(if
select-sel
(let
((html (select-html-from-doc doc select-sel)))
(with-transition
use-transition
((container (dom-create-element "div" nil)))
(dom-set-inner-html container (dom-body-inner-html doc))
(process-oob-swaps
container
(fn
()
(let
((swap-root (swap-html-string target html swap-style)))
(log-info
(str
"swap-root: "
(if swap-root (dom-tag-name swap-root) "nil")
" target: "
(dom-tag-name target)))
(post-swap (or swap-root target))))))
(t oob (s :as string))
(dispose-islands-in t)
(swap-dom-nodes t oob s)
(post-swap t)))
(hoist-head-elements container)
(let
((html (select-from-container container select-sel)))
(with-transition
use-transition
(fn
()
(let
((swap-root (swap-dom-nodes target html swap-style)))
(log-info
(str
"swap-root: "
(if swap-root (dom-tag-name swap-root) "nil")
" target: "
(dom-tag-name target)))
(post-swap (or swap-root target)))))))
(let
((container (dom-create-element "div" nil)))
(dom-set-inner-html container (dom-body-inner-html doc))