roast-ai 0.4.10 → 0.5.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.
Files changed (173) hide show
  1. checksums.yaml +4 -4
  2. data/.claude/commands/docs/write-comments.md +36 -0
  3. data/.github/CODEOWNERS +1 -1
  4. data/.github/workflows/ci.yaml +10 -6
  5. data/.gitignore +0 -1
  6. data/.rubocop.yml +7 -1
  7. data/CLAUDE.md +2 -2
  8. data/CONTRIBUTING.md +2 -0
  9. data/Gemfile +19 -18
  10. data/Gemfile.lock +35 -58
  11. data/README.md +118 -1432
  12. data/README_LEGACY.md +1464 -0
  13. data/Rakefile +39 -4
  14. data/dev.yml +29 -0
  15. data/dsl/agent_sessions.rb +20 -0
  16. data/dsl/async_cogs.rb +49 -0
  17. data/dsl/async_cogs_complex.rb +67 -0
  18. data/dsl/call.rb +44 -0
  19. data/dsl/collect_from.rb +72 -0
  20. data/dsl/json_output.rb +28 -0
  21. data/dsl/map.rb +55 -0
  22. data/dsl/map_reduce.rb +37 -0
  23. data/dsl/map_with_index.rb +49 -0
  24. data/dsl/next_break.rb +40 -0
  25. data/dsl/next_break_parallel.rb +44 -0
  26. data/dsl/outputs.rb +39 -0
  27. data/dsl/outputs_bang.rb +36 -0
  28. data/dsl/parallel_map.rb +37 -0
  29. data/dsl/prompts/simple_prompt.md.erb +3 -0
  30. data/dsl/prototype.rb +5 -7
  31. data/dsl/repeat_loop_results.rb +53 -0
  32. data/dsl/ruby_cog.rb +72 -0
  33. data/dsl/simple_agent.rb +18 -0
  34. data/dsl/simple_chat.rb +15 -1
  35. data/dsl/simple_repeat.rb +29 -0
  36. data/dsl/skip.rb +36 -0
  37. data/dsl/step_communication.rb +2 -3
  38. data/dsl/targets_and_params.rb +57 -0
  39. data/dsl/temperature.rb +17 -0
  40. data/dsl/temporary_directory.rb +22 -0
  41. data/dsl/tutorial/01_your_first_workflow/README.md +179 -0
  42. data/dsl/tutorial/01_your_first_workflow/configured_chat.rb +33 -0
  43. data/dsl/tutorial/01_your_first_workflow/hello.rb +23 -0
  44. data/dsl/tutorial/02_chaining_cogs/README.md +310 -0
  45. data/dsl/tutorial/02_chaining_cogs/code_review.rb +104 -0
  46. data/dsl/tutorial/02_chaining_cogs/session_resumption.rb +92 -0
  47. data/dsl/tutorial/02_chaining_cogs/simple_chain.rb +84 -0
  48. data/dsl/tutorial/03_targets_and_params/README.md +230 -0
  49. data/dsl/tutorial/03_targets_and_params/multiple_targets.rb +65 -0
  50. data/dsl/tutorial/03_targets_and_params/single_target.rb +65 -0
  51. data/dsl/tutorial/04_configuration_options/README.md +209 -0
  52. data/dsl/tutorial/04_configuration_options/control_display_and_temperature.rb +104 -0
  53. data/dsl/tutorial/04_configuration_options/simple_config.rb +68 -0
  54. data/dsl/tutorial/05_control_flow/README.md +156 -0
  55. data/dsl/tutorial/05_control_flow/conditional_execution.rb +62 -0
  56. data/dsl/tutorial/05_control_flow/handling_failures.rb +77 -0
  57. data/dsl/tutorial/06_reusable_scopes/README.md +172 -0
  58. data/dsl/tutorial/06_reusable_scopes/accessing_scope_outputs.rb +126 -0
  59. data/dsl/tutorial/06_reusable_scopes/basic_scope.rb +63 -0
  60. data/dsl/tutorial/06_reusable_scopes/parameterized_scope.rb +78 -0
  61. data/dsl/tutorial/07_processing_collections/README.md +152 -0
  62. data/dsl/tutorial/07_processing_collections/basic_map.rb +70 -0
  63. data/dsl/tutorial/07_processing_collections/parallel_map.rb +74 -0
  64. data/dsl/tutorial/08_iterative_workflows/README.md +231 -0
  65. data/dsl/tutorial/08_iterative_workflows/basic_repeat.rb +57 -0
  66. data/dsl/tutorial/08_iterative_workflows/conditional_break.rb +57 -0
  67. data/dsl/tutorial/09_async_cogs/README.md +197 -0
  68. data/dsl/tutorial/09_async_cogs/basic_async.rb +38 -0
  69. data/dsl/tutorial/README.md +222 -0
  70. data/dsl/working_directory.rb +16 -0
  71. data/exe/roast +1 -1
  72. data/internal/documentation/architectural-notes.md +115 -0
  73. data/internal/documentation/doc-comments-external.md +686 -0
  74. data/internal/documentation/doc-comments-internal.md +342 -0
  75. data/internal/documentation/doc-comments.md +211 -0
  76. data/lib/roast/dsl/cog/config.rb +274 -3
  77. data/lib/roast/dsl/cog/input.rb +53 -10
  78. data/lib/roast/dsl/cog/output.rb +297 -8
  79. data/lib/roast/dsl/cog/registry.rb +35 -3
  80. data/lib/roast/dsl/cog/stack.rb +1 -1
  81. data/lib/roast/dsl/cog/store.rb +5 -5
  82. data/lib/roast/dsl/cog.rb +70 -14
  83. data/lib/roast/dsl/cog_input_context.rb +36 -1
  84. data/lib/roast/dsl/cog_input_manager.rb +116 -7
  85. data/lib/roast/dsl/cogs/agent/config.rb +465 -0
  86. data/lib/roast/dsl/cogs/agent/input.rb +81 -0
  87. data/lib/roast/dsl/cogs/agent/output.rb +59 -0
  88. data/lib/roast/dsl/cogs/agent/provider.rb +51 -0
  89. data/lib/roast/dsl/cogs/agent/providers/claude/claude_invocation.rb +185 -0
  90. data/lib/roast/dsl/cogs/agent/providers/claude/message.rb +73 -0
  91. data/lib/roast/dsl/cogs/agent/providers/claude/messages/assistant_message.rb +36 -0
  92. data/lib/roast/dsl/cogs/agent/providers/claude/messages/result_message.rb +61 -0
  93. data/lib/roast/dsl/cogs/agent/providers/claude/messages/system_message.rb +47 -0
  94. data/lib/roast/dsl/cogs/agent/providers/claude/messages/text_message.rb +36 -0
  95. data/lib/roast/dsl/cogs/agent/providers/claude/messages/tool_result_message.rb +47 -0
  96. data/lib/roast/dsl/cogs/agent/providers/claude/messages/tool_use_message.rb +46 -0
  97. data/lib/roast/dsl/cogs/agent/providers/claude/messages/unknown_message.rb +27 -0
  98. data/lib/roast/dsl/cogs/agent/providers/claude/messages/user_message.rb +37 -0
  99. data/lib/roast/dsl/cogs/agent/providers/claude/tool_result.rb +51 -0
  100. data/lib/roast/dsl/cogs/agent/providers/claude/tool_use.rb +48 -0
  101. data/lib/roast/dsl/cogs/agent/providers/claude.rb +31 -0
  102. data/lib/roast/dsl/cogs/agent/stats.rb +92 -0
  103. data/lib/roast/dsl/cogs/agent/usage.rb +62 -0
  104. data/lib/roast/dsl/cogs/agent.rb +75 -0
  105. data/lib/roast/dsl/cogs/chat/config.rb +453 -0
  106. data/lib/roast/dsl/cogs/chat/input.rb +92 -0
  107. data/lib/roast/dsl/cogs/chat/output.rb +64 -0
  108. data/lib/roast/dsl/cogs/chat/session.rb +68 -0
  109. data/lib/roast/dsl/cogs/chat.rb +59 -56
  110. data/lib/roast/dsl/cogs/cmd.rb +248 -61
  111. data/lib/roast/dsl/cogs/ruby.rb +171 -0
  112. data/lib/roast/dsl/command_runner.rb +191 -0
  113. data/lib/roast/dsl/config_manager.rb +58 -11
  114. data/lib/roast/dsl/control_flow.rb +41 -0
  115. data/lib/roast/dsl/execution_manager.rb +162 -32
  116. data/lib/roast/dsl/nil_assertions.rb +23 -0
  117. data/lib/roast/dsl/system_cog/params.rb +32 -0
  118. data/lib/roast/dsl/system_cog.rb +36 -0
  119. data/lib/roast/dsl/system_cogs/call.rb +162 -0
  120. data/lib/roast/dsl/system_cogs/map.rb +448 -0
  121. data/lib/roast/dsl/system_cogs/repeat.rb +242 -0
  122. data/lib/roast/dsl/workflow.rb +26 -16
  123. data/lib/roast/dsl/workflow_context.rb +20 -0
  124. data/lib/roast/dsl/workflow_params.rb +24 -0
  125. data/lib/roast/sorbet_runtime_stub.rb +154 -0
  126. data/lib/roast/tools/apply_diff.rb +1 -3
  127. data/lib/roast/tools/cmd.rb +4 -3
  128. data/lib/roast/tools/read_file.rb +1 -1
  129. data/lib/roast/tools/update_files.rb +1 -1
  130. data/lib/roast/tools/write_file.rb +1 -1
  131. data/lib/roast/version.rb +1 -1
  132. data/lib/roast/workflow/base_workflow.rb +4 -0
  133. data/lib/roast/workflow/step_loader.rb +14 -2
  134. data/lib/roast-ai.rb +4 -0
  135. data/lib/roast.rb +58 -21
  136. data/{roast.gemspec → roast-ai.gemspec} +9 -13
  137. data/sorbet/rbi/gems/async@2.34.0.rbi +1577 -0
  138. data/sorbet/rbi/gems/cli-kit@5.2.0.rbi +2063 -0
  139. data/sorbet/rbi/gems/{cli-ui@2.3.0.rbi → cli-ui@2.7.0-6bdefd1d06305e5d6ae312ac76f9c88f88658dda.rbi} +1418 -1013
  140. data/sorbet/rbi/gems/console@1.34.2.rbi +1193 -0
  141. data/sorbet/rbi/gems/fiber-annotation@0.2.0.rbi +50 -0
  142. data/sorbet/rbi/gems/fiber-local@1.1.0.rbi +35 -0
  143. data/sorbet/rbi/gems/fiber-storage@1.0.1.rbi +41 -0
  144. data/sorbet/rbi/gems/io-event@1.14.0.rbi +724 -0
  145. data/sorbet/rbi/gems/metrics@0.15.0.rbi +9 -0
  146. data/sorbet/rbi/gems/traces@0.18.2.rbi +9 -0
  147. data/sorbet/rbi/shims/lib/roast/dsl/cog_input_context.rbi +1185 -5
  148. data/sorbet/rbi/shims/lib/roast/dsl/config_context.rbi +311 -5
  149. data/sorbet/rbi/shims/lib/roast/dsl/execution_context.rbi +486 -5
  150. data/sorbet/tapioca/config.yml +6 -0
  151. data/sorbet/tapioca/require.rb +2 -0
  152. metadata +157 -30
  153. data/dsl/less_simple.rb +0 -112
  154. data/dsl/scoped_executors.rb +0 -28
  155. data/dsl/simple.rb +0 -8
  156. data/lib/roast/dsl/cogs/execute.rb +0 -46
  157. data/lib/roast/dsl/cogs/graph.rb +0 -53
  158. data/sorbet/rbi/gems/cgi@0.5.0.rbi +0 -2961
  159. data/sorbet/rbi/gems/claude_swarm@0.1.19.rbi +0 -568
  160. data/sorbet/rbi/gems/cli-kit@5.0.1.rbi +0 -1991
  161. data/sorbet/rbi/gems/dry-configurable@1.3.0.rbi +0 -672
  162. data/sorbet/rbi/gems/dry-core@1.1.0.rbi +0 -1894
  163. data/sorbet/rbi/gems/dry-inflector@1.2.0.rbi +0 -659
  164. data/sorbet/rbi/gems/dry-initializer@3.2.0.rbi +0 -781
  165. data/sorbet/rbi/gems/dry-logic@1.6.0.rbi +0 -1127
  166. data/sorbet/rbi/gems/dry-schema@1.14.1.rbi +0 -3727
  167. data/sorbet/rbi/gems/dry-types@1.8.3.rbi +0 -3969
  168. data/sorbet/rbi/gems/fast-mcp-annotations@1.5.3.rbi +0 -1588
  169. data/sorbet/rbi/gems/mime-types-data@3.2025.0617.rbi +0 -136
  170. data/sorbet/rbi/gems/mime-types@3.7.0.rbi +0 -1342
  171. data/sorbet/rbi/gems/rack@2.2.19.rbi +0 -5676
  172. data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +0 -435
  173. data/sorbet/rbi/gems/yard@0.9.37.rbi +0 -18492
@@ -5,10 +5,10 @@
5
5
  # Please instead update this file by running `bin/tapioca gem cli-ui`.
6
6
 
7
7
 
8
- # source://cli-ui//lib/cli/ui.rb#8
8
+ # source://cli-ui//lib/cli/ui.rb#4
9
9
  module CLI; end
10
10
 
11
- # source://cli-ui//lib/cli/ui.rb#9
11
+ # source://cli-ui//lib/cli/ui.rb#5
12
12
  module CLI::UI
13
13
  class << self
14
14
  # Convenience Method for +CLI::UI::Prompt.any_key+
@@ -17,26 +17,15 @@ module CLI::UI
17
17
  #
18
18
  # * +prompt+ - prompt to present
19
19
  #
20
- # source://cli-ui//lib/cli/ui.rb#101
21
- sig { params(prompt: ::String).returns(T.nilable(::String)) }
20
+ # : (?String prompt) -> String?
21
+ #
22
+ # source://cli-ui//lib/cli/ui.rb#94
22
23
  def any_key(prompt = T.unsafe(nil)); end
23
24
 
24
25
  # Convenience Method for +CLI::UI::Prompt.ask+
26
+ # : (String question, ?options: Array[String]?, ?default: (String | Array[String])?, ?is_file: bool, ?allow_empty: bool, ?multiple: bool, ?filter_ui: bool, ?select_ui: bool) ?{ (Prompt::OptionsHandler handler) -> void } -> (String | Array[String])
25
27
  #
26
- # source://cli-ui//lib/cli/ui.rb#119
27
- sig do
28
- params(
29
- question: ::String,
30
- options: T.nilable(T::Array[::String]),
31
- default: T.nilable(T.any(::String, T::Array[::String])),
32
- is_file: T::Boolean,
33
- allow_empty: T::Boolean,
34
- multiple: T::Boolean,
35
- filter_ui: T::Boolean,
36
- select_ui: T::Boolean,
37
- options_proc: T.nilable(T.proc.params(handler: ::CLI::UI::Prompt::OptionsHandler).void)
38
- ).returns(T.any(::String, T::Array[::String]))
39
- end
28
+ # source://cli-ui//lib/cli/ui.rb#100
40
29
  def ask(question, options: T.unsafe(nil), default: T.unsafe(nil), is_file: T.unsafe(nil), allow_empty: T.unsafe(nil), multiple: T.unsafe(nil), filter_ui: T.unsafe(nil), select_ui: T.unsafe(nil), &options_proc); end
41
30
 
42
31
  # Convenience Method for +CLI::UI::Prompt.confirm+
@@ -45,8 +34,9 @@ module CLI::UI
45
34
  #
46
35
  # * +question+ - question to confirm
47
36
  #
48
- # source://cli-ui//lib/cli/ui.rb#90
49
- sig { params(question: ::String, default: T::Boolean).returns(T::Boolean) }
37
+ # : (String question, ?default: bool) -> bool
38
+ #
39
+ # source://cli-ui//lib/cli/ui.rb#83
50
40
  def confirm(question, default: T.unsafe(nil)); end
51
41
 
52
42
  # Turn colour in Formatter, Frame, and Spinner output on or off.
@@ -55,16 +45,20 @@ module CLI::UI
55
45
  #
56
46
  # * +bool+ - true or false; enable or disable colour.
57
47
  #
58
- # source://cli-ui//lib/cli/ui.rb#358
59
- sig { params(bool: T::Boolean).void }
48
+ # : (bool bool) -> void
49
+ #
50
+ # source://cli-ui//lib/cli/ui.rb#303
60
51
  def enable_color=(bool); end
61
52
 
62
53
  # Check whether colour is enabled in Formatter, Frame, and Spinner output.
63
54
  # By default, colour is enabled when STDOUT is a TTY; that is, when output
64
55
  # has not been directed to another program or to a file.
65
56
  #
66
- # source://cli-ui//lib/cli/ui.rb#347
67
- sig { returns(T::Boolean) }
57
+ # : -> bool
58
+ #
59
+ # @return [Boolean]
60
+ #
61
+ # source://cli-ui//lib/cli/ui.rb#292
68
62
  def enable_color?; end
69
63
 
70
64
  # Turn cursor control in Formatter, Frame, and Spinner output on or off.
@@ -73,16 +67,20 @@ module CLI::UI
73
67
  #
74
68
  # * +bool+ - true or false; enable or disable cursor control.
75
69
  #
76
- # source://cli-ui//lib/cli/ui.rb#378
77
- sig { params(bool: T::Boolean).void }
70
+ # : (bool bool) -> void
71
+ #
72
+ # source://cli-ui//lib/cli/ui.rb#323
78
73
  def enable_cursor=(bool); end
79
74
 
80
75
  # Check whether cursor control is enabled in Formatter, Frame, and Spinner output.
81
76
  # By default, cursor control is enabled when STDOUT is a TTY; that is, when output
82
77
  # has not been directed to another program or to a file.
83
78
  #
84
- # source://cli-ui//lib/cli/ui.rb#367
85
- sig { returns(T::Boolean) }
79
+ # : -> bool
80
+ #
81
+ # @return [Boolean]
82
+ #
83
+ # source://cli-ui//lib/cli/ui.rb#312
86
84
  def enable_cursor?; end
87
85
 
88
86
  # Convenience Method to format text using +CLI::UI::Formatter.format+
@@ -99,8 +97,9 @@ module CLI::UI
99
97
  #
100
98
  # * +enable_color+ - should color be used? default to true unless output is redirected.
101
99
  #
102
- # source://cli-ui//lib/cli/ui.rb#175
103
- sig { params(input: ::String, enable_color: T::Boolean).returns(::String) }
100
+ # : (String input, ?enable_color: bool) -> String
101
+ #
102
+ # source://cli-ui//lib/cli/ui.rb#156
104
103
  def fmt(input, enable_color: T.unsafe(nil)); end
105
104
 
106
105
  # Convenience Method for +CLI::UI::Frame.open+
@@ -110,20 +109,9 @@ module CLI::UI
110
109
  # * +args+ - arguments for +Frame.open+
111
110
  # * +block+ - block for +Frame.open+
112
111
  #
113
- # source://cli-ui//lib/cli/ui.rb#241
114
- sig do
115
- type_parameters(:T)
116
- .params(
117
- text: ::String,
118
- color: T.nilable(T.any(::CLI::UI::Color, ::String, ::Symbol)),
119
- failure_text: T.nilable(::String),
120
- success_text: T.nilable(::String),
121
- timing: T.any(::Numeric, T::Boolean),
122
- frame_style: T.any(::CLI::UI::Frame::FrameStyle, ::String, ::Symbol),
123
- to: T.any(::IO, ::StringIO),
124
- block: T.nilable(T.proc.returns(T.type_parameter(:T)))
125
- ).returns(T.nilable(T.type_parameter(:T)))
126
- end
112
+ # : [T] (String text, ?color: colorable?, ?failure_text: String?, ?success_text: String?, ?timing: (Numeric | bool), ?frame_style: frame_stylable, ?to: io_like) ?{ -> T } -> T?
113
+ #
114
+ # source://cli-ui//lib/cli/ui.rb#201
127
115
  def frame(text, color: T.unsafe(nil), failure_text: T.unsafe(nil), success_text: T.unsafe(nil), timing: T.unsafe(nil), frame_style: T.unsafe(nil), to: T.unsafe(nil), &block); end
128
116
 
129
117
  # Set the default frame style.
@@ -135,8 +123,9 @@ module CLI::UI
135
123
  #
136
124
  # * +symbol+ - the default frame style to use for frames
137
125
  #
138
- # source://cli-ui//lib/cli/ui.rb#392
139
- sig { params(frame_style: T.any(::CLI::UI::Frame::FrameStyle, ::String, ::Symbol)).void }
126
+ # : (frame_stylable frame_style) -> void
127
+ #
128
+ # source://cli-ui//lib/cli/ui.rb#337
140
129
  def frame_style=(frame_style); end
141
130
 
142
131
  # Glyph resolution using +CLI::UI::Glyph.lookup+
@@ -146,14 +135,15 @@ module CLI::UI
146
135
  #
147
136
  # * +handle+ - handle of the glyph to resolve
148
137
  #
149
- # source://cli-ui//lib/cli/ui.rb#46
150
- sig { params(handle: ::String).returns(::CLI::UI::Glyph) }
138
+ # : (String handle) -> Glyph
139
+ #
140
+ # source://cli-ui//lib/cli/ui.rb#39
151
141
  def glyph(handle); end
152
142
 
153
143
  # Create a terminal link
144
+ # : (String url, String text, ?format: bool, ?blue_underline: bool) -> String
154
145
  #
155
- # source://cli-ui//lib/cli/ui.rb#398
156
- sig { params(url: ::String, text: ::String, format: T::Boolean, blue_underline: T::Boolean).returns(::String) }
146
+ # source://cli-ui//lib/cli/ui.rb#343
157
147
  def link(url, text, format: T.unsafe(nil), blue_underline: T.unsafe(nil)); end
158
148
 
159
149
  # Duplicate output to a file path
@@ -162,14 +152,9 @@ module CLI::UI
162
152
  #
163
153
  # * +path+ - path to duplicate output to
164
154
  #
165
- # source://cli-ui//lib/cli/ui.rb#309
166
- sig do
167
- type_parameters(:T)
168
- .params(
169
- path: ::String,
170
- block: T.proc.returns(T.type_parameter(:T))
171
- ).returns(T.type_parameter(:T))
172
- end
155
+ # : [T] (String path) { -> T } -> T
156
+ #
157
+ # source://cli-ui//lib/cli/ui.rb#254
173
158
  def log_output_to(path, &block); end
174
159
 
175
160
  # Convenience Method for +CLI::UI::Printer.puts+
@@ -179,18 +164,8 @@ module CLI::UI
179
164
  # * +msg+ - Message to print
180
165
  # * +kwargs+ - keyword arguments for +Printer.puts+
181
166
  #
182
- # source://cli-ui//lib/cli/ui.rb#202
183
- sig do
184
- params(
185
- msg: ::String,
186
- frame_color: T.nilable(T.any(::CLI::UI::Color, ::String, ::Symbol)),
187
- to: T.any(::IO, ::StringIO),
188
- encoding: ::Encoding,
189
- format: T::Boolean,
190
- graceful: T::Boolean,
191
- wrap: T::Boolean
192
- ).void
193
- end
167
+ #
168
+ # source://cli-ui//lib/cli/ui.rb#173
194
169
  def puts(msg, frame_color: T.unsafe(nil), to: T.unsafe(nil), encoding: T.unsafe(nil), format: T.unsafe(nil), graceful: T.unsafe(nil), wrap: T.unsafe(nil)); end
195
170
 
196
171
  # Disable all framing within a block
@@ -199,8 +174,9 @@ module CLI::UI
199
174
  #
200
175
  # * +block+ - block in which to disable frames
201
176
  #
202
- # source://cli-ui//lib/cli/ui.rb#334
203
- sig { type_parameters(:T).params(block: T.proc.returns(T.type_parameter(:T))).returns(T.type_parameter(:T)) }
177
+ # : [T] { -> T } -> T
178
+ #
179
+ # source://cli-ui//lib/cli/ui.rb#279
204
180
  def raw(&block); end
205
181
 
