Adapter fixes, orchestration updates, example content + SPA tests
From other session: adapter-html/sx/dom fixes, orchestration improvements, examples-content refactoring, SPA navigation test updates, WASM copies synced. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -66,7 +66,24 @@
|
||||
(= name "marsh")
|
||||
(aser-call name args env)
|
||||
(= name "error-boundary")
|
||||
(aser-call name args env)
|
||||
(let
|
||||
((has-fallback (> (len args) 1)))
|
||||
(let
|
||||
((body-exprs (if has-fallback (rest args) args))
|
||||
(err-str nil))
|
||||
(let
|
||||
((rendered (try-catch (fn () (join "" (map (fn (x) (let ((v (aser x env))) (cond (= (type-of v) "sx-expr") (sx-expr-source v) (nil? v) "" :else (serialize v)))) body-exprs))) (fn (err) (set! err-str (str err)) nil))))
|
||||
(if
|
||||
rendered
|
||||
(make-sx-expr (str "(error-boundary " rendered ")"))
|
||||
(make-sx-expr
|
||||
(str
|
||||
"(div :data-sx-boundary \"true\" "
|
||||
"(div :class \"sx-render-error\" "
|
||||
":style \"color:red;font-size:0.875rem;padding:0.5rem;border:1px solid red;border-radius:0.25rem;margin:0.5rem 0;\" "
|
||||
"\"Render error: "
|
||||
(replace (replace err-str "\"" "'") "\\" "\\\\")
|
||||
"\"))"))))))
|
||||
(contains? HTML_TAGS name)
|
||||
(aser-call name args env)
|
||||
(or (special-form? name) (ho-form? name))
|
||||
|
||||
Reference in New Issue
Block a user