diff --git a/.gitattributes b/.gitattributes
index 455116e..807a737 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,5 +1,6 @@
* text=auto
+/.art export-ignore
/.github export-ignore
/tests export-ignore
.editorconfig export-ignore
diff --git a/README.md b/README.md
index adeb38c..da483df 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,8 @@
-# Minicli Framework
+
+
+
+
Minicli Framework
+
+
This repo contains the source code for the Minicli Framework - a great way to extend the core minicli application.
diff --git a/art/minicli.png b/art/minicli.png
new file mode 100644
index 0000000..061201c
Binary files /dev/null and b/art/minicli.png differ
diff --git a/src/Theme/Catalog/DefaultTheme.php b/src/Theme/Catalog/DefaultTheme.php
index fc75227..9eb16d1 100644
--- a/src/Theme/Catalog/DefaultTheme.php
+++ b/src/Theme/Catalog/DefaultTheme.php
@@ -5,69 +5,85 @@
namespace Minicli\Framework\Theme\Catalog;
use Minicli\Framework\Theme\Enums\Background;
+use Minicli\Framework\Theme\Enums\FontWeight;
use Minicli\Framework\Theme\Enums\Foreground;
use Minicli\Framework\Theme\ThemeContract;
-use StringBackedEnum;
+use Minicli\Framework\Theme\ThemeStyle;
final class DefaultTheme implements ThemeContract
{
- public function default(): array
+ public function default(): ThemeStyle
{
- return [
- Foreground::WHITE,
- ];
+ return ThemeStyle::make(Foreground::WHITE);
}
- public function alt(): array
+ public function alt(): ThemeStyle
{
- return [
- Foreground::BLACK,
- Background::WHITE,
- ];
+ return ThemeStyle::make(Foreground::BLACK, Background::WHITE);
}
- public function error(): array
+ public function error(): ThemeStyle
{
- return [
- Foreground::RED,
- ];
+ return ThemeStyle::make(Foreground::RED);
}
- public function errorAlt(): array
+ public function errorAlt(): ThemeStyle
{
- return [
- Foreground::WHITE,
- Background::RED,
- ];
+ return ThemeStyle::make(Foreground::WHITE, Background::RED);
}
- public function success(): array
+ public function warning(): ThemeStyle
{
- return [
- Foreground::GREEN,
- ];
+ return ThemeStyle::make(Foreground::YELLOW);
}
- public function successAlt(): array
+ public function warningAlt(): ThemeStyle
{
- return [
- Foreground::WHITE,
- Background::GREEN,
- ];
+ return ThemeStyle::make(Foreground::WHITE, Background::YELLOW);
}
- public function info(): array
+ public function success(): ThemeStyle
{
- return [
- Foreground::CYAN,
- ];
+ return ThemeStyle::make(Foreground::GREEN);
}
- public function infoAlt(): array
+ public function successAlt(): ThemeStyle
{
- return [
- Foreground::WHITE,
- Background::CYAN,
- ];
+ return ThemeStyle::make(Foreground::WHITE, Background::GREEN);
+ }
+
+ public function info(): ThemeStyle
+ {
+ return ThemeStyle::make(Foreground::CYAN);
+ }
+
+ public function infoAlt(): ThemeStyle
+ {
+ return ThemeStyle::make(Foreground::WHITE, Background::CYAN);
+ }
+
+ public function bold(): ThemeStyle
+ {
+ return ThemeStyle::make(FontWeight::BOLD);
+ }
+
+ public function dim(): ThemeStyle
+ {
+ return ThemeStyle::make(FontWeight::DIM);
+ }
+
+ public function italic(): ThemeStyle
+ {
+ return ThemeStyle::make(FontWeight::ITALIC);
+ }
+
+ public function underline(): ThemeStyle
+ {
+ return ThemeStyle::make(FontWeight::UNDERLINE);
+ }
+
+ public function invert(): ThemeStyle
+ {
+ return ThemeStyle::make(FontWeight::INVERT);
}
}
diff --git a/src/Theme/ThemeContract.php b/src/Theme/ThemeContract.php
index edd707d..56eb443 100644
--- a/src/Theme/ThemeContract.php
+++ b/src/Theme/ThemeContract.php
@@ -4,55 +4,80 @@
namespace Minicli\Framework\Theme;
-use StringBackedEnum;
-
interface ThemeContract
{
/**
* Default style
- * @return array
*/
- public function default(): array;
+ public function default(): ThemeStyle;
/**
* Alternative style for Default
- * @return array
*/
- public function alt(): array;
+ public function alt(): ThemeStyle;
/**
* Error style
- * @return array
*/
- public function error(): array;
+ public function error(): ThemeStyle;
/**
* Alternative style for Error
- * @return array
*/
- public function errorAlt(): array;
+ public function errorAlt(): ThemeStyle;
+
+ /**
+ * Warning style
+ */
+ public function warning(): ThemeStyle;
+
+ /**
+ * Alternative style for Warning
+ */
+ public function warningAlt(): ThemeStyle;
/**
* Success style
- * @return array
*/
- public function success(): array;
+ public function success(): ThemeStyle;
/**
* Alternative style for Success
- * @return array
*/
- public function successAlt(): array;
+ public function successAlt(): ThemeStyle;
/**
* Info style
- * @return array
*/
- public function info(): array;
+ public function info(): ThemeStyle;
/**
* Alternative style for Info
- * @return array
*/
- public function infoAlt(): array;
+ public function infoAlt(): ThemeStyle;
+
+ /**
+ * Bold style
+ */
+ public function bold(): ThemeStyle;
+
+ /**
+ * Dim style
+ */
+ public function dim(): ThemeStyle;
+
+ /**
+ * Italic style
+ */
+ public function italic(): ThemeStyle;
+
+ /**
+ * Underline style
+ */
+ public function underline(): ThemeStyle;
+
+ /**
+ * Invert style
+ */
+ public function invert(): ThemeStyle;
}
diff --git a/src/Theme/ThemeStyle.php b/src/Theme/ThemeStyle.php
new file mode 100644
index 0000000..e5db925
--- /dev/null
+++ b/src/Theme/ThemeStyle.php
@@ -0,0 +1,23 @@
+