206
182
  # Color resolution using +CLI::UI::Color.lookup+
@@ -210,8 +186,9 @@ module CLI::UI
210
186
  #
211
187
  # * +input+ - color to resolve
212
188
  #
213
- # source://cli-ui//lib/cli/ui.rb#58
214
- sig { params(input: T.any(::CLI::UI::Color, ::String, ::Symbol)).returns(::CLI::UI::Color) }
189
+ # : (colorable input) -> CLI::UI::Color
190
+ #
191
+ # source://cli-ui//lib/cli/ui.rb#51
215
192
  def resolve_color(input); end
216
193
 
217
194
  # Frame style resolution using +CLI::UI::Frame::FrameStyle.lookup+.
@@ -220,13 +197,9 @@ module CLI::UI
220
197
  # ==== Attributes
221
198
  #
222
199
  # * +input+ - frame style to resolve
200
+ # : (frame_stylable input) -> CLI::UI::Frame::FrameStyle
223
201
  #
224
- # source://cli-ui//lib/cli/ui.rb#74
225
- sig do
226
- params(
227
- input: T.any(::CLI::UI::Frame::FrameStyle, ::String, ::Symbol)
228
- ).returns(::CLI::UI::Frame::FrameStyle)
229
- end
202
+ # source://cli-ui//lib/cli/ui.rb#67
230
203
  def resolve_style(input); end
231
204
 
232
205
  # Convenience Method to resolve text using +CLI::UI::Formatter.format+
@@ -238,8 +211,9 @@ module CLI::UI
238
211
  # * +truncate_to+ - number of characters to truncate the string to (or nil)
239
212
  # * +enable_color+ - should color be used? default to true unless output is redirected.
240
213
  #
241
- # source://cli-ui//lib/cli/ui.rb#153
242
- sig { params(input: ::String, truncate_to: T.nilable(::Integer), enable_color: T::Boolean).returns(::String) }
214
+ # : (String input, ?truncate_to: Integer?, ?enable_color: bool) -> String
215
+ #
216
+ # source://cli-ui//lib/cli/ui.rb#134
243
217
  def resolve_text(input, truncate_to: T.unsafe(nil), enable_color: T.unsafe(nil)); end
244
218
 
245
219
  # Convenience Method for +CLI::UI::Spinner.spin+
@@ -249,15 +223,9 @@ module CLI::UI
249
223
  # * +args+ - arguments for +Spinner.open+
250
224
  # * +block+ - block for +Spinner.open+
251
225
  #
252
- # source://cli-ui//lib/cli/ui.rb#278
253
- sig do
254
- params(
255
- title: ::String,
256
- auto_debrief: T::Boolean,
257
- to: T.any(::IO, ::StringIO),
258
- block: T.proc.params(task: ::CLI::UI::Spinner::SpinGroup::Task).void
259
- ).returns(T::Boolean)
260
- end
226
+ # : (String title, ?auto_debrief: bool, ?to: io_like) { (Spinner::SpinGroup::Task task) -> void } -> bool
227
+ #
228
+ # source://cli-ui//lib/cli/ui.rb#231
261
229
  def spinner(title, auto_debrief: T.unsafe(nil), to: T.unsafe(nil), &block); end
262
230
 
263
231
  # Convenience Method to override frame color using +CLI::UI::Frame.with_frame_color+
@@ -267,27 +235,24 @@ module CLI::UI
267
235
  # * +color+ - color to override to
268
236
  # * +block+ - block for +Frame.with_frame_color_override+
269
237
  #
270
- # source://cli-ui//lib/cli/ui.rb#294
271
- sig do
272
- type_parameters(:T)
273
- .params(
274
- color: T.any(::CLI::UI::Color, ::String, ::Symbol),
275
- block: T.proc.returns(T.type_parameter(:T))
276
- ).returns(T.type_parameter(:T))
277
- end
238
+ # : [T] (colorable color) { -> T } -> T
239
+ #
240
+ # source://cli-ui//lib/cli/ui.rb#243
278
241
  def with_frame_color(color, &block); end
279
242
 
280
- # source://cli-ui//lib/cli/ui.rb#180
281
- sig { params(input: ::String).returns(::String) }
243
+ # : (String input) -> String
244
+ #
245
+ # source://cli-ui//lib/cli/ui.rb#161
282
246
  def wrap(input); end
283
247
  end
284
248
  end
285
249
 
286
- # source://cli-ui//lib/cli/ui/ansi.rb#8
250
+ # source://cli-ui//lib/cli/ui/ansi.rb#6
287
251
  module CLI::UI::ANSI
288
252
  class << self
289
- # source://cli-ui//lib/cli/ui/ansi.rb#206
290
- sig { returns(::String) }
253
+ # : -> String
254
+ #
255
+ # source://cli-ui//lib/cli/ui/ansi.rb#205
291
256
  def clear_to_end_of_line; end
292
257
 
293
258
  # Returns an ANSI control sequence
@@ -297,8 +262,9 @@ module CLI::UI::ANSI
297
262
  # - +args+ - Argument to pass to the ANSI control sequence
298
263
  # - +cmd+ - ANSI control sequence Command
299
264
  #
300
- # source://cli-ui//lib/cli/ui/ansi.rb#60
301
- sig { params(args: ::String, cmd: ::String).returns(::String) }
265
+ # : (String args, String cmd) -> String
266
+ #
267
+ # source://cli-ui//lib/cli/ui/ansi.rb#59
302
268
  def control(args, cmd); end
303
269
 
304
270
  # Move the cursor back n columns
@@ -307,8 +273,9 @@ module CLI::UI::ANSI
307
273
  #
308
274
  # * +n+ - number of columns by which to move the cursor back
309
275
  #
310
- # source://cli-ui//lib/cli/ui/ansi.rb#118
311
- sig { params(n: ::Integer).returns(::String) }
276
+ # : (?Integer n) -> String
277
+ #
278
+ # source://cli-ui//lib/cli/ui/ansi.rb#117
312
279
  def cursor_back(n = T.unsafe(nil)); end
313
280
 
314
281
  # Move the cursor down n lines
@@ -317,8 +284,9 @@ module CLI::UI::ANSI
317
284
  #
318
285
  # * +n+ - number of lines by which to move the cursor down
319
286
  #
320
- # source://cli-ui//lib/cli/ui/ansi.rb#92
321
- sig { params(n: ::Integer).returns(::String) }
287
+ # : (?Integer n) -> String
288
+ #
289
+ # source://cli-ui//lib/cli/ui/ansi.rb#91
322
290
  def cursor_down(n = T.unsafe(nil)); end
323
291
 
324
292
  # Move the cursor forward n columns
@@ -327,8 +295,9 @@ module CLI::UI::ANSI
327
295
  #
328
296
  # * +n+ - number of columns by which to move the cursor forward
329
297
  #
330
- # source://cli-ui//lib/cli/ui/ansi.rb#105
331
- sig { params(n: ::Integer).returns(::String) }
298
+ # : (?Integer n) -> String
299
+ #
300
+ # source://cli-ui//lib/cli/ui/ansi.rb#104
332
301
  def cursor_forward(n = T.unsafe(nil)); end
333
302
 
334
303
  # Move the cursor to a specific column
@@ -337,20 +306,23 @@ module CLI::UI::ANSI
337
306
  #
338
307
  # * +n+ - The column to move to
339
308
  #
340
- # source://cli-ui//lib/cli/ui/ansi.rb#131
341
- sig { params(n: ::Integer).returns(::String) }
309
+ # : (?Integer n) -> String
310
+ #
311
+ # source://cli-ui//lib/cli/ui/ansi.rb#130
342
312
  def cursor_horizontal_absolute(n = T.unsafe(nil)); end
343
313
 
344
314
  # Restore the saved cursor position
345
315
  #
346
- # source://cli-ui//lib/cli/ui/ansi.rb#176
347
- sig { returns(::String) }
316
+ # : -> String
317
+ #
318
+ # source://cli-ui//lib/cli/ui/ansi.rb#175
348
319
  def cursor_restore; end
349
320
 
350
321
  # Save the cursor position
351
322
  #
352
- # source://cli-ui//lib/cli/ui/ansi.rb#169
353
- sig { returns(::String) }
323
+ # : -> String
324
+ #
325
+ # source://cli-ui//lib/cli/ui/ansi.rb#168
354
326
  def cursor_save; end
355
327
 
356
328
  # Move the cursor up n lines
@@ -359,46 +331,55 @@ module CLI::UI::ANSI
359
331
  #
360
332
  # * +n+ - number of lines by which to move the cursor up
361
333
  #
362
- # source://cli-ui//lib/cli/ui/ansi.rb#79
363
- sig { params(n: ::Integer).returns(::String) }
334
+ # : (?Integer n) -> String
335
+ #
336
+ # source://cli-ui//lib/cli/ui/ansi.rb#78
364
337
  def cursor_up(n = T.unsafe(nil)); end
365
338
 
366
- # source://cli-ui//lib/cli/ui/ansi.rb#138
367
- sig { returns(::String) }
339
+ # : -> String
340
+ #
341
+ # source://cli-ui//lib/cli/ui/ansi.rb#137
368
342
  def enter_alternate_screen; end
369
343
 
370
- # source://cli-ui//lib/cli/ui/ansi.rb#143
371
- sig { returns(::String) }
344
+ # : -> String
345
+ #
346
+ # source://cli-ui//lib/cli/ui/ansi.rb#142
372
347
  def exit_alternate_screen; end
373
348
 
374
349
  # Hide the cursor
375
350
  #
376
- # source://cli-ui//lib/cli/ui/ansi.rb#162
377
- sig { returns(::String) }
351
+ # : -> String
352
+ #
353
+ # source://cli-ui//lib/cli/ui/ansi.rb#161
378
354
  def hide_cursor; end
379
355
 
380
- # source://cli-ui//lib/cli/ui/ansi.rb#211
381
- sig { returns(::String) }
356
+ # : -> String
357
+ #
358
+ # source://cli-ui//lib/cli/ui/ansi.rb#210
382
359
  def insert_line; end
383
360
 
384
- # source://cli-ui//lib/cli/ui/ansi.rb#216
385
- sig { params(n: ::Integer).returns(::String) }
361
+ # : (?Integer n) -> String
362
+ #
363
+ # source://cli-ui//lib/cli/ui/ansi.rb#215
386
364
  def insert_lines(n = T.unsafe(nil)); end
387
365
 
388
- # source://cli-ui//lib/cli/ui/ansi.rb#148
389
- sig { returns(::Regexp) }
366
+ # : -> Regexp
367
+ #
368
+ # source://cli-ui//lib/cli/ui/ansi.rb#147
390
369
  def match_alternate_screen; end
391
370
 
392
371
  # Move to the next line
393
372
  #
394
- # source://cli-ui//lib/cli/ui/ansi.rb#183
395
- sig { returns(::String) }
373
+ # : -> String
374
+ #
375
+ # source://cli-ui//lib/cli/ui/ansi.rb#182
396
376
  def next_line; end
397
377
 
398
378
  # Move to the previous line
399
379
  #
400
- # source://cli-ui//lib/cli/ui/ansi.rb#190
401
- sig { returns(::String) }
380
+ # : -> String
381
+ #
382
+ # source://cli-ui//lib/cli/ui/ansi.rb#189
402
383
  def previous_line; end
403
384
 
404
385
  # Move to the previous n lines
@@ -407,8 +388,9 @@ module CLI::UI::ANSI
407
388
  #
408
389
  # * +n+ - number of lines by which to move the cursor up
409
390
  #
410
- # source://cli-ui//lib/cli/ui/ansi.rb#201
411
- sig { params(n: ::Integer).returns(::String) }
391
+ # : (?Integer n) -> String
392
+ #
393
+ # source://cli-ui//lib/cli/ui/ansi.rb#200
412
394
  def previous_lines(n = T.unsafe(nil)); end
413
395
 
414
396
  # ANSI escape sequences (like \x1b[31m) have zero width.
@@ -416,20 +398,22 @@ module CLI::UI::ANSI
416
398
  # This also implements a basic version of utf8 character width calculation like
417
399
  # we could get for real from something like utf8proc.
418
400
  #
419
- # source://cli-ui//lib/cli/ui/ansi.rb#22
420
- sig { params(str: ::String).returns(::Integer) }
401
+ # : (String str) -> Integer
402
+ #
403
+ # source://cli-ui//lib/cli/ui/ansi.rb#21
421
404
  def printing_width(str); end
422
405
 
423
406
  # https://en.wikipedia.org/wiki/ANSI_escape_code#graphics
407
+ # : (String params) -> String
424
408
  #
425
- # source://cli-ui//lib/cli/ui/ansi.rb#66
426
- sig { params(params: ::String).returns(::String) }
409
+ # source://cli-ui//lib/cli/ui/ansi.rb#65
427
410
  def sgr(params); end
428
411
 
429
412
  # Show the cursor
430
413
  #
431
- # source://cli-ui//lib/cli/ui/ansi.rb#155
432
- sig { returns(::String) }
414
+ # : -> String
415
+ #
416
+ # source://cli-ui//lib/cli/ui/ansi.rb#154
433
417
  def show_cursor; end
434
418
 
435
419
  # Strips ANSI codes from a str
@@ -438,16 +422,28 @@ module CLI::UI::ANSI
438
422
  #
439
423
  # - +str+ - The string from which to strip codes
440
424
  #
441
- # source://cli-ui//lib/cli/ui/ansi.rb#48
442
- sig { params(str: ::String).returns(::String) }
425
+ # : (String str) -> String
426
+ #
427
+ # source://cli-ui//lib/cli/ui/ansi.rb#47
443
428
  def strip_codes(str); end
444
429
  end
445
430
  end
446
431
 
447
- # source://cli-ui//lib/cli/ui/ansi.rb#11
432
+ # https://ghostty.org/docs/vt/concepts/sequences#csi-sequences
433
+ #
434
+ # source://cli-ui//lib/cli/ui/ansi.rb#9
435
+ CLI::UI::ANSI::CSI_SEQUENCE = T.let(T.unsafe(nil), Regexp)
436
+
437
+ # source://cli-ui//lib/cli/ui/ansi.rb#7
448
438
  CLI::UI::ANSI::ESC = T.let(T.unsafe(nil), String)
449
439
 
450
- # source://cli-ui//lib/cli/ui/color.rb#8
440
+ # https://ghostty.org/docs/vt/concepts/sequences#osc-sequences
441
+ # OSC sequences can be terminated with either ST (\x1b\x5c) or BEL (\x07)
442
+ #
443
+ # source://cli-ui//lib/cli/ui/ansi.rb#12
444
+ CLI::UI::ANSI::OSC_SEQUENCE = T.let(T.unsafe(nil), Regexp)
445
+
446
+ # source://cli-ui//lib/cli/ui/color.rb#6
451
447
  class CLI::UI::Color
452
448
  # Creates a new color mapping
453
449
  # Signatures can be found here:
@@ -458,28 +454,34 @@ class CLI::UI::Color
458
454
  # * +sgr+ - The color signature
459
455
  # * +name+ - The name of the color
460
456
  #
461
- # source://cli-ui//lib/cli/ui/color.rb#27
462
- sig { params(sgr: ::String, name: ::Symbol).void }
457
+ # : (String sgr, Symbol name) -> void
458
+ #
459
+ # @return [Color] a new instance of Color
460
+ #
461
+ # source://cli-ui//lib/cli/ui/color.rb#23
463
462
  def initialize(sgr, name); end
464
463
 
465
- # @return [String]
464
+ # : String
466
465
  #
467
- # source://cli-ui//lib/cli/ui/color.rb#12
466
+ # source://cli-ui//lib/cli/ui/color.rb#8
468
467
  def code; end
469
468
 
470
- # source://cli-ui//lib/cli/ui/color.rb#15
471
- sig { returns(::Symbol) }
469
+ # : Symbol
470
+ #
471
+ # source://cli-ui//lib/cli/ui/color.rb#11
472
472
  def name; end
473
473
 
474
- # source://cli-ui//lib/cli/ui/color.rb#12
475
- sig { returns(::String) }
474
+ # : String
475
+ #
476
+ # source://cli-ui//lib/cli/ui/color.rb#8
476
477
  def sgr; end
477
478
 
478
479
  class << self
479
480
  # All available colors by name
480
481
  #
481
- # source://cli-ui//lib/cli/ui/color.rb#100
482
- sig { returns(T::Array[::Symbol]) }
482
+ # : -> Array[Symbol]
483
+ #
484
+ # source://cli-ui//lib/cli/ui/color.rb#93
483
485
  def available; end
484
486
 
485
487
  # Looks up a color code by name
@@ -491,68 +493,70 @@ class CLI::UI::Color
491
493
  # ==== Returns
492
494
  # Returns a color code
493
495
  #
494
- # source://cli-ui//lib/cli/ui/color.rb#91
495
- sig { params(name: T.any(::String, ::Symbol)).returns(::CLI::UI::Color) }
496
+ # : ((Symbol | String) name) -> Color
497
+ #
498
+ # source://cli-ui//lib/cli/ui/color.rb#84
496
499
  def lookup(name); end
497
500
  end
498
501
  end
499
502
 
500
503
  # default blue is low-contrast against black in some default terminal color scheme
501
504
  #
502
- # source://cli-ui//lib/cli/ui/color.rb#37
505
+ # source://cli-ui//lib/cli/ui/color.rb#33
503
506
  CLI::UI::Color::BLUE = T.let(T.unsafe(nil), CLI::UI::Color)
504
507
 
505
- # source://cli-ui//lib/cli/ui/color.rb#41
508
+ # source://cli-ui//lib/cli/ui/color.rb#37
506
509
  CLI::UI::Color::BOLD = T.let(T.unsafe(nil), CLI::UI::Color)
507
510
 
508
- # source://cli-ui//lib/cli/ui/color.rb#39
511
+ # source://cli-ui//lib/cli/ui/color.rb#35
509
512
  CLI::UI::Color::CYAN = T.let(T.unsafe(nil), CLI::UI::Color)
510
513
 
511
514
  # 240 is very dark gray; 255 is very light gray. 244 is somewhat dark.
512
515
  #
513
- # source://cli-ui//lib/cli/ui/color.rb#45
516
+ # source://cli-ui//lib/cli/ui/color.rb#41
514
517
  CLI::UI::Color::GRAY = T.let(T.unsafe(nil), CLI::UI::Color)
515
518
 
516
- # source://cli-ui//lib/cli/ui/color.rb#34
519
+ # source://cli-ui//lib/cli/ui/color.rb#30
517
520
  CLI::UI::Color::GREEN = T.let(T.unsafe(nil), CLI::UI::Color)
518
521
 
519
- # source://cli-ui//lib/cli/ui/color.rb#61
522
+ # source://cli-ui//lib/cli/ui/color.rb#58
520
523
  class CLI::UI::Color::InvalidColorName < ::ArgumentError
521
- # source://cli-ui//lib/cli/ui/color.rb#65
522
- sig { params(name: ::Symbol).void }
524
+ # : (Symbol name) -> void
525
+ #
526
+ # @return [InvalidColorName] a new instance of InvalidColorName
527
+ #
528
+ # source://cli-ui//lib/cli/ui/color.rb#60
523
529
  def initialize(name); end
524
530
 
525
- # source://cli-ui//lib/cli/ui/color.rb#71
526
- sig { returns(::String) }
531
+ # : -> String
532
+ #
533
+ # source://cli-ui//lib/cli/ui/color.rb#66
527
534
  def message; end
528
535
  end
529
536
 
530
- # source://cli-ui//lib/cli/ui/color.rb#38
537
+ # source://cli-ui//lib/cli/ui/color.rb#34
531
538
  CLI::UI::Color::MAGENTA = T.let(T.unsafe(nil), CLI::UI::Color)
532
539
 
533
- # source://cli-ui//lib/cli/ui/color.rb#49
540
+ # source://cli-ui//lib/cli/ui/color.rb#45
534
541
  CLI::UI::Color::MAP = T.let(T.unsafe(nil), Hash)
535
542
 
536
543
  # Using color 214 from the 256-color palette for a more distinct orange
537
544
  #
538
- # source://cli-ui//lib/cli/ui/color.rb#47
545
+ # source://cli-ui//lib/cli/ui/color.rb#43
539
546
  CLI::UI::Color::ORANGE = T.let(T.unsafe(nil), CLI::UI::Color)
540
547
 
541
- # source://cli-ui//lib/cli/ui/color.rb#33
548
+ # source://cli-ui//lib/cli/ui/color.rb#29
542
549
  CLI::UI::Color::RED = T.let(T.unsafe(nil), CLI::UI::Color)
543
550
 
544
- # source://cli-ui//lib/cli/ui/color.rb#40
551
+ # source://cli-ui//lib/cli/ui/color.rb#36
545
552
  CLI::UI::Color::RESET = T.let(T.unsafe(nil), CLI::UI::Color)
546
553
 
547
- # source://cli-ui//lib/cli/ui/color.rb#42
554
+ # source://cli-ui//lib/cli/ui/color.rb#38
548
555
  CLI::UI::Color::WHITE = T.let(T.unsafe(nil), CLI::UI::Color)
549
556
 
550
- # source://cli-ui//lib/cli/ui/color.rb#35
557
+ # source://cli-ui//lib/cli/ui/color.rb#31
551
558
  CLI::UI::Color::YELLOW = T.let(T.unsafe(nil), CLI::UI::Color)
552
559
 
553
- # source://cli-ui//lib/cli/ui.rb#31
554
- CLI::UI::Colorable = T.type_alias { T.any(::CLI::UI::Color, ::String, ::Symbol) }
555
-
556
560
  # source://cli-ui//lib/cli/ui/formatter.rb#9
557
561
  class CLI::UI::Formatter
558
562
  # Initialize a formatter with text.
@@ -561,8 +565,11 @@ class CLI::UI::Formatter
561
565
  #
562
566
  # * +text+ - the text to format
563
567
  #
564
- # source://cli-ui//lib/cli/ui/formatter.rb#87
565
- sig { params(text: ::String).void }
568
+ # : (String text) -> void
569
+ #
570
+ # @return [Formatter] a new instance of Formatter
571
+ #
572
+ # source://cli-ui//lib/cli/ui/formatter.rb#84
566
573
  def initialize(text); end
567
574
 
568
575
  # Format the text using a map.
@@ -575,92 +582,88 @@ class CLI::UI::Formatter
575
582
  #
576
583
  # * +:enable_color+ - enable color output? Default is true unless output is redirected
577
584
  #
578
- # source://cli-ui//lib/cli/ui/formatter.rb#103
579
- sig { params(sgr_map: T::Hash[::String, ::String], enable_color: T::Boolean).returns(::String) }
585
+ # : (?Hash[String, String] sgr_map, ?enable_color: bool) -> String
586
+ #
587
+ # source://cli-ui//lib/cli/ui/formatter.rb#100
580
588
  def format(sgr_map = T.unsafe(nil), enable_color: T.unsafe(nil)); end
581
589
 
582
590
  private
583
591
 
584
- # source://cli-ui//lib/cli/ui/formatter.rb#129
585
- sig do
586
- params(
587
- text: ::String,
588
- fmt: T::Array[T.any(::CLI::UI::Formatter::LITERAL_BRACES, ::String)],
589
- sgr_map: T::Hash[::String, ::String]
590
- ).returns(::String)
591
- end
592
+ # : (String text, stack fmt, Hash[String, String] sgr_map) -> String
593
+ #
594
+ # source://cli-ui//lib/cli/ui/formatter.rb#127
592
595
  def apply_format(text, fmt, sgr_map); end
593
596
 
594
- # source://cli-ui//lib/cli/ui/formatter.rb#211
595
- sig { params(text: ::String, stack: T::Array[T.any(::CLI::UI::Formatter::LITERAL_BRACES, ::String)]).void }
597
+ # : (String text, stack stack) -> void
598
+ #
599
+ # source://cli-ui//lib/cli/ui/formatter.rb#212
596
600
  def emit(text, stack); end
597
601
 
