v0.4.0: Theme engine — semantic colors, presets, dark/light variants
- Theme class with role→hex hash table, mode (dark/light) - theme-color reader/writer (gethash based) - define-preset macro with dark and light variants - load-preset function with keyword lookup - 2 built-in presets: default (gold) and nord - 30+ semantic roles per preset (primary, accent, error, syntax-*, etc.) - 9 theme tests: create, set/get, unknown, dark/light presets, nord, unknown-warn, switch-mode - 57 total component tests, 100% GREEN
This commit is contained in:
28
demo.lisp
Normal file
28
demo.lisp
Normal file
@@ -0,0 +1,28 @@
|
||||
;; demo.lisp — minimal cl-tui demo
|
||||
(load "/root/quicklisp/setup.lisp")
|
||||
(ql:quickload :fiveam :silent t)
|
||||
(load "backend/package.lisp")
|
||||
(load "backend/classes.lisp")
|
||||
(load "backend/simple.lisp")
|
||||
(load "backend/modern.lisp")
|
||||
(load "layout/layout.lisp")
|
||||
(load "src/components/package.lisp")
|
||||
(load "src/components/dirty.lisp")
|
||||
(load "src/components/box.lisp")
|
||||
(load "src/components/text.lisp")
|
||||
(load "src/components/render.lisp")
|
||||
(in-package :cl-tui.box)
|
||||
|
||||
;; Demo 1: Simple backend (ASCII)
|
||||
(let* ((b (make-simple-backend))
|
||||
(bx (make-box :border-style :rounded :title " Hello World " :width 30 :height 5)))
|
||||
(compute-layout (box-layout-node bx) 30 5)
|
||||
(render bx b))
|
||||
|
||||
;; Demo 2: Box with text inside
|
||||
(let* ((b (make-simple-backend))
|
||||
(tx (make-text "This is cl-tui in action!" :width 28 :height 1)))
|
||||
(setf (layout-node-direction (text-layout-node tx)) :column)
|
||||
(compute-layout (text-layout-node tx) 28 1)
|
||||
(render tx b)
|
||||
(format t "~%~%"))
|
||||
Reference in New Issue
Block a user