;; Streaming & Suspense demo — Phase 6
;;
;; This page uses :stream true to enable chunked transfer encoding.
;; The browser receives the HTML shell immediately with loading skeletons,
;; then content fills in as each IO resolves at staggered intervals.
;;
;; The :data expression is an async generator that yields three chunks
;; at 1s, 3s, and 5s. Each chunk resolves a different ~shared:pages/suspense slot.
;; Color map for stream chunk styling (all string keys for get compatibility)
(define stream-colors
  (dict
    "emerald"
    (dict
      "border"
      "border-emerald-200"
      "bg"
      "bg-emerald-50"
      "dot"
      "bg-emerald-400"
      "title"
      "text-emerald-900"
      "text"
      "text-emerald-800"
      "sub"
      "text-emerald-700"
      "code"
      "bg-emerald-100")
    "amber"
    (dict
      "border"
      "border-amber-200"
      "bg"
      "bg-amber-50"
      "dot"
      "bg-amber-400"
      "title"
      "text-amber-900"
      "text"
      "text-amber-800"
      "sub"
      "text-amber-700"
      "code"
      "bg-amber-100")
    "violet"
    (dict
      "border"
      "border-violet-200"
      "bg"
      "bg-violet-50"
      "dot"
      "bg-violet-400"
      "title"
      "text-violet-900"
      "text"
      "text-violet-800"
      "sub"
      "text-violet-700"
      "code"
      "bg-violet-100")))
