natty-ui 0.12.0 → 0.12.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0aa357f7937c367ecc77396e7241f33a774973d773b99c6923cc975199755a14
4
- data.tar.gz: '060778aaca552a23c57e39e4efd8adf3eff07658e6a712708b6c8e46c5077bc1'
3
+ metadata.gz: b7b5e669e50f25432d17c55b8cbcc0e9a1c2c181982c08771b03160180586673
4
+ data.tar.gz: da124f705a984042e805c83b33565bc5c43e1a97c891ad95abccc5d2e8c62e62
5
5
  SHA512:
6
- metadata.gz: c79a14e0f8b02181a19268958c8784e306f66853e0e09f40ae630043a3f89b699aaaaee72622d06fff43df0eab9814908b5d692f748df0c7ff5f67d4cac1b460
7
- data.tar.gz: 7b27b83b5592b3ec556e640d7d583983ec42615ac036c40a0f5b2a305616e3df846f292aae191952e312aeaf6d9e4be99ab84ed123c1853acbf055c515b9335f
6
+ metadata.gz: 4be6c711b6b5cc7d3b6b6800f35e9e5450c44f6b57d139325a4afeeec3b350f26f0719a8909ee9d5d335e26803761bf3d2b31bbd672f47656d70b86ee2dbc465
7
+ data.tar.gz: 5b889460d57e3d92bb6bed0ce83fd8c4c6e7fecd8001fcd70674c6f7210550b259fcb4299d61d6a1a1ea376e96704670984a27c8471e07cb427a7fb62059de44
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # NattyUI ![version](https://img.shields.io/gem/v/natty-ui?label=)
2
2
 
3
- This is the beautiful, nice, nifty, fancy, neat, pretty, cool, lovely, natty user interface you like to have for your command line applications. It contains elegant, simple and beautiful tools that enhance your command line interfaces functionally and aesthetically.
3
+ This is the beautiful, nice, nifty, fancy, neat, pretty, cool, rich, lovely, natty user interface you like to have for your command line applications. It contains elegant, simple and beautiful tools that enhance your command line interfaces functionally and aesthetically.
4
4
 