598
- # source://cli-ui//lib/cli/ui/formatter.rb#191
599
- sig do
600
- params(
601
- sc: ::StringScanner,
602
- stack: T::Array[T.any(::CLI::UI::Formatter::LITERAL_BRACES, ::String)]
603
- ).returns(T::Array[T.any(::CLI::UI::Formatter::LITERAL_BRACES, ::String)])
604
- end
602
+ # : (StringScanner sc, ?stack stack) -> stack
603
+ #
604
+ # source://cli-ui//lib/cli/ui/formatter.rb#190
605
605
  def parse_body(sc, stack = T.unsafe(nil)); end
606
606
 
607
- # source://cli-ui//lib/cli/ui/formatter.rb#147
608
- sig do
609
- params(
610
- sc: ::StringScanner,
611
- stack: T::Array[T.any(::CLI::UI::Formatter::LITERAL_BRACES, ::String)]
612
- ).returns(T::Array[T.any(::CLI::UI::Formatter::LITERAL_BRACES, ::String)])
613
- end
607
+ # : (StringScanner sc, stack stack) -> stack
608
+ #
609
+ # source://cli-ui//lib/cli/ui/formatter.rb#145
614
610
  def parse_expr(sc, stack); end
615
611
  end
616
612
 
617
- # source://cli-ui//lib/cli/ui/formatter.rb#42
613
+ # source://cli-ui//lib/cli/ui/formatter.rb#41
618
614
  CLI::UI::Formatter::BEGIN_EXPR = T.let(T.unsafe(nil), String)
619
615
 
620
- # source://cli-ui//lib/cli/ui/formatter.rb#57
616
+ # source://cli-ui//lib/cli/ui/formatter.rb#56
621
617
  CLI::UI::Formatter::DISCARD_BRACES = T.let(T.unsafe(nil), Range)
622
618
 
623
- # source://cli-ui//lib/cli/ui/formatter.rb#43
619
+ # source://cli-ui//lib/cli/ui/formatter.rb#42
624
620
  CLI::UI::Formatter::END_EXPR = T.let(T.unsafe(nil), String)
625
621
 
626
- # source://cli-ui//lib/cli/ui/formatter.rb#63
622
+ # : type stack = Array[String | LITERAL_BRACES]
623
+ #
624
+ # source://cli-ui//lib/cli/ui/formatter.rb#62
627
625
  class CLI::UI::Formatter::FormatError < ::StandardError
628
- # source://cli-ui//lib/cli/ui/formatter.rb#73
629
- sig { params(message: ::String, input: ::String, index: ::Integer).void }
626
+ # : (String message, String input, Integer index) -> void
627
+ #
628
+ # @return [FormatError] a new instance of FormatError
629
+ #
630
+ # source://cli-ui//lib/cli/ui/formatter.rb#70
630
631
  def initialize(message, input, index); end
631
632
 
632
- # source://cli-ui//lib/cli/ui/formatter.rb#70
633
- sig { returns(::Integer) }
633
+ # : Integer
634
+ #
635
+ # source://cli-ui//lib/cli/ui/formatter.rb#67
634
636
  def index; end
635
637
 
636
- # @return [Integer]
638
+ # : Integer
637
639
  #
638
- # source://cli-ui//lib/cli/ui/formatter.rb#70
640
+ # source://cli-ui//lib/cli/ui/formatter.rb#67
639
641
  def index=(_arg0); end
640
642
 
641
- # source://cli-ui//lib/cli/ui/formatter.rb#67
642
- sig { returns(::String) }
643
+ # : String
644
+ #
645
+ # source://cli-ui//lib/cli/ui/formatter.rb#64
643
646
  def input; end
644
647
 
645
- # @return [String]
648
+ # : String
646
649
  #
647
- # source://cli-ui//lib/cli/ui/formatter.rb#67
650
+ # source://cli-ui//lib/cli/ui/formatter.rb#64
648
651
  def input=(_arg0); end
649
652
  end
650
653
 
651
- # source://cli-ui//lib/cli/ui/formatter.rb#59
654
+ # source://cli-ui//lib/cli/ui/formatter.rb#58
652
655
  class CLI::UI::Formatter::LITERAL_BRACES; end
653
656
 
654
- # source://cli-ui//lib/cli/ui/formatter.rb#48
657
+ # source://cli-ui//lib/cli/ui/formatter.rb#47
655
658
  CLI::UI::Formatter::SCAN_BODY = T.let(T.unsafe(nil), Regexp)
656
659
 
657
- # source://cli-ui//lib/cli/ui/formatter.rb#46
660
+ # source://cli-ui//lib/cli/ui/formatter.rb#45
658
661
  CLI::UI::Formatter::SCAN_FUNCNAME = T.let(T.unsafe(nil), Regexp)
659
662
 
660
- # source://cli-ui//lib/cli/ui/formatter.rb#47
663
+ # source://cli-ui//lib/cli/ui/formatter.rb#46
661
664
  CLI::UI::Formatter::SCAN_GLYPH = T.let(T.unsafe(nil), Regexp)
662
665
 
663
- # source://cli-ui//lib/cli/ui/formatter.rb#45
666
+ # source://cli-ui//lib/cli/ui/formatter.rb#44
664
667
  CLI::UI::Formatter::SCAN_WIDGET = T.let(T.unsafe(nil), Regexp)
665
668
 
666
669
  # Available mappings of formattings
@@ -668,12 +671,9 @@ CLI::UI::Formatter::SCAN_WIDGET = T.let(T.unsafe(nil), Regexp)
668
671
  # There are presentational (colours and formatters)
669
672
  # and semantic (error, info, command) formatters available
670
673
  #
671
- # source://cli-ui//lib/cli/ui/formatter.rb#17
674
+ # source://cli-ui//lib/cli/ui/formatter.rb#15
672
675
  CLI::UI::Formatter::SGR_MAP = T.let(T.unsafe(nil), Hash)
673
676
 
674
- # source://cli-ui//lib/cli/ui/formatter.rb#61
675
- CLI::UI::Formatter::Stack = T.type_alias { T::Array[T.any(::CLI::UI::Formatter::LITERAL_BRACES, ::String)] }
676
-
677
677
  # source://cli-ui//lib/cli/ui/frame/frame_stack.rb#6
678
678
  module CLI::UI::Frame
679
679
  class << self
@@ -703,18 +703,11 @@ module CLI::UI::Frame
703
703
  #
704
704
  # MUST be inside an open frame or it raises a +UnnestedFrameException+
705
705
  #
706
+ # : (String? text, ?color: colorable?, ?elapsed: Numeric?, ?frame_style: frame_stylable?, ?to: io_like) -> void
707
+ #
706
708
  # @raise [UnnestedFrameException]
707
709
  #
708
- # source://cli-ui//lib/cli/ui/frame.rb#230
709
- sig do
710
- params(
711
- text: T.nilable(::String),
712
- color: T.nilable(T.any(::CLI::UI::Color, ::String, ::Symbol)),
713
- elapsed: T.nilable(::Numeric),
714
- frame_style: T.nilable(T.any(::CLI::UI::Frame::FrameStyle, ::String, ::Symbol)),
715
- to: T.any(::IO, ::StringIO)
716
- ).void
717
- end
710
+ # source://cli-ui//lib/cli/ui/frame.rb#202
718
711
  def close(text, color: T.unsafe(nil), elapsed: T.unsafe(nil), frame_style: T.unsafe(nil), to: T.unsafe(nil)); end
719
712
 
720
713
  # Adds a divider in a frame
@@ -744,21 +737,16 @@ module CLI::UI::Frame
744
737
  #
745
738
  # MUST be inside an open frame or it raises a +UnnestedFrameException+
746
739
  #
740
+ # : (String? text, ?color: colorable?, ?frame_style: frame_stylable?, ?to: io_like) -> void
741
+ #
747
742
  # @raise [UnnestedFrameException]
748
743
  #
749
- # source://cli-ui//lib/cli/ui/frame.rb#180
750
- sig do
751
- params(
752
- text: T.nilable(::String),
753
- color: T.nilable(T.any(::CLI::UI::Color, ::String, ::Symbol)),
754
- frame_style: T.nilable(T.any(::CLI::UI::Frame::FrameStyle, ::String, ::Symbol)),
755
- to: T.any(::IO, ::StringIO)
756
- ).void
757
- end
744
+ # source://cli-ui//lib/cli/ui/frame.rb#160
758
745
  def divider(text, color: T.unsafe(nil), frame_style: T.unsafe(nil), to: T.unsafe(nil)); end
759
746
 
760
- # source://cli-ui//lib/cli/ui/frame.rb#18
761
- sig { returns(::CLI::UI::Frame::FrameStyle) }
747
+ # : -> FrameStyle
748
+ #
749
+ # source://cli-ui//lib/cli/ui/frame.rb#15
762
750
  def frame_style; end
763
751
 
764
752
  # Set the default frame style.
@@ -769,8 +757,9 @@ module CLI::UI::Frame
769
757
  #
770
758
  # * +symbol+ or +FrameStyle+ - the default frame style to use for frames
771
759
  #
772
- # source://cli-ui//lib/cli/ui/frame.rb#31
773
- sig { params(frame_style: T.any(::CLI::UI::Frame::FrameStyle, ::String, ::Symbol)).void }
760
+ # : (frame_stylable frame_style) -> void
761
+ #
762
+ # source://cli-ui//lib/cli/ui/frame.rb#28
774
763
  def frame_style=(frame_style); end
775
764
 
776
765
  # Opens a new frame. Can be nested
@@ -815,20 +804,10 @@ module CLI::UI::Frame
815
804
  # Default Output:
816
805
  # ┏━━ Open ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
817
806
  #
818
- # source://cli-ui//lib/cli/ui/frame.rb#90
819
- sig do
820
- type_parameters(:T)
821
- .params(
822
- text: ::String,
823
- color: T.any(::CLI::UI::Color, ::String, ::Symbol),
824
- failure_text: T.nilable(::String),
825
- success_text: T.nilable(::String),
826
- timing: T.any(::Numeric, T::Boolean),
827
- frame_style: T.any(::CLI::UI::Frame::FrameStyle, ::String, ::Symbol),
828
- to: T.any(::IO, ::StringIO),
829
- block: T.nilable(T.proc.returns(T.type_parameter(:T)))
830
- ).returns(T.nilable(T.type_parameter(:T)))
831
- end
807
+ #
808
+ # : [T] (String text, ?color: colorable, ?failure_text: String?, ?success_text: String?, ?timing: (Numeric | bool), ?frame_style: frame_stylable, ?to: io_like) ?{ -> T } -> T?
809
+ #
810
+ # source://cli-ui//lib/cli/ui/frame.rb#76
832
811
  def open(text, color: T.unsafe(nil), failure_text: T.unsafe(nil), success_text: T.unsafe(nil), timing: T.unsafe(nil), frame_style: T.unsafe(nil), to: T.unsafe(nil), &block); end
833
812
 
834
813
  # Determines the prefix of a frame entry taking multi-nested frames into account
@@ -837,14 +816,15 @@ module CLI::UI::Frame
837
816
  #
838
817
  # * +:color+ - The color of the prefix. Defaults to +Thread.current[:cliui_frame_color_override]+
839
818
  #
840
- # source://cli-ui//lib/cli/ui/frame.rb#251
841
- sig { params(color: T.nilable(T.any(::CLI::UI::Color, ::String, ::Symbol))).returns(::String) }
819
+ # : (?color: colorable?) -> String
820
+ #
821
+ # source://cli-ui//lib/cli/ui/frame.rb#223
842
822
  def prefix(color: T.unsafe(nil)); end
843
823
 
844
824
  # The width of a prefix given the number of Frames in the stack
825
+ # : -> Integer
845
826
  #
846
- # source://cli-ui//lib/cli/ui/frame.rb#273
847
- sig { returns(::Integer) }
827
+ # source://cli-ui//lib/cli/ui/frame.rb#245
848
828
  def prefix_width; end
849
829
 
850
830
  # Override a color for a given thread.
@@ -853,14 +833,9 @@ module CLI::UI::Frame
853
833
  #
854
834
  # * +color+ - The color to override to
855
835
  #
856
- # source://cli-ui//lib/cli/ui/frame.rb#292
857
- sig do
858
- type_parameters(:T)
859
- .params(
860
- color: T.any(::CLI::UI::Color, ::String, ::Symbol),
861
- block: T.proc.returns(T.type_parameter(:T))
862
- ).returns(T.type_parameter(:T))
863
- end
836
+ # : [T] (colorable color) { -> T } -> T
837
+ #
838
+ # source://cli-ui//lib/cli/ui/frame.rb#260
864
839
  def with_frame_color_override(color, &block); end
865
840
 
866
841
  private
@@ -869,29 +844,29 @@ module CLI::UI::Frame
869
844
  # Numeric: return it
870
845
  # false: return nil
871
846
  # true: defaults to Time.new
847
+ # : (Time start, (Numeric | bool) timing) -> Numeric?
872
848
  #
873
- # source://cli-ui//lib/cli/ui/frame.rb#307
874
- sig { params(start: ::Time, timing: T.any(::Numeric, T::Boolean)).returns(T.nilable(::Numeric)) }
849
+ # source://cli-ui//lib/cli/ui/frame.rb#275
875
850
  def elapsed(start, timing); end
876
851
  end
877
852
  end
878
853
 
879
- # source://cli-ui//lib/cli/ui/frame.rb#12
854
+ # source://cli-ui//lib/cli/ui/frame.rb#11
880
855
  CLI::UI::Frame::DEFAULT_FRAME_COLOR = T.let(T.unsafe(nil), CLI::UI::Color)
881
856
 
882
857
  # source://cli-ui//lib/cli/ui/frame/frame_stack.rb#7
883
858
  module CLI::UI::Frame::FrameStack
884
859
  class << self
885
860
  # Fetch all items off the frame stack
861
+ # : -> Array[StackItem]
886
862
  #
887
- # source://cli-ui//lib/cli/ui/frame/frame_stack.rb#32
888
- sig { returns(T::Array[::CLI::UI::Frame::FrameStack::StackItem]) }
863
+ # source://cli-ui//lib/cli/ui/frame/frame_stack.rb#25
889
864
  def items; end
890
865
 
891
866
  # Removes and returns the last stack item off the stack
867
+ # : -> StackItem?
892
868
  #
893
- # source://cli-ui//lib/cli/ui/frame/frame_stack.rb#72
894
- sig { returns(T.nilable(::CLI::UI::Frame::FrameStack::StackItem)) }
869
+ # source://cli-ui//lib/cli/ui/frame/frame_stack.rb#60
895
870
  def pop; end
896
871
 
897
872
  # Push a new item onto the frame stack.
@@ -912,46 +887,39 @@ module CLI::UI::Frame::FrameStack
912
887
  # If both an item and a color/style pair are given, raises an +ArgumentError+
913
888
  # If the given item is not a +StackItem+, raises an +ArgumentError+
914
889
  #
915
- # source://cli-ui//lib/cli/ui/frame/frame_stack.rb#62
916
- sig do
917
- params(
918
- item: T.nilable(::CLI::UI::Frame::FrameStack::StackItem),
919
- color: T.nilable(::CLI::UI::Color),
920
- style: T.nilable(::CLI::UI::Frame::FrameStyle)
921
- ).void
922
- end
890
+ # : (?StackItem? item, ?color: CLI::UI::Color?, ?style: CLI::UI::Frame::FrameStyle?) -> void
891
+ #
892
+ # source://cli-ui//lib/cli/ui/frame/frame_stack.rb#48
923
893
  def push(item = T.unsafe(nil), color: T.unsafe(nil), style: T.unsafe(nil)); end
924
894
  end
925
895
  end
926
896
 
927
897
  # source://cli-ui//lib/cli/ui/frame/frame_stack.rb#8
928
898
  class CLI::UI::Frame::FrameStack::StackItem
929
- # source://cli-ui//lib/cli/ui/frame/frame_stack.rb#21
930
- sig do
931
- params(
932
- color_name: T.any(::CLI::UI::Color, ::String, ::Symbol),
933
- style_name: T.any(::CLI::UI::Frame::FrameStyle, ::String, ::Symbol)
934
- ).void
935
- end
899
+ # : (CLI::UI::colorable color_name, frame_stylable style_name) -> void
900
+ #
901
+ # @return [StackItem] a new instance of StackItem
902
+ #
903
+ # source://cli-ui//lib/cli/ui/frame/frame_stack.rb#16
936
904
  def initialize(color_name, style_name); end
937
905
 
938
- # source://cli-ui//lib/cli/ui/frame/frame_stack.rb#12
939
- sig { returns(::CLI::UI::Color) }
906
+ # : CLI::UI::Color
907
+ #
908
+ # source://cli-ui//lib/cli/ui/frame/frame_stack.rb#10
940
909
  def color; end
941
910
 
942
- # source://cli-ui//lib/cli/ui/frame/frame_stack.rb#15
943
- sig { returns(::CLI::UI::Frame::FrameStyle) }
911
+ # : CLI::UI::Frame::FrameStyle
912
+ #
913
+ # source://cli-ui//lib/cli/ui/frame/frame_stack.rb#13
944
914
  def frame_style; end
945
915
  end
946
916
 
947
- # @abstract Subclasses must implement the `abstract` methods below.
917
+ # @abstract
948
918
  #
949
- # source://cli-ui//lib/cli/ui/frame/frame_style.rb#9
919
+ # source://cli-ui//lib/cli/ui/frame/frame_style.rb#10
950
920
  module CLI::UI::Frame::FrameStyle
951
921
  include ::Kernel
952
922
 
953
- abstract!
954
-
955
923
  # Draws the "Close" line for this frame style
956
924
  #
957
925
  # ==== Attributes
@@ -963,10 +931,12 @@ module CLI::UI::Frame::FrameStyle
963
931
  # * +:color+ - (required) The color of the frame.
964
932
  # * +:right_text+ - Text to print at the right of the line. Defaults to nil
965
933
  #
934
+ # : (String, color: CLI::UI::Color, ?right_text: String?) -> String
935
+ #
966
936
  # @abstract
937
+ # @raise [NotImplementedError]
967
938
  #
968
- # source://cli-ui//lib/cli/ui/frame/frame_style.rb#78
969
- sig { abstract.params(text: ::String, color: ::CLI::UI::Color, right_text: T.nilable(::String)).returns(::String) }
939
+ # source://cli-ui//lib/cli/ui/frame/frame_style.rb#84
970
940
  def close(text, color:, right_text: T.unsafe(nil)); end
971
941
 
972
942
  # Draws a "divider" line for the current frame style
@@ -979,29 +949,33 @@ module CLI::UI::Frame::FrameStyle
979
949
  #
980
950
  # * +:color+ - (required) The color of the frame.
981
951
  #
952
+ # : (String, color: CLI::UI::Color) -> String
953
+ #
982
954
  # @abstract
955
+ # @raise [NotImplementedError]
983
956
  #
984
- # source://cli-ui//lib/cli/ui/frame/frame_style.rb#91
985
- sig { abstract.params(text: ::String, color: ::CLI::UI::Color).returns(::String) }
957
+ # source://cli-ui//lib/cli/ui/frame/frame_style.rb#100
986
958
  def divider(text, color:); end
987
959
 
988
960
  # Returns the character(s) that should be printed at the beginning
989
961
  # of lines inside this frame
962
+ # : -> String
990
963
  #
991
964
  # @abstract
965
+ # @raise [NotImplementedError]
992
966
  #
993
967
  # source://cli-ui//lib/cli/ui/frame/frame_style.rb#45
994
- sig { abstract.returns(::String) }
995
968
  def prefix; end
996
969
 
997
970
  # Returns the printing width of the prefix
971
+ # : -> Integer
998
972
  #
999
- # source://cli-ui//lib/cli/ui/frame/frame_style.rb#49
1000
- sig { returns(::Integer) }
973
+ # source://cli-ui//lib/cli/ui/frame/frame_style.rb#51
1001
974
  def prefix_width; end
1002
975
 
1003
- # source://cli-ui//lib/cli/ui/frame/frame_style.rb#94
1004
- sig { params(x: ::Integer, str: ::String).returns(::String) }
976
+ # : (Integer x, String str) -> String
977
+ #
978
+ # source://cli-ui//lib/cli/ui/frame/frame_style.rb#105
1005
979
  def print_at_x(x, str); end
1006
980
 
1007
981
  # Draws the "Open" line for this frame style
@@ -1014,16 +988,20 @@ module CLI::UI::Frame::FrameStyle
1014
988
  #
1015
989
  # * +:color+ - (required) The color of the frame.
1016
990
  #
991
+ # : (String, color: CLI::UI::Color) -> String
992
+ #
1017
993
  # @abstract
994
+ # @raise [NotImplementedError]
1018
995
  #
1019
- # source://cli-ui//lib/cli/ui/frame/frame_style.rb#64
1020
- sig { abstract.params(text: ::String, color: ::CLI::UI::Color).returns(::String) }
996
+ # source://cli-ui//lib/cli/ui/frame/frame_style.rb#67
1021
997
  def start(text, color:); end
1022
998
 
999
+ # : -> Symbol
1000
+ #
1023
1001
  # @abstract
1002
+ # @raise [NotImplementedError]
1024
1003
  #
1025
- # source://cli-ui//lib/cli/ui/frame/frame_style.rb#40
1026
- sig { abstract.returns(::Symbol) }
1004
+ # source://cli-ui//lib/cli/ui/frame/frame_style.rb#37
1027
1005
  def style_name; end
1028
1006
 
1029
1007
  class << self
@@ -1032,9 +1010,9 @@ module CLI::UI::Frame::FrameStyle
1032
1010
  # ==== Attributes
1033
1011
  #
1034
1012
  # * +symbol+ - frame style name to lookup
1013
+ # : ((String | Symbol) name) -> FrameStyle
1035
1014
  #
1036
- # source://cli-ui//lib/cli/ui/frame/frame_style.rb#32
1037
- sig { params(name: T.any(::String, ::Symbol)).returns(::CLI::UI::Frame::FrameStyle) }
1015
+ # source://cli-ui//lib/cli/ui/frame/frame_style.rb#28
1038
1016
  def lookup(name); end
1039
1017
  end
1040
1018
  end
@@ -1059,8 +1037,9 @@ module CLI::UI::Frame::FrameStyle::Box
1059
1037
  #
1060
1038
  # ┗━━ Close ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1061
1039
  #
1062
- # source://cli-ui//lib/cli/ui/frame/frame_style/box.rb#84
1063
- sig { override.params(text: ::String, color: ::CLI::UI::Color, right_text: T.nilable(::String)).returns(::String) }
1040
+ # : (String text, color: CLI::UI::Color, ?right_text: String?) -> String
1041
+ #
1042
+ # source://cli-ui//lib/cli/ui/frame/frame_style/box.rb#87
1064
1043
  def close(text, color:, right_text: T.unsafe(nil)); end
1065
1044
 
1066
1045
  # Draws a "divider" line for the current frame style
@@ -1077,12 +1056,14 @@ module CLI::UI::Frame::FrameStyle::Box
1077
1056
  #
1078
1057
  # ┣━━ Divider ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1079
1058
  #
1080
- # source://cli-ui//lib/cli/ui/frame/frame_style/box.rb#64
1081
- sig { override.params(text: ::String, color: ::CLI::UI::Color).returns(::String) }
1059
+ # : (String text, color: CLI::UI::Color) -> String
1060
+ #
1061
+ # source://cli-ui//lib/cli/ui/frame/frame_style/box.rb#66
1082
1062
  def divider(text, color:); end
1083
1063
 
1064
+ # : -> String
1065
+ #
1084
1066
  # source://cli-ui//lib/cli/ui/frame/frame_style/box.rb#26
1085
- sig { override.returns(::String) }
1086
1067
  def prefix; end
1087
1068
 
1088
1069
  # Draws the "Open" line for this frame style
@@ -1099,25 +1080,21 @@ module CLI::UI::Frame::FrameStyle::Box
1099
1080
  #
1100
1081
  # ┏━━ Open ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1101
1082
  #
1102
- # source://cli-ui//lib/cli/ui/frame/frame_style/box.rb#45
1103
- sig { override.params(text: ::String, color: ::CLI::UI::Color).returns(::String) }
1083
+ # : (String text, color: CLI::UI::Color) -> String
1084
+ #
1085
+ # source://cli-ui//lib/cli/ui/frame/frame_style/box.rb#46
1104
1086
  def start(text, color:); end
1105
1087
 
