v0.4.0: Theme engine — semantic colors, presets, dark/light #5

Merged
amr merged 5 commits from feature/v0.4.0-theme-engine into main 2026-05-11 22:02:45 -04:00
3 changed files with 3 additions and 2 deletions
Showing only changes of commit 2d3227aaf1 - Show all commits

View File

@@ -2,7 +2,7 @@
(asdf:defsystem :cl-tui
:description "Reusable Common Lisp Terminal UI Framework"
:author "Amr Gharbeia"
:version "0.3.0"
:version "0.4.0"
:license "TBD"
:depends-on (:fiveam)
:components

View File

@@ -48,7 +48,7 @@
(test load-preset-unknown-warns
"Unknown preset warns but doesn't error"
(let ((th (make-theme)))
(load-preset th :nonexistent)
(signals warning (load-preset th :nonexistent))
(is (null (theme-color th :primary)))))
(test preset-switch-mode

View File

@@ -22,6 +22,7 @@
(defmacro define-preset (name &key dark light)
"Define a theme preset with DARK and LIGHT variants.
NAME should be a keyword (e.g., :default, :nord)."
(check-type name keyword)
`(setf (gethash ,name *presets*) '(:dark ,dark :light ,light)))
(defun load-preset (theme preset-name)