5
5
  - Gem: [rubygems.org](https://rubygems.org/gems/natty-ui)
6
6
  - Source: [github.com](https://github.com/mblumtritt/natty-ui)
@@ -13,7 +13,10 @@ Here you find elegant, simple and beautiful tools that enhance your command line
13
13
  You can style your text using a [BBCode](https://en.wikipedia.org/wiki/BBCode)-like syntax
14
14
 
15
15
  ```ruby
16
- ui.puts '[bold underline bright_white]Hello [ff7bfd]World!'
16
+ ui.puts '[b]Hello World![/b]' # bold
17
+ ui.puts '[i]Hello World![/i]' # italic
18
+ ui.puts '[u]Hello World![/u]' # underline
19
+ ui.puts '[yellow on_blue]Hello World![/]'
17
20
  ```
18
21
 
19
22
  which supports all ANSI attributes, colors in 3/4-bit, 8-bit and Truecolor. There are headers, rulers, diverse message types, framed blocks and tables to layout your text. You can organize the output of tasks, use progress bars and request and handle user input. And there are text animations for fame and fun!
@@ -2,9 +2,7 @@
2
2
 
3
3
  require_relative '../lib/natty-ui'
4
4
 
5
- ui.space
6
- ui.h1 'NattyUI: 24-bit Color Support'
7
- ui.space
5
+ ui.h1 'NattyUI: 24-bit Color Support', space: 2
8
6
 
9
7
  ui.section do
10
8
  bar = '█' * ui.available_width
@@ -2,9 +2,7 @@
2
2
 
3
3
  require_relative '../lib/natty-ui'
4
4
 
5
- ui.space
6
- ui.h1 'NattyUI: 3/4-bit Color Support'
7
- ui.space
5
+ ui.h1 'NattyUI: 3/4-bit Color Support', space: 2
8
6
 
9
7
  color = ->(n, j) { "[#{n}]#{n.ljust(j)}[/] [on_#{n}] sample text [/]" }
10
8
  %w[black red green yellow blue magenta cyan white].each do |name|
@@ -2,9 +2,7 @@
2
2
 
3
3
  require_relative '../lib/natty-ui'
4
4
 
5
- ui.space
6
- ui.h1 'NattyUI: 8-bit Color Support'
7
- ui.space
5
+ ui.h1 'NattyUI: 8-bit Color Support', space: 2
8
6
 
9
7
  color = ->(i) { "[bg#{i = i.to_s(16).rjust(2, '0')}] #{i} " }
10
8
  ui.msg 'System Colors' do
data/examples/animate.rb CHANGED
@@ -2,9 +2,7 @@
2
2
 
3
3
  require_relative '../lib/natty-ui'
4
4
 
5
- ui.space
6
- ui.h1 'NattyUI: Text Line Animation'
7
- ui.space
5
+ ui.h1 'NattyUI: Text Line Animation', space: 2
8
6
 
9
7
  TEXT = <<~TEXT.tr("\n", ' ')
10
8
  Lorem [yellow]ipsum[/] dolor sit amet, consectetur adipisicing elit, sed
@@ -2,20 +2,17 @@
2
2
 
3
3
  require_relative '../lib/natty-ui'
4
4
 
5
- ui.space
6
- ui.h2 'NattyUI: ANSI Attributes'
7
- ui.space
5
+ ui.h2 'NattyUI: ANSI Attributes', space: 2
8
6
 
9
7
  ui.puts <<~PARA1.tr("\n", ' ')
10
8
  Some attributes are widely supported, such as [b]bold[/b],
11
- [i]italic[/i], [u]underline[/u], [blink]blink[/blink],
12
- [invert]invert[/invert] and [strike]strike[/strike], while others are rarely
13
- complete or correctly implemented, like [faint]faint[/faint],
14
- [double_underline]double underline[/], [curly_underline]curly
15
- underline[/], [dotted_underline]dotted underline[/],
9
+ [i]italic[/i], [u]underline[/u], [bl]blink[/bl], [inv]invert[/inv] and
10
+ [s]strike[/s], while others are rarely complete or correctly implemented, like
11
+ [faint]faint[/faint], [double_underline]double underline[/],
12
+ [curly_underline]curly underline[/], [dotted_underline]dotted underline[/],
16
13
  [dashed_underline]dashed underline[/], [rapid_blink]rapid_blink[/],
17
- [framed]framed[/], [encircled]encircled[/],
18
- [overlined]overlined[/] and [proportional]proportional[/].
14
+ [framed]framed[/], [encircled]encircled[/], [overlined]overlined[/] and
15
+ [proportional]proportional[/].
19
16
  PARA1
20
17
 
21
18
  ui.puts <<~PARA2.tr("\n", ' ')
@@ -2,13 +2,11 @@
2
2
 
3
3
  require_relative '../lib/natty-ui'
4
4
 
5
- ui.space
6
- ui.h2 'NattyUI: All Attribute and Defined Color Names'
7
- ui.space
5
+ ui.h2 'NattyUI: All Attribute and Defined Color Names', space: 2
8
6
 
9
7
  ui.ls(
10
8
  (NattyUI::Ansi.attribute_names + NattyUI::Ansi.color_names)
11
9
  .sort!
12
- .map! { |name| "[#{name}]#{name}[/]" }
10
+ .map! { |name| "[#{name}]#{name}" }
13
11
  )
14
12
  ui.space
data/examples/demo.rb CHANGED
@@ -3,9 +3,7 @@
3
3
  require_relative '../lib/natty-ui'
4
4
 
5
5
  ui.page do
6
- ui.space
7
- ui.h1 'NattyUI: Examples'
8
- ui.space
6
+ ui.h1 'NattyUI: Examples', space: 2
9
7
 
10
8
  ruby =
11
9
  ENV.fetch('RUBY') do
data/examples/ls.rb CHANGED
@@ -2,9 +2,7 @@
2
2
 
3
3
  require_relative '../lib/natty-ui'
4
4
 
5
- ui.space
6
- ui.h1 'NattyUI: Print In Columns'
7
- ui.space
5
+ ui.h1 'NattyUI: Print In Columns', space: 2
8
6
 
9
7
  LOREM = <<~IPSUM.lines(chomp: true)
10
8
  Lorem ipsum dolor sit
data/examples/message.rb CHANGED
@@ -2,9 +2,7 @@
2
2
 
3
3
  require_relative '../lib/natty-ui'
4
4
 
5
- ui.space
6
- ui.h1 'NattyUI: Message Types'
7
- ui.space
5
+ ui.h1 'NattyUI: Message Types', space: 2
8
6
 
9
7
  TEXT = <<~TEXT.tr("\n", ' ')
10
8
  Lorem [yellow]ipsum[/fg] dolor sit amet, consectetur adipisicing elit, sed
data/examples/progress.rb CHANGED
@@ -2,9 +2,7 @@
2
2
 
3
3
  require_relative '../lib/natty-ui'
4
4
 
5
- ui.space
6
- ui.h1 'NattyUI: Progress Indication'
7
- ui.space
5
+ ui.h1 'NattyUI: Progress Indication', space: 2
8
6
 
9
7
  # just simulate some work
10
8
  if ENV.key?('NO_WAIT')
data/examples/query.rb CHANGED
@@ -2,9 +2,7 @@
2
2
 
3
3
  require_relative '../lib/natty-ui'
4
4
 
5
- ui.space
6
- ui.h1 'NattyUI: User Queries'
7
- ui.space
5
+ ui.h1 'NattyUI: User Queries', space: 2
8
6
 
9
7
  # little helper
10
8
  def abort!
data/examples/read_key.rb CHANGED
@@ -4,7 +4,7 @@ require_relative '../lib/natty-ui'
4
4
 
5
5
  ui.puts '⌨️ Display Keyboard Input [bright_black](Exit with Ctrl+C)'
6
6
 
7
- ui.section prefix: '[blue]:[/] ' do
7
+ ui.section prefix: '[blue]:[/fg] ' do
8
8
  while true
9
9
  raw, name = NattyUI.read_key(mode: :both)
10
10
  ui.puts "[yellow]#{raw.inspect}[/] [bold bright_green]#{name}[/]"
data/examples/table.rb CHANGED
@@ -2,9 +2,7 @@
2
2
 
3
3
  require_relative '../lib/natty-ui'
4
4
 
5
- ui.space
6
- ui.h1 'NattyUI: Tables'
7
- ui.space
5
+ ui.h1 'NattyUI: Tables', space: 2
8
6
 
9
7
  User = Struct.new(:id, :name, :mail, :notes)
10
8
  users = [
data/lib/natty-ui/ansi.rb CHANGED
@@ -373,16 +373,7 @@ module NattyUI
373
373
  'dashed_underline_off' => '4:0',
374
374
  'curly_underline' => '4:3',
375
375
  'dotted_underline' => '4:4',
376
- 'dashed_underline' => '4:5',
377
- # aliases
378
- 'b' => 1, # bold
379
- '/b' => 22, # bold_off
380
- 'i' => 3, # italic
381
- '/i' => 23, # italic_off
382
- 'u' => 4, # underline
383
- '/u' => 24, # underline_off
384
- 'h' => 8, # hide
385
- '/h' => 28 # reveal
376
+ 'dashed_underline' => '4:5'
386
377
  }
387
378
  add = ->(s, n) { n.each_with_index { |a, idx| map[a] = s + idx } }
388
379
  add[
@@ -432,6 +423,24 @@ module NattyUI
432
423
  ]
433
424
  add[73, %w[superscript subscript superscript_off]]
434
425
 
426
+ add_alias =
427
+ proc do |name, org_name|
428
+ map[name] = map[org_name] or
429
+ raise("undefined value - #{org_name}")
430
+ map["/#{name}"] = map["#{org_name}_off"] or
431
+ raise("undefined value - #{org_name}_off")
432
+ end
433
+ add_alias['b', 'bold']
434
+ add_alias['i', 'italic']
435
+ add_alias['u', 'underline']
436
+ add_alias['bl', 'blink']
437
+ add_alias['inv', 'invert']
438
+ add_alias['s', 'strike']
439
+ add_alias['sup', 'superscript']
440
+ add_alias['sub', 'subscript']
441
+ add_alias['prop', 'proportional']
442
+ add_alias['sp', 'spacing']
443
+
435
444
  map.merge!(
436
445
  map
437
446
  .filter_map do |name, att|
@@ -6,13 +6,23 @@ module NattyUI
6
6
  class AnsiWrapper < Wrapper
7
7
  def ansi? = true
8
8
 
9
+ def cursor=(value)
10
+ if value
11
+ (@stream << Ansi::CURSOR_SHOW).flush if @cursor == 1
12
+ @cursor -= 1 if @cursor.positive?
13
+ return
14
+ end
15
+ (@stream << Ansi::CURSOR_HIDE).flush if @cursor.zero?
16
+ @cursor += 1
17
+ end
18
+
9
19
  def puts(*args, **kwargs)
10
20
  return super if args.empty? || (animation = kwargs[:animation]).nil?
11
21
  animation = Animation[animation].new(wrapper, args, kwargs)
12
- @stream << Ansi::CURSOR_HIDE
22
+ self.cursor = false
13
23
  animation.perform(@stream)
14
24
  @lines_written += animation.lines_written
15
- (@stream << Ansi::CURSOR_SHOW).flush
25
+ self.cursor = true
16
26
  self
17
27
  end
18
28
 
@@ -77,35 +87,58 @@ module NattyUI
77
87
  end
78
88
  end
79
89
 
80
- class Progress < Progress
81
- def draw(title, spinner)
82
- @msg =
83
- "#{@parent.prefix}#{Ansi[:bold, 39]}➔#{Ansi[:reset, 39]} " \
84
- "#{title}#{Ansi::RESET} "
85
- (wrapper.stream << @msg << Ansi::CURSOR_HIDE).flush
86
- @msg = "#{Ansi::CLL}#{@msg}"
87
- return @msg << BAR_COLOR if @max_value
88
- @spinner = NattyUI::Spinner[spinner]
90
+ class Progress < Element
91
+ include ProgressAttributes
92
+ include ValueAttributes
93
+
94
+ protected
95
+
96
+ def call(title, max_value, spinner)
97
+ @title = "[b 27]➔[/b] #{title}"
98
+ @info = nil
99
+ @final_text = [title]
100
+ if max_value
101
+ @max_value = [0, max_value.to_f].max
102
+ else
103
+ @spinner = NattyUI::Spinner[spinner]
104
+ end
105
+ @value = 0
106
+ @pos = wrapper.lines_written
107
+ wrapper.cursor = false
108
+ @parent.puts(@last_render = render)
109
+ @height = wrapper.lines_written - @pos
110
+ self
89
111
  end
90
112
 
91
113
  def redraw
92
- (wrapper.stream << @msg << (@max_value ? fullbar : @spinner.next)).flush
114
+ return if @status
115
+ current = render
116
+ return if @last_render == current
117
+ wrapper.stream << Ansi.cursor_previous_line(@height) << Ansi::LINE_ERASE
118
+ cl = wrapper.lines_written
119
+ @parent.puts(@last_render = current)
120
+ @height = wrapper.lines_written - cl
93
121
  end
94
122
 
95
- def end_draw = (wrapper.stream << Ansi::CLL << Ansi::CURSOR_SHOW).flush
96
-
97
- def fullbar
98
- percent = @value / @max_value
99
- count = (30 * percent).to_i
100
- mv = max_value.to_i.to_s
101
- "#{'█' * count}#{BAR_BACK}#{'▁' * (30 - count)}" \
102
- "#{BAR_INK} #{value.to_i.to_s.rjust(mv.size)}/#{mv} " \
103
- "(#{(percent * 100).round(2).to_s.rjust(6)})"
123
+ def render
124
+ return "#{@title} #{@spinner.next}#{" #{@info}" if @info}" if @spinner
125
+ percent = @max_value.zero? ? 100.0 : @value / @max_value
126
+ count = [(30 * percent).round, 30].min
127
+ mv = @max_value.round.to_s
128
+ "#{@title} [27 on27]#{'█' * count}[ec onec]#{
129
+ '▁' * (30 - count)
130
+ }[/bg] [e2 b]#{(percent * 100).round.to_s.rjust(3)}%[/b] [f6](#{
131
+ @value.round.to_s.rjust(mv.size)
132
+ }/#{mv})[/]#{" #{@info}" if @info}"
104
133
  end
105
134
 
106
- BAR_COLOR = Ansi[39, 295].freeze
107
- BAR_BACK = Ansi[236, 492].freeze
108
- BAR_INK = Ansi[:bold, 255, :on_default].freeze
135
+ def finish
136
+ wrapper.stream << Ansi.cursor_previous_line(@height) << Ansi::LINE_ERASE
137
+ wrapper.instance_variable_set(:@lines_written, @pos)
138
+ wrapper.cursor = true
139
+ return @parent.failed(*@final_text) if failed?
140
+ @parent.message(*@final_text, glyph: @status = :completed)
141
+ end
109
142
  end
110
143
 
111
144
  module Temporary
@@ -36,7 +36,7 @@ module NattyUI
36
36
  end
37
37
  parts =
38
38
  (parts.respond_to?(:map) ? parts : parts.to_s.chars).map do |part|
39
- "#{@style}#{part}"
39
+ "#{@style}#{part}#{Ansi::RESET}"
40
40
  end
41
41
  raise(ArgumentError, "invalid spinner type - #{name}") if parts.empty?
42
42
  parts = parts.zip(parts).flatten(1) while parts.size < 6
@@ -1168,7 +1168,7 @@ module NattyUI
1168
1168
  0x1f190,
1169
1169
  0x1f19a,
1170
1170
  0x1f1ac,
1171
- 0x1f1ff,
1171
+ 0x1f1e5,
1172
1172
  0x1f202,
1173
1173
  0x1f20f,
1174
1174
  0x1f23b,
@@ -2,5 +2,5 @@
2
2
 
3
3
  module NattyUI
4
4
  # The version number of the gem.
5
- VERSION = '0.12.0'
5
+ VERSION = '0.12.1'
6
6
  end
@@ -7,32 +7,33 @@ module NattyUI
7
7
  # Prints a H1 title.
8
8
  #
9
9
  # @param [#to_s] title text
10
+ # @param [#to_i] space space around the heading
10
11
  # @return [Wrapper::Section, Wrapper] it's parent object
11
- def h1(title) = _element(:Heading, title, '═══════')
12
+ def h1(title, space: 0) = _element(:Heading, title, space, '═══════')
12
13
 
13
14
  # Prints a H2 title.
14
15
  #
15
16
  # @param (see #h1)
16
17
  # @return (see #h1)
17
- def h2(title) = _element(:Heading, title, '━━━━━')
18
+ def h2(title, space: 0) = _element(:Heading, title, space, '━━━━━')
18
19
 
19
20
  # Prints a H3 title.
20
21
  #
21
22
  # @param (see #h1)
22
23
  # @return (see #h1)
23
- def h3(title) = _element(:Heading, title, '━━━')
24
+ def h3(title, space: 0) = _element(:Heading, title, space, '━━━')
24
25
 
25
26
  # Prints a H4 title.
26
27
  #
27
28
  # @param (see #h1)
28
29
  # @return (see #h1)
29
- def h4(title) = _element(:Heading, title, '───')
30
+ def h4(title, space: 0) = _element(:Heading, title, space, '───')
30
31
 
31
32
  # Prints a H5 title.
32
33
  #
33
34
  # @param (see #h1)
34
35
  # @return (see #h1)
35
- def h5(title) = _element(:Heading, title, '──')
36
+ def h5(title, space: 0) = _element(:Heading, title, space, '──')
36
37
  end
37
38
 
38
39
  class Wrapper
@@ -47,13 +48,16 @@ module NattyUI
47
48
  class Heading < Element
48
49
  protected
49
50
 
50
- def call(title, enclose)
51
+ def call(title, space, enclose)
52
+ (space = space.to_i).positive? and (before = space / 2).positive? and
53
+ @parent.space(before)
51
54
  @parent.puts(
52
55
  title,
53
56
  prefix: "#{Ansi[39]}#{enclose} #{Ansi[:bold, 255]}",
54
57
  suffix: " #{Ansi[:bold_off, 39]}#{enclose}#{Ansi::RESET}",
55
58
  max_width: available_width - 2 - (enclose.size * 2)
56
59
  )
60
+ @parent.space(space - before) if before
57
61
  end
58
62
  end
59
63
  end
@@ -43,9 +43,17 @@ module NattyUI
43
43
  # @return [Float] current value
44
44
  attr_reader :value
45
45
 
46
- def value=(val)
47
- @value = [0, val.to_f].max
48
- @max_value = @value if @max_value&.< 0
46
+ def value=(value)
47
+ @value = [0, value.to_f].max
48
+ @max_value = @value if @max_value&.< @value
49
+ redraw
50
+ end
51
+
52
+ # @return [String, nil] current information
53
+ attr_reader :info
54
+
55
+ def info=(value)
56
+ @info = value
49
57
  redraw
50
58
  end
51
59
 
@@ -36,21 +36,16 @@ module NattyUI
36
36
 
37
37
  protected
38
38
 
39
- def call(title, max_value, spinner)
39
+ def call(title, max_value, _spinner)
40
40
  @final_text = [title]
41
41
  @max_value = [0, max_value.to_f].max if max_value
42
42
  @value = @progress = 0
43
- draw(title, spinner)
44
- self
45
- end
46
-
47
- def draw(title, _spinner)
48
43
  (wrapper.stream << @parent.prefix << "➔ #{title} ").flush
44
+ self
49
45
  end
50
46
 
51
- def end_draw = (wrapper.stream << "\n")
52
-
53
47
  def redraw
48
+ return if @status
54
49
  return (wrapper.stream << '.').flush unless @max_value
55
50
  cn = (20 * @value / @max_value).to_i
56
51
  return if @progress == cn
@@ -59,15 +54,9 @@ module NattyUI
59
54
  end
60
55
 
61
56
  def finish
62
- end_draw
57
+ wrapper.stream << "\n"
63
58
  return @parent.failed(*@final_text) if failed?
64
- _section(
65
- :Message,
66
- @final_text,
67
- owner: @parent,
68
- title: @final_text.shift,
69
- glyph: @status = :completed
70
- )
59
+ @parent.message(*@final_text, glyph: @status = :completed)
71
60
  end
72
61
  end
73
62
  end
@@ -159,8 +159,7 @@ module NattyUI
159
159
  if columns.size == 1 && columns[0].respond_to?(:map)
160
160
  columns = columns[0]
161
161
  end
162
- columns =
163
- columns.map { |cell| as_cell(cell, align, style) if cell }.to_a
162
+ columns = columns.map { as_cell(_1, align, style) if _1 }.to_a
164
163
  @rows << (columns.empty? ? nil : columns)
165
164
  self
166
165
  end
@@ -367,7 +366,7 @@ module NattyUI
367
366
  @parent.available_width - 1,
368
367
  frame,
369
368
  enlarge
370
- ) { |line| @parent.puts(line) }
369
+ ) { @parent.puts(_1) }
371
370
  @parent