1106
- # source://cli-ui//lib/cli/ui/frame/frame_style/box.rb#21
1107
- sig { override.returns(::Symbol) }
1088
+ # : -> Symbol
1089
+ #
1090
+ # source://cli-ui//lib/cli/ui/frame/frame_style/box.rb#20
1108
1091
  def style_name; end
1109
1092
 
1110
1093
  private
1111
1094
 
1112
- # source://cli-ui//lib/cli/ui/frame/frame_style/box.rb#93
1113
- sig do
1114
- params(
1115
- text: ::String,
1116
- color: ::CLI::UI::Color,
1117
- first: ::String,
1118
- right_text: T.nilable(::String)
1119
- ).returns(::String)
1120
- end
1095
+ # : (String text, color: CLI::UI::Color, first: String, ?right_text: String?) -> String
1096
+ #
1097
+ # source://cli-ui//lib/cli/ui/frame/frame_style/box.rb#94
1121
1098
  def edge(text, color:, first:, right_text: T.unsafe(nil)); end
1122
1099
  end
1123
1100
  end
@@ -1157,8 +1134,9 @@ module CLI::UI::Frame::FrameStyle::Bracket
1157
1134
  #
1158
1135
  # ┗━━ Close
1159
1136
  #
1160
- # source://cli-ui//lib/cli/ui/frame/frame_style/bracket.rb#84
1161
- sig { override.params(text: ::String, color: ::CLI::UI::Color, right_text: T.nilable(::String)).returns(::String) }
1137
+ # : (String text, color: CLI::UI::Color, ?right_text: String?) -> String
1138
+ #
1139
+ # source://cli-ui//lib/cli/ui/frame/frame_style/bracket.rb#87
1162
1140
  def close(text, color:, right_text: T.unsafe(nil)); end
1163
1141
 
1164
1142
  # Draws a "divider" line for the current frame style
@@ -1175,12 +1153,14 @@ module CLI::UI::Frame::FrameStyle::Bracket
1175
1153
  #
1176
1154
  # ┣━━ Divider
1177
1155
  #
1178
- # source://cli-ui//lib/cli/ui/frame/frame_style/bracket.rb#64
1179
- sig { override.params(text: ::String, color: ::CLI::UI::Color).returns(::String) }
1156
+ # : (String text, color: CLI::UI::Color) -> String
1157
+ #
1158
+ # source://cli-ui//lib/cli/ui/frame/frame_style/bracket.rb#66
1180
1159
  def divider(text, color:); end
1181
1160
 
1161
+ # : -> String
1162
+ #
1182
1163
  # source://cli-ui//lib/cli/ui/frame/frame_style/bracket.rb#26
1183
- sig { override.returns(::String) }
1184
1164
  def prefix; end
1185
1165
 
1186
1166
  # Draws the "Open" line for this frame style
@@ -1197,25 +1177,21 @@ module CLI::UI::Frame::FrameStyle::Bracket
1197
1177
  #
1198
1178
  # ┏━━ Open
1199
1179
  #
1200
- # source://cli-ui//lib/cli/ui/frame/frame_style/bracket.rb#45
1201
- sig { override.params(text: ::String, color: ::CLI::UI::Color).returns(::String) }
1180
+ # : (String text, color: CLI::UI::Color) -> String
1181
+ #
1182
+ # source://cli-ui//lib/cli/ui/frame/frame_style/bracket.rb#46
1202
1183
  def start(text, color:); end
1203
1184
 
1204
- # source://cli-ui//lib/cli/ui/frame/frame_style/bracket.rb#21
1205
- sig { override.returns(::Symbol) }
1185
+ # : -> Symbol
1186
+ #
1187
+ # source://cli-ui//lib/cli/ui/frame/frame_style/bracket.rb#20
1206
1188
  def style_name; end
1207
1189
 
1208
1190
  private
1209
1191
 
1210
- # source://cli-ui//lib/cli/ui/frame/frame_style/bracket.rb#93
1211
- sig do
1212
- params(
1213
- text: ::String,
1214
- color: ::CLI::UI::Color,
1215
- first: ::String,
1216
- right_text: T.nilable(::String)
1217
- ).returns(::String)
1218
- end
1192
+ # : (String text, color: CLI::UI::Color, first: String, ?right_text: String?) -> String
1193
+ #
1194
+ # source://cli-ui//lib/cli/ui/frame/frame_style/bracket.rb#94
1219
1195
  def edge(text, color:, first:, right_text: T.unsafe(nil)); end
1220
1196
  end
1221
1197
  end
@@ -1235,27 +1211,28 @@ CLI::UI::Frame::FrameStyle::Bracket::TOP_LEFT = T.let(T.unsafe(nil), String)
1235
1211
  # source://cli-ui//lib/cli/ui/frame/frame_style/bracket.rb#11
1236
1212
  CLI::UI::Frame::FrameStyle::Bracket::VERTICAL = T.let(T.unsafe(nil), String)
1237
1213
 
1238
- # source://cli-ui//lib/cli/ui/frame/frame_style.rb#98
1214
+ # source://cli-ui//lib/cli/ui/frame/frame_style.rb#109
1239
1215
  class CLI::UI::Frame::FrameStyle::InvalidFrameStyleName < ::ArgumentError
1240
- # source://cli-ui//lib/cli/ui/frame/frame_style.rb#102
1241
- sig { params(name: T.any(::String, ::Symbol)).void }
1216
+ # : ((String | Symbol) name) -> void
1217
+ #
1218
+ # @return [InvalidFrameStyleName] a new instance of InvalidFrameStyleName
1219
+ #
1220
+ # source://cli-ui//lib/cli/ui/frame/frame_style.rb#111
1242
1221
  def initialize(name); end
1243
1222
 
1244
- # source://cli-ui//lib/cli/ui/frame/frame_style.rb#108
1245
- sig { returns(::String) }
1223
+ # : -> String
1224
+ #
1225
+ # source://cli-ui//lib/cli/ui/frame/frame_style.rb#117
1246
1226
  def message; end
1247
1227
  end
1248
1228
 
1249
- # source://cli-ui//lib/cli/ui/frame/frame_style.rb#18
1229
+ # source://cli-ui//lib/cli/ui/frame/frame_style.rb#16
1250
1230
  CLI::UI::Frame::FrameStyle::MAP = T.let(T.unsafe(nil), Hash)
1251
1231
 
1252
- # source://cli-ui//lib/cli/ui/frame.rb#11
1232
+ # source://cli-ui//lib/cli/ui/frame.rb#10
1253
1233
  class CLI::UI::Frame::UnnestedFrameException < ::StandardError; end
1254
1234
 
1255
- # source://cli-ui//lib/cli/ui.rb#32
1256
- CLI::UI::FrameStylable = T.type_alias { T.any(::CLI::UI::Frame::FrameStyle, ::String, ::Symbol) }
1257
-
1258
- # source://cli-ui//lib/cli/ui/glyph.rb#8
1235
+ # source://cli-ui//lib/cli/ui/glyph.rb#6
1259
1236
  class CLI::UI::Glyph
1260
1237
  # Creates a new glyph
1261
1238
  #
@@ -1266,49 +1243,49 @@ class CLI::UI::Glyph
1266
1243
  # * +plain+ - A fallback plain string to be used in case glyphs are disabled
1267
1244
  # * +color+ - What color to output the glyph. Check +CLI::UI::Color+ for options.
1268
1245
  #
1269
- # source://cli-ui//lib/cli/ui/glyph.rb#47
1270
- sig do
1271
- params(
1272
- handle: ::String,
1273
- codepoint: T.any(::Integer, T::Array[::Integer]),
1274
- plain: ::String,
1275
- color: ::CLI::UI::Color
1276
- ).void
1277
- end
1246
+ # : (String handle, (Integer | Array[Integer]) codepoint, String plain, Color color) -> void
1247
+ #
1248
+ # @return [Glyph] a new instance of Glyph
1249
+ #
1250
+ # source://cli-ui//lib/cli/ui/glyph.rb#41
1278
1251
  def initialize(handle, codepoint, plain, color); end
1279
1252
 
1280
- # @return [String]
1253
+ # : String
1281
1254
  #
1282
- # source://cli-ui//lib/cli/ui/glyph.rb#29
1255
+ # source://cli-ui//lib/cli/ui/glyph.rb#23
1283
1256
  def char; end
1284
1257
 
1285
- # source://cli-ui//lib/cli/ui/glyph.rb#32
1286
- sig { returns(T.any(::Integer, T::Array[::Integer])) }
1258
+ # : (Integer | Array[Integer])
1259
+ #
1260
+ # source://cli-ui//lib/cli/ui/glyph.rb#26
1287
1261
  def codepoint; end
1288
1262
 
1289
- # source://cli-ui//lib/cli/ui/glyph.rb#35
1290
- sig { returns(::CLI::UI::Color) }
1263
+ # : Color
1264
+ #
1265
+ # source://cli-ui//lib/cli/ui/glyph.rb#29
1291
1266
  def color; end
1292
1267
 
1293
- # @return [String]
1268
+ # : String
1294
1269
  #
1295
- # source://cli-ui//lib/cli/ui/glyph.rb#29
1270
+ # source://cli-ui//lib/cli/ui/glyph.rb#23
1296
1271
  def fmt; end
1297
1272
 
1298
- # source://cli-ui//lib/cli/ui/glyph.rb#29
1299
- sig { returns(::String) }
1273
+ # : String
1274
+ #
1275
+ # source://cli-ui//lib/cli/ui/glyph.rb#23
1300
1276
  def handle; end
1301
1277
 
1302
- # @return [String]
1278
+ # : String
1303
1279
  #
1304
- # source://cli-ui//lib/cli/ui/glyph.rb#29
1280
+ # source://cli-ui//lib/cli/ui/glyph.rb#23
1305
1281
  def to_s; end
1306
1282
 
1307
1283
  class << self
1308
1284
  # All available glyphs by name
1309
1285
  #
1310
- # source://cli-ui//lib/cli/ui/glyph.rb#92
1311
- sig { returns(T::Array[::String]) }
1286
+ # : -> Array[String]
1287
+ #
1288
+ # source://cli-ui//lib/cli/ui/glyph.rb#84
1312
1289
  def available; end
1313
1290
 
1314
1291
  # Looks up a glyph by name
@@ -1320,115 +1297,136 @@ class CLI::UI::Glyph
1320
1297
  # ==== Returns
1321
1298
  # Returns a terminal output-capable string
1322
1299
  #
1323
- # source://cli-ui//lib/cli/ui/glyph.rb#83
1324
- sig { params(name: ::String).returns(::CLI::UI::Glyph) }
1300
+ # : (String name) -> Glyph
1301
+ #
1302
+ # source://cli-ui//lib/cli/ui/glyph.rb#75
1325
1303
  def lookup(name); end
1326
1304
  end
1327
1305
  end
1328
1306
 
1329
1307
  # Bug emoji (🐛)
1330
1308
  #
1331
- # source://cli-ui//lib/cli/ui/glyph.rb#65
1309
+ # source://cli-ui//lib/cli/ui/glyph.rb#59
1332
1310
  CLI::UI::Glyph::BUG = T.let(T.unsafe(nil), CLI::UI::Glyph)
1333
1311
 
1334
1312
  # GREEN CHECK MARK (✓)
1335
1313
  #
1336
- # source://cli-ui//lib/cli/ui/glyph.rb#63
1314
+ # source://cli-ui//lib/cli/ui/glyph.rb#57
1337
1315
  CLI::UI::Glyph::CHECK = T.let(T.unsafe(nil), CLI::UI::Glyph)
1338
1316
 
1339
1317
  # RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK (»)
1340
1318
  #
1341
- # source://cli-ui//lib/cli/ui/glyph.rb#66
1319
+ # source://cli-ui//lib/cli/ui/glyph.rb#60
1342
1320
  CLI::UI::Glyph::CHEVRON = T.let(T.unsafe(nil), CLI::UI::Glyph)
1343
1321
 
1344
1322
  # HOURGLASS (⧖)
1345
1323
  #
1346
- # source://cli-ui//lib/cli/ui/glyph.rb#67
1324
+ # source://cli-ui//lib/cli/ui/glyph.rb#61
1347
1325
  CLI::UI::Glyph::HOURGLASS = T.let(T.unsafe(nil), CLI::UI::Glyph)
1348
1326
 
1349
1327
  # BLUE MATHEMATICAL SCRIPT SMALL i (𝒾)
1350
1328
  #
1351
- # source://cli-ui//lib/cli/ui/glyph.rb#61
1329
+ # source://cli-ui//lib/cli/ui/glyph.rb#55
1352
1330
  CLI::UI::Glyph::INFO = T.let(T.unsafe(nil), CLI::UI::Glyph)
1353
1331
 
1354
- # source://cli-ui//lib/cli/ui/glyph.rb#11
1332
+ # source://cli-ui//lib/cli/ui/glyph.rb#7
1355
1333
  class CLI::UI::Glyph::InvalidGlyphHandle < ::ArgumentError
1356
- # source://cli-ui//lib/cli/ui/glyph.rb#15
1357
- sig { params(handle: ::String).void }
1334
+ # : (String handle) -> void
1335
+ #
1336
+ # @return [InvalidGlyphHandle] a new instance of InvalidGlyphHandle
1337
+ #
1338
+ # source://cli-ui//lib/cli/ui/glyph.rb#9
1358
1339
  def initialize(handle); end
1359
1340
 
1360
- # source://cli-ui//lib/cli/ui/glyph.rb#21
1361
- sig { returns(::String) }
1341
+ # : -> String
1342
+ #
1343
+ # source://cli-ui//lib/cli/ui/glyph.rb#15
1362
1344
  def message; end
1363
1345
  end
1364
1346
 
1365
1347
  # Mapping of glyphs to terminal output
1366
1348
  #
1367
- # source://cli-ui//lib/cli/ui/glyph.rb#59
1349
+ # source://cli-ui//lib/cli/ui/glyph.rb#53
1368
1350
  CLI::UI::Glyph::MAP = T.let(T.unsafe(nil), Hash)
1369
1351
 
1370
1352
  # BLUE QUESTION MARK (?)
1371
1353
  #
1372
- # source://cli-ui//lib/cli/ui/glyph.rb#62
1354
+ # source://cli-ui//lib/cli/ui/glyph.rb#56
1373
1355
  CLI::UI::Glyph::QUESTION = T.let(T.unsafe(nil), CLI::UI::Glyph)
1374
1356
 
1375
1357
  # YELLOW SMALL STAR (⭑)
1376
1358
  #
1377
- # source://cli-ui//lib/cli/ui/glyph.rb#60
1359
+ # source://cli-ui//lib/cli/ui/glyph.rb#54
1378
1360
  CLI::UI::Glyph::STAR = T.let(T.unsafe(nil), CLI::UI::Glyph)
1379
1361
 
1380
1362
  # WARNING SIGN + VARIATION SELECTOR 16 (⚠️ )
1381
1363
  #
1382
- # source://cli-ui//lib/cli/ui/glyph.rb#68
1364
+ # source://cli-ui//lib/cli/ui/glyph.rb#62
1383
1365
  CLI::UI::Glyph::WARNING = T.let(T.unsafe(nil), CLI::UI::Glyph)
1384
1366
 
1385
1367
  # RED BALLOT X (✗)
1386
1368
  #
1387
- # source://cli-ui//lib/cli/ui/glyph.rb#64
1369
+ # source://cli-ui//lib/cli/ui/glyph.rb#58
1388
1370
  CLI::UI::Glyph::X = T.let(T.unsafe(nil), CLI::UI::Glyph)
1389
1371
 
1390
- # source://cli-ui//lib/cli/ui.rb#33
1391
- CLI::UI::IOLike = T.type_alias { T.any(::IO, ::StringIO) }
1392
-
1393
1372
  # source://cli-ui//lib/cli/ui/os.rb#8
1394
1373
  class CLI::UI::OS
1395
- # source://cli-ui//lib/cli/ui/os.rb#12
1396
- sig { params(emoji: T::Boolean, color_prompt: T::Boolean, arrow_keys: T::Boolean, shift_cursor: T::Boolean).void }
1374
+ # : (?emoji: bool, ?color_prompt: bool, ?arrow_keys: bool, ?shift_cursor: bool) -> void
1375
+ #
1376
+ # @return [OS] a new instance of OS
1377
+ #
1378
+ # source://cli-ui//lib/cli/ui/os.rb#10
1397
1379
  def initialize(emoji: T.unsafe(nil), color_prompt: T.unsafe(nil), arrow_keys: T.unsafe(nil), shift_cursor: T.unsafe(nil)); end
1398
1380
 
1399
- # source://cli-ui//lib/cli/ui/os.rb#35
1400
- sig { returns(T::Boolean) }
1381
+ # : -> bool
1382
+ #
1383
+ # @return [Boolean]
1384
+ #
1385
+ # source://cli-ui//lib/cli/ui/os.rb#33
1401
1386
  def shift_cursor_back_on_horizontal_absolute?; end
1402
1387
 
1403
- # source://cli-ui//lib/cli/ui/os.rb#30
1404
- sig { returns(T::Boolean) }
1388
+ # : -> bool
1389
+ #
1390
+ # @return [Boolean]
1391
+ #
1392
+ # source://cli-ui//lib/cli/ui/os.rb#28
1405
1393
  def suggest_arrow_keys?; end
1406
1394
 
1407
- # source://cli-ui//lib/cli/ui/os.rb#25
1408
- sig { returns(T::Boolean) }
1395
+ # : -> bool
1396
+ #
1397
+ # @return [Boolean]
1398
+ #
1399
+ # source://cli-ui//lib/cli/ui/os.rb#23
1409
1400
  def use_color_prompt?; end
1410
1401
 
1411
- # source://cli-ui//lib/cli/ui/os.rb#20
1412
- sig { returns(T::Boolean) }
1402
+ # : -> bool
1403
+ #
1404
+ # @return [Boolean]
1405
+ #
1406
+ # source://cli-ui//lib/cli/ui/os.rb#18
1413
1407
  def use_emoji?; end
1414
1408
 
1415
1409
  class << self
1416
- # source://cli-ui//lib/cli/ui/os.rb#43
1417
- sig { returns(::CLI::UI::OS) }
1410
+ # : -> OS
1411
+ #
1412
+ # source://cli-ui//lib/cli/ui/os.rb#39
1418
1413
  def current; end
1419
1414
  end
1420
1415
  end
1421
1416
 
1422
- # source://cli-ui//lib/cli/ui/os.rb#60
1417
+ # source://cli-ui//lib/cli/ui/os.rb#59
1418
+ CLI::UI::OS::FREEBSD = T.let(T.unsafe(nil), CLI::UI::OS)
1419
+
1420
+ # source://cli-ui//lib/cli/ui/os.rb#58
1423
1421
  CLI::UI::OS::LINUX = T.let(T.unsafe(nil), CLI::UI::OS)
1424
1422
 
1425
- # source://cli-ui//lib/cli/ui/os.rb#59
1423
+ # source://cli-ui//lib/cli/ui/os.rb#57
1426
1424
  CLI::UI::OS::MAC = T.let(T.unsafe(nil), CLI::UI::OS)
1427
1425
 
1428
- # source://cli-ui//lib/cli/ui/os.rb#61
1426
+ # source://cli-ui//lib/cli/ui/os.rb#60
1429
1427
  CLI::UI::OS::WINDOWS = T.let(T.unsafe(nil), CLI::UI::OS)
1430
1428
 
1431
- # source://cli-ui//lib/cli/ui/printer.rb#8
1429
+ # source://cli-ui//lib/cli/ui/printer.rb#6
1432
1430
  class CLI::UI::Printer
1433
1431
  class << self
1434
1432
  # Print a message to a stream with common utilities.
@@ -1456,23 +1454,13 @@ class CLI::UI::Printer
1456
1454
  #
1457
1455
  # CLI::UI::Printer.puts('{{x}} Ouch', to: $stderr)
1458
1456
  #
1459
- # source://cli-ui//lib/cli/ui/printer.rb#50
1460
- sig do
1461
- params(
1462
- msg: ::String,
1463
- frame_color: T.nilable(T.any(::CLI::UI::Color, ::String, ::Symbol)),
1464
- to: T.any(::IO, ::StringIO),
1465
- encoding: T.nilable(::Encoding),
1466
- format: T::Boolean,
1467
- graceful: T::Boolean,
1468
- wrap: T::Boolean
1469
- ).returns(T::Boolean)
1470
- end
1457
+ #
1458
+ # source://cli-ui//lib/cli/ui/printer.rb#34
1471
1459
  def puts(msg, frame_color: T.unsafe(nil), to: T.unsafe(nil), encoding: T.unsafe(nil), format: T.unsafe(nil), graceful: T.unsafe(nil), wrap: T.unsafe(nil)); end
1472
1460
  end
1473
1461
  end
1474
1462
 
1475
- # source://cli-ui//lib/cli/ui/progress.rb#8
1463
+ # source://cli-ui//lib/cli/ui/progress.rb#6
1476
1464
  class CLI::UI::Progress
1477
1465
  # Initialize a progress bar. Typically used in a +Progress.progress+ block
1478
1466
  #
@@ -1480,10 +1468,14 @@ class CLI::UI::Progress
1480
1468
  #
1481
1469
  # * +:title+ - The title of the progress bar
1482
1470
  # * +:width+ - The width of the terminal
1471
+ # * +:reporter+ - The progress reporter instance
1472
+ #
1473
+ # : (?String? title, ?width: Integer, ?reporter: ProgressReporter::Reporter?) -> void
1483
1474
  #
1484
- # source://cli-ui//lib/cli/ui/progress.rb#74
1485
- sig { params(title: T.nilable(::String), width: ::Integer).void }
1486
- def initialize(title = T.unsafe(nil), width: T.unsafe(nil)); end
1475
+ # @return [Progress] a new instance of Progress
1476
+ #
1477
+ # source://cli-ui//lib/cli/ui/progress.rb#65
1478
+ def initialize(title = T.unsafe(nil), width: T.unsafe(nil), reporter: T.unsafe(nil)); end
1487
1479
 
1488
1480
  # Set the progress of the bar. Typically used in a +Progress.progress+ block
1489
1481
  #
@@ -1495,16 +1487,18 @@ class CLI::UI::Progress
1495
1487
  #
1496
1488
  # *Note:* The +:percent+ and +:set_percent must be between 0.00 and 1.0
1497
1489
  #
1490
+ # : (?percent: Numeric?, ?set_percent: Numeric?) -> void
1491
+ #
1498
1492
  # @raise [ArgumentError]
1499
1493
  #
1500
- # source://cli-ui//lib/cli/ui/progress.rb#91
1501
- sig { params(percent: T.nilable(::Numeric), set_percent: T.nilable(::Numeric)).void }
1494
+ # source://cli-ui//lib/cli/ui/progress.rb#83
1502
1495
  def tick(percent: T.unsafe(nil), set_percent: T.unsafe(nil)); end
1503
1496
 
1504
1497
  # Format the progress bar to be printed to terminal
1505
1498
  #
1506
- # source://cli-ui//lib/cli/ui/progress.rb#118
1507
- sig { returns(::String) }
1499
+ # : -> String
1500
+ #
1501
+ # source://cli-ui//lib/cli/ui/progress.rb#113
1508
1502
  def to_s; end
1509
1503
 
1510
1504
  # Update the progress bar title
@@ -1513,8 +1507,9 @@ class CLI::UI::Progress
1513
1507
  #
1514
1508
  # * +new_title+ - title to change the progress bar to
1515
1509
  #
1516
- # source://cli-ui//lib/cli/ui/progress.rb#111
1517
- sig { params(new_title: ::String).void }
1510
+ # : (String new_title) -> void
1511
+ #
1512
+ # source://cli-ui//lib/cli/ui/progress.rb#106
1518
1513
  def update_title(new_title); end
1519
1514
 
1520
1515
  class << self
@@ -1544,31 +1539,159 @@ class CLI::UI::Progress
1544
1539
  # bar.tick(percent: 0.05)
1545
1540
  # bar.update_title('New title')
1546
1541
  # end
1542
+ # : [T] (?String? title, ?width: Integer) { (Progress bar) -> T } -> T
1547
1543
  #
