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
//! Step-by-step wizard widget with tree-structured steps, optional steps,
//! select (cycling) steps, and variable-length array steps.
//!
//! ## Visual layout (example)
//!
//! ```text
//! │
//! ● name my-blueprint
//! │
//! ● description (none)
//! │
//! ○ fields [ + add ] [0] ← active array, collapsed
//! │
//! ◌ [ save ] ← pending Buttons step
//! │
//! ```
//!
//! When the array is expanded:
//!
//! ```text
//! ◉ fields [ + add ] [2] ← expanded, 2 items
//! │ │
//! │ ● #1 ← item (not selected)
//! │ │ │
//! │ │ ● field name title
//! │ │ │
//! │ │ ● field type String
//! │ │
//! │ ► #2 [ remove ] ← item selected; [ remove ] focusable via Right
//! │ │ │
//! │ │ ● field name count
//! │ │ │
//! │ │ ● field type Integer
//! │
//! ```
//!
//! ## Navigation
//!
//! | Context | Key | Effect |
//! |---------|-----|--------|
//! | Any leaf | Tab / Enter | Confirm value, advance |
//! | Any leaf | BackTab | Retreat (wraps) |
//! | Any leaf | Esc | Cancel (dismiss wizard) |
//! | Array collapsed | Left / Right | Switch between `[+ add]` and `[n]` |
//! | Array collapsed | Enter on `[+ add]` | Expand + start new item |
//! | Array collapsed | Enter on `[n]` | Expand only |
//! | Array collapsed | Tab | Advance past array |
//! | Array collapsed | Esc | Cancel (dismiss wizard) |
//! | Array expanded | Tab | Cycle through items |
//! | Array expanded | Enter | Edit focused item |
//! | Array expanded | Right → `[remove]` → Enter | Delete focused item |
//! | Array expanded | Esc / BackTab | Collapse |
//! | Item editing leaf | Tab / Enter | Confirm sub-step / complete item |
//! | Item editing leaf | Esc | Cancel edit (delete if new, restore if existing) |
//! | Item editing select | Left / Right | Cycle option |
//! | Item editing select | Tab / Enter | Confirm, advance sub-step |
//! | Buttons | Left / Right / Tab | Cycle buttons (Tab wraps to first step) |
//! | Buttons | BackTab | Retreat to previous step |
//! | Buttons | Enter | Fire primary (Done) or secondary (Cancelled) |
//! | Buttons | Esc | Cancel |
// ── Public re-exports ─────────────────────────────────────────────────────────
pub use ;
pub use render_wizard;