From a0e39f0014f63ee1ae58a4372a9cd12216380448 Mon Sep 17 00:00:00 2001 From: giles Date: Fri, 6 Mar 2026 14:30:18 +0000 Subject: [PATCH] Fix bundle analyzer source display: override prose styling + add syntax highlighting - Add not-prose class to escape Tailwind typography dark pre/code backgrounds - Use (highlight source "lisp") for syntax-highlighted component source - Add missing bg-blue-500 bg-amber-500 to @css annotation Co-Authored-By: Claude Opus 4.6 --- sx/sx/analyzer.sx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sx/sx/analyzer.sx b/sx/sx/analyzer.sx index cd19b3f..70c9f59 100644 --- a/sx/sx/analyzer.sx +++ b/sx/sx/analyzer.sx @@ -1,7 +1,7 @@ ;; Bundle analyzer — live demonstration of dependency analysis + IO detection. ;; Shows per-page component bundles vs total, visualizing payload savings. ;; Drill down into each bundle to see component tree; expand to see SX source. -;; @css bg-green-100 text-green-800 bg-violet-600 bg-stone-200 text-violet-600 text-stone-600 text-green-600 rounded-full h-2.5 grid-cols-3 bg-blue-100 text-blue-800 bg-amber-100 text-amber-800 grid-cols-4 marker:text-stone-400 bg-blue-50 bg-amber-50 text-blue-700 text-amber-700 border-blue-200 border-amber-200 +;; @css bg-green-100 text-green-800 bg-violet-600 bg-stone-200 text-violet-600 text-stone-600 text-green-600 rounded-full h-2.5 grid-cols-3 bg-blue-100 text-blue-800 bg-amber-100 text-amber-800 grid-cols-4 marker:text-stone-400 bg-blue-50 bg-amber-50 text-blue-700 text-amber-700 border-blue-200 border-amber-200 bg-blue-500 bg-amber-500 (defcomp ~bundle-analyzer-content (&key pages total-components total-macros pure-count io-count) @@ -115,6 +115,6 @@ (str (len deps) " deps")))))) ;; SX source (shown when component expanded) - (div :class "border-t border-stone-200 p-3 bg-white rounded-b" - (pre :class "text-xs font-mono text-stone-900 whitespace-pre-wrap overflow-x-auto leading-relaxed" - source)))) + (div :class "not-prose border-t border-stone-200 p-3 bg-stone-100 rounded-b" + (pre :class "text-xs leading-relaxed whitespace-pre-wrap overflow-x-auto" + (code (highlight source "lisp"))))))