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:
@@ -110,10 +110,47 @@
|
||||
(render-html-lake args env)
|
||||
(= name "marsh")
|
||||
(render-html-marsh args env)
|
||||
(or
|
||||
(= name "portal")
|
||||
(= name "error-boundary")
|
||||
(= name "promise-delayed"))
|
||||
(= name "error-boundary")
|
||||
(let
|
||||
((has-fallback (> (len args) 1)))
|
||||
(let
|
||||
((body-exprs (if has-fallback (rest args) args))
|
||||
(fallback-expr (if has-fallback (first args) nil)))
|
||||
(str
|
||||
"<div data-sx-boundary=\"true\">"
|
||||
(try-catch
|
||||
(fn
|
||||
()
|
||||
(join
|
||||
""
|
||||
(map (fn (x) (render-to-html x env)) body-exprs)))
|
||||
(fn
|
||||
(err)
|
||||
(let
|
||||
((safe-err (replace (replace (str err) "<" "<") ">" ">")))
|
||||
(if
|
||||
(and fallback-expr (not (nil? fallback-expr)))
|
||||
(try-catch
|
||||
(fn
|
||||
()
|
||||
(render-to-html
|
||||
(list
|
||||
(trampoline (eval-expr fallback-expr env))
|
||||
err
|
||||
nil)
|
||||
env))
|
||||
(fn
|
||||
(e2)
|
||||
(str
|
||||
"<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: "
|
||||
safe-err
|
||||
"</div>")))
|
||||
(str
|
||||
"<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: "
|
||||
safe-err
|
||||
"</div>")))))
|
||||
"</div>")))
|
||||
(or (= name "portal") (= name "promise-delayed"))
|
||||
(join "" (map (fn (x) (render-to-html x env)) args))
|
||||
(contains? HTML_TAGS name)
|
||||
(render-html-element name args env)
|
||||
|
||||
Reference in New Issue
Block a user