372
371
  end
373
372
  end
@@ -31,6 +31,15 @@ module NattyUI
31
31
  # @return [Boolean] whether ANSI is supported
32
32
  def ansi? = false
33
33
 
34
+ # Cursor visibility
35
+ # @attribute [r] cursor
36
+ def cursor = @cursor.zero?
37
+
38
+ # @attribute [w] cursor
39
+ def cursor=(value)
40
+ # nop
41
+ end
42
+
34
43
  # @attribute [r] screen_size
35
44
  # @return [[Integer, Integer]] screen size as rows and columns
36
45
  def screen_size = (@screen_size ||= determine_screen_size)
@@ -43,6 +52,10 @@ module NattyUI
43
52
  # @return [Integer] number of screen columns
44
53
  def screen_columns = screen_size[1]
45
54
 
55
+ # @attribute [r] wrapper
56
+ # @return [Wrapper] self
57
+ alias wrapper itself
58
+
46
59
  # @!group Tool functions
47
60
 
48
61
  # Print given arguments line-wise to the output stream.
@@ -144,10 +157,6 @@ module NattyUI
144
157
  # @!visibility private
145
158
  alias inspect to_s
146
159
 
147
- # @attribute [r] wrapper
148
- # @return [Wrapper] self
149
- alias wrapper itself
150
-
151
160
  # @!visibility private
