refactor(cli): 🔨 rename colors to stylize
This commit is contained in:
parent
a9909eb9db
commit
12173f39f1
18
.github/img/Artboard 1.svg
vendored
18
.github/img/Artboard 1.svg
vendored
@ -1,18 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 142 117.51953">
|
||||
<style>
|
||||
.a { fill: #000000; }
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.a { fill: #ffffff; }
|
||||
}
|
||||
</style>
|
||||
<defs>
|
||||
<linearGradient id="a" x1="6.15847" y1="16.11455" x2="135.84585" y2="16.11455"
|
||||
gradientTransform="matrix(1, 0, 0, -1, 0, 120)" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0" stop-color="aqua" />
|
||||
<stop offset="0.51117" stop-color="#e1e1e1" />
|
||||
<stop offset="1" stop-color="#ff65ff" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<path class="a" d="M4.91962,1.516H0V0H20.42877V61.6416h4.6695v1.51648H.3335V61.6416H4.91962ZM32.68567,58.60962q-5.33725-5.3865-5.33649-15.45264,0-10.06072,5.71161-15.49371,5.71014-5.432,16.051-5.432,10.33767,0,15.42578,5.01056,5.08492,5.01123,5.08642,15.28467Q69.624,63.999,48.44489,64,38.02069,64,32.68567,58.60962ZM43.35858,39.83124v6.56811q0,9.18109.54187,11.03144a18.9376,18.9376,0,0,0,1.12549,3.032,3.54885,3.54885,0,0,0,3.58575,2.02167q3.252,0,4.25214-3.79071.751-2.69322.75079-12.12592V39.41034a57.79392,57.79392,0,0,0-.87579-11.916q-.87543-3.74541-4.04382-3.74713a4.16109,4.16109,0,0,0-2.96,1.05243,6.48716,6.48716,0,0,0-1.62616,3.495A64.69815,64.69815,0,0,0,43.35858,39.83124Zm34.604,18.77838q-5.3379-5.3865-5.33741-15.45264,0-10.06072,5.71161-15.49371,5.71161-5.432,16.051-5.432,10.3384,0,15.42669,5.01056,5.08347,5.01123,5.08539,15.28473Q114.8999,63.999,93.721,64,83.298,64,77.96259,58.60962ZM88.6355,39.83124v6.56811q0,9.18109.541,11.03144a18.93249,18.93249,0,0,0,1.12641,3.032,3.54714,3.54714,0,0,0,3.58477,2.02167q3.25278,0,4.25269-3.79071.75165-2.69322.75122-12.12592h.00006V39.41034a57.8197,57.8197,0,0,0-.87634-11.916q-.87534-3.74541-4.04425-3.74713a4.16011,4.16011,0,0,0-2.95954,1.05243,6.48463,6.48463,0,0,0-1.62567,3.495A64.70932,64.70932,0,0,0,88.6355,39.83124Zm48.695,21.81036V0H116.90173V1.516h4.91962V61.6416h-4.58618v1.51648H142V61.6416ZM0,80.25H142V78H0Z" />
|
||||
<path d="M12.70731,105.19824a5.33389,5.33389,0,0,0,0,4.88379,4.53313,4.53313,0,0,0,1.60938,1.70215,4.301,4.301,0,0,0,2.3125.62891,5.082,5.082,0,0,0,2.73828-.75782,4.93972,4.93972,0,0,0,1.8501-2.01661l4.51367,3.293a9.63526,9.63526,0,0,1-3.73682,3.33008,11.477,11.477,0,0,1-5.40185,1.25781,10.79016,10.79016,0,0,1-5.32813-1.31347,9.70309,9.70309,0,0,1,0-17.13085,10.79028,10.79028,0,0,1,5.32813-1.31348,11.477,11.477,0,0,1,5.40185,1.25781,9.643,9.643,0,0,1,3.73682,3.33008l-4.51367,3.293a4.772,4.772,0,0,0-1.8501-2.03516,5.18151,5.18151,0,0,0-2.73828-.74022,4.30948,4.30948,0,0,0-2.3125.62889A4.54765,4.54765,0,0,0,12.70731,105.19824Zm34.021-2.58984a10.25772,10.25772,0,0,1,0,10.0459,9.75853,9.75853,0,0,1-8.602,4.86522,9.95908,9.95908,0,0,1-5.10645-1.31347,9.72448,9.72448,0,0,1-4.88379-8.60253,9.61964,9.61964,0,0,1,1.31348-4.99512,10.04921,10.04921,0,0,1,17.27881,0Zm-4.53223,5.03222a5.765,5.765,0,0,0-.51806-2.498,4.22247,4.22247,0,0,0-1.44288-1.71973,3.939,3.939,0,0,0-4.27343,0,4.1569,4.1569,0,0,0-1.46143,1.71973,6.27925,6.27925,0,0,0,0,4.99511,4.14761,4.14761,0,0,0,1.46143,1.72071,3.94421,3.94421,0,0,0,4.27343,0,4.21275,4.21275,0,0,0,1.44288-1.72071A5.75756,5.75756,0,0,0,42.19608,107.64062Zm23.82758,4.84668a3.50048,3.50048,0,0,1-2.479-.74023,3.088,3.088,0,0,1-.77685-2.331V90.25h-12.58v4.625h6.58594v15.1709a7.25087,7.25087,0,0,0,2.03515,5.5869q2.03394,1.88673,5.99366,1.88672a12.54886,12.54886,0,0,0,2.55316-.27734,8.523,8.523,0,0,0,1.92383-.57422v-4.84668a9.47329,9.47329,0,0,1-1.68311.51855A8.203,8.203,0,0,1,66.02366,112.4873Zm25.104-9.8789a10.25767,10.25767,0,0,1,0,10.0459,9.75855,9.75855,0,0,1-8.60206,4.86522,9.959,9.959,0,0,1-5.10643-1.31347,9.72441,9.72441,0,0,1-4.88379-8.60253,9.61972,9.61972,0,0,1,1.31347-4.99512,10.04922,10.04922,0,0,1,17.27881,0Zm-4.53223,5.03222a5.76513,5.76513,0,0,0-.51806-2.498,4.22237,4.22237,0,0,0-1.44287-1.71973,3.939,3.939,0,0,0-4.27344,0,4.157,4.157,0,0,0-1.46143,1.71973,6.27941,6.27941,0,0,0,0,4.99511,4.14761,4.14761,0,0,0,1.46143,1.72071,3.94423,3.94423,0,0,0,4.27344,0,4.21273,4.21273,0,0,0,1.44287-1.72071A5.75771,5.75771,0,0,0,86.59543,107.64062Zm25.45556-9.8789a5.61307,5.61307,0,0,0-3.57031,1.23926,8.98064,8.98064,0,0,0-2.6084,3.86621V98.05762H95.73411v4.625h4.144v9.84179h-4.144v4.625H110.238v-4.625h-4.36572v-6.95605a5.66062,5.66062,0,0,1,2.18261-1.86816,6.45181,6.45181,0,0,1,2.92334-.68458,11.65585,11.65585,0,0,1,1.94239.166,6.46025,6.46025,0,0,1,1.68359.5V98.31641a5.955,5.955,0,0,0-1.20263-.44435A6.56028,6.56028,0,0,0,112.051,97.76172ZM135.19408,108.417a5.0706,5.0706,0,0,0-1.73828-1.68261,9.64974,9.64974,0,0,0-2.36817-.999,23.362,23.362,0,0,0-2.57226-.55566q-1.29493-.20216-2.38575-.38867a6.5517,6.5517,0,0,1-1.73925-.499.98342.98342,0,0,1-.64747-.90625,1.08592,1.08592,0,0,1,.75879-.98047,5.52635,5.52635,0,0,1,2.23828-.35156,10.32411,10.32411,0,0,1,2.94141.44336,10.88866,10.88866,0,0,1,2.94141,1.40625l2.88574-3.66309a13.84912,13.84912,0,0,0-4.14356-1.92383,16.63553,16.63553,0,0,0-4.47753-.6289,12.4297,12.4297,0,0,0-4.4209.72168,6.42526,6.42526,0,0,0-2.94141,2.08983,5.47643,5.47643,0,0,0-1.03613,3.4043,4.7047,4.7047,0,0,0,.64746,2.57129,5.0403,5.0403,0,0,0,1.70215,1.64648,9.32885,9.32885,0,0,0,2.331.98047q1.27589.353,2.53418.57421,1.25685.2212,2.3125.42482a6.42189,6.42189,0,0,1,1.70215.53711,1.02088,1.02088,0,0,1,.64746.92479,1.26875,1.26875,0,0,1-.90625,1.14648,6.68844,6.68844,0,0,1-2.64551.40723,9.68331,9.68331,0,0,1-2.9414-.46191,18.83275,18.83275,0,0,1-3.57129-1.6836l-2.77441,3.84766a13.25433,13.25433,0,0,0,4.08789,1.97949,17.74867,17.74867,0,0,0,5.16211.72168,12.66658,12.66658,0,0,0,4.60645-.7959,7.79826,7.79826,0,0,0,3.25586-2.23828,5.15547,5.15547,0,0,0,1.20215-3.4043A4.95829,4.95829,0,0,0,135.19408,108.417Z" style="fill:url(#a)" />
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 5.6 KiB |
15
.github/img/logo-cli-colors.svg
vendored
15
.github/img/logo-cli-colors.svg
vendored
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 9.0 KiB |
@ -25,6 +25,9 @@ index = "sparse+http://lugit.local/api/packages/lucodear/cargo/"
|
||||
[lib]
|
||||
path = "lib/lib.rs"
|
||||
|
||||
[features]
|
||||
cli-stylize = ["dep:bitflags"]
|
||||
|
||||
[dependencies]
|
||||
bitflags = "2.5.0"
|
||||
bitflags = { version = "2.5.0", optional = true}
|
||||
eyre = { version = "0.6.12", default-features = false }
|
||||
|
||||
@ -32,7 +32,7 @@ tasks:
|
||||
test:
|
||||
desc: 🧪 test lool
|
||||
cmds:
|
||||
- cargo nextest run
|
||||
- cargo nextest run --all-features
|
||||
|
||||
publish:
|
||||
desc: 🚀 publish lool
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
use eyre::{set_hook, DefaultHandler, Result};
|
||||
use lool::cli::colors::{stylize, Stylize};
|
||||
use lool::cli::stylize::{stylize, Stylize};
|
||||
|
||||
fn setup_eyre() {
|
||||
let _ = set_hook(Box::new(DefaultHandler::default_with));
|
||||
|
||||
@ -1 +0,0 @@
|
||||
mod stylizer;
|
||||
@ -1 +1,2 @@
|
||||
pub mod colors;
|
||||
#[cfg(feature = "cli-stylize")]
|
||||
pub mod stylize;
|
||||
|
||||
1
lib/cli/stylize/tests/mod.rs
Normal file
1
lib/cli/stylize/tests/mod.rs
Normal file
@ -0,0 +1 @@
|
||||
mod stylizo;
|
||||
@ -1,7 +1,7 @@
|
||||
#[cfg(test)]
|
||||
mod parse_instruction {
|
||||
use {
|
||||
crate::cli::colors::{
|
||||
crate::cli::stylize::{
|
||||
stylizer::instructions::{parse, parse_color_instruction}, style::{Color, StyleAttributes}
|
||||
}, eyre::{set_hook, DefaultHandler}
|
||||
};
|
||||
@ -12,9 +12,11 @@
|
||||
"lucodear-icons.activeIconPack": "rust_ferris",
|
||||
"lucodear-icons.folders.associations": {
|
||||
".cargo": "rust",
|
||||
"stylize": "theme"
|
||||
},
|
||||
"lucodear-icons.files.associations": {
|
||||
|
||||
}
|
||||
},
|
||||
"rust-analyzer.cargo.features": "all",
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user