1548
- # source://cli-ui//lib/cli/ui/progress.rb#54
1549
- sig do
1550
- type_parameters(:T)
1551
- .params(
1552
- title: T.nilable(::String),
1553
- width: ::Integer,
1554
- block: T.proc.params(bar: ::CLI::UI::Progress).returns(T.type_parameter(:T))
1555
- ).returns(T.type_parameter(:T))
1556
- end
1544
+ # source://cli-ui//lib/cli/ui/progress.rb#40
1557
1545
  def progress(title = T.unsafe(nil), width: T.unsafe(nil), &block); end
1558
1546
  end
1559
1547
  end
1560
1548
 
1561
1549
  # A Cyan filled block
1562
1550
  #
1563
- # source://cli-ui//lib/cli/ui/progress.rb#12
1551
+ # source://cli-ui//lib/cli/ui/progress.rb#8
1564
1552
  CLI::UI::Progress::FILLED_BAR = T.let(T.unsafe(nil), String)
1565
1553
 
1566
1554
  # A bright white block
1567
1555
  #
1568
- # source://cli-ui//lib/cli/ui/progress.rb#14
1556
+ # source://cli-ui//lib/cli/ui/progress.rb#10
1569
1557
  CLI::UI::Progress::UNFILLED_BAR = T.let(T.unsafe(nil), String)
1570
1558
 
1571
- # source://cli-ui//lib/cli/ui/prompt.rb#15
1559
+ # Handles terminal progress bar reporting using ConEmu OSC 9;4 sequences
1560
+ # Supports:
1561
+ # - Numerical progress (0-100%)
1562
+ # - Indeterminate/pulsing progress
1563
+ # - Success/error states
1564
+ # - Paused state
1565
+ #
1566
+ # source://cli-ui//lib/cli/ui/progress_reporter.rb#12
1567
+ module CLI::UI::ProgressReporter
1568
+ class << self
1569
+ # : -> Reporter?
1570
+ #
1571
+ # source://cli-ui//lib/cli/ui/progress_reporter.rb#165
1572
+ def current_reporter; end
1573
+
1574
+ # Thread-local storage for the current reporter stack
1575
+ # : -> Array[Reporter]
1576
+ #
1577
+ # source://cli-ui//lib/cli/ui/progress_reporter.rb#160
1578
+ def reporter_stack; end
1579
+
1580
+ # : -> bool
1581
+ #
1582
+ # @return [Boolean]
1583
+ #
1584
+ # source://cli-ui//lib/cli/ui/progress_reporter.rb#183
1585
+ def supports_progress?; end
1586
+
1587
+ # Block-based API that ensures progress is cleared
1588
+ # : [T] (?mode: Symbol, ?to: io_like, ?delay_start: bool) { (Reporter reporter) -> T } -> T
1589
+ #
1590
+ # source://cli-ui//lib/cli/ui/progress_reporter.rb#171
1591
+ def with_progress(mode: T.unsafe(nil), to: T.unsafe(nil), delay_start: T.unsafe(nil), &block); end
1592
+ end
1593
+ end
1594
+
1595
+ # Progress reporter instance that manages the lifecycle of progress reporting
1596
+ #
1597
+ # source://cli-ui//lib/cli/ui/progress_reporter.rb#14
1598
+ class CLI::UI::ProgressReporter::Reporter
1599
+ # : (Symbol mode, ?io_like to, ?parent: Reporter?, ?delay_start: bool) -> void
1600
+ #
1601
+ # @return [Reporter] a new instance of Reporter
1602
+ #
1603
+ # source://cli-ui//lib/cli/ui/progress_reporter.rb#27
1604
+ def initialize(mode, to = T.unsafe(nil), parent: T.unsafe(nil), delay_start: T.unsafe(nil)); end
1605
+
1606
+ # : (Reporter child) -> void
1607
+ #
1608
+ # source://cli-ui//lib/cli/ui/progress_reporter.rb#51
1609
+ def add_child(child); end
1610
+
1611
+ # : -> void
1612
+ #
1613
+ # source://cli-ui//lib/cli/ui/progress_reporter.rb#137
1614
+ def cleanup; end
1615
+
1616
+ # : -> void
1617
+ #
1618
+ # source://cli-ui//lib/cli/ui/progress_reporter.rb#128
1619
+ def clear; end
1620
+
1621
+ # Force indeterminate mode even if there are children
1622
+ # : -> void
1623
+ #
1624
+ # source://cli-ui//lib/cli/ui/progress_reporter.rb#99
1625
+ def force_set_indeterminate; end
1626
+
1627
+ # Force progress mode even if there are children - used by SpinGroup
1628
+ # when a task needs to show deterministic progress
1629
+ # : (Integer percentage) -> void
1630
+ #
1631
+ # source://cli-ui//lib/cli/ui/progress_reporter.rb#89
1632
+ def force_set_progress(percentage); end
1633
+
1634
+ # : -> bool
1635
+ #
1636
+ # @return [Boolean]
1637
+ #
1638
+ # source://cli-ui//lib/cli/ui/progress_reporter.rb#61
1639
+ def has_active_children?; end
1640
+
1641
+ # : (Reporter child) -> void
1642
+ #
1643
+ # source://cli-ui//lib/cli/ui/progress_reporter.rb#56
1644
+ def remove_child(child); end
1645
+
1646
+ # : -> void
1647
+ #
1648
+ # source://cli-ui//lib/cli/ui/progress_reporter.rb#107
1649
+ def set_error; end
1650
+
1651
+ # : -> void
1652
+ #
1653
+ # source://cli-ui//lib/cli/ui/progress_reporter.rb#77
1654
+ def set_indeterminate; end
1655
+
1656
+ # : (?Integer? percentage) -> void
1657
+ #
1658
+ # source://cli-ui//lib/cli/ui/progress_reporter.rb#115
1659
+ def set_paused(percentage = T.unsafe(nil)); end
1660
+
1661
+ # : (Integer percentage) -> void
1662
+ #
1663
+ # source://cli-ui//lib/cli/ui/progress_reporter.rb#66
1664
+ def set_progress(percentage); end
1665
+ end
1666
+
1667
+ # source://cli-ui//lib/cli/ui/progress_reporter.rb#22
1668
+ CLI::UI::ProgressReporter::Reporter::ERROR = T.let(T.unsafe(nil), Integer)
1669
+
1670
+ # source://cli-ui//lib/cli/ui/progress_reporter.rb#23
1671
+ CLI::UI::ProgressReporter::Reporter::INDETERMINATE = T.let(T.unsafe(nil), Integer)
1672
+
1673
+ # OSC (Operating System Command) escape sequences
1674
+ #
1675
+ # source://cli-ui//lib/cli/ui/progress_reporter.rb#16
1676
+ CLI::UI::ProgressReporter::Reporter::OSC = T.let(T.unsafe(nil), String)
1677
+
1678
+ # source://cli-ui//lib/cli/ui/progress_reporter.rb#24
1679
+ CLI::UI::ProgressReporter::Reporter::PAUSED = T.let(T.unsafe(nil), Integer)
1680
+
1681
+ # Progress states
1682
+ #
1683
+ # source://cli-ui//lib/cli/ui/progress_reporter.rb#20
1684
+ CLI::UI::ProgressReporter::Reporter::REMOVE = T.let(T.unsafe(nil), Integer)
1685
+
1686
+ # source://cli-ui//lib/cli/ui/progress_reporter.rb#21
1687
+ CLI::UI::ProgressReporter::Reporter::SET_PROGRESS = T.let(T.unsafe(nil), Integer)
1688
+
1689
+ # String Terminator (BEL)
1690
+ #
1691
+ # source://cli-ui//lib/cli/ui/progress_reporter.rb#17
1692
+ CLI::UI::ProgressReporter::Reporter::ST = T.let(T.unsafe(nil), String)
1693
+
1694
+ # source://cli-ui//lib/cli/ui/prompt.rb#14
1572
1695
  module CLI::UI::Prompt
1573
1696
  class << self
1574
1697
  # Present the user with a message and wait for any key to be pressed, returning the pressed key.
@@ -1578,9 +1701,9 @@ module CLI::UI::Prompt
1578
1701
  # CLI::UI::Prompt.any_key # Press any key to continue...
1579
1702
  #
1580
1703
  # CLI::UI::Prompt.any_key('Press RETURN to continue...') # Then check if that's what they pressed
1704
+ # : (?String prompt) -> String?
1581
1705
  #
1582
- # source://cli-ui//lib/cli/ui/prompt.rb#212
1583
- sig { params(prompt: ::String).returns(T.nilable(::String)) }
1706
+ # source://cli-ui//lib/cli/ui/prompt.rb#202
1584
1707
  def any_key(prompt = T.unsafe(nil)); end
1585
1708
 
1586
1709
  # Ask a user a question with either free form answer or a set of answers (multiple choice)
@@ -1650,20 +1773,9 @@ module CLI::UI::Prompt
1650
1773
  # handler.option('python') { |selection| selection }
1651
1774
  # end
1652
1775
  #
1653
- # source://cli-ui//lib/cli/ui/prompt.rb#118
1654
- sig do
1655
- params(
1656
- question: ::String,
1657
- options: T.nilable(T::Array[::String]),
1658
- default: T.nilable(T.any(::String, T::Array[::String])),
1659
- is_file: T::Boolean,
1660
- allow_empty: T::Boolean,
1661
- multiple: T::Boolean,
1662
- filter_ui: T::Boolean,
1663
- select_ui: T::Boolean,
1664
- options_proc: T.nilable(T.proc.params(handler: ::CLI::UI::Prompt::OptionsHandler).void)
1665
- ).returns(T.any(::String, T::Array[::String]))
1666
- end
1776
+ # : (String question, ?options: Array[String]?, ?default: (String | Array[String])?, ?is_file: bool, ?allow_empty: bool, ?multiple: bool, ?filter_ui: bool, ?select_ui: bool) ?{ (OptionsHandler handler) -> void } -> (String | Array[String])
1777
+ #
1778
+ # source://cli-ui//lib/cli/ui/prompt.rb#103
1667
1779
  def ask(question, options: T.unsafe(nil), default: T.unsafe(nil), is_file: T.unsafe(nil), allow_empty: T.unsafe(nil), multiple: T.unsafe(nil), filter_ui: T.unsafe(nil), select_ui: T.unsafe(nil), &options_proc); end
1668
1780
 
1669
1781
  # Asks the user for a single-line answer, without displaying the characters while typing.
@@ -1673,9 +1785,9 @@ module CLI::UI::Prompt
1673
1785
  #
1674
1786
  # The password, without a trailing newline.
1675
1787
  # If the user simply presses "Enter" without typing any password, this will return an empty string.
1788
+ # : (String question) -> String
1676
1789
  #
1677
- # source://cli-ui//lib/cli/ui/prompt.rb#169
1678
- sig { params(question: ::String).returns(::String) }
1790
+ # source://cli-ui//lib/cli/ui/prompt.rb#159
1679
1791
  def ask_password(question); end
1680
1792
 
1681
1793
  # Asks the user a yes/no question.
@@ -1688,12 +1800,14 @@ module CLI::UI::Prompt
1688
1800
  #
1689
1801
  # CLI::UI::Prompt.confirm('Do a dangerous thing?', default: false)
1690
1802
  #
1691
- # source://cli-ui//lib/cli/ui/prompt.rb#200
1692
- sig { params(question: ::String, default: T::Boolean).returns(T::Boolean) }
1803
+ # : (String question, ?default: bool) -> bool
1804
+ #
1805
+ # source://cli-ui//lib/cli/ui/prompt.rb#190
1693
1806
  def confirm(question, default: T.unsafe(nil)); end
1694
1807
 
1695
- # source://cli-ui//lib/cli/ui/prompt.rb#23
1696
- sig { returns(::CLI::UI::Color) }
1808
+ # : -> Color
1809
+ #
1810
+ # source://cli-ui//lib/cli/ui/prompt.rb#20
1697
1811
  def instructions_color; end
1698
1812
 
1699
1813
  # Set the instructions color.
@@ -1702,66 +1816,50 @@ module CLI::UI::Prompt
1702
1816
  #
1703
1817
  # * +color+ - the color to use for prompt instructions
1704
1818
  #
1705
- # source://cli-ui//lib/cli/ui/prompt.rb#34
1706
- sig { params(color: T.any(::CLI::UI::Color, ::String, ::Symbol)).void }
1819
+ # : (colorable color) -> void
1820
+ #
1821
+ # source://cli-ui//lib/cli/ui/prompt.rb#31
1707
1822
  def instructions_color=(color); end
1708
1823
 
1709
1824
  # Wait for any key to be pressed, returning the pressed key.
1825
+ # : -> String?
1710
1826
  #
1711
- # source://cli-ui//lib/cli/ui/prompt.rb#221
1712
- sig { returns(T.nilable(::String)) }
1827
+ # source://cli-ui//lib/cli/ui/prompt.rb#211
1713
1828
  def read_char; end
1714
1829
 
1715
1830
  private
1716
1831
 
1717
- # source://cli-ui//lib/cli/ui/prompt.rb#240
1718
- sig do
1719
- params(
1720
- question: ::String,
1721
- default: T.nilable(::String),
1722
- is_file: T::Boolean,
1723
- allow_empty: T::Boolean
1724
- ).returns(::String)
1725
- end
1832
+ # : (String question, String? default, bool is_file, bool allow_empty) -> String
1833
+ #
1834
+ # source://cli-ui//lib/cli/ui/prompt.rb#227
1726
1835
  def ask_free_form(question, default, is_file, allow_empty); end
1727
1836
 
1837
+ # : (String question, ?Array[String]? options, ?multiple: bool, ?default: (String | Array[String])?, ?filter_ui: bool, ?select_ui: bool) -> (String | Array[String])
1838
+ #
1728
1839
  # @raise [ArgumentError]
1729
1840
  #
1730
- # source://cli-ui//lib/cli/ui/prompt.rb#278
1731
- sig do
1732
- params(
1733
- question: ::String,
1734
- options: T.nilable(T::Array[::String]),
1735
- multiple: T::Boolean,
1736
- default: T.nilable(T.any(::String, T::Array[::String])),
1737
- filter_ui: T::Boolean,
1738
- select_ui: T::Boolean
1739
- ).returns(T.any(::String, T::Array[::String]))
1740
- end
1841
+ # source://cli-ui//lib/cli/ui/prompt.rb#256
1741
1842
  def ask_interactive(question, options = T.unsafe(nil), multiple: T.unsafe(nil), default: T.unsafe(nil), filter_ui: T.unsafe(nil), select_ui: T.unsafe(nil)); end
1742
1843
 
1743
1844
  # Useful for stubbing in tests
1845
+ # : (Array[String] options, ?multiple: bool, ?default: (Array[String] | String)?) -> (Array[String] | String)
1744
1846
  #
1745
- # source://cli-ui//lib/cli/ui/prompt.rb#339
1746
- sig do
1747
- params(
1748
- options: T::Array[::String],
1749
- multiple: T::Boolean,
1750
- default: T.nilable(T.any(::String, T::Array[::String]))
1751
- ).returns(T.any(::String, T::Array[::String]))
1752
- end
1847
+ # source://cli-ui//lib/cli/ui/prompt.rb#315
1753
1848
  def interactive_prompt(options, multiple: T.unsafe(nil), default: T.unsafe(nil)); end
1754
1849
 
1755
- # source://cli-ui//lib/cli/ui/prompt.rb#359
1756
- sig { params(str: ::String).void }
1850
+ # : (String str) -> void
1851
+ #
1852
+ # source://cli-ui//lib/cli/ui/prompt.rb#335
1757
1853
  def puts_question(str); end
1758
1854
 
1759
- # source://cli-ui//lib/cli/ui/prompt.rb#364
1760
- sig { params(is_file: T::Boolean).returns(::String) }
1855
+ # : (?is_file: bool) -> String
1856
+ #
1857
+ # source://cli-ui//lib/cli/ui/prompt.rb#340
1761
1858
  def readline(is_file: T.unsafe(nil)); end
1762
1859
 
1763
- # source://cli-ui//lib/cli/ui/prompt.rb#346
1764
- sig { params(default: ::String).void }
1860
+ # : (String default) -> void
1861
+ #
1862
+ # source://cli-ui//lib/cli/ui/prompt.rb#322
1765
1863
  def write_default_over_empty_input(default); end
1766
1864
  end
1767
1865
  end
@@ -1775,157 +1873,222 @@ class CLI::UI::Prompt::InteractiveOptions
1775
1873
  #
1776
1874
  # CLI::UI::Prompt::InteractiveOptions.new(%w(rails go python))
1777
1875
  #
1778
- # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#60
1779
- sig do
1780
- params(
1781
- options: T::Array[::String],
1782
- multiple: T::Boolean,
1783
- default: T.nilable(T.any(::String, T::Array[::String]))
1784
- ).void
1785
- end
1786
- def initialize(options, multiple: T.unsafe(nil), default: T.unsafe(nil)); end
1876
+ # : (Array[String] options, ?multiple: bool, ?default: (String | Array[String])?) -> void
1877
+ #
1878
+ # @return [InteractiveOptions] a new instance of InteractiveOptions
1879
+ #
1880
+ # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#52
1881
+ def initialize(options, multiple: T.unsafe(nil), default: T.unsafe(nil)); end
1787
1882
 
1788
1883
  # Calls the +InteractiveOptions+ and asks the question
1789
1884
  # Usually used from +self.call+
1790
1885
  #
1791
- # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#92
1792
- sig { returns(T.any(::Integer, T::Array[::Integer])) }
1886
+ # : -> (Integer | Array[Integer])
1887
+ #
1888
+ # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#84
1793
1889
  def call; end
1794
1890
 
1795
1891
  private
1796
1892
 
1797
- # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#251
1798
- sig { params(char: ::String).void }
1893
+ # : (String char) -> void
1894
+ #
1895
+ # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#298
1799
1896
  def build_selection(char); end
1800
1897
 
1801
- # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#112
1802
- sig { void }
1898
+ # : -> void
1899
+ #
1900
+ # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#104
1803
1901
  def calculate_option_line_lengths; end
1804
1902
 
1805
- # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#257
1806
- sig { void }
1903
+ # : -> void
1904
+ #
1905
+ # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#304
1807
1906
  def chop_selection; end
1808
1907
 
1809
- # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#151
1810
- sig { params(number_of_lines: ::Integer).void }
1908
+ # : (?Integer number_of_lines) -> void
1909
+ #
1910
+ # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#143
1811
1911
  def clear_output(number_of_lines = T.unsafe(nil)); end
1812
1912
 
1813
1913
  # Don't use this in place of +@displaying_metadata+, this updates too
1814
1914
  # quickly to be useful when drawing to the screen.
1915
+ # : -> bool
1916
+ #
1917
+ # @return [Boolean]
1815
1918
  #
1816
- # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#167
1817
- sig { returns(T::Boolean) }
1919
+ # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#159
1818
1920
  def display_metadata?; end
1819
1921
 
1820
- # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#438
1821
- sig { returns(::Integer) }
1922
+ # : -> Integer
1923
+ #
1924
+ # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#490
1822
1925
  def distance_from_selection_to_end; end
1823
1926
 
1824
- # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#443
1825
- sig { returns(::Integer) }
1927
+ # : -> Integer
1928
+ #
1929
+ # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#495
1826
1930
  def distance_from_start_to_selection; end
1827
1931
 
1828
- # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#207
1829
- sig { void }
1932
+ # : -> void
1933
+ #
1934
+ # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#199
1830
1935
  def down; end
1831
1936
 
1832
- # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#458
1833
- sig { void }
1937
+ # : -> void
1938
+ #
1939
+ # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#510
1834
1940
  def ensure_first_item_is_continuation_marker; end
1835
1941
 
1836
- # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#453
1837
- sig { void }
1942
+ # : -> void
1943
+ #
1944
+ # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#505
1838
1945
  def ensure_last_item_is_continuation_marker; end
1839
1946
 
1840
- # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#431
1841
- sig { void }
1947
+ # : -> void
1948
+ #
1949
+ # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#483
1842
1950
  def ensure_visible_is_active; end
1843
1951
 
1844
- # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#358
1845
- sig { returns(T::Boolean) }
1952
+ # : -> bool
1953
+ #
1954
+ # @return [Boolean]
1955
+ #
1956
+ # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#410
1846
1957
  def filtering?; end
1847
1958
 
1848
- # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#519
1849
- sig { params(format: ::String, choice: ::String).returns(::String) }
1959
+ # : -> void
1960
+ #
1961
+ # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#210
1962
+ def first_option; end
1963
+
1964
+ # : (String format, String choice) -> String
1965
+ #
1966
+ # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#571
1850
1967
  def format_choice(format, choice); end
1851
1968
 
1852
- # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#363
1853
- sig { returns(T::Boolean) }
1969
+ # : -> bool
1970
+ #
1971
+ # @return [Boolean]
1972
+ #
1973
+ # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#415
1854
1974
  def has_filter?; end
1855
1975
 
1856
- # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#448
1857
- sig { returns(::Integer) }
1976
+ # : -> Integer
1977
+ #
1978
+ # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#500
1858
1979
  def index_of_active_option; end
1859
1980
 
1860
- # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#463
1861
- sig { returns(::Integer) }
1981
+ # : -> void
1982
+ #
1983
+ # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#216
1984
+ def last_option; end
1985
+
1986
+ # : -> Integer
1987
+ #
1988
+ # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#515
1862
1989
  def max_lines; end
1863
1990
 
1864
- # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#172
1865
- sig { returns(::Integer) }
1991
+ # : -> void
1992
+ #
1993
+ # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#222
1994
+ def next_page; end
1995
+
1996
+ # : -> Integer
1997
+ #
1998
+ # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#164
1866
1999
  def num_lines; end
1867
2000
 
1868
- # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#388
1869
- sig { params(recalculate: T::Boolean).returns(T::Array[[::String, T.nilable(::Integer)]]) }
2001
+ # : (?recalculate: bool) -> Array[[String, Integer?]]
2002
+ #
2003
+ # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#440
1870
2004
  def presented_options(recalculate: T.unsafe(nil)); end
1871
2005
 
1872
- # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#289
1873
- sig { void }
2006
+ # : -> void
2007
+ #
2008
+ # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#233
2009
+ def previous_page; end
2010
+
2011
+ # : -> void
2012
+ #
2013
+ # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#336
1874
2014
  def process_input_until_redraw_required; end
1875
2015
 
1876
- # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#468
1877
- sig { void }
2016
+ # : -> void
2017
+ #
2018
+ # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#520
1878
2019
  def render_options; end
1879
2020
 
1880
- # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#142
1881
- sig { params(number_of_lines: ::Integer).void }
2021
+ # : (?Integer number_of_lines) -> void
2022
+ #
2023
+ # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#134
1882
2024
  def reset_position(number_of_lines = T.unsafe(nil)); end
1883
2025
 
1884
- # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#241
1885
- sig { params(char: ::String).void }
2026
+ # : (String char) -> void
2027
+ #
2028
+ # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#288
1886
2029
  def select_bool(char); end
1887
2030
 
1888
- # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#281
1889
- sig { void }
2031
+ # : -> void
2032
+ #
2033
+ # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#328
1890
2034
  def select_current; end
1891
2035
 
1892
2036
  # n is 1-indexed selection
1893
2037
  # n == 0 if "Done" was selected in @multiple mode
2038
+ # : (Integer n, ?final: bool) -> void
1894
2039
  #
1895
- # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#220
1896
- sig { params(n: ::Integer).void }
1897
- def select_n(n); end
2040
+ # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#247
2041
+ def select_n(n, final: T.unsafe(nil)); end
1898
2042
 
1899
- # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#353
1900
- sig { returns(T::Boolean) }
2043
+ # : -> bool
2044
+ #
2045
+ # @return [Boolean]
2046
+ #
2047
+ # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#405
1901
2048
  def selecting?; end
1902
2049
 
1903
- # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#368
1904
- sig { void }
2050
+ # : (Integer n) -> bool
2051
+ #
2052
+ # @return [Boolean]
2053
+ #
2054
+ # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#274
2055
+ def should_enter_select_mode?(n); end
2056
+
2057
+ # : -> void
2058
+ #
2059
+ # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#420
1905
2060
  def start_filter; end
1906
2061
 
1907
- # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#374
1908
- sig { void }
2062
+ # : -> void
2063
+ #
2064
+ # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#426
1909
2065
  def start_line_select; end
