@rootly/wizard 0.1.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/LICENSE +21 -0
- package/README.md +131 -0
- package/assets/rootly-logo-glyph-purple.png +0 -0
- package/assets/rootly-logo-glyph.png +0 -0
- package/assets/welcome-screen.png +0 -0
- package/package.json +47 -0
- package/src/actions/guided.js +87 -0
- package/src/actions/inspect.js +341 -0
- package/src/actions/integrations.js +75 -0
- package/src/actions/mcp.js +52 -0
- package/src/actions/oneshot.js +243 -0
- package/src/actions/phone.js +122 -0
- package/src/actions/registry.js +373 -0
- package/src/actions/setup.js +574 -0
- package/src/actions/testing.js +141 -0
- package/src/actions/workflow.js +47 -0
- package/src/auth.js +553 -0
- package/src/cli.js +199 -0
- package/src/detect-state.js +232 -0
- package/src/format.js +43 -0
- package/src/mcp.js +254 -0
- package/src/rootly-api.js +325 -0
- package/src/runtime.js +55 -0
- package/src/tui/components/AppShell.js +68 -0
- package/src/tui/components/Banner.js +145 -0
- package/src/tui/components/BigText.js +46 -0
- package/src/tui/components/Celebration.js +47 -0
- package/src/tui/components/KeyValueList.js +22 -0
- package/src/tui/components/MenuList.js +170 -0
- package/src/tui/components/MultiSelectList.js +181 -0
- package/src/tui/components/NoticeBox.js +56 -0
- package/src/tui/components/SlideReveal.js +52 -0
- package/src/tui/index.js +2078 -0
- package/src/tui/screens/ListScreen.js +29 -0
- package/src/tui/screens/LoadFailedScreen.js +30 -0
- package/src/tui/screens/LoadingScreen.js +32 -0
- package/src/tui/screens/MainMenuScreen.js +81 -0
- package/src/tui/screens/MultiSelectScreen.js +17 -0
- package/src/tui/screens/OneShotRunnerScreen.js +186 -0
- package/src/tui/screens/OptionScreen.js +24 -0
- package/src/tui/screens/ResultScreen.js +35 -0
- package/src/tui/screens/StatusScreen.js +70 -0
- package/src/tui/screens/TextEntryScreen.js +115 -0
- package/src/tui/screens/WelcomeScreen.js +66 -0
- package/src/tui/theme.js +69 -0
- package/src/tui-legacy-bridge.js +371 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { createElement as h, useEffect, useState } from 'react';
|
|
2
|
+
import { Box, Text, useInput } from 'ink';
|
|
3
|
+
import { palette } from '../theme.js';
|
|
4
|
+
|
|
5
|
+
// Each line slides in from a right indent and settles into place, fading from
|
|
6
|
+
// dim to full as it lands. Staggered per line. Any keypress finishes it.
|
|
7
|
+
const RAMP = ['#3C3C46', '#56565F', '#727280', '#9A9AA5', '#C4C4CC', palette.text];
|
|
8
|
+
const INDENT = 6;
|
|
9
|
+
const STAGGER = 3;
|
|
10
|
+
|
|
11
|
+
export function SlideReveal({ lines = [], onDone }) {
|
|
12
|
+
let order = 0;
|
|
13
|
+
const meta = lines.map((line) => {
|
|
14
|
+
if (line.trim() === '') return { blank: true, start: 0 };
|
|
15
|
+
const start = order * STAGGER;
|
|
16
|
+
order += 1;
|
|
17
|
+
return { blank: false, start };
|
|
18
|
+
});
|
|
19
|
+
const lastStart = meta.reduce((max, m) => (m.blank ? max : Math.max(max, m.start)), 0);
|
|
20
|
+
const end = lastStart + Math.max(INDENT, RAMP.length - 1) + 1;
|
|
21
|
+
|
|
22
|
+
const [tick, setTick] = useState(0);
|
|
23
|
+
|
|
24
|
+
useInput(() => setTick(end));
|
|
25
|
+
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
if (tick >= end) {
|
|
28
|
+
const settle = setTimeout(() => onDone?.(), 150);
|
|
29
|
+
return () => clearTimeout(settle);
|
|
30
|
+
}
|
|
31
|
+
const next = setTimeout(() => setTick((current) => current + 1), 45);
|
|
32
|
+
return () => clearTimeout(next);
|
|
33
|
+
}, [tick, end, onDone]);
|
|
34
|
+
|
|
35
|
+
return h(
|
|
36
|
+
Box,
|
|
37
|
+
{ flexDirection: 'column' },
|
|
38
|
+
...lines.map((line, index) => {
|
|
39
|
+
const m = meta[index];
|
|
40
|
+
if (m.blank) {
|
|
41
|
+
return h(Box, { key: index }, h(Text, null, ' '));
|
|
42
|
+
}
|
|
43
|
+
const progress = tick - m.start;
|
|
44
|
+
if (progress < 0) {
|
|
45
|
+
return h(Box, { key: index }, h(Text, null, ' '));
|
|
46
|
+
}
|
|
47
|
+
const indent = Math.max(0, INDENT - progress);
|
|
48
|
+
const color = RAMP[Math.min(progress, RAMP.length - 1)];
|
|
49
|
+
return h(Box, { key: index }, h(Text, { color }, `${' '.repeat(indent)}${line}`));
|
|
50
|
+
})
|
|
51
|
+
);
|
|
52
|
+
}
|