Add scope-collected/scope-clear-collected!/scope-emitted primitives

Register hashtable-based scope accessors that bypass the CEK special form
dispatch, for use by adapter-html.sx and shell templates.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-24 02:50:23 +00:00
parent 49fd4a51d6
commit ce9c5d3a08
3 changed files with 20 additions and 3 deletions

View File

@@ -32,9 +32,7 @@
(meta :name "csrf-token" :content csrf)
(style :id "sx-css" (raw! (or sx-css "")))
;; CSSX rules from island SSR — must be in <head> so they survive
;; #main-panel morphs during SPA navigation. Inline the flush logic
;; rather than calling ~cssx/flush (which has :affinity :client and
;; gets skipped during SSR rendering).
;; #main-panel morphs during SPA navigation.
(let ((cssx-rules (collected "cssx")))
(clear-collected! "cssx")
(when (not (empty? cssx-rules))