1910
2066
 
1911
- # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#381
1912
- sig { void }
2067
+ # : -> void
2068
+ #
2069
+ # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#433
1913
2070
  def stop_line_select; end
1914
2071
 
1915
- # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#186
1916
- sig { returns(T::Boolean) }
2072
+ # : -> bool
2073
+ #
2074
+ # @return [Boolean]
2075
+ #
2076
+ # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#178
1917
2077
  def terminal_width_changed?; end
1918
2078
 
1919
- # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#196
1920
- sig { void }
2079
+ # : -> void
2080
+ #
2081
+ # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#188
1921
2082
  def up; end
1922
2083
 
1923
- # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#263
1924
- sig { params(char: ::String).void }
2084
+ # : (String char) -> void
2085
+ #
2086
+ # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#310
1925
2087
  def update_search(char); end
1926
2088
 
1927
- # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#296
1928
- sig { void }
2089
+ # : -> void
2090
+ #
2091
+ # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#343
1929
2092
  def wait_for_user_input; end
1930
2093
 
1931
2094
  class << self
@@ -1943,54 +2106,55 @@ class CLI::UI::Prompt::InteractiveOptions
1943
2106
  # Ask an interactive question
1944
2107
  # CLI::UI::Prompt::InteractiveOptions.call(%w(rails go python))
1945
2108
  #
1946
- # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#37
1947
- sig do
1948
- params(
1949
- options: T::Array[::String],
1950
- multiple: T::Boolean,
1951
- default: T.nilable(T.any(::String, T::Array[::String]))
1952
- ).returns(T.any(::String, T::Array[::String]))
1953
- end
2109
+ # : (Array[String] options, ?multiple: bool, ?default: (String | Array[String])?) -> (String | Array[String])
2110
+ #
2111
+ # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#30
1954
2112
  def call(options, multiple: T.unsafe(nil), default: T.unsafe(nil)); end
1955
2113
  end
1956
2114
  end
1957
2115
 
1958
- # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#191
2116
+ # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#183
1959
2117
  CLI::UI::Prompt::InteractiveOptions::BACKSPACE = T.let(T.unsafe(nil), String)
1960
2118
 
1961
- # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#14
2119
+ # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#12
1962
2120
  CLI::UI::Prompt::InteractiveOptions::CHECKBOX_ICON = T.let(T.unsafe(nil), Hash)
1963
2121
 
1964
- # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#192
2122
+ # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#184
1965
2123
  CLI::UI::Prompt::InteractiveOptions::CTRL_C = T.let(T.unsafe(nil), String)
1966
2124
 
1967
- # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#193
2125
+ # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#185
1968
2126
  CLI::UI::Prompt::InteractiveOptions::CTRL_D = T.let(T.unsafe(nil), String)
1969
2127
 
1970
- # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#13
2128
+ # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#11
1971
2129
  CLI::UI::Prompt::InteractiveOptions::DONE = T.let(T.unsafe(nil), String)
1972
2130
 
1973
- # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#190
2131
+ # source://cli-ui//lib/cli/ui/prompt/interactive_options.rb#182
1974
2132
  CLI::UI::Prompt::InteractiveOptions::ESC = T.let(T.unsafe(nil), String)
1975
2133
 
1976
2134
  # A class that handles the various options of an InteractivePrompt and their callbacks
1977
2135
  #
1978
2136
  # source://cli-ui//lib/cli/ui/prompt/options_handler.rb#8
1979
2137
  class CLI::UI::Prompt::OptionsHandler
1980
- # source://cli-ui//lib/cli/ui/prompt/options_handler.rb#12
1981
- sig { void }
2138
+ # : -> void
2139
+ #
2140
+ # @return [OptionsHandler] a new instance of OptionsHandler
2141
+ #
2142
+ # source://cli-ui//lib/cli/ui/prompt/options_handler.rb#10
1982
2143
  def initialize; end
1983
2144
 
1984
- # source://cli-ui//lib/cli/ui/prompt/options_handler.rb#27
1985
- sig { params(options: T.any(::String, T::Array[::String])).returns(::String) }
2145
+ # : ((Array[String] | String) options) -> String
2146
+ #
2147
+ # source://cli-ui//lib/cli/ui/prompt/options_handler.rb#25
1986
2148
  def call(options); end
1987
2149
 
1988
- # source://cli-ui//lib/cli/ui/prompt/options_handler.rb#22
1989
- sig { params(option: ::String, handler: T.proc.params(option: ::String).returns(::String)).void }
2150
+ # : (String option) { (String option) -> String } -> void
2151
+ #
2152
+ # source://cli-ui//lib/cli/ui/prompt/options_handler.rb#20
1990
2153
  def option(option, &handler); end
1991
2154
 
1992
- # source://cli-ui//lib/cli/ui/prompt/options_handler.rb#17
1993
- sig { returns(T::Array[::String]) }
2155
+ # : -> Array[String]
2156
+ #
2157
+ # source://cli-ui//lib/cli/ui/prompt/options_handler.rb#15
1994
2158
  def options; end
1995
2159
  end
1996
2160
 
@@ -2011,10 +2175,10 @@ end
2011
2175
 
2012
2176
  # Convenience accessor to +CLI::UI::Spinner::SpinGroup+
2013
2177
  #
2014
- # source://cli-ui//lib/cli/ui.rb#29
2178
+ # source://cli-ui//lib/cli/ui.rb#24
2015
2179
  CLI::UI::SpinGroup = CLI::UI::Spinner::SpinGroup
2016
2180
 
2017
- # source://cli-ui//lib/cli/ui/spinner.rb#8
2181
+ # source://cli-ui//lib/cli/ui/spinner.rb#6
2018
2182
  module CLI::UI::Spinner
2019
2183
  class << self
2020
2184
  # We use this from CLI::UI::Widgets::Status to render an additional
@@ -2027,18 +2191,19 @@ module CLI::UI::Spinner
2027
2191
  # While it would be possible to stitch through some connection between
2028
2192
  # the SpinGroup and the Widgets included in its title, this is simpler
2029
2193
  # in practice and seems unlikely to cause issues in practice.
2194
+ # : -> String
2030
2195
  #
2031
- # source://cli-ui//lib/cli/ui/spinner.rb#44
2032
- sig { returns(::String) }
2196
+ # source://cli-ui//lib/cli/ui/spinner.rb#38
2033
2197
  def current_rune; end
2034
2198
 
2035
- # source://cli-ui//lib/cli/ui/spinner.rb#31
2036
- sig { returns(T.nilable(::Integer)) }
2199
+ # : Integer?
2200
+ #
2201
+ # source://cli-ui//lib/cli/ui/spinner.rb#25
2037
2202
  def index; end
2038
2203
 
2039
- # @return [Integer, nil]
2204
+ # : Integer?
2040
2205
  #
2041
- # source://cli-ui//lib/cli/ui/spinner.rb#31
2206
+ # source://cli-ui//lib/cli/ui/spinner.rb#25
2042
2207
  def index=(_arg0); end
2043
2208
 
2044
2209
  # Adds a single spinner
@@ -2065,15 +2230,9 @@ module CLI::UI::Spinner
2065
2230
  #
2066
2231
  # CLI::UI::Spinner.spin('Title') { sleep 1.0 }
2067
2232
  #
2068
- # source://cli-ui//lib/cli/ui/spinner.rb#84
2069
- sig do
2070
- params(
2071
- title: ::String,
2072
- auto_debrief: T::Boolean,
2073
- to: T.any(::IO, ::StringIO),
2074
- block: T.proc.params(task: ::CLI::UI::Spinner::SpinGroup::Task).void
2075
- ).returns(T::Boolean)
2076
- end
2233
+ # : (String title, ?auto_debrief: bool, ?to: io_like) { (SpinGroup::Task task) -> void } -> bool
2234
+ #
2235
+ # source://cli-ui//lib/cli/ui/spinner.rb#69
2077
2236
  def spin(title, auto_debrief: T.unsafe(nil), to: T.unsafe(nil), &block); end
2078
2237
  end
2079
2238
  end
@@ -2091,34 +2250,39 @@ class CLI::UI::Spinner::Async
2091
2250
  #
2092
2251
  # CLI::UI::Spinner::Async.new('Title')
2093
2252
  #
2094
- # source://cli-ui//lib/cli/ui/spinner/async.rb#33
2095
- sig { params(title: ::String).void }
2253
+ # : (String title) -> void
2254
+ #
2255
+ # @return [Async] a new instance of Async
2256
+ #
2257
+ # source://cli-ui//lib/cli/ui/spinner/async.rb#29
2096
2258
  def initialize(title); end
2097
2259
 
2098
2260
  # Stops an asynchronous spinner
2099
2261
  #
2100
- # source://cli-ui//lib/cli/ui/spinner/async.rb#45
2101
- sig { returns(T::Boolean) }
2262
+ # : -> bool
2263
+ #
2264
+ # source://cli-ui//lib/cli/ui/spinner/async.rb#41
2102
2265
  def stop; end
2103
2266
 
2104
2267
  class << self
2105
2268
  # Convenience method for +initialize+
2106
2269
  #
2107
- # source://cli-ui//lib/cli/ui/spinner/async.rb#16
2108
- sig { params(title: ::String).returns(::CLI::UI::Spinner::Async) }
2270
+ # : (String title) -> Async
2271
+ #
2272
+ # source://cli-ui//lib/cli/ui/spinner/async.rb#12
2109
2273
  def start(title); end
2110
2274
  end
2111
2275
  end
2112
2276
 
2113
- # source://cli-ui//lib/cli/ui/spinner.rb#25
2277
+ # source://cli-ui//lib/cli/ui/spinner.rb#21
2114
2278
  CLI::UI::Spinner::GLYPHS = T.let(T.unsafe(nil), Array)
2115
2279
 
2116
2280
  # seconds
2117
2281
  #
2118
- # source://cli-ui//lib/cli/ui/spinner.rb#14
2282
+ # source://cli-ui//lib/cli/ui/spinner.rb#10
2119
2283
  CLI::UI::Spinner::PERIOD = T.let(T.unsafe(nil), Float)
2120
2284
 
2121
- # source://cli-ui//lib/cli/ui/spinner.rb#17
2285
+ # source://cli-ui//lib/cli/ui/spinner.rb#13
2122
2286
  CLI::UI::Spinner::RUNES = T.let(T.unsafe(nil), Array)
2123
2287
 
2124
2288
  # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#9
@@ -2146,16 +2310,11 @@ class CLI::UI::Spinner::SpinGroup
2146
2310
  #
2147
2311
  # https://user-images.githubusercontent.com/3074765/33798558-c452fa26-dce8-11e7-9e90-b4b34df21a46.gif
2148
2312
  #
2149
- # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#79
2150
- sig do
2151
- params(
2152
- auto_debrief: T::Boolean,
2153
- interrupt_debrief: T::Boolean,
2154
- max_concurrent: ::Integer,
2155
- work_queue: T.nilable(::CLI::UI::WorkQueue),
2156
- to: T.any(::IO, ::StringIO)
2157
- ).void
2158
- end
2313
+ # : (?auto_debrief: bool, ?interrupt_debrief: bool, ?max_concurrent: Integer, ?work_queue: WorkQueue?, ?to: io_like) -> void
2314
+ #
2315
+ # @return [SpinGroup] a new instance of SpinGroup
2316
+ #
2317
+ # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#63
2159
2318
  def initialize(auto_debrief: T.unsafe(nil), interrupt_debrief: T.unsafe(nil), max_concurrent: T.unsafe(nil), work_queue: T.unsafe(nil), to: T.unsafe(nil)); end
2160
2319
 
2161
2320
  # Add a new task
@@ -2170,59 +2329,45 @@ class CLI::UI::Spinner::SpinGroup
2170
2329
  # spin_group.add('Title') { |spinner| sleep 1.0 }
2171
2330
  # spin_group.wait
2172
2331
  #
2173
- # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#307
2174
- sig do
2175
- params(
2176
- title: ::String,
2177
- final_glyph: T.proc.params(success: T::Boolean).returns(T.any(::CLI::UI::Glyph, ::String)),
2178
- merged_output: T::Boolean,
2179
- duplicate_output_to: ::IO,
2180
- block: T.proc.params(task: ::CLI::UI::Spinner::SpinGroup::Task).void
2181
- ).void
2182
- end
2332
+ # : (String title, ?final_glyph: ^(bool success) -> (Glyph | String), ?merged_output: bool, ?duplicate_output_to: IO) { (Task task) -> void } -> void
2333
+ #
2334
+ # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#304
2183
2335
  def add(title, final_glyph: T.unsafe(nil), merged_output: T.unsafe(nil), duplicate_output_to: T.unsafe(nil), &block); end
2184
2336
 
2185
- # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#480
2186
- sig { returns(T::Boolean) }
2187
- def all_succeeded?; end
2188
-
2189
- # Debriefs failed tasks is +auto_debrief+ is true
2337
+ # : -> bool
2190
2338
  #
2191
- # ==== Options
2192
- #
2193
- # * +:to+ - Target stream, like $stdout or $stderr. Can be anything with print and puts methods,
2194
- # or under Sorbet, IO or StringIO. Defaults to $stdout
2339
+ # @return [Boolean]
2195
2340
  #
2196
- # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#494
2197
- sig { params(to: T.any(::IO, ::StringIO)).returns(T::Boolean) }
2198
- def debrief(to: T.unsafe(nil)); end
2341
+ # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#464
2342
+ def all_succeeded?; end
2199
2343
 
2200
2344
  # Provide an alternative debriefing for failed tasks
2345
+ # : { (String title, Exception? exception, String out, String err) -> void } -> void
2201
2346
  #
2202
- # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#465
2203
- sig do
2204
- params(
2205
- block: T.proc.params(title: ::String, exception: T.nilable(::Exception), out: ::String, err: ::String).void
2206
- ).void
2207
- end
2347
+ # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#453
2208
2348
  def failure_debrief(&block); end
2209
2349
 
2210
- # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#453
2211
- sig { params(message: ::String).void }
2350
+ # : (String message) -> void
2351
+ #
2352
+ # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#445
2212
2353
  def puts_above(message); end
2213
2354
 
2214
- # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#327
2215
- sig { void }
2355
+ # : -> void
2356
+ #
2357
+ # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#324
2216
2358
  def stop; end
2217
2359
 
2218
- # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#346
2219
- sig { returns(T::Boolean) }
2360
+ # : -> bool
2361
+ #
2362
+ # @return [Boolean]
2363
+ #
2364
+ # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#343
2220
2365
  def stopped?; end
2221
2366
 
2222
2367
  # Provide a debriefing for successful tasks
2368
+ # : { (String title, String out, String err) -> void } -> void
2223
2369
  #
2224
- # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#475
2225
- sig { params(block: T.proc.params(title: ::String, out: ::String, err: ::String).void).void }
2370
+ # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#459
2226
2371
  def success_debrief(&block); end
2227
2372
 
2228
2373
  # Tells the group you're done adding tasks and to wait for all of them to finish
@@ -2237,21 +2382,59 @@ class CLI::UI::Spinner::SpinGroup
2237
2382
  # spin_group.add('Title') { |spinner| sleep 1.0 }
2238
2383
  # spin_group.wait
2239
2384
  #
2240
- # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#367
2241
- sig { params(to: T.any(::IO, ::StringIO)).returns(T::Boolean) }
2385
+ # : (?to: io_like) -> bool
2386
+ #
2387
+ # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#364
2242
2388
  def wait(to: T.unsafe(nil)); end
2243
2389
 
2390
+ private
2391
+
2392
+ # Debriefs failed tasks is +auto_debrief+ is true
2393
+ #
2394
+ # ==== Options
2395
+ #
2396
+ # * +:to+ - Target stream, like $stdout or $stderr. Can be anything with print and puts methods,
2397
+ # or under Sorbet, IO or StringIO. Defaults to $stdout
2398
+ #
2399
+ # : (?to: io_like) -> bool
2400
+ #
2401
+ # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#564
2402
+ def debrief(to: T.unsafe(nil)); end
2403
+
2404
+ # Render messages that should appear above the spinner
2405
+ # : (io_like to, Integer consumed_lines) -> bool
2406
+ #
2407
+ # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#506
2408
+ def render_puts_above(to, consumed_lines); end
2409
+
2410
+ # Render all tasks
2411
+ # : (to: io_like, tasks_seen: Array[bool], tasks_seen_done: Array[bool], consumed_lines: Integer, idx: Integer, force_full_render: bool, width: Integer) -> [Integer, Integer]
2412
+ #
2413
+ # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#526
2414
+ def render_tasks(to:, tasks_seen:, tasks_seen_done:, consumed_lines:, idx:, force_full_render:, width:); end
2415
+
2416
+ # Update progress reporter mode based on task progress states
2417
+ # : (CLI::UI::ProgressReporter::Reporter reporter, Symbol current_mode, bool first_render) -> Symbol
2418
+ #
2419
+ # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#474
2420
+ def update_progress_mode(reporter, current_mode, first_render); end
2421
+
2244
2422
  class << self
2245
- # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#16
2246
- sig { returns(::Thread::Mutex) }
2423
+ # : Mutex
2424
+ #
2425
+ # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#14
2247
2426
  def pause_mutex; end
2248
2427
 
2249
- # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#28
2250
- sig { type_parameters(:T).params(block: T.proc.returns(T.type_parameter(:T))).returns(T.type_parameter(:T)) }
2428
+ # : [T] { -> T } -> T
2429
+ #
2430
+ # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#22
2251
2431
  def pause_spinners(&block); end
2252
2432
 
2253
- # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#19
2254
- sig { returns(T::Boolean) }
2433
+ # : -> bool
2434
+ #
2435
+ # @return [Boolean]
2436
+ #
2437
+ # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#17
2255
2438
  def paused?; end
2256
2439
  end
2257
2440
  end
@@ -2259,7 +2442,7 @@ end
2259
2442
  # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#10
2260
2443
  CLI::UI::Spinner::SpinGroup::DEFAULT_FINAL_GLYPH = T.let(T.unsafe(nil), Proc)
2261
2444
 
2262
- # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#98
2445
+ # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#79
2263
2446
  class CLI::UI::Spinner::SpinGroup::Task
2264
2447
  # Initializes a new Task
2265
2448
  # This is managed entirely internally by +SpinGroup+
@@ -2269,37 +2452,52 @@ class CLI::UI::Spinner::SpinGroup::Task
2269
2452
  # * +title+ - Title of the task
2270
2453
  # * +block+ - Block for the task, will be provided with an instance of the spinner
2271
2454
  #
2272
- # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#131
2273
- sig do
2274
- params(
2275
- title: ::String,
2276
- final_glyph: T.proc.params(success: T::Boolean).returns(T.any(::CLI::UI::Glyph, ::String)),
2277
- merged_output: T::Boolean,
2278
- duplicate_output_to: ::IO,
2279
- work_queue: ::CLI::UI::WorkQueue,
2280
- block: T.proc.params(task: ::CLI::UI::Spinner::SpinGroup::Task).returns(T.untyped)
2281
- ).void
2282
- end
2455
+ # : (String title, final_glyph: ^(bool success) -> (Glyph | String), merged_output: bool, duplicate_output_to: IO, work_queue: WorkQueue) { (Task task) -> untyped } -> void
2456
+ #
2457
+ # @return [Task] a new instance of Task
2458
+ #
2459
+ # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#104
2283
2460
  def initialize(title, final_glyph:, merged_output:, duplicate_output_to:, work_queue:, &block); end
2284
2461
 
2285
2462
  # Checks if a task is finished
2286
2463
  #
2287
- # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#162
2288
- sig { returns(T::Boolean) }
2464
+ # : -> bool
2465
+ #
2466
+ # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#137
2289
2467
  def check; end
2290
2468
 
2291
- # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#108
2292
- sig { returns(T::Boolean) }
2469
+ # Switch back to indeterminate mode
2470
+ # : -> void
2471
+ #
2472
+ # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#213
2473
+ def clear_progress; end
2474
+
2475
+ # Get current progress percentage
2476
+ # : -> Integer?
2477
+ #
2478
+ # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#228
2479
+ def current_progress; end
2480
+
2481
+ # : bool
2482
+ #
2483
+ # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#87
2293
2484
  def done; end
2294
2485
 
2295
- # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#111
2296
- sig { returns(T.nilable(::Exception)) }
2486
+ # : Exception?
2487
+ #
2488
+ # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#90
2297
2489
  def exception; end
2298
2490
 
2299
- # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#155
2300
- sig { params(block: T.proc.params(task: ::CLI::UI::Spinner::SpinGroup::Task).void).void }
2491
+ # : { (Task task) -> void } -> void
2492
+ #
2493
+ # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#130
2301
2494
  def on_done(&block); end
2302
2495
 
2496
+ # : Integer?
2497
+ #
2498
+ # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#93
2499
+ def progress_percentage; end
2500
+
2303
2501
  # Re-renders the task if required:
2304
2502
  #
2305
2503
  # We try to be as lazy as possible in re-rendering the full line. The
@@ -2318,26 +2516,35 @@ class CLI::UI::Spinner::SpinGroup::Task
2318
2516
  # * +force+ - force rerender of the task
2319
2517
  # * +width+ - current terminal width to format for
2320
2518
  #
2321
- # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#200
2322
- sig { params(index: ::Integer, force: T::Boolean, width: ::Integer).returns(::String) }
2519
+ # : (Integer index, ?bool force, ?width: Integer) -> String
2520
+ #
2521
+ # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#175
2323
2522
  def render(index, force = T.unsafe(nil), width: T.unsafe(nil)); end
2324
2523
 
2325
- # @return [String]
2524
+ # Set progress percentage (0-100) and switch to progress mode
2525
+ # : (Integer percentage) -> void
2526
+ #
2527
+ # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#204
2528
+ def set_progress(percentage); end
2529
+
2530
+ # : String
2326
2531
  #
2327
- # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#102
2532
+ # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#81
2328
2533
  def stderr; end
2329
2534
 
2330
- # @return [String]
2535
+ # : String
2331
2536
  #
2332
- # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#102
2537
+ # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#81
2333
2538
  def stdout; end
2334
2539
 
2335
- # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#105
2336
- sig { returns(T::Boolean) }
2540
+ # : bool
2541
+ #
2542
+ # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#84
2337
2543
  def success; end
2338
2544
 
2339
- # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#102
2340
- sig { returns(::String) }
2545
+ # : String
2546
+ #
2547
+ # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#81
2341
2548
  def title; end
2342
2549
 
2343
2550
  # Update the spinner title
@@ -2346,451 +2553,589 @@ class CLI::UI::Spinner::SpinGroup::Task
2346
2553
  #
2347
2554
  # * +title+ - title to change the spinner to
2348
2555
  #
2349
- # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#219
2350
- sig { params(new_title: ::String).void }
2556
+ # : (String new_title) -> void
2557
+ #
2558
+ # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#194
2351
2559
  def update_title(new_title); end
2352
2560
 
2561
+ # Check if this task wants progress mode
2562
+ # : -> bool
2563
+ #
2564
+ # @return [Boolean]
2565
+ #
2566
+ # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#222
2567
+ def wants_progress_mode?; end
2568
+
2353
2569
  private
2354
2570
 
2355
- # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#230
2356
- sig { params(index: ::Integer, terminal_width: ::Integer).returns(::String) }
2571
+ # : (Integer index, Integer terminal_width) -> String
2572
+ #
2573
+ # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#235
2357
2574
  def full_render(index, terminal_width); end
2358
2575
 
2359
- # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#256
2360
- sig { params(index: ::Integer).returns(::String) }
2576
+ # : (Integer index) -> String
2577
+ #
2578
+ # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#261
2361
2579
  def glyph(index); end
2362
2580
 
2363
- # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#276
2364
- sig { returns(::String) }
2581
+ # : -> String
2582
+ #
2583
+ # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#281
2365
2584
  def inset; end
2366
2585
 
2367
- # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#281
2368
- sig { returns(::Integer) }
2586
+ # : -> Integer
2587
+ #
2588
+ # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#286
2369
2589
  def inset_width; end
2370
2590
 
2371
- # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#246
2372
- sig { params(index: ::Integer).returns(::String) }
2591
+ # : (Integer index) -> String
2592
+ #
2593
+ # source://cli-ui//lib/cli/ui/spinner/spin_group.rb#251
2373
2594
  def partial_render(index); end
