(defcomp ()
  (~docs/page :title "Server Rendering"
    (~docs/section :title "Python API" :id "python"
      (p (~tw :tokens "text-stone-600")
        "The server-side sx library provides several entry points for rendering:")
      (~docs/code :src (highlight "from shared.sx.helpers import sx_page, sx_response, sx_call\nfrom shared.sx.parser import SxExpr\n\n# Build a component call from Python kwargs\nsx_call(\"card\", title=\"Hello\", subtitle=\"World\")\n\n# Return an sx wire-format response\nreturn sx_response(sx_call(\"card\", title=\"Hello\"))\n\n# Return a full HTML page shell with sx boot\nreturn sx_page(ctx, page_sx)" "python")))
    (~docs/section :title "sx_call" :id "sx-call"
      (p (~tw :tokens "text-stone-600")
        "sx_call converts Python kwargs to an s-expression component call. Snake_case becomes kebab-case. SxExpr values are inlined without quoting. None becomes nil. Bools become true/false."))
    (~docs/section :title "sx_response" :id "sx-response"
      (p (~tw :tokens "text-stone-600")
        "sx_response returns a Quart Response with content type text/sx. It prepends missing component definitions, scans for CSS classes, and sets SX-Css-Hash and SX-Css-Add headers."))
    (~docs/section :title "sx_page" :id "sx-page"
      (p (~tw :tokens "text-stone-600")
        "sx_page returns a minimal HTML document that boots the page from sx source. The browser loads component definitions and page sx from inline <script> tags, then sx.js renders everything client-side. CSS rules are pre-scanned and injected."))))
