1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
//! The shared visual language for onboarding-facing CLI output.
//!
//! One palette, one set of helpers, used by the `new` wizard, the
//! scaffold summaries, and the post-command "Next" pointers so the
//! whole first-run reads as one calm, legible flow instead of a wall
//! of single-colour text.
//!
//! Doctrine (`DESIGN_ONBOARDING.md` §13, which supersedes the earlier
//! colourless-wizard rule):
//!
//! - **One accent** — a warm amber (256-colour 173, the Claude-tone
//! orange). It marks the *active* thing: a step title, a prompt
//! arrow, the "Next" label. Never decoration.
//! - **Roles, not rainbows.** Success is green (`✓`); paths and URLs
//! are cyan; commands you type are bold; secondary text is dim.
//! Nothing else gets colour.
//! - **No emoji, no hype.** The only marks are `✓` (done), `›`
//! (prompt / pointer), and a dim divider. (`✗` for failures lives in
//! `progress`/`ui`.)
//! - **Breathing room.** Stages are separated by blank lines; callers
//! own the spacing, these helpers only colour fragments.
//! - **Degrades cleanly.** `console` strips every escape under
//! `NO_COLOR`, non-TTY, or a dumb terminal, so piped/CI output stays
//! plain text with the same words and spacing.
use IsTerminal;
use style;
/// The single accent colour — a warm amber in the 256-colour cube
/// (`#d7875f`), chosen to read as calm and on-brand rather than
/// alarming. Used only for the active element of a stage.
pub const ACCENT: u8 = 173;
/// A screen/section title (accent + bold). E.g. `RustIO › new project`.
pub
/// A stage / "Next" heading (accent, bold).
pub
/// Secondary explanatory text — the calm one-liners under a heading.
pub
/// A command the developer types or pastes (bold so it stands out as
/// "this is the thing to run").
pub
/// A filesystem path (cyan).
pub
/// A URL (cyan, underlined).
pub
/// A value the user chose or that was generated (bold, no colour) —
/// e.g. the confirmed project name beside a `✓`.
pub
/// Accent-coloured fragment (no bold) — e.g. a list number or the
/// `›` prompt arrow.
pub
/// The green success mark.
pub
/// A gentle correction shown when input fails validation — yellow so
/// it is noticed, but not the red of a hard error.
pub
/// The accent prompt / pointer arrow.
pub
/// A dim horizontal divider, sized to sit comfortably in an 80-col
/// terminal without reaching the edge.
pub
/// A stage header line: `Step 2 of 3 · Project type`, the counter in
/// accent and the title in bold, so the eye lands on "where am I".
pub
/// A confirmation line: ` ✓ huntclick`.
pub
/// True when output is going to an interactive human (a TTY, not CI).
/// The contextual "Next" pointers a command prints after it runs are
/// guidance for a person mid-flow — scripts and CI runs stay quiet.
pub
/// Print a "Next — <what>:" pointer: a bold accent heading, then each
/// command on its own copy-clean line, with any (already-styled)
/// annotation on a dim line beneath it. The shared shape behind the
/// post-command guidance so `migrate`, `user create`, and the scaffold
/// all point forward the same way.
pub