2374
2595
  end
2375
2596
 
2376
- # source://cli-ui//lib/cli/ui/spinner.rb#15
2597
+ # source://cli-ui//lib/cli/ui/spinner.rb#11
2377
2598
  CLI::UI::Spinner::TASK_FAILED = T.let(T.unsafe(nil), Symbol)
2378
2599
 
2379
- # source://cli-ui//lib/cli/ui/stdout_router.rb#10
2600
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#9
2380
2601
  module CLI::UI::StdoutRouter
2381
2602
  class << self
2603
+ # : -> void
2604
+ #
2382
2605
  # @raise [NotEnabled]
2383
2606
  #
2384
- # source://cli-ui//lib/cli/ui/stdout_router.rb#352
2385
- sig { void }
2607
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#334
2386
2608
  def assert_enabled!; end
2387
2609
 
2388
- # source://cli-ui//lib/cli/ui/stdout_router.rb#347
2389
- sig { returns(T.nilable(T::Hash[::Symbol, T.any(::IO, ::String, ::StringIO)])) }
2610
+ # : -> Hash[Symbol, (String | io_like)]?
2611
+ #
2612
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#329
2390
2613
  def current_id; end
2391
2614
 
2392
- # source://cli-ui//lib/cli/ui/stdout_router.rb#385
2393
- sig { returns(T::Boolean) }
2615
+ # : -> bool
2616
+ #
2617
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#367
2394
2618
  def disable; end
2395
2619
 
2396
- # source://cli-ui//lib/cli/ui/stdout_router.rb#327
2397
- sig { returns(T.nilable(T.any(::IO, ::StringIO))) }
2620
+ # : io_like?
2621
+ #
2622
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#311
2398
2623
  def duplicate_output_to; end
2399
2624
 
2400
- # @return [IOLike, nil]
2625
+ # : io_like?
2401
2626
  #
2402
- # source://cli-ui//lib/cli/ui/stdout_router.rb#327
2627
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#311
2403
2628
  def duplicate_output_to=(_arg0); end
2404
2629
 
2405
- # source://cli-ui//lib/cli/ui/stdout_router.rb#371
2406
- sig { returns(T::Boolean) }
2630
+ # : -> bool
2631
+ #
2632
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#353
2407
2633
  def enable; end
2408
2634
 
2409
- # source://cli-ui//lib/cli/ui/stdout_router.rb#380
2410
- sig { params(stream: T.any(::IO, ::StringIO)).returns(T::Boolean) }
2635
+ # : (?io_like stream) -> bool
2636
+ #
2637
+ # @return [Boolean]
2638
+ #
2639
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#362
2411
2640
  def enabled?(stream = T.unsafe(nil)); end
2412
2641
 
2413
2642
  # TODO: remove this
2643
+ # : -> void
2414
2644
  #
2415
- # source://cli-ui//lib/cli/ui/stdout_router.rb#366
2416
- sig { void }
2645
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#348
2417
2646
  def ensure_activated; end
2418
2647
 
2419
- # source://cli-ui//lib/cli/ui/stdout_router.rb#357
2420
- sig { type_parameters(:T).params(block: T.proc.returns(T.type_parameter(:T))).returns(T.type_parameter(:T)) }
2648
+ # : [T] { -> T } -> T
2649
+ #
2650
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#339
2421
2651
  def with_enabled(&block); end
2422
2652
 
2423
- # source://cli-ui//lib/cli/ui/stdout_router.rb#334
2424
- sig do
2425
- type_parameters(:T)
2426
- .params(
2427
- on_streams: T::Array[T.any(::IO, ::StringIO)],
2428
- block: T.proc.params(id: ::String).returns(T.type_parameter(:T))
2429
- ).returns(T.type_parameter(:T))
2430
- end
2653
+ # : [T] (on_streams: Array[io_like]) { (String id) -> T } -> T
2654
+ #
2655
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#314
2431
2656
  def with_id(on_streams:, &block); end
2432
2657
 
2433
2658
  private
2434
2659
 
2435
- # source://cli-ui//lib/cli/ui/stdout_router.rb#403
2436
- sig { params(stream: T.any(::IO, ::StringIO), streamname: ::Symbol).void }
2660
+ # : (io_like stream, Symbol streamname) -> void
2661
+ #
2662
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#385
2437
2663
  def activate(stream, streamname); end
2438
2664
 
2439
- # source://cli-ui//lib/cli/ui/stdout_router.rb#396
2440
- sig { params(stream: T.any(::IO, ::StringIO)).void }
2665
+ # : (io_like stream) -> void
2666
+ #
2667
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#378
2441
2668
  def deactivate(stream); end
2442
2669
  end
2443
2670
  end
2444
2671
 
2445
- # source://cli-ui//lib/cli/ui/stdout_router.rb#94
2672
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#93
2446
2673
  class CLI::UI::StdoutRouter::Capture
2447
- # source://cli-ui//lib/cli/ui/stdout_router.rb#196
2448
- sig do
2449
- params(
2450
- with_frame_inset: T::Boolean,
2451
- merged_output: T::Boolean,
2452
- duplicate_output_to: ::IO,
2453
- block: T.proc.void
2454
- ).void
2455
- end
2674
+ # : (?with_frame_inset: bool, ?merged_output: bool, ?duplicate_output_to: IO) { -> void } -> void
2675
+ #
2676
+ # @return [Capture] a new instance of Capture
2677
+ #
2678
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#184
2456
2679
  def initialize(with_frame_inset: T.unsafe(nil), merged_output: T.unsafe(nil), duplicate_output_to: T.unsafe(nil), &block); end
2457
2680
 
2458
- # source://cli-ui//lib/cli/ui/stdout_router.rb#212
2459
- sig { returns(T::Boolean) }
2681
+ # : bool
2682
+ #
2683
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#200
2460
2684
  def print_captured_output; end
2461
2685
 
2462
- # @return [Boolean]
2686
+ # : bool
2463
2687
  #
2464
- # source://cli-ui//lib/cli/ui/stdout_router.rb#212
2688
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#200
2465
2689
  def print_captured_output=(_arg0); end
2466
2690
 
2467
- # source://cli-ui//lib/cli/ui/stdout_router.rb#215
2468
- sig { returns(T.untyped) }
2691
+ # : -> untyped
2692
+ #
2693
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#203
2469
2694
  def run; end
2470
2695
 
2471
- # source://cli-ui//lib/cli/ui/stdout_router.rb#258
2472
- sig { returns(::String) }
2696
+ # : -> String
2697
+ #
2698
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#246
2473
2699
  def stderr; end
2474
2700
 
2475
- # source://cli-ui//lib/cli/ui/stdout_router.rb#253
2476
- sig { returns(::String) }
2701
+ # : -> String
2702
+ #
2703
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#241
2477
2704
  def stdout; end
2478
2705
 
2479
2706
  class << self
2480
- # source://cli-ui//lib/cli/ui/stdout_router.rb#106
2481
- sig { returns(T.nilable(::CLI::UI::StdoutRouter::Capture)) }
2707
+ # : -> Capture?
2708
+ #
2709
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#101
2482
2710
  def current_capture; end
2483
2711
 
2484
- # source://cli-ui//lib/cli/ui/stdout_router.rb#111
2485
- sig { returns(::CLI::UI::StdoutRouter::Capture) }
2712
+ # : -> Capture
2713
+ #
2714
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#106
2486
2715
  def current_capture!; end
2487
2716
 
2488
- # source://cli-ui//lib/cli/ui/stdout_router.rb#116
2489
- sig { type_parameters(:T).params(block: T.proc.returns(T.type_parameter(:T))).returns(T.type_parameter(:T)) }
2717
+ # : [T] { -> T } -> T
2718
+ #
2719
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#111
2490
2720
  def in_alternate_screen(&block); end
2491
2721
 
2492
- # source://cli-ui//lib/cli/ui/stdout_router.rb#143
2493
- sig { type_parameters(:T).params(block: T.proc.returns(T.type_parameter(:T))).returns(T.type_parameter(:T)) }
2722
+ # : [T] { -> T } -> T
2723
+ #
2724
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#138
2494
2725
  def stdin_synchronize(&block); end
2495
2726
 
2496
- # source://cli-ui//lib/cli/ui/stdout_router.rb#157
2497
- sig { type_parameters(:T).params(block: T.proc.returns(T.type_parameter(:T))).returns(T.type_parameter(:T)) }
2727
+ # : [T] { -> T } -> T
2728
+ #
2729
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#152
2498
2730
  def with_stdin_masked(&block); end
2499
2731
 
2500
2732
  private
2501
2733
 
2502
- # source://cli-ui//lib/cli/ui/stdout_router.rb#183
2503
- sig { returns(T::Boolean) }
2734
+ # : -> bool
2735
+ #
2736
+ # @return [Boolean]
2737
+ #
2738
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#178
2504
2739
  def outermost_uncaptured?; end
2505
2740
  end
2506
2741
  end
2507
2742
 
2508
- # source://cli-ui//lib/cli/ui/stdout_router.rb#262
2743
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#250
2509
2744
  class CLI::UI::StdoutRouter::Capture::BlockingInput
2510
- # source://cli-ui//lib/cli/ui/stdout_router.rb#266
2511
- sig { params(stream: ::IO).void }
2745
+ # : (IO stream) -> void
2746
+ #
2747
+ # @return [BlockingInput] a new instance of BlockingInput
2748
+ #
2749
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#252
2512
2750
  def initialize(stream); end
2513
2751
 
2514
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
2752
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2515
2753
  def <<(*args, **kwargs, &block); end
2516
2754
 
2517
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
2755
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2518
2756
  def advise(*args, **kwargs, &block); end
2519
2757
 
2520
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
2758
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2521
2759
  def autoclose=(*args, **kwargs, &block); end
2522
2760
 
2523
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
2761
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2524
2762
  def autoclose?(*args, **kwargs, &block); end
2525
2763
 
2526
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
2764
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2765
+ def beep(*args, **kwargs, &block); end
2766
+
2767
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2527
2768
  def binmode(*args, **kwargs, &block); end
2528
2769
 
2529
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
2770
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2530
2771
  def binmode?(*args, **kwargs, &block); end
2531
2772
 
2532
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
2773
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2774
+ def check_winsize_changed(*args, **kwargs, &block); end
2775
+
2776
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2777
+ def clear_screen(*args, **kwargs, &block); end
2778
+
2779
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2533
2780
  def close(*args, **kwargs, &block); end
2534
2781
 
2535
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
2782
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2536
2783
  def close_on_exec=(*args, **kwargs, &block); end
2537
2784
 
2538
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
2785
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2539
2786
  def close_on_exec?(*args, **kwargs, &block); end
2540
2787
 
2541
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
2788
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2542
2789
  def close_read(*args, **kwargs, &block); end
2543
2790
 
2544
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
2791
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2545
2792
  def close_write(*args, **kwargs, &block); end
2546
2793
 
2547
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
2794
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2548
2795
  def closed?(*args, **kwargs, &block); end
2549
2796
 
2550
- # source://cli-ui//lib/cli/ui/stdout_router.rb#304
2797
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2798
+ def console_mode(*args, **kwargs, &block); end
2799
+
2800
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2801
+ def console_mode=(*args, **kwargs, &block); end
2802
+
2803
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2804
+ def cooked(*args, **kwargs, &block); end
2805
+
2806
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2807
+ def cooked!(*args, **kwargs, &block); end
2808
+
2809
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2810
+ def cursor(*args, **kwargs, &block); end
2811
+
2812
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2813
+ def cursor=(*args, **kwargs, &block); end
2814
+
2815
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2816
+ def cursor_down(*args, **kwargs, &block); end
2817
+
2818
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2819
+ def cursor_left(*args, **kwargs, &block); end
2820
+
2821
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2822
+ def cursor_right(*args, **kwargs, &block); end
2823
+
2824
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2825
+ def cursor_up(*args, **kwargs, &block); end
2826
+
2827
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#290
2551
2828
  def each(*args, **kwargs, &block); end
2552
2829
 
2553
- # source://cli-ui//lib/cli/ui/stdout_router.rb#304
2830
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#290
2554
2831
  def each_byte(*args, **kwargs, &block); end
2555
2832
 
2556
- # source://cli-ui//lib/cli/ui/stdout_router.rb#304
2833
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#290
2557
2834
  def each_char(*args, **kwargs, &block); end
2558
2835
 
2559
- # source://cli-ui//lib/cli/ui/stdout_router.rb#304
2836
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#290
2560
2837
  def each_codepoint(*args, **kwargs, &block); end
2561
2838
 
2562
- # source://cli-ui//lib/cli/ui/stdout_router.rb#304
2839
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#290
2563
2840
  def each_line(*args, **kwargs, &block); end
2564
2841
 
2565
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
2842
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2843
+ def echo=(*args, **kwargs, &block); end
2844
+
2845
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2846
+ def echo?(*args, **kwargs, &block); end
2847
+
2848
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2566
2849
  def eof(*args, **kwargs, &block); end
2567
2850
 
2568
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
2851
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2569
2852
  def eof?(*args, **kwargs, &block); end
2570
2853
 
2571
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
2854
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2855
+ def erase_line(*args, **kwargs, &block); end
2856
+
2857
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2858
+ def erase_screen(*args, **kwargs, &block); end
2859
+
2860
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2572
2861
  def external_encoding(*args, **kwargs, &block); end
2573
2862
 
2574
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
2863
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2575
2864
  def fcntl(*args, **kwargs, &block); end
2576
2865
 
2577
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
2866
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2578
2867
  def fdatasync(*args, **kwargs, &block); end
2579
2868
 
2580
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
2869
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2581
2870
  def fileno(*args, **kwargs, &block); end
2582
2871
 
2583
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
2872
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2584
2873
  def flush(*args, **kwargs, &block); end
2585
2874
 
2586
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
2875
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2587
2876
  def fsync(*args, **kwargs, &block); end
2588
2877
 
2589
- # source://cli-ui//lib/cli/ui/stdout_router.rb#304
2878
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#290
2590
2879
  def getbyte(*args, **kwargs, &block); end
2591
2880
 
2592
- # source://cli-ui//lib/cli/ui/stdout_router.rb#304
2881
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#290
2593
2882
  def getc(*args, **kwargs, &block); end
2594
2883
 
2595
- # source://cli-ui//lib/cli/ui/stdout_router.rb#304
2884
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#290
2596
2885
  def getch(*args, **kwargs, &block); end
2597
2886
 
2598
- # source://cli-ui//lib/cli/ui/stdout_router.rb#304
2887
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2888
+ def getpass(*args, **kwargs, &block); end
2889
+
2890
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#290
2599
2891
  def gets(*args, **kwargs, &block); end
2600
2892
 
2601
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
2893
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2894
+ def goto(*args, **kwargs, &block); end
2895
+
2896
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2897
+ def goto_column(*args, **kwargs, &block); end
2898
+
2899
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2900
+ def iflush(*args, **kwargs, &block); end
2901
+
2902
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2602
2903
  def inspect(*args, **kwargs, &block); end
2603
2904
 
2604
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
2905
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2605
2906
  def internal_encoding(*args, **kwargs, &block); end
2606
2907
 
2607
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
2908
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2608
2909
  def ioctl(*args, **kwargs, &block); end
2609
2910
 
2610
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
2911
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2912
+ def ioflush(*args, **kwargs, &block); end
2913
+
2914
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2611
2915
  def isatty(*args, **kwargs, &block); end
2612
2916
 
2613
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
2917
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2614
2918
  def lineno(*args, **kwargs, &block); end
2615
2919
 
2616
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
2920
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2617
2921
  def lineno=(*args, **kwargs, &block); end
2618
2922
 
2619
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
2923
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2924
+ def noecho(*args, **kwargs, &block); end
2925
+
2926
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2620
2927
  def nread(*args, **kwargs, &block); end
2621
2928
 
2622
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
2929
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2930
+ def oflush(*args, **kwargs, &block); end
2931
+
2932
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2623
2933
  def path(*args, **kwargs, &block); end
2624
2934
 
2625
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
2935
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2626
2936
  def pathconf(*args, **kwargs, &block); end
2627
2937
 
2628
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
2938
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2629
2939
  def pid(*args, **kwargs, &block); end
2630
2940
 
2631
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
2941
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2632
2942
  def pos(*args, **kwargs, &block); end
2633
2943
 
2634
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
2944
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2635
2945
  def pos=(*args, **kwargs, &block); end
2636
2946
 
2637
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
2947
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2638
2948
  def pread(*args, **kwargs, &block); end
2639
2949
 
2640
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
2950
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2951
+ def pressed?(*args, **kwargs, &block); end
2952
+
2953
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2641
2954
  def print(*args, **kwargs, &block); end
2642
2955
 
2643
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
2956
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2644
2957
  def printf(*args, **kwargs, &block); end
2645
2958
 
2646
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
2959
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2647
2960
  def putc(*args, **kwargs, &block); end
2648
2961
 
2649
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
2962
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2650
2963
  def puts(*args, **kwargs, &block); end
2651
2964
 
2652
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
2965
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2653
2966
  def pwrite(*args, **kwargs, &block); end
2654
2967
 
2655
- # source://cli-ui//lib/cli/ui/stdout_router.rb#304
2968
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2969
+ def raw(*args, **kwargs, &block); end
2970
+
2971
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2972
+ def raw!(*args, **kwargs, &block); end
2973
+
2974
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#290
2656
2975
  def read(*args, **kwargs, &block); end
2657
2976
 
2658
- # source://cli-ui//lib/cli/ui/stdout_router.rb#304
2977
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#290
2659
2978
  def read_nonblock(*args, **kwargs, &block); end
2660
2979
 
2661
- # source://cli-ui//lib/cli/ui/stdout_router.rb#304
2980
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#290
2662
2981
  def readbyte(*args, **kwargs, &block); end
2663
2982
 
2664
- # source://cli-ui//lib/cli/ui/stdout_router.rb#304
2983
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#290
2665
2984
  def readchar(*args, **kwargs, &block); end
2666
2985
 
2667
- # source://cli-ui//lib/cli/ui/stdout_router.rb#304
2986
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#290
2668
2987
  def readline(*args, **kwargs, &block); end
2669
2988
 
2670
- # source://cli-ui//lib/cli/ui/stdout_router.rb#304
2989
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#290
2671
2990
  def readlines(*args, **kwargs, &block); end
2672
2991
 
2673
- # source://cli-ui//lib/cli/ui/stdout_router.rb#304
2992
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#290
2674
2993
  def readpartial(*args, **kwargs, &block); end
2675
2994
 
2676
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
2995
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2677
2996
  def ready?(*args, **kwargs, &block); end
2678
2997
 
2679
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
2998
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2680
2999
  def reopen(*args, **kwargs, &block); end
2681
3000
 
2682
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
3001
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2683
3002
  def rewind(*args, **kwargs, &block); end
2684
3003
 
2685
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
3004
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
3005
+ def scroll_backward(*args, **kwargs, &block); end
3006
+
3007
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
3008
+ def scroll_forward(*args, **kwargs, &block); end
3009
+
3010
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2686
3011
  def seek(*args, **kwargs, &block); end
2687
3012
 
2688
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
3013
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2689
3014
  def set_encoding(*args, **kwargs, &block); end
2690
3015
 
2691
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
3016
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2692
3017
  def set_encoding_by_bom(*args, **kwargs, &block); end
2693
3018
 
2694
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
3019
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2695
3020
  def stat(*args, **kwargs, &block); end
2696
3021
 
2697
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
3022
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2698
3023
  def sync(*args, **kwargs, &block); end
2699
3024
 
2700
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
3025
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2701
3026
  def sync=(*args, **kwargs, &block); end
2702
3027
 
2703
- # source://cli-ui//lib/cli/ui/stdout_router.rb#272
2704
- sig { type_parameters(:T).params(block: T.proc.returns(T.type_parameter(:T))).returns(T.type_parameter(:T)) }
3028
+ # : [T] { -> T } -> T
3029
+ #
3030
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#258
2705
3031
  def synchronize(&block); end
2706
3032
 
2707
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
3033
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2708
3034
  def sysread(*args, **kwargs, &block); end
2709
3035
 
2710
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
3036
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2711
3037
  def sysseek(*args, **kwargs, &block); end
2712
3038
 
2713
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
3039
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2714
3040
  def syswrite(*args, **kwargs, &block); end
2715
3041
 
2716
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
3042
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2717
3043
  def tell(*args, **kwargs, &block); end
2718
3044
 
2719
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
3045
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2720
3046
  def timeout(*args, **kwargs, &block); end
2721
3047
 
2722
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
3048
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2723
3049
  def timeout=(*args, **kwargs, &block); end
2724
3050
 
2725
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
3051
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2726
3052
  def to_i(*args, **kwargs, &block); end
2727
3053
 
2728
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
3054
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2729
3055
  def to_io(*args, **kwargs, &block); end
2730
3056
 
2731
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
3057
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2732
3058
  def to_path(*args, **kwargs, &block); end
2733
3059
 
2734
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
3060
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2735
3061
  def tty?(*args, **kwargs, &block); end
2736
3062
 
2737
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
3063
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
3064
+ def ttyname(*args, **kwargs, &block); end
3065
+
3066
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2738
3067
  def ungetbyte(*args, **kwargs, &block); end
2739
3068
 
2740
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
3069
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2741
3070
  def ungetc(*args, **kwargs, &block); end
2742
3071
 
2743
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
3072
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2744
3073
  def wait(*args, **kwargs, &block); end
2745
3074
 
2746
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
3075
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2747
3076
  def wait_priority(*args, **kwargs, &block); end
2748
3077
 
2749
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
3078
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2750
3079
  def wait_readable(*args, **kwargs, &block); end
2751
3080
 
2752
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
3081
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2753
3082
  def wait_writable(*args, **kwargs, &block); end
2754
3083
 
2755
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
3084
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
3085
+ def winsize(*args, **kwargs, &block); end
3086
+
3087
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
3088
+ def winsize=(*args, **kwargs, &block); end
3089
+
3090
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2756
3091
  def write(*args, **kwargs, &block); end
2757
3092
 
2758
- # source://cli-ui//lib/cli/ui/stdout_router.rb#312
3093
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#298
2759
3094
  def write_nonblock(*args, **kwargs, &block); end
2760
3095
  end
2761
3096
 
2762
- # source://cli-ui//lib/cli/ui/stdout_router.rb#301
3097
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#287
2763
3098
  CLI::UI::StdoutRouter::Capture::BlockingInput::NON_READING_METHODS = T.let(T.unsafe(nil), Array)
2764
3099
 
2765
- # source://cli-ui//lib/cli/ui/stdout_router.rb#282
3100
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#268
2766
3101
  CLI::UI::StdoutRouter::Capture::BlockingInput::READING_METHODS = T.let(T.unsafe(nil), Array)
2767
3102
 
2768
- # source://cli-ui//lib/cli/ui/stdout_router.rb#11
3103
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#10
2769
3104
  class CLI::UI::StdoutRouter::Writer
2770
- # source://cli-ui//lib/cli/ui/stdout_router.rb#15
2771
- sig { params(stream: T.any(::IO, ::StringIO), name: ::Symbol).void }
3105
+ # : (io_like stream, Symbol name) -> void
3106
+ #
3107
+ # @return [Writer] a new instance of Writer
3108
+ #
3109
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#12
2772
3110
  def initialize(stream, name); end
2773
3111
 
2774
- # source://cli-ui//lib/cli/ui/stdout_router.rb#21
2775
- sig { params(args: ::Object).returns(::Integer) }
3112
+ # : (*Object args) -> Integer
3113
+ #
3114
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#18
2776
3115
  def write(*args); end
2777
3116
 
2778
3117
  private
2779
3118
 
2780
- # source://cli-ui//lib/cli/ui/stdout_router.rb#77
2781
- sig { params(str: ::String, prefix: ::String).returns(::String) }
3119
+ # : (String str, String prefix) -> String
3120
+ #
3121
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#76
2782
3122
  def apply_line_prefix(str, prefix); end
2783
3123
 
