From 9a550c1a7f8f2d5e4a48e1b435c488569ffa94fc Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Mon, 6 Jan 2025 10:22:57 -0700 Subject: [PATCH] start design file for dumping ideas --- design.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 design.md diff --git a/design.md b/design.md new file mode 100644 index 0000000..72b7c84 --- /dev/null +++ b/design.md @@ -0,0 +1,30 @@ +# design + +A dump for fleshing out in-progress/future design ideas. + +## tables + +a table can like the others build off of bbansi to support some basic ansi rendering. +to do this effectively I may need to pull in unicode and unicode_db. + +but the general idea would probably be something like: + +```nim +var table = newHwylTable(style = Ansi) +table.addColumn(name = "movie") +table.addColumn(name = "box office") +table.addSep() +table.addRow "Avatar", "2,923,706,026" +table.addRow "Avengers: Endgame", "2,797,501,328" +echo table +``` +resulting in: + +```txt +| movie | box office | +|-------------------|---------------| +| Avatar | 2,923,706,026 | +| Avengers: Endgame | 2,797,501,328 | +``` + +A good table API could be reused by `hwylcli` using a borderless table for flags and commands