Replace \uXXXX escapes with actual UTF-8 characters in .sx files

SX parser doesn't process \u escapes — they render as literal text.
Use actual UTF-8 characters (→, —, £, ⬡) directly in source.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-13 10:46:53 +00:00
parent 98036b2292
commit 28a6560963
5 changed files with 23 additions and 23 deletions

View File

@@ -62,9 +62,9 @@
(~docs/table
:headers (list "Primitive" "Direction" "Boundary" "When")
:rows (list
(list "spread" "child \u2192 parent" "element boundary" "render time")
(list "collect!" "child \u2192 ancestor" "render tree" "render time")
(list "reactive-spread" "child \u2192 parent" "element boundary" "signal change")))
(list "spread" "child parent" "element boundary" "render time")
(list "collect!" "child ancestor" "render tree" "render time")
(list "reactive-spread" "child parent" "element boundary" "signal change")))
(~docs/subsection :title "Server rendering (HTML adapter)"
(p "On the server, " (code "~cssx/tw") " returns a spread. The HTML renderer "
@@ -105,9 +105,9 @@
"tokens, " (code "reactive-spread") " makes it live.")
(p "But " (code "~cssx/tw") " is just one instance. The same primitives enable:")
(ul :class "list-disc pl-5 space-y-1 text-stone-600"
(li (code "~aria") " \u2014 reactive accessibility attributes driven by UI state")
(li (code "~data-attrs") " \u2014 signal-driven data attributes for coordination")
(li (code "~conditional-attrs") " \u2014 presence/absence of attributes based on state")
(li (code "~aria") " reactive accessibility attributes driven by UI state")
(li (code "~data-attrs") " signal-driven data attributes for coordination")
(li (code "~conditional-attrs") " presence/absence of attributes based on state")
(li "Any component that needs to inject attributes onto its parent")))
;; =====================================================================
@@ -120,7 +120,7 @@
(~docs/code :code (highlight ";; Define once\n(define heading-style (~cssx/tw :tokens \"text-violet-700 text-2xl font-bold\"))\n(define nav-link (~cssx/tw :tokens \"text-stone-500 text-sm\"))\n(define card-base (~cssx/tw :tokens \"bg-stone-50 rounded-lg p-4\"))\n\n;; Use everywhere\n(div card-base\n (h1 heading-style \"Title\")\n (a nav-link :href \"/\" \"Home\"))" "lisp"))
(p "These are semantic names wrapping utility tokens. Change the definition, "
"every use updates. No build step, no CSS-in-JS runtime. Just " (code "define") ".")
(p "Namespacing prevents clashes \u2014 " (code "~app/heading") " vs "
(p "Namespacing prevents clashes " (code "~app/heading") " vs "
(code "~admin/heading") " are different components in different namespaces."))
;; =====================================================================
@@ -131,15 +131,15 @@
(p "React can't do this. In React, attributes live in the parent's JSX. "
"A child component cannot inject attrs onto its parent element. You'd need "
"to lift state up, pass callbacks, use context, or reach for " (code "forwardRef")
" \u2014 all of which couple the child to the parent's rendering logic.")
" all of which couple the child to the parent's rendering logic.")
(p "CSS-in-JS libraries (styled-components, Emotion) create " (em "wrapper elements")
". They don't inject attrs onto an existing element from a child position. "
"And they need a build step, a runtime, a theme provider.")
(p "SX does it with three orthogonal primitives that already existed for other reasons:")
(ul :class "list-disc pl-5 space-y-1 text-stone-600"
(li (strong "spread") " \u2014 child-to-parent attr injection (existed for component composition)")
(li (strong "collect!") " \u2014 render-time accumulation (existed for CSS rule batching)")
(li (strong "reactive-spread") " \u2014 just the obvious combination of spread + effect"))
(li (strong "spread") " child-to-parent attr injection (existed for component composition)")
(li (strong "collect!") " render-time accumulation (existed for CSS rule batching)")
(li (strong "reactive-spread") " just the obvious combination of spread + effect"))
(p "No new concepts. No new runtime. No new API surface."))
;; =====================================================================
@@ -150,15 +150,15 @@
(p "Spread and collect are both instances of the same pattern: "
(strong "child communicates upward through the render tree") ". "
"The general form is " (code "provide") "/" (code "context") "/" (code "emit!")
" \u2014 render-time dynamic scope.")
" render-time dynamic scope.")
(~docs/subsection :title "The unification"
(~docs/table
:headers (list "Current" "General form" "Direction")
:rows (list
(list "collect! / collected" "emit! / emitted" "upward (child \u2192 scope)")
(list "make-spread" "emit! into implicit parent-attrs provider" "upward (child \u2192 parent)")
(list "(nothing yet)" "context" "downward (scope \u2192 child)")))
(list "collect! / collected" "emit! / emitted" "upward (child scope)")
(list "make-spread" "emit! into implicit parent-attrs provider" "upward (child parent)")
(list "(nothing yet)" "context" "downward (scope child)")))
(p (code "provide") " creates a named scope with a value (downward) and an accumulator (upward). "
(code "context") " reads the value. " (code "emit!") " appends to the accumulator. "
(code "emitted") " retrieves accumulated values.")
@@ -170,8 +170,8 @@
(li (code "collect!") " = " (code "emit!") " with deduplication")
(li (code "spread") " = " (code "emit!") " into implicit parent-attrs provider")
(li (code "collected") " = " (code "emitted"))
(li (code "context") " = downward data flow (new capability \u2014 no current equivalent)"))
(p "The reactive-spread we just built would naturally follow \u2014 the effect tracks "
(li (code "context") " = downward data flow (new capability no current equivalent)"))
(p "The reactive-spread we just built would naturally follow the effect tracks "
"signal deps in the " (code "emit!") " call, the provider accumulates, the element applies.")
(p :class "text-stone-500 italic"
"This is the planned next step. The current primitives (spread, collect, reactive-spread) "