2784
- # source://cli-ui//lib/cli/ui/stdout_router.rb#72
2785
- sig { returns(T::Boolean) }
3124
+ # : -> bool
3125
+ #
3126
+ # @return [Boolean]
3127
+ #
3128
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#71
2786
3129
  def auto_frame_inset?; end
2787
3130
 
2788
- # source://cli-ui//lib/cli/ui/stdout_router.rb#53
2789
- sig { params(stream: T.any(::IO, ::StringIO), args: T::Array[::String]).returns(T::Array[::String]) }
3131
+ # : (io_like stream, Array[String] args) -> Array[String]
3132
+ #
3133
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#52
2790
3134
  def prepend_id(stream, args); end
2791
3135
 
2792
- # source://cli-ui//lib/cli/ui/stdout_router.rb#64
2793
- sig { params(stream: T.any(::IO, ::StringIO)).returns(T::Boolean) }
3136
+ # : (io_like stream) -> bool
3137
+ #
3138
+ # source://cli-ui//lib/cli/ui/stdout_router.rb#63
2794
3139
  def prepend_id_for_stream(stream); end
2795
3140
  end
2796
3141
 
@@ -2820,8 +3165,9 @@ module CLI::UI::Table
2820
3165
  # ["row2", "row2"]
2821
3166
  # ])
2822
3167
  #
2823
- # source://cli-ui//lib/cli/ui/table.rb#79
2824
- sig { params(table: T::Array[T::Array[::String]], col_spacing: ::Integer).returns(T::Array[::String]) }
3168
+ # : (Array[Array[String]] table, ?col_spacing: Integer) -> Array[String]
3169
+ #
3170
+ # source://cli-ui//lib/cli/ui/table.rb#75
2825
3171
  def capture_table(table, col_spacing: T.unsafe(nil)); end
2826
3172
 
2827
3173
  # Prints a formatted table to the specified output
@@ -2851,58 +3197,65 @@ module CLI::UI::Table
2851
3197
  # really_long_cell short
2852
3198
  # row2 row2
2853
3199
  #
2854
- # source://cli-ui//lib/cli/ui/table.rb#39
2855
- sig { params(table: T::Array[T::Array[::String]], col_spacing: ::Integer, to: T.any(::IO, ::StringIO)).void }
3200
+ # : (Array[Array[String]] table, ?col_spacing: Integer, ?to: io_like) -> void
3201
+ #
3202
+ # source://cli-ui//lib/cli/ui/table.rb#35
2856
3203
  def puts_table(table, col_spacing: T.unsafe(nil), to: T.unsafe(nil)); end
2857
3204
  end
2858
3205
  end
2859
3206
 
2860
- # source://cli-ui//lib/cli/ui/terminal.rb#9
3207
+ # source://cli-ui//lib/cli/ui/terminal.rb#8
2861
3208
  module CLI::UI::Terminal
2862
3209
  class << self
2863
3210
  # Returns the width of the terminal, if possible
2864
3211
  # Otherwise, will return DEFAULT_HEIGHT
2865
3212
  #
2866
- # source://cli-ui//lib/cli/ui/terminal.rb#30
2867
- sig { returns(::Integer) }
3213
+ # : -> Integer
3214
+ #
3215
+ # source://cli-ui//lib/cli/ui/terminal.rb#25
2868
3216
  def height; end
2869
3217
 
2870
- # source://cli-ui//lib/cli/ui/terminal.rb#51
2871
- sig { void }
3218
+ # : -> void
3219
+ #
3220
+ # source://cli-ui//lib/cli/ui/terminal.rb#46
2872
3221
  def setup_winsize_trap; end
2873
3222
 
2874
3223
  # Returns the width of the terminal, if possible
2875
3224
  # Otherwise will return DEFAULT_WIDTH
2876
3225
  #
2877
- # source://cli-ui//lib/cli/ui/terminal.rb#22
2878
- sig { returns(::Integer) }
3226
+ # : -> Integer
3227
+ #
3228
+ # source://cli-ui//lib/cli/ui/terminal.rb#17
2879
3229
  def width; end
2880
3230
 
2881
- # source://cli-ui//lib/cli/ui/terminal.rb#35
2882
- sig { returns([::Integer, ::Integer]) }
3231
+ # : -> [Integer, Integer]
3232
+ #
3233
+ # source://cli-ui//lib/cli/ui/terminal.rb#30
2883
3234
  def winsize; end
2884
3235
  end
2885
3236
  end
2886
3237
 
2887
- # source://cli-ui//lib/cli/ui/terminal.rb#13
3238
+ # source://cli-ui//lib/cli/ui/terminal.rb#10
2888
3239
  CLI::UI::Terminal::DEFAULT_HEIGHT = T.let(T.unsafe(nil), Integer)
2889
3240
 
2890
- # source://cli-ui//lib/cli/ui/terminal.rb#12
3241
+ # source://cli-ui//lib/cli/ui/terminal.rb#9
2891
3242
  CLI::UI::Terminal::DEFAULT_WIDTH = T.let(T.unsafe(nil), Integer)
2892
3243
 
2893
3244
  # Truncater truncates a string to a provided printable width.
2894
3245
  #
2895
- # source://cli-ui//lib/cli/ui/truncater.rb#9
3246
+ # source://cli-ui//lib/cli/ui/truncater.rb#7
2896
3247
  module CLI::UI::Truncater
2897
3248
  class << self
2898
- # source://cli-ui//lib/cli/ui/truncater.rb#34
2899
- sig { params(text: ::String, printing_width: ::Integer).returns(::String) }
3249
+ # : (String text, Integer printing_width) -> String
3250
+ #
3251
+ # source://cli-ui//lib/cli/ui/truncater.rb#30
2900
3252
  def call(text, printing_width); end
2901
3253
 
2902
3254
  private
2903
3255
 
2904
- # source://cli-ui//lib/cli/ui/truncater.rb#96
2905
- sig { params(printable_codepoint: ::Integer).returns(::Integer) }
3256
+ # : (Integer printable_codepoint) -> Integer
3257
+ #
3258
+ # source://cli-ui//lib/cli/ui/truncater.rb#93
2906
3259
  def width(printable_codepoint); end
2907
3260
  end
2908
3261
  end
@@ -2911,45 +3264,45 @@ end
2911
3264
  # If you need this to be more accurate, we'll almost certainly accept a
2912
3265
  # PR improving it.
2913
3266
  #
2914
- # source://cli-ui//lib/cli/ui/truncater.rb#23
3267
+ # source://cli-ui//lib/cli/ui/truncater.rb#21
2915
3268
  CLI::UI::Truncater::EMOJI_RANGE = T.let(T.unsafe(nil), Range)
2916
3269
 
2917
- # source://cli-ui//lib/cli/ui/truncater.rb#15
3270
+ # source://cli-ui//lib/cli/ui/truncater.rb#13
2918
3271
  CLI::UI::Truncater::ESC = T.let(T.unsafe(nil), Integer)
2919
3272
 
2920
- # source://cli-ui//lib/cli/ui/truncater.rb#25
3273
+ # source://cli-ui//lib/cli/ui/truncater.rb#23
2921
3274
  CLI::UI::Truncater::LC_ALPHA_RANGE = T.let(T.unsafe(nil), Range)
2922
3275
 
2923
- # source://cli-ui//lib/cli/ui/truncater.rb#16
3276
+ # source://cli-ui//lib/cli/ui/truncater.rb#14
2924
3277
  CLI::UI::Truncater::LEFT_SQUARE_BRACKET = T.let(T.unsafe(nil), Integer)
2925
3278
 
2926
- # source://cli-ui//lib/cli/ui/truncater.rb#24
3279
+ # source://cli-ui//lib/cli/ui/truncater.rb#22
2927
3280
  CLI::UI::Truncater::NUMERIC_RANGE = T.let(T.unsafe(nil), Range)
2928
3281
 
2929
- # source://cli-ui//lib/cli/ui/truncater.rb#11
3282
+ # source://cli-ui//lib/cli/ui/truncater.rb#9
2930
3283
  CLI::UI::Truncater::PARSE_ANSI = T.let(T.unsafe(nil), Symbol)
2931
3284
 
2932
- # source://cli-ui//lib/cli/ui/truncater.rb#12
3285
+ # source://cli-ui//lib/cli/ui/truncater.rb#10
2933
3286
  CLI::UI::Truncater::PARSE_ESC = T.let(T.unsafe(nil), Symbol)
2934
3287
 
2935
- # source://cli-ui//lib/cli/ui/truncater.rb#10
3288
+ # source://cli-ui//lib/cli/ui/truncater.rb#8
2936
3289
  CLI::UI::Truncater::PARSE_ROOT = T.let(T.unsafe(nil), Symbol)
2937
3290
 
2938
- # source://cli-ui//lib/cli/ui/truncater.rb#13
3291
+ # source://cli-ui//lib/cli/ui/truncater.rb#11
2939
3292
  CLI::UI::Truncater::PARSE_ZWJ = T.let(T.unsafe(nil), Symbol)
2940
3293
 
2941
- # source://cli-ui//lib/cli/ui/truncater.rb#18
3294
+ # source://cli-ui//lib/cli/ui/truncater.rb#16
2942
3295
  CLI::UI::Truncater::SEMICOLON = T.let(T.unsafe(nil), Integer)
2943
3296
 
2944
- # source://cli-ui//lib/cli/ui/truncater.rb#28
3297
+ # source://cli-ui//lib/cli/ui/truncater.rb#26
2945
3298
  CLI::UI::Truncater::TRUNCATED = T.let(T.unsafe(nil), String)
2946
3299
 
2947
- # source://cli-ui//lib/cli/ui/truncater.rb#26
3300
+ # source://cli-ui//lib/cli/ui/truncater.rb#24
2948
3301
  CLI::UI::Truncater::UC_ALPHA_RANGE = T.let(T.unsafe(nil), Range)
2949
3302
 
2950
3303
  # emojipedia.org/emoji-zwj-sequences
2951
3304
  #
2952
- # source://cli-ui//lib/cli/ui/truncater.rb#17
3305
+ # source://cli-ui//lib/cli/ui/truncater.rb#15
2953
3306
  CLI::UI::Truncater::ZWJ = T.let(T.unsafe(nil), Integer)
2954
3307
 
2955
3308
  # Widgets are formatter objects with more custom implementations than the
@@ -2971,8 +3324,9 @@ module CLI::UI::Widgets
2971
3324
  class << self
2972
3325
  # All available widgets by name
2973
3326
  #
2974
- # source://cli-ui//lib/cli/ui/widgets.rb#55
2975
- sig { returns(T::Array[::String]) }
3327
+ # : -> Array[String]
3328
+ #
3329
+ # source://cli-ui//lib/cli/ui/widgets.rb#51
2976
3330
  def available; end
2977
3331
 
2978
3332
  # Looks up a widget by handle
@@ -2983,105 +3337,131 @@ module CLI::UI::Widgets
2983
3337
  # ==== Returns
2984
3338
  # A callable widget, to be invoked like `.call(argstring)`
2985
3339
  #
2986
- # source://cli-ui//lib/cli/ui/widgets.rb#46
2987
- sig { params(handle: ::String).returns(T.class_of(CLI::UI::Widgets::Base)) }
3340
+ # : (String handle) -> singleton(Widgets::Base)
3341
+ #
3342
+ # source://cli-ui//lib/cli/ui/widgets.rb#42
2988
3343
  def lookup(handle); end
2989
3344
 
2990
- # source://cli-ui//lib/cli/ui/widgets.rb#33
2991
- sig { params(name: ::String, cb: T.proc.returns(T.class_of(CLI::UI::Widgets::Base))).void }
3345
+ # : (String name) { -> singleton(Widgets::Base) } -> void
3346
+ #
3347
+ # source://cli-ui//lib/cli/ui/widgets.rb#29
2992
3348
  def register(name, &cb); end
2993
3349
  end
2994
3350
  end
2995
3351
 
2996
- # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
3352
+ # @abstract
2997
3353
  #
2998
- # source://cli-ui//lib/cli/ui/widgets/base.rb#9
3354
+ # source://cli-ui//lib/cli/ui/widgets/base.rb#10
2999
3355
  class CLI::UI::Widgets::Base
3000
- abstract!
3001
-
3002
- # source://cli-ui//lib/cli/ui/widgets/base.rb#24
3003
- sig { params(argstring: ::String).void }
3356
+ # : (String argstring) -> void
3357
+ #
3358
+ # @return [Base] a new instance of Base
3359
+ #
3360
+ # source://cli-ui//lib/cli/ui/widgets/base.rb#19
3004
3361
  def initialize(argstring); end
3005
3362
 
3363
+ # : -> String
3364
+ #
3006
3365
  # @abstract
3366
+ # @raise [NotImplementedError]
3007
3367
  #
3008
- # source://cli-ui//lib/cli/ui/widgets/base.rb#43
3009
- sig { abstract.returns(::String) }
3368
+ # source://cli-ui//lib/cli/ui/widgets/base.rb#40
3010
3369
  def render; end
3011
3370
 
3012
3371
  class << self
3372
+ # : -> Regexp
3373
+ #
3013
3374
  # @abstract
3375
+ # @raise [NotImplementedError]
3014
3376
  #
3015
- # source://cli-ui//lib/cli/ui/widgets/base.rb#39
3016
- sig { abstract.returns(::Regexp) }
3377
+ # source://cli-ui//lib/cli/ui/widgets/base.rb#33
3017
3378
  def argparse_pattern; end
3018
3379
 
3019
- # source://cli-ui//lib/cli/ui/widgets/base.rb#18
3020
- sig { params(argstring: ::String).returns(::String) }
3380
+ # : (String argstring) -> String
3381
+ #
3382
+ # source://cli-ui//lib/cli/ui/widgets/base.rb#13
3021
3383
  def call(argstring); end
3022
3384
  end
3023
3385
  end
3024
3386
 
3025
- # source://cli-ui//lib/cli/ui/widgets.rb#79
3387
+ # source://cli-ui//lib/cli/ui/widgets.rb#73
3026
3388
  class CLI::UI::Widgets::InvalidWidgetArguments < ::ArgumentError
3027
- # source://cli-ui//lib/cli/ui/widgets.rb#83
3028
- sig { params(argstring: ::String, pattern: ::Regexp).void }
3389
+ # : (String argstring, Regexp pattern) -> void
3390
+ #
3391
+ # @return [InvalidWidgetArguments] a new instance of InvalidWidgetArguments
3392
+ #
3393
+ # source://cli-ui//lib/cli/ui/widgets.rb#75
3029
3394
  def initialize(argstring, pattern); end
3030
3395
 
3031
- # source://cli-ui//lib/cli/ui/widgets.rb#90
3032
- sig { returns(::String) }
3396
+ # : -> String
3397
+ #
3398
+ # source://cli-ui//lib/cli/ui/widgets.rb#82
3033
3399
  def message; end
3034
3400
  end
3035
3401
 
3036
- # source://cli-ui//lib/cli/ui/widgets.rb#62
3402
+ # source://cli-ui//lib/cli/ui/widgets.rb#58
3037
3403
  class CLI::UI::Widgets::InvalidWidgetHandle < ::ArgumentError
3038
- # source://cli-ui//lib/cli/ui/widgets.rb#66
3039
- sig { params(handle: ::String).void }
3404
+ # : (String handle) -> void
3405
+ #
3406
+ # @return [InvalidWidgetHandle] a new instance of InvalidWidgetHandle
3407
+ #
3408
+ # source://cli-ui//lib/cli/ui/widgets.rb#60
3040
3409
  def initialize(handle); end
3041
3410
 
3042
- # source://cli-ui//lib/cli/ui/widgets.rb#72
3043
- sig { returns(::String) }
3411
+ # : -> String
3412
+ #
3413
+ # source://cli-ui//lib/cli/ui/widgets.rb#66
3044
3414
  def message; end
3045
3415
  end
3046
3416
 
3047
- # source://cli-ui//lib/cli/ui/widgets.rb#24
3417
+ # source://cli-ui//lib/cli/ui/widgets.rb#22
3048
3418
  CLI::UI::Widgets::MAP = T.let(T.unsafe(nil), Hash)
3049
3419
 
3050
3420
  # source://cli-ui//lib/cli/ui/widgets/status.rb#9
3051
3421
  class CLI::UI::Widgets::Status < ::CLI::UI::Widgets::Base
3422
+ # : -> String
3423
+ #
3052
3424
  # source://cli-ui//lib/cli/ui/widgets/status.rb#34
3053
- sig { override.returns(::String) }
3054
3425
  def render; end
3055
3426
 
3056
3427
  private
3057
3428
 
3429
+ # : (String num_str, String rune, Color color) -> String
3430
+ #
3058
3431
  # source://cli-ui//lib/cli/ui/widgets/status.rb#51
3059
- sig { params(num_str: ::String, rune: ::String, color: ::CLI::UI::Color).returns(::String) }
3060
3432
  def colorize_if_nonzero(num_str, rune, color); end
3061
3433
 
3434
+ # : -> String
3435
+ #
3062
3436
  # source://cli-ui//lib/cli/ui/widgets/status.rb#62
3063
- sig { returns(::String) }
3064
3437
  def failed_part; end
3065
3438
 
3439
+ # : -> String
3440
+ #
3066
3441
  # source://cli-ui//lib/cli/ui/widgets/status.rb#73
3067
- sig { returns(::String) }
3068
3442
  def pending_part; end
3069
3443
 
3444
+ # : -> String
3445
+ #
3070
3446
  # source://cli-ui//lib/cli/ui/widgets/status.rb#57
3071
- sig { returns(::String) }
3072
3447
  def succeeded_part; end
3073
3448
 
3449
+ # : -> String
3450
+ #
3074
3451
  # source://cli-ui//lib/cli/ui/widgets/status.rb#67
3075
- sig { returns(::String) }
3076
3452
  def working_part; end
3077
3453
 
3454
+ # : (String num_str) -> bool
3455
+ #
3456
+ # @return [Boolean]
3457
+ #
3078
3458
  # source://cli-ui//lib/cli/ui/widgets/status.rb#46
3079
- sig { params(num_str: ::String).returns(T::Boolean) }
3080
3459
  def zero?(num_str); end
3081
3460
 
3082
3461
  class << self
3083
- # source://cli-ui//lib/cli/ui/widgets/status.rb#28
3084
- sig { override.returns(::Regexp) }
3462
+ # : -> Regexp
3463
+ #
3464
+ # source://cli-ui//lib/cli/ui/widgets/status.rb#27
3085
3465
  def argparse_pattern; end
3086
3466
  end
3087
3467
  end
@@ -3111,71 +3491,96 @@ CLI::UI::Widgets::Status::SPINNER_STOPPED = T.let(T.unsafe(nil), String)
3111
3491
 
3112
3492
  # source://cli-ui//lib/cli/ui/work_queue.rb#6
3113
3493
  class CLI::UI::WorkQueue
3114
- # source://cli-ui//lib/cli/ui/work_queue.rb#72
3115
- sig { params(max_concurrent: ::Integer).void }
3494
+ # : (Integer max_concurrent) -> void
3495
+ #
3496
+ # @return [WorkQueue] a new instance of WorkQueue
3497
+ #
3498
+ # source://cli-ui//lib/cli/ui/work_queue.rb#68
3116
3499
  def initialize(max_concurrent); end
3117
3500
 
3118
- # source://cli-ui//lib/cli/ui/work_queue.rb#91
3119
- sig { void }
3501
+ # : -> void
3502
+ #
3503
+ # source://cli-ui//lib/cli/ui/work_queue.rb#87
3120
3504
  def close; end
3121
3505
 
3122
- # source://cli-ui//lib/cli/ui/work_queue.rb#81
3123
- sig { params(block: T.proc.returns(T.untyped)).returns(::CLI::UI::WorkQueue::Future) }
3506
+ # : { -> untyped } -> Future
3507
+ #
3508
+ # source://cli-ui//lib/cli/ui/work_queue.rb#77
3124
3509
  def enqueue(&block); end
3125
3510
 
3126
- # source://cli-ui//lib/cli/ui/work_queue.rb#102
3127
- sig { void }
3511
+ # : -> void
3512
+ #
3513
+ # source://cli-ui//lib/cli/ui/work_queue.rb#98
3128
3514
  def interrupt; end
3129
3515
 
3130
- # source://cli-ui//lib/cli/ui/work_queue.rb#96
3131
- sig { void }
3516
+ # : -> void
3517
+ #
3518
+ # source://cli-ui//lib/cli/ui/work_queue.rb#92
3132
3519
  def wait; end
3133
3520
 
3134
3521
  private
3135
3522
 
3136
- # source://cli-ui//lib/cli/ui/work_queue.rb#120
3137
- sig { void }
3523
+ # : -> void
3524
+ #
3525
+ # source://cli-ui//lib/cli/ui/work_queue.rb#116
3138
3526
  def start_worker; end
3139
3527
  end
3140
3528
 
3141
- # source://cli-ui//lib/cli/ui/work_queue.rb#9
3529
+ # source://cli-ui//lib/cli/ui/work_queue.rb#7
3142
3530
  class CLI::UI::WorkQueue::Future
3143
- # source://cli-ui//lib/cli/ui/work_queue.rb#13
3144
- sig { void }
3531
+ # : -> void
3532
+ #
3533
+ # @return [Future] a new instance of Future
3534
+ #
3535
+ # source://cli-ui//lib/cli/ui/work_queue.rb#9
3145
3536
  def initialize; end
3146
3537
 
3147
- # source://cli-ui//lib/cli/ui/work_queue.rb#23
3148
- sig { params(result: T.untyped).void }
3538
+ # : (untyped result) -> void
3539
+ #
3540
+ # source://cli-ui//lib/cli/ui/work_queue.rb#19
3149
3541
  def complete(result); end
3150
3542
 
3151
- # source://cli-ui//lib/cli/ui/work_queue.rb#53
3152
- sig { returns(T::Boolean) }
3543
+ # : -> bool
3544
+ #
3545
+ # @return [Boolean]
3546
+ #
3547
+ # source://cli-ui//lib/cli/ui/work_queue.rb#49
3153
3548
  def completed?; end
3154
3549
 
3155
- # source://cli-ui//lib/cli/ui/work_queue.rb#32
3156
- sig { params(error: ::Exception).void }
3550
+ # : (Exception error) -> void
3551
+ #
3552
+ # source://cli-ui//lib/cli/ui/work_queue.rb#28
3157
3553
  def fail(error); end
3158
3554
 
3159
- # source://cli-ui//lib/cli/ui/work_queue.rb#63
3160
- sig { void }
3555
+ # : -> void
3556
+ #
3557
+ # source://cli-ui//lib/cli/ui/work_queue.rb#59
3161
3558
  def start; end
3162
3559
 
3163
- # source://cli-ui//lib/cli/ui/work_queue.rb#58
3164
- sig { returns(T::Boolean) }
3560
+ # : -> bool
3561
+ #
3562
+ # @return [Boolean]
3563
+ #
3564
+ # source://cli-ui//lib/cli/ui/work_queue.rb#54
3165
3565
  def started?; end
3166
3566
 
3167
- # source://cli-ui//lib/cli/ui/work_queue.rb#43
3168
- sig { returns(T.untyped) }
3567
+ # : -> untyped
3568
+ #
3569
+ # source://cli-ui//lib/cli/ui/work_queue.rb#39
3169
3570
  def value; end
3170
3571
  end
3171
3572
 
3172
- # source://cli-ui//lib/cli/ui/wrap.rb#11
3573
+ # source://cli-ui//lib/cli/ui/wrap.rb#10
3173
3574
  class CLI::UI::Wrap
3174
- # source://cli-ui//lib/cli/ui/wrap.rb#15
3175
- sig { params(input: ::String).void }
3575
+ # : (String input) -> void
3576
+ #
3577
+ # @return [Wrap] a new instance of Wrap
3578
+ #
3579
+ # source://cli-ui//lib/cli/ui/wrap.rb#12
3176
3580
  def initialize(input); end
3177
3581
 
3178
- # source://cli-ui//lib/cli/ui/wrap.rb#20
3179
- sig { params(total_width: ::Integer).returns(::String) }
3582
+ # : (?Integer total_width) -> String
3583
+ #
3584
+ # source://cli-ui//lib/cli/ui/wrap.rb#17
3180
3585
  def wrap(total_width = T.unsafe(nil)); end
3181
3586
  end