nolo-cli 0.6.1 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +63 -29
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -108103,51 +108103,76 @@ function renderStatusLine(state4) {
|
|
|
108103
108103
|
if (!surface) return body;
|
|
108104
108104
|
return `${surface} ${body} \x1B[49m`;
|
|
108105
108105
|
}
|
|
108106
|
-
function buildPlainScene(isDark) {
|
|
108107
|
-
|
|
108106
|
+
function buildPlainScene(isDark, frame = 0, maxFrames = 0) {
|
|
108107
|
+
let skyLine = ` ${isDark ? "\u{1F319}" : "\u2600"}`;
|
|
108108
|
+
if (isDark) {
|
|
108109
|
+
const star1 = frame % 6 < 3 ? "\u2726" : "\u22C6";
|
|
108110
|
+
const star2 = frame % 4 < 2 ? "\u22C6" : "\xB7";
|
|
108111
|
+
const star3 = frame % 5 < 2 ? "\xB7" : "\u2726";
|
|
108112
|
+
skyLine = ` ${star1} \u{1F319} ${star2} ${star3}`;
|
|
108113
|
+
}
|
|
108114
|
+
const wavePattern = "_.~^~.";
|
|
108115
|
+
const longWave = wavePattern.repeat(10);
|
|
108116
|
+
const offset = frame % wavePattern.length;
|
|
108117
|
+
const wave2 = longWave.slice(offset, offset + 25);
|
|
108108
108118
|
return [
|
|
108109
|
-
|
|
108110
|
-
|
|
108111
|
-
" \u2571 \u2572",
|
|
108112
|
-
|
|
108113
|
-
|
|
108114
|
-
" \u2581\u2581\u2581\u2581\u2581\u2581\u2571
|
|
108115
|
-
" \u2588\u2584 \u2588 \u2584\u2580\u2580\u2584 \u2588 \u2584\u2580\u2580\u2584",
|
|
108116
|
-
" \u2588 \u2580\u2588 \u2588 \u2588 \u2588 \u2588 \u2588",
|
|
108117
|
-
" \u2580 \u2580 \u2580\u2580 \u2580\u2580\u2580\u2580 \u2580\u2580",
|
|
108118
|
-
" \u2570\u256E~\u2248~~\u2248~~\u2248~~\u2248~~\u2248~~\u2248~~\u2248~~\u2248~\u2570\u256E\u2248~"
|
|
108119
|
+
skyLine,
|
|
108120
|
+
" \u2571\u2572 \u2588\u2584 \u2588 \u2584\u2580\u2580\u2584 \u2588 \u2584\u2580\u2580\u2584",
|
|
108121
|
+
" \u2571 \u2572 \u2571\u2572 \u2588 \u2580\u2588 \u2588 \u2588 \u2588 \u2588 \u2588",
|
|
108122
|
+
" \u2571 \u2572\u2571 \u2572 \u2580 \u2580 \u2580\u2580 \u2580\u2580\u2580\u2580 \u2580\u2580",
|
|
108123
|
+
` \u2571 \u2660 \u2572 ${wave2}`,
|
|
108124
|
+
" \u2581\u2581\u2581\u2581\u2581\u2581\u2571 \u2660 \u2660 \u2572\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581"
|
|
108119
108125
|
].join("\n");
|
|
108120
108126
|
}
|
|
108121
|
-
function buildColoredScene(isDark) {
|
|
108127
|
+
function buildColoredScene(isDark, frame = 0, maxFrames = 0) {
|
|
108122
108128
|
const pk = themeColorSequence("chrome");
|
|
108123
108129
|
const sk = themeColorSequence("warning");
|
|
108124
|
-
const st = themeColorSequence("muted");
|
|
108125
108130
|
const tr = themeColorSequence("success");
|
|
108126
108131
|
const wv = themeColorSequence("info");
|
|
108127
108132
|
const ac = themeColorSequence("accent");
|
|
108128
|
-
const
|
|
108133
|
+
const mu = themeColorSequence("muted");
|
|
108129
108134
|
const r = "\x1B[39m";
|
|
108130
108135
|
const b = "\x1B[1m";
|
|
108131
108136
|
const rs = "\x1B[0m";
|
|
108132
|
-
|
|
108137
|
+
let skyLine = ` ${sk}${isDark ? "\u{1F319}" : "\u2600"}${r}`;
|
|
108138
|
+
if (isDark) {
|
|
108139
|
+
const star1 = frame % 6 < 3 ? "\u2726" : "\u22C6";
|
|
108140
|
+
const star2 = frame % 4 < 2 ? "\u22C6" : "\xB7";
|
|
108141
|
+
const star3 = frame % 5 < 2 ? "\xB7" : "\u2726";
|
|
108142
|
+
skyLine = ` ${mu}${star1}${r} ${sk}\u{1F319}${r} ${mu}${star2}${r} ${mu}${star3}${r}`;
|
|
108143
|
+
}
|
|
108144
|
+
const wavePattern = "_.~^~.";
|
|
108145
|
+
const longWave = wavePattern.repeat(10);
|
|
108146
|
+
const offset = frame % wavePattern.length;
|
|
108147
|
+
const wave2 = longWave.slice(offset, offset + 25);
|
|
108148
|
+
const waveStr = `${wv}${wave2.slice(0, 20)}${r}${mu}${wave2.slice(20, 25)}${r}`;
|
|
108149
|
+
const line1 = "\u2588\u2584 \u2588 \u2584\u2580\u2580\u2584 \u2588 \u2584\u2580\u2580\u2584";
|
|
108150
|
+
const line2 = "\u2588 \u2580\u2588 \u2588 \u2588 \u2588 \u2588 \u2588";
|
|
108151
|
+
const line3 = "\u2580 \u2580 \u2580\u2580 \u2580\u2580\u2580\u2580 \u2580\u2580";
|
|
108152
|
+
const sweepEndFrame = maxFrames > 3 ? maxFrames - 3 : maxFrames;
|
|
108153
|
+
const sweepLen = maxFrames === 0 ? 21 : Math.min(21, Math.floor(frame / sweepEndFrame * 21));
|
|
108154
|
+
const colorLine = (str, bold) => {
|
|
108155
|
+
const active = str.slice(0, sweepLen);
|
|
108156
|
+
const dimmed = str.slice(sweepLen);
|
|
108157
|
+
return `${bold ? b : ""}${ac}${active}${r}${mu}${dimmed}${r}${bold ? rs : ""}`;
|
|
108158
|
+
};
|
|
108159
|
+
const nolo1 = colorLine(line1, true);
|
|
108160
|
+
const nolo2 = colorLine(line2, false);
|
|
108161
|
+
const nolo3 = colorLine(line3, false);
|
|
108133
108162
|
return [
|
|
108134
|
-
|
|
108135
|
-
|
|
108136
|
-
` ${pk}\u2571 \u2572${r}`,
|
|
108137
|
-
|
|
108138
|
-
` ${pk}\u2571${r}
|
|
108139
|
-
` ${pk}\u2581\u2581\u2581\u2581\u2581\u2581\u2571${r}
|
|
108140
|
-
` ${b}${ac}\u2588\u2584 \u2588 \u2584\u2580\u2580\u2584 \u2588 \u2584\u2580\u2580\u2584${rs}`,
|
|
108141
|
-
` ${ac}\u2588 \u2580\u2588 \u2588 \u2588 \u2588 \u2588 \u2588${r}`,
|
|
108142
|
-
` ${cr}\u2580 \u2580 \u2580\u2580 \u2580\u2580\u2580\u2580 \u2580\u2580${r}`,
|
|
108143
|
-
` ${wv}\u2570\u256E~\u2248~~\u2248~~\u2248~~\u2248~~\u2248~~\u2248~~\u2248~~\u2248~\u2570\u256E\u2248~${r}`
|
|
108163
|
+
skyLine,
|
|
108164
|
+
` ${pk}\u2571\u2572${r} ${nolo1}`,
|
|
108165
|
+
` ${pk}\u2571 \u2572 \u2571\u2572${r} ${nolo2}`,
|
|
108166
|
+
` ${pk}\u2571 \u2572\u2571 \u2572${r} ${nolo3}`,
|
|
108167
|
+
` ${pk}\u2571${r} ${tr}\u2660${r} ${pk}\u2572${r} ${waveStr}`,
|
|
108168
|
+
` ${pk}\u2581\u2581\u2581\u2581\u2581\u2581\u2571${r} ${tr}\u2660${r} ${tr}\u2660${r} ${pk}\u2572\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581${r}`
|
|
108144
108169
|
].join("\n");
|
|
108145
108170
|
}
|
|
108146
|
-
function renderWelcome(state4) {
|
|
108171
|
+
function renderWelcome(state4, frame = 0, maxFrames = 0) {
|
|
108147
108172
|
const colorEnabled = resolveCliColorEnabled();
|
|
108148
108173
|
const brightness = resolveTuiBrightness();
|
|
108149
108174
|
const isDark = brightness === "dark";
|
|
108150
|
-
const sceneArt = colorEnabled ? buildColoredScene(isDark) : buildPlainScene(isDark);
|
|
108175
|
+
const sceneArt = colorEnabled ? buildColoredScene(isDark, frame, maxFrames) : buildPlainScene(isDark, frame, maxFrames);
|
|
108151
108176
|
const versionLine = colorEnabled ? `\x1B[1m${themeColorSequence("accent")}nolo\x1B[0m ${state4.cliVersion ?? ""} | server ${state4.serverUrl}`.replace(" |", " |") : `nolo ${state4.cliVersion ?? ""} | server ${state4.serverUrl}`.replace(" |", " |");
|
|
108152
108177
|
return [
|
|
108153
108178
|
sceneArt,
|
|
@@ -110639,7 +110664,16 @@ async function startTuiWorkspace(options) {
|
|
|
110639
110664
|
stdout: output2
|
|
110640
110665
|
});
|
|
110641
110666
|
if (detected) setActiveBrightness(detected);
|
|
110642
|
-
|
|
110667
|
+
const frames = 15;
|
|
110668
|
+
output2.write("\x1B[?25l");
|
|
110669
|
+
for (let i = 0; i < frames; i++) {
|
|
110670
|
+
output2.write(renderWelcome(state4, i, frames));
|
|
110671
|
+
if (i < frames - 1) {
|
|
110672
|
+
await new Promise((resolve9) => setTimeout(resolve9, 100));
|
|
110673
|
+
output2.write("\r\x1B[8A\x1B[0J");
|
|
110674
|
+
}
|
|
110675
|
+
}
|
|
110676
|
+
output2.write("\x1B[?25h");
|
|
110643
110677
|
let fixedInput = createNoopFixedInput();
|
|
110644
110678
|
let buffer = "";
|
|
110645
110679
|
let cursorPos = 0;
|