152
161
  alias available_width screen_columns
153
162
 
@@ -198,7 +207,7 @@ module NattyUI
198
207
 
199
208
  def initialize(stream)
200
209
  @stream = stream
201
- @lines_written = 0
210
+ @lines_written = @cursor = 0
202
211
  end
203
212
 
204
213
  private_class_method :new
data/lib/natty-ui.rb CHANGED
@@ -5,8 +5,8 @@ require_relative 'natty-ui/wrapper'
5
5
  require_relative 'natty-ui/ansi_wrapper'
6
6
 
7
7
  #
8
- # Module to create beautiful, nice, nifty, fancy, neat, pretty, cool, lovely,
9
- # natty user interfaces for your CLI application.
8
+ # Module to create beautiful, nice, nifty, fancy, neat, pretty, cool, rich,
9
+ # lovely, natty user interfaces for your CLI application.
10
10
  #
11
11
  # It creates {Wrapper} instances which can optionally support ANSI. The UI
12
12
  # consists of {Wrapper::Element}s and {Wrapper::Section}s for different
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: natty-ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.12.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Blumtritt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-03 00:00:00.000000000 Z
11
+ date: 2024-08-18 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |
14
- This is the beautiful, nice, nifty, fancy, neat, pretty, cool, lovely,
14
+ This is the beautiful, nice, nifty, fancy, neat, pretty, cool, rich, lovely,
15
15
  natty user interface tool you like to have for your command line applications.
16
16
  It contains elegant, simple and beautiful features that enhance your
17
17
  command line interfaces functionally and aesthetically.
@@ -102,6 +102,6 @@ requirements: []
102
102
  rubygems_version: 3.5.17
103
103
  signing_key:
104
104
  specification_version: 4
105
- summary: This is the beautiful, nice, nifty, fancy, neat, pretty, cool, lovely, natty
106
- user interface you like to have for your CLI.
105
+ summary: This is the beautiful, nice, nifty, fancy, neat, pretty, cool, rich, lovely,
106
+ natty user interface you like to have for your CLI.
107
107
  test_files: []