;; Generic streamed content chunk — rendered once per yield from the ;; async generator. The :content expression receives different bindings ;; each time, and the _stream_id determines which ~shared:pages/suspense slot it fills. (defcomp (&key (stream-label :as string) (stream-color :as string) (stream-message :as string) (stream-time :as string)) (let ((colors (get stream-colors stream-color))) (div :class (str "rounded-lg border p-5 space-y-3 " (get colors "border") " " (get colors "bg")) (div (~tw :tokens "flex items-center gap-2") (div :class (str "w-3 h-3 rounded-full " (get colors "dot"))) (h2 :class (str "text-lg font-semibold " (get colors "title")) stream-label)) (p :class (get colors "text") stream-message) (p :class (str "text-sm " (get colors "sub")) "Resolved at: " (code :class (str "px-1 rounded " (get colors "code")) stream-time)))))