whirled_peas 0.11.1 → 0.12.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 (123) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -0
  3. data/doc/components.md +0 -4
  4. data/doc/themes.md +35 -0
  5. data/examples/components.rb +2 -4
  6. data/examples/graph.rb +1 -1
  7. data/lib/whirled_peas/animator/debug_consumer.rb +2 -2
  8. data/lib/whirled_peas/animator/easing.rb +57 -0
  9. data/lib/whirled_peas/animator/frameset.rb +13 -8
  10. data/lib/whirled_peas/animator/producer.rb +7 -8
  11. data/lib/whirled_peas/animator/renderer_consumer.rb +7 -5
  12. data/lib/whirled_peas/command/frames.rb +1 -3
  13. data/lib/whirled_peas/command/play.rb +5 -7
  14. data/lib/whirled_peas/command/record.rb +1 -3
  15. data/lib/whirled_peas/command/still.rb +6 -2
  16. data/lib/whirled_peas/command/themes.rb +4 -3
  17. data/lib/whirled_peas/component/list_with_active.rb +1 -1
  18. data/lib/whirled_peas/config.rb +1 -8
  19. data/lib/whirled_peas/device/null_device.rb +1 -1
  20. data/lib/whirled_peas/device/output_file.rb +2 -2
  21. data/lib/whirled_peas/device/rendered_frame.rb +12 -0
  22. data/lib/whirled_peas/device/screen.rb +12 -8
  23. data/lib/whirled_peas/graphics/pixel_grid.rb +44 -0
  24. data/lib/whirled_peas/graphics/renderer.rb +4 -5
  25. data/lib/whirled_peas/settings/border.rb +1 -1
  26. data/lib/whirled_peas/utils/ansi.rb +4 -2
  27. data/lib/whirled_peas/utils/file_handler.rb +14 -9
  28. data/lib/whirled_peas/utils/formatted_string.rb +5 -3
  29. data/lib/whirled_peas/version.rb +1 -1
  30. data/screen_test/components/list_with_active/l2r_position_end.frame +1 -1
  31. data/screen_test/components/list_with_active/l2r_position_middle.frame +1 -1
  32. data/screen_test/components/list_with_active/l2r_position_start.frame +1 -1
  33. data/screen_test/components/list_with_active/l2r_separator.frame +1 -1
  34. data/screen_test/components/list_with_active/t2b_position_end.frame +1 -1
  35. data/screen_test/components/list_with_active/t2b_position_middle.frame +1 -1
  36. data/screen_test/components/list_with_active/t2b_position_start.frame +1 -1
  37. data/screen_test/components/list_with_active/t2b_separator.frame +1 -1
  38. data/screen_test/elements/box.frame +1 -1
  39. data/screen_test/elements/graph_asc.frame +1 -1
  40. data/screen_test/elements/graph_desc.frame +1 -1
  41. data/screen_test/elements/graph_horiz.frame +1 -1
  42. data/screen_test/elements/graph_sin.frame +1 -1
  43. data/screen_test/elements/grid.frame +1 -1
  44. data/screen_test/elements/screen_overflow_x.frame +1 -1
  45. data/screen_test/elements/screen_overflow_y.frame +1 -1
  46. data/screen_test/elements/text.frame +1 -1
  47. data/screen_test/elements/text_multiline.frame +1 -1
  48. data/screen_test/elements/theme.frame +1 -1
  49. data/screen_test/settings/align/box_around.frame +1 -1
  50. data/screen_test/settings/align/box_between.frame +1 -1
  51. data/screen_test/settings/align/box_center.frame +1 -1
  52. data/screen_test/settings/align/box_default.frame +1 -1
  53. data/screen_test/settings/align/box_evenly.frame +1 -1
  54. data/screen_test/settings/align/box_left.frame +1 -1
  55. data/screen_test/settings/align/box_right.frame +1 -1
  56. data/screen_test/settings/align/children_center.frame +1 -1
  57. data/screen_test/settings/align/children_left.frame +1 -1
  58. data/screen_test/settings/align/children_right.frame +1 -1
  59. data/screen_test/settings/align/grid_center.frame +1 -1
  60. data/screen_test/settings/align/grid_default.frame +1 -1
  61. data/screen_test/settings/align/grid_left.frame +1 -1
  62. data/screen_test/settings/align/grid_right.frame +1 -1
  63. data/screen_test/settings/ansi/bold.frame +1 -1
  64. data/screen_test/settings/ansi/color.frame +1 -1
  65. data/screen_test/settings/ansi/underline.frame +1 -1
  66. data/screen_test/settings/border.frame +1 -1
  67. data/screen_test/settings/content_start/box_bottom.frame +1 -1
  68. data/screen_test/settings/content_start/box_left.frame +1 -1
  69. data/screen_test/settings/content_start/box_left_negative.frame +1 -1
  70. data/screen_test/settings/content_start/box_right.frame +1 -1
  71. data/screen_test/settings/content_start/box_top.frame +1 -1
  72. data/screen_test/settings/content_start/box_top_negative.frame +1 -1
  73. data/screen_test/settings/content_start/grid_left.frame +1 -1
  74. data/screen_test/settings/content_start/grid_left_negative.frame +1 -1
  75. data/screen_test/settings/content_start/grid_top.frame +1 -1
  76. data/screen_test/settings/content_start/grid_top_negative.frame +1 -1
  77. data/screen_test/settings/flow/box_b2t.frame +1 -1
  78. data/screen_test/settings/flow/box_l2r.frame +1 -1
  79. data/screen_test/settings/flow/box_r2l.frame +1 -1
  80. data/screen_test/settings/flow/box_t2b.frame +1 -1
  81. data/screen_test/settings/flow/grid_b2t.frame +1 -1
  82. data/screen_test/settings/flow/grid_l2r.frame +1 -1
  83. data/screen_test/settings/flow/grid_r2l.frame +1 -1
  84. data/screen_test/settings/flow/grid_t2b.frame +1 -1
  85. data/screen_test/settings/height/box.frame +1 -1
  86. data/screen_test/settings/height/box_border_sizing.frame +1 -1
  87. data/screen_test/settings/height/grid.frame +1 -1
  88. data/screen_test/settings/height/overflow_box.frame +1 -1
  89. data/screen_test/settings/height/overflow_box_l2r.frame +1 -1
  90. data/screen_test/settings/height/overflow_box_t2b.frame +1 -1
  91. data/screen_test/settings/height/overflow_grid.frame +1 -1
  92. data/screen_test/settings/margin.frame +1 -1
  93. data/screen_test/settings/padding.frame +1 -1
  94. data/screen_test/settings/scroll/horiz_box.frame +1 -1
  95. data/screen_test/settings/scroll/vert_box.frame +1 -1
  96. data/screen_test/settings/title_font.frame +1 -1
  97. data/screen_test/settings/valign/box_around.frame +1 -1
  98. data/screen_test/settings/valign/box_between.frame +1 -1
  99. data/screen_test/settings/valign/box_bottom.frame +1 -1
  100. data/screen_test/settings/valign/box_default.frame +1 -1
  101. data/screen_test/settings/valign/box_evenly.frame +1 -1
  102. data/screen_test/settings/valign/box_middle.frame +1 -1
  103. data/screen_test/settings/valign/box_top.frame +1 -1
  104. data/screen_test/settings/valign/grid_bottom.frame +1 -1
  105. data/screen_test/settings/valign/grid_default.frame +1 -1
  106. data/screen_test/settings/valign/grid_middle.frame +1 -1
  107. data/screen_test/settings/valign/grid_top.frame +1 -1
  108. data/screen_test/settings/width/box_border_sizing.frame +1 -1
  109. data/screen_test/settings/width/box_content.frame +1 -1
  110. data/screen_test/settings/width/box_default.frame +1 -1
  111. data/screen_test/settings/width/grid.frame +1 -1
  112. data/screen_test/settings/width/overflow_align_center.frame +1 -1
  113. data/screen_test/settings/width/overflow_align_right.frame +1 -1
  114. data/screen_test/settings/width/overflow_box.frame +1 -1
  115. data/screen_test/settings/width/overflow_box_l2r.frame +1 -1
  116. data/screen_test/settings/width/overflow_box_t2b.frame +1 -1
  117. data/screen_test/settings/width/overflow_grid.frame +1 -1
  118. data/tools/whirled_peas/tools/screen_tester.rb +5 -2
  119. metadata +3 -5
  120. data/screen_test/components/list_with_active/l2r_active_color.frame +0 -1
  121. data/screen_test/components/list_with_active/l2r_active_color.rb +0 -18
  122. data/screen_test/components/list_with_active/t2b_active_color.frame +0 -1
  123. data/screen_test/components/list_with_active/t2b_active_color.rb +0 -19
@@ -1,7 +1,7 @@
1
1
  module WhirledPeas
2
2
  module Device
3
3
  class NullDevice
4
- def handle_renders(*)
4
+ def handle_rendered_frames(*)
5
5
  end
6
6
  end
7
7
  end
@@ -7,8 +7,8 @@ module WhirledPeas
7
7
  @file = file
8
8
  end
9
9
 
10
- def handle_renders(renders)
11
- Utils::FileHandler.write(file, renders)
10
+ def handle_rendered_frames(rendered_frames)
11
+ Utils::FileHandler.write(file, rendered_frames)
12
12
  end
13
13
 
14
14
  private
@@ -0,0 +1,12 @@
1
+ module WhirledPeas
2
+ module Device
3
+ class RenderedFrame
4
+ attr_reader :strokes, :duration
5
+
6
+ def initialize(strokes, duration)
7
+ @strokes = strokes
8
+ @duration = duration
9
+ end
10
+ end
11
+ end
12
+ end
@@ -3,24 +3,28 @@ require 'highline'
3
3
  module WhirledPeas
4
4
  module Device
5
5
  class Screen
6
- def initialize(refresh_rate, output: STDOUT)
7
- @refresh_rate = refresh_rate
6
+ def initialize(output: STDOUT)
8
7
  @output = output
9
8
  end
10
9
 
11
- def handle_renders(renders)
12
- renders.each do |strokes|
13
- frame_at = Time.now
14
- output.print(strokes)
10
+ def handle_rendered_frames(rendered_frames)
11
+ next_frame_at = nil
12
+ rendered_frames.each do |rendered_frame|
13
+ if next_frame_at.nil?
14
+ next_frame_at = Time.now + rendered_frame.duration
15
+ else
16
+ next_frame_at += rendered_frame.duration
17
+ next if next_frame_at < Time.now
18
+ end
19
+ output.print(rendered_frame.strokes)
15
20
  output.flush
16
- next_frame_at = frame_at + 1.0 / refresh_rate
17
21
  sleep([0, next_frame_at - Time.now].max)
18
22
  end
19
23
  end
20
24
 
21
25
  private
22
26
 
23
- attr_reader :refresh_rate, :output
27
+ attr_reader :output
24
28
  end
25
29
  end
26
30
  end
@@ -0,0 +1,44 @@
1
+ module WhirledPeas
2
+ module Graphics
3
+ class PixelGrid
4
+ Pixel = Struct.new(:char, :formatting)
5
+
6
+ def initialize(width, height)
7
+ @pixels = Array.new(height) { Array.new(width) { Pixel.new } }
8
+ end
9
+
10
+ def add_stroke(left, top, fstring)
11
+ fstring.each_char.with_index do |char, offset|
12
+ pixels[top][left + offset].char = char
13
+ pixels[top][left + offset].formatting = fstring.formatting
14
+ end
15
+ end
16
+
17
+ def to_s
18
+ str = Utils::Ansi.cursor_pos(left: 0, top: 0) + Utils::Ansi.clear_down
19
+ formatting = nil
20
+ chars = ''
21
+ pixels.each.with_index do |row, row_offset|
22
+ str += Utils::Ansi.cursor_pos(left: 0, top: row_offset) if row_offset > 0
23
+ row.each do |pixel|
24
+ if pixel.formatting != formatting
25
+ str += Utils::FormattedString.new(chars, formatting).to_s if chars != ''
26
+ chars = ''
27
+ formatting = pixel.formatting
28
+ end
29
+ chars << pixel.char
30
+ end
31
+ if chars != ''
32
+ str += Utils::FormattedString.new(chars, formatting).to_s
33
+ chars = ''
34
+ end
35
+ end
36
+ str
37
+ end
38
+
39
+ private
40
+
41
+ attr_reader :pixels
42
+ end
43
+ end
44
+ end
@@ -1,4 +1,5 @@
1
1
  require_relative 'canvas'
2
+ require_relative 'pixel_grid'
2
3
 
3
4
  module WhirledPeas
4
5
  module Graphics
@@ -15,13 +16,11 @@ module WhirledPeas
15
16
  template.settings.height = height
16
17
  template.settings.sizing = :border
17
18
  template.settings.set_margin(left: 0, top: 0, right: 0, bottom: 0)
18
- strokes = [Utils::Ansi.cursor_visible(false), Utils::Ansi.cursor_pos, Utils::Ansi.clear_down]
19
+ pixel_grid = PixelGrid.new(width, height)
19
20
  template.paint(Canvas.new(0, 0, width, height), 0, 0) do |left, top, fstring|
20
- next unless fstring.length > 0
21
- strokes << Utils::Ansi.cursor_pos(left: left, top: top)
22
- strokes << fstring
21
+ pixel_grid.add_stroke(left, top, fstring)
23
22
  end
24
- strokes.join
23
+ pixel_grid.to_s
25
24
  end
26
25
 
27
26
  private
@@ -94,7 +94,7 @@ module WhirledPeas
94
94
  end
95
95
 
96
96
  def style
97
- @_style || theme.border_style
97
+ @_style || theme.border_style || Styles::BOLD
98
98
  end
99
99
 
100
100
  def style=(val)
@@ -33,15 +33,17 @@ module WhirledPeas
33
33
  unless width && height
34
34
  width, height = HighLine.new.terminal.terminal_size
35
35
  end
36
+ output.print cursor_visible(false)
37
+ output.flush
36
38
  yield width, height
37
39
  ensure
38
40
  output.print clear
39
- output.print cursor_pos(top: height - 1)
41
+ output.print cursor_pos(left: 0, top: height - 1)
40
42
  output.print cursor_visible(true)
41
43
  output.flush
42
44
  end
43
45
 
44
- def cursor_pos(top: 0, left: 0)
46
+ def cursor_pos(left:, top:)
45
47
  "#{ESC}[#{top + 1};#{left + 1}H"
46
48
  end
47
49
 
@@ -1,16 +1,19 @@
1
1
  require 'base64'
2
2
  require 'zlib'
3
3
 
4
+ require 'whirled_peas/device/rendered_frame'
5
+
4
6
  module WhirledPeas
5
7
  module Utils
6
8
  module FileHandler
7
9
  module FileWriter
8
10
  VERSION = '1'
9
11
 
10
- def self.write(fp, renders)
11
- fp.puts renders.count
12
- renders.each do |strokes|
13
- encoded = Base64.encode64(strokes)
12
+ def self.write(fp, rendered_frames)
13
+ fp.puts rendered_frames.count
14
+ rendered_frames.each do |rendered_frame|
15
+ fp.puts rendered_frame.duration
16
+ encoded = Base64.encode64(rendered_frame.strokes)
14
17
  fp.puts encoded.count("\n")
15
18
  fp.puts encoded
16
19
  end
@@ -20,10 +23,12 @@ module WhirledPeas
20
23
 
21
24
  class FileReaderV1
22
25
  def self.read(fp)
23
- num_renders = Integer(fp.readline.chomp, 10)
24
- num_renders.times.map do
26
+ num_frames = Integer(fp.readline.chomp, 10)
27
+ num_frames.times.map do
28
+ duration = Float(fp.readline.chomp)
25
29
  num_strokes = Integer(fp.readline.chomp, 10)
26
- Base64.decode64(num_strokes.times.map { fp.readline }.join)
30
+ strokes = Base64.decode64(num_strokes.times.map { fp.readline }.join)
31
+ Device::RenderedFrame.new(strokes, duration)
27
32
  end
28
33
  end
29
34
 
@@ -38,10 +43,10 @@ module WhirledPeas
38
43
  }
39
44
  private_constant :READERS
40
45
 
41
- def self.write(file, renders)
46
+ def self.write(file, rendered_frames)
42
47
  Zlib::GzipWriter.open(file, Zlib::BEST_COMPRESSION) do |gz|
43
48
  gz.puts FileWriter::VERSION
44
- FileWriter.write(gz, renders)
49
+ FileWriter.write(gz, rendered_frames)
45
50
  end
46
51
  end
47
52
 
@@ -7,6 +7,8 @@ module WhirledPeas
7
7
  new('')
8
8
  end
9
9
 
10
+ attr_reader :formatting
11
+
10
12
  def initialize(raw, formatting=nil)
11
13
  @raw = raw
12
14
  @formatting = [*formatting]
@@ -16,8 +18,8 @@ module WhirledPeas
16
18
  raw.length
17
19
  end
18
20
 
19
- def [](index_or_range)
20
- self.class.new(raw[index_or_range], foramtting)
21
+ def each_char(&block)
22
+ raw.chars.each(&block)
21
23
  end
22
24
 
23
25
  def blank?
@@ -58,7 +60,7 @@ module WhirledPeas
58
60
 
59
61
  private
60
62
 
61
- attr_reader :raw, :formatting
63
+ attr_reader :raw
62
64
  end
63
65
  end
64
66
  end
@@ -1,3 +1,3 @@
1
1
  module WhirledPeas
2
- VERSION = '0.11.1'
2
+ VERSION = '0.12.0'
3
3
  end
@@ -1 +1 @@
1
- [?25l                        ┏━━━━━━━━━━┓┃ ┃┃ ▄▄▄▄┃┗━━━━━━━━━━┛QRSTUVWXYZ[?25h
1
+ [?25l┏━━━━━━━━━━┓ ┃QRSTUVWXYZ┃ ▄▄▄▄┃ ┗━━━━━━━━━━┛                     [?25h
@@ -1 +1 @@
1
- [?25l                        ┏━━━━━━━━━━┓┃ ┃┃ ▗▄▄▄▖ ┃┗━━━━━━━━━━┛HIJKLMNOPQ[?25h
1
+ [?25l┏━━━━━━━━━━┓ ┃HIJKLMNOPQ┃ ┃ ▗▄▄▄▖ ┃ ┗━━━━━━━━━━┛                     [?25h
@@ -1 +1 @@
1
- [?25l                        ┏━━━━━━━━━━┓┃ ┃┃▄▄▄▄ ┃┗━━━━━━━━━━┛ABCDEFGHIJ[?25h
1
+ [?25l┏━━━━━━━━━━┓ ┃ABCDEFGHIJ┃ ┃▄▄▄▄ ┃ ┗━━━━━━━━━━┛                     [?25h
@@ -1 +1 @@
1
- [?25l                        ┏━━━━━━━━━━┓┃ ┃┃ ▗▄ ┃┗━━━━━━━━━━┛L, M, N, O[?25h
1
+ [?25l┏━━━━━━━━━━┓ ┃L, M, N, O┃ ┃ ▗▄ ┃ ┗━━━━━━━━━━┛                     [?25h
@@ -1 +1 @@
1
- [?25l                        ┏━━┓┃ ┃┃ ┃┃ ┃┃ ┃┃ ┃┃ ┃┃ ▐┃┃ ▐┃┃ ▐┃┃ ▐┃┗━━┛QRSTUVWXYZ[?25h
1
+ [?25l┏━━┓ ┃Q ┃ ┃R ┃ ┃S ┃ ┃T ┃ ┃U ┃ ┃V ┃ ┃W▐┃ ┃X▐┃ ┃Y▐┃ ┃Z▐┃ ┗━━┛             [?25h
@@ -1 +1 @@
1
- [?25l                        ┏━━┓┃ ┃┃ ┃┃ ▗┃┃ ▐┃┃ ▐┃┃ ▐┃┃ ▝┃┃ ┃┃ ┃┃ ┃┗━━┛HIJKLMNOPQ[?25h
1
+ [?25l┏━━┓ ┃H ┃ ┃I ┃ ┃J▗┃ ┃K▐┃ ┃L▐┃ ┃M▐┃ ┃N▝┃ ┃O ┃ ┃P ┃ ┃Q ┃ ┗━━┛             [?25h
@@ -1 +1 @@
1
- [?25l                        ┏━━┓┃ ▐┃┃ ▐┃┃ ▐┃┃ ▐┃┃ ┃┃ ┃┃ ┃┃ ┃┃ ┃┃ ┃┗━━┛ABCDEFGHIJ[?25h
1
+ [?25l┏━━┓ ┃A▐┃ ┃B▐┃ ┃C▐┃ ┃D▐┃ ┃E ┃ ┃F ┃ ┃G ┃ ┃H ┃ ┃I ┃ ┃J ┃ ┗━━┛             [?25h
@@ -1 +1 @@
1
- [?25l                        ┏━━┓┃ ┃┃ ┃┃ ┃┃ ┃┃ ▐┃┃ ▐┃┃ ┃┃ ┃┃ ┃┃ ┃┗━━┛K-L-M-N-O-[?25h
1
+ [?25l┏━━┓ ┃K ┃ ┃- ┃ ┃L ┃ ┃- ┃ ┃M▐┃ ┃-▐┃ ┃N ┃ ┃- ┃ ┃O ┃ ┃- ┃ ┗━━┛             [?25h
@@ -1 +1 @@
1
- [?25l                             TOP LEFT BOTTOM LEFT    TOP RIGHT   BOTTOM RIGHT[?25h
1
+ [?25lTOP LEFT TOP RIGHT BOTTOM LEFT BOTTOM RIGHT                       [?25h
@@ -1 +1 @@
1
- [?25l                        ┃ █┃ █┃ █┃ ▄▀┃ █ ┃ █ ┃ █ ┃ █ ┃ █ ┃ ▄▀ ┃▄▄▀ ┗━━━━━━━━━[?25h
1
+ [?25l┃ █ ┃ █ ┃ █ ┃ ▄▀ ┃ █ ┃ █ ┃ █ ┃ █ ┃ █ ┃ ▄▀ ┃▄▄▀ ┗━━━━━━━━━             [?25h
@@ -1 +1 @@
1
- [?25l                        ┃ ▀▄ ┃ ▀▄ ┃ █ ┃ █ ┃ █ ┃ █ ┃ █ ┃ ▀▄┃ █┃ █┃ █┗━━━━━━━━━[?25h
1
+ [?25l┃ ▀▄ ┃ ▀▄ ┃ █ ┃ █ ┃ █ ┃ █ ┃ █ ┃ ▀▄ ┃ █ ┃ █ ┃ █ ┗━━━━━━━━━             [?25h
@@ -1 +1 @@
1
- [?25l                        ┃ ┃ ┃ ┃ ┃ ┃▀▀▀▀▀▀▀▀▀┃ ┃ ┃ ┃ ┃ ┗━━━━━━━━━[?25h
1
+ [?25l┃▀▀▀▀▀▀▀▀▀ ┗━━━━━━━━━             [?25h
@@ -1 +1 @@
1
- [?25l                        ┃ ▄▀▄ ┃ █ █ ┃ █ █ ┃ █ █ ┃█ █ ┃▀ █ ▄┃ █ █┃ █ █┃ █ █┃ █ █ ┃ ▀▄▀ ┗━━━━━━━━━━━━[?25h
1
+ [?25l┃ ▄▀▄ ┃ █ █ ┃ █ █ ┃ █ █ ┃█ █ ┃▀ █ ▄ ┃ █ █ ┃ █ █ ┃ █ █ ┃ █ █ ┃ ▀▄▀ ┗━━━━━━━━━━━━             [?25h
@@ -1 +1 @@
1
- [?25l                        ┏━━━━━━┳━━━━━━┳━━━━━━┓┃ ┃ ┃ ┃┣━━━━━━╋━━━━━━╋━━━━━━┫┃ ┃ ┃ ┃┣━━━━━━╋━━━━━━╋━━━━━━┫┃ ┃ ┃ ┃┗━━━━━━┻━━━━━━┻━━━━━━┛Item 0Item 1Item 2Item 3Item 4Item 5Item 6[?25h
1
+ [?25l┏━━━━━━┳━━━━━━┳━━━━━━┓ ┃Item 0┃Item 1┃Item 2┃ ┣━━━━━━╋━━━━━━╋━━━━━━┫ ┃Item 3┃Item 4┃Item 5┃ ┣━━━━━━╋━━━━━━╋━━━━━━┫ ┃Item 6┃ ┃ ┃ ┗━━━━━━┻━━━━━━┻━━━━━━┛                  [?25h
@@ -1 +1 @@
1
- [?25l                        --------------------------------[?25h
1
+ [?25l--------------------------------                       [?25h
@@ -1 +1 @@
1
- [?25l                        ||||||||||||||||||||||||[?25h
1
+ [?25l| | | | | | | | | | | | | | | | | | | | | | | | [?25h
@@ -1 +1 @@
1
- [?25l                        Hello, World![?25h
1
+ [?25lHello, World!                        [?25h
@@ -1 +1 @@
1
- [?25l                        Line 1Line 2Line 3[?25h
1
+ [?25lLine 1 Line 2 Line 3                      [?25h
@@ -1 +1 @@
1
- [?25l┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┃┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ ██████╗ ██████╗ ██╗ ██╗██╔═══██╗██╔═══██╗██║ ██║██║ ██║██║ ██║███████║██║ ██║██║ ██║██╔══██║╚██████╔╝╚██████╔╝██║ ██║ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝┃ ▄▄▀┃ ▄▀▀ ┃ ▄▄▀ ┃ ▄▀ ┃ ▄▀ ┃ ▄▀ ┃ ▄▀ ┃ ┃ █ ┃▄▀ ┃█ ┗━━━━━━━━━━━━━━━━━━━[?25h
1
+ [?25l┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓┃ ██████╗ ██████╗ ██╗ ██╗ ┃┃██╔═══██╗██╔═══██╗██║ ██║ ┃┃██║ ██║██║ ██║███████║ ┃┃██║ ██║██║ ██║██╔══██║ ┃┃╚██████╔╝╚██████╔╝██║ ██║ ┃┃ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ┃┃┃ ▄▄▀ ┃┃┃ ▄▀▀  ┃┃┃ ▄▄▀  ┃┃┃ ▄▀  ┃┃┃ ▄▀  ┃┃┃ ▄▀  ┃┃┃ ▄▀  ┃┃┃ ┃┃┃ ┃┃┃▄▀  ┃┃┃█  ┃┃┗━━━━━━━━━━━━━━━━━━━ ┃┃┃ ┃┃┃ ┃┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛[?25h
@@ -1 +1 @@
1
- [?25l                        ┏━━━━━━━━━━━━━━━┓┃ ┃┗━━━━━━━━━━━━━━━┛ABC[?25h
1
+ [?25l┏━━━━━━━━━━━━━━━┓ ┃ A B C ┃ ┗━━━━━━━━━━━━━━━┛                      [?25h
@@ -1 +1 @@
1
- [?25l                        ┏━━━━━━━━━━━━━━━┓┃ ┃┗━━━━━━━━━━━━━━━┛ABC[?25h
1
+ [?25l┏━━━━━━━━━━━━━━━┓ ┃A B C┃ ┗━━━━━━━━━━━━━━━┛                      [?25h
@@ -1 +1 @@
1
- [?25l                            ┏━━━━━━━━━━━━━━━━━━━━━━┓┃ ┃┃ ┃┗━━━━━━━━━━━━━━━━━━━━━━┛This is an aligned boxCenter[?25h
1
+ [?25l┏━━━━━━━━━━━━━━━━━━━━━━┓ ┃This is an aligned box┃ ┃ Center ┃ ┗━━━━━━━━━━━━━━━━━━━━━━┛                     [?25h
@@ -1 +1 @@
1
- [?25l                            ┏━━━━━━━━━━━━━━━━━━━━━━┓┃ ┃┃ ┃┗━━━━━━━━━━━━━━━━━━━━━━┛This is an aligned boxDefault[?25h
1
+ [?25l┏━━━━━━━━━━━━━━━━━━━━━━┓ ┃This is an aligned box┃ ┃Default ┃ ┗━━━━━━━━━━━━━━━━━━━━━━┛                     [?25h
@@ -1 +1 @@
1
- [?25l                        ┏━━━━━━━━━━━━━━━┓┃ ┃┗━━━━━━━━━━━━━━━┛ABC[?25h
1
+ [?25l┏━━━━━━━━━━━━━━━┓ ┃ A B C ┃ ┗━━━━━━━━━━━━━━━┛                      [?25h
@@ -1 +1 @@
1
- [?25l                            ┏━━━━━━━━━━━━━━━━━━━━━━┓┃ ┃┃ ┃┗━━━━━━━━━━━━━━━━━━━━━━┛This is an aligned boxLeft[?25h
1
+ [?25l┏━━━━━━━━━━━━━━━━━━━━━━┓ ┃This is an aligned box┃ ┃Left ┃ ┗━━━━━━━━━━━━━━━━━━━━━━┛                     [?25h
@@ -1 +1 @@
1
- [?25l                            ┏━━━━━━━━━━━━━━━━━━━━━━┓┃ ┃┃ ┃┗━━━━━━━━━━━━━━━━━━━━━━┛This is an aligned boxRight[?25h
1
+ [?25l┏━━━━━━━━━━━━━━━━━━━━━━┓ ┃This is an aligned box┃ ┃ Right┃ ┗━━━━━━━━━━━━━━━━━━━━━━┛                     [?25h
@@ -1 +1 @@
1
- [?25l                        ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓┃ ┃┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛Thing 1Thing 2[?25h
1
+ [?25l┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ Thing 1Thing 2 ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛                      [?25h
@@ -1 +1 @@
1
- [?25l                        ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓┃ ┃┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛Thing 1Thing 2[?25h
1
+ [?25l┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃Thing 1Thing 2 ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛                      [?25h
@@ -1 +1 @@
1
- [?25l                        ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓┃ ┃┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛Thing 1Thing 2[?25h
1
+ [?25l┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ Thing 1Thing 2┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛                      [?25h
@@ -1 +1 @@
1
- [?25l                        ┏━━━━━━━━━━━━━━━━━━━━━━━┓┃ ┃┣━━━━━━━━━━━━━━━━━━━━━━━┫┃ ┃┗━━━━━━━━━━━━━━━━━━━━━━━┛This is an aligned gridCenter[?25h
1
+ [?25l┏━━━━━━━━━━━━━━━━━━━━━━━┓ ┃This is an aligned grid┃ ┣━━━━━━━━━━━━━━━━━━━━━━━┫ ┃ Center ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━┛                    [?25h
@@ -1 +1 @@
1
- [?25l                        ┏━━━━━━━━━━━━━━━━━━━━━━━┓┃ ┃┣━━━━━━━━━━━━━━━━━━━━━━━┫┃ ┃┗━━━━━━━━━━━━━━━━━━━━━━━┛This is an aligned gridDefault[?25h
1
+ [?25l┏━━━━━━━━━━━━━━━━━━━━━━━┓ ┃This is an aligned grid┃ ┣━━━━━━━━━━━━━━━━━━━━━━━┫ ┃Default ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━┛                    [?25h
@@ -1 +1 @@
1
- [?25l                        ┏━━━━━━━━━━━━━━━━━━━━━━━┓┃ ┃┣━━━━━━━━━━━━━━━━━━━━━━━┫┃ ┃┗━━━━━━━━━━━━━━━━━━━━━━━┛This is an aligned gridLeft[?25h
1
+ [?25l┏━━━━━━━━━━━━━━━━━━━━━━━┓ ┃This is an aligned grid┃ ┣━━━━━━━━━━━━━━━━━━━━━━━┫ ┃Left ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━┛                    [?25h
@@ -1 +1 @@
1
- [?25l                        ┏━━━━━━━━━━━━━━━━━━━━━━━┓┃ ┃┣━━━━━━━━━━━━━━━━━━━━━━━┫┃ ┃┗━━━━━━━━━━━━━━━━━━━━━━━┛This is an aligned gridRight[?25h
1
+ [?25l┏━━━━━━━━━━━━━━━━━━━━━━━┓ ┃This is an aligned grid┃ ┣━━━━━━━━━━━━━━━━━━━━━━━┫ ┃ Right┃ ┗━━━━━━━━━━━━━━━━━━━━━━━┛                    [?25h
@@ -1 +1 @@
1
- [?25l                        This is boldThis is not bold[?25h
1
+ [?25lThis is bold This is not bold                       [?25h
@@ -1 +1 @@
1
- [?25l                                        BLACK on WHITEGRAY on BRIGHT_REDRED on BRIGHT_GREENGREEN on BRIGHT_YELLOWYELLOW on BRIGHT_BLUEBLUE on BRIGHT_MAGENTAMAGENTA on BRIGHT_CYANCYAN on BRIGHT_WHITEWHITE on BLACKBRIGHT_RED on GRAYBRIGHT_GREEN on REDBRIGHT_YELLOW on GREENBRIGHT_BLUE on YELLOWBRIGHT_MAGENTA on BLUEBRIGHT_CYAN on MAGENTABRIGHT_WHITE on CYAN[?25h
1
+ [?25lBLACK on WHITE GRAY on BRIGHT_RED RED on BRIGHT_GREEN GREEN on BRIGHT_YELLOW YELLOW on BRIGHT_BLUE BLUE on BRIGHT_MAGENTA MAGENTA on BRIGHT_CYAN CYAN on BRIGHT_WHITE WHITE on BLACK BRIGHT_RED on GRAY BRIGHT_GREEN on RED BRIGHT_YELLOW on GREEN BRIGHT_BLUE on YELLOW BRIGHT_MAGENTA on BLUE BRIGHT_CYAN on MAGENTA BRIGHT_WHITE on CYAN         [?25h
@@ -1 +1 @@
1
- [?25l                        This is underlinedThis is not underlined[?25h
1
+ [?25lThis is underlined This is not underlined                       [?25h
@@ -1 +1 @@
1
- [?25l                        ╔══╦══╦══╗║ ║ ║ ║╠══╬══╬══╣║ ║ ║ ║╠══╬══╬══╣║ ║ ║ ║╠══╬══╬══╣║ ║ ║ ║╚══╩══╩══╝01234567891011[?25h
1
+ [?25l╔══╦══╦══╗ ║0 ║1 ║2 ║ ╠══╬══╬══╣ ║3 ║4 ║5 ║ ╠══╬══╬══╣ ║6 ║7 ║8 ║ ╠══╬══╬══╣ ║9 ║10║11║ ╚══╩══╩══╝                [?25h
@@ -1 +1 @@
1
- [?25l                        ┏━━━━━━━┓┃ ┃┃ ┃┃ ┃┃ ┃┃ ┃┃ ┃┃ ┃┗━━━━━━━┛┃ ┃┃ ┃┃ ┃┗━━━━━┛333334432254321[?25h
1
+ [?25l      ┏━━━━━━━┓  ┃┃33333┃┃  ┃┃44322┃┃  ┃┃54321┃┃  ┃┗━━━━━┛┃  ┃ ┃  ┃ ┃  ┃ ┃  ┗━━━━━━━┛           [?25h
@@ -1 +1 @@
1
- [?25l                        ┏━━━━━━━┓┃┃┃ ┃┃ ┃┃ ┃┃┃ ┃┗━━━━━━━┛┏━━━┗━━━123223333443543[?25h
1
+ [?25l      ┏━━━━━━━┓  ┃ ┏━━━┃  ┃123┃  ┃ ┃223┃  ┃ ┃333┃  ┃ ┃443┃  ┃ ┃543┃  ┃ ┗━━━┃  ┗━━━━━━━┛           [?25h
@@ -1 +1 @@
1
- [?25l                        ┏━━━━━━━┓┃┃┃ ┃┃ ┃┃┃┃ ┃┗━━━━━━━┛━━━┓ ┃ ┃ ┃ ┃ ┃━━━┛345344333322321[?25h
1
+ [?25l      ┏━━━━━━━┓  ┃━━━┓ ┃  ┃345┃ ┃  ┃344┃ ┃  ┃333┃ ┃  ┃322┃ ┃  ┃321┃ ┃  ┃━━━┛ ┃  ┗━━━━━━━┛           [?25h
@@ -1 +1 @@
1
- [?25l                        ┏━━━━━━━┓┃┃┃ ┃┃ ┃┃┃┃ ┃┗━━━━━━━┛━━━┓ ┃ ┃ ┃ ┃ ┃━━━┛345344333322321[?25h
1
+ [?25l      ┏━━━━━━━┓  ┃━━━┓ ┃  ┃345┃ ┃  ┃344┃ ┃  ┃333┃ ┃  ┃322┃ ┃  ┃321┃ ┃  ┃━━━┛ ┃  ┗━━━━━━━┛           [?25h
@@ -1 +1 @@
1
- [?25l                        ┏━━━━━━━┓┃┃┃┃ ┃┃ ┃┃ ┃┃ ┃┗━━━━━━━┛┏━━━━━┓┃ ┃┃ ┃┃ ┃123452234433333[?25h
1
+ [?25l      ┏━━━━━━━┓  ┃ ┃  ┃ ┃  ┃ ┃  ┃┏━━━━━┓┃  ┃┃12345┃┃  ┃┃22344┃┃  ┃┃33333┃┃  ┗━━━━━━━┛           [?25h
@@ -1 +1 @@
1
- [?25l                        ┏━━━━━━━┓┃ ┃┃ ┃┃ ┃┃ ┃┃ ┃┃ ┃┃ ┃┗━━━━━━━┛┃ ┃┃ ┃┃ ┃┗━━━━━┛333334432254321[?25h
1
+ [?25l      ┏━━━━━━━┓  ┃┃33333┃┃  ┃┃44322┃┃  ┃┃54321┃┃  ┃┗━━━━━┛┃  ┃ ┃  ┃ ┃  ┃ ┃  ┗━━━━━━━┛           [?25h
@@ -1 +1 @@
1
- [?25l                        ┏━━━━━━━┓┃┃ ┃┃ ┃┃┃ ┃┃ ┃┃┃┃ ┃┃ ┃┃┗━━━━━━━┛┏━━━┃ ┣━━━┃ ┣━━━┃ ┣━━━┣━━━┗━━━123223333443543[?25h
1
+ [?25l      ┏━━━━━━━┓  ┃ ┏━━━┃  ┃123┃  ┃ ┣━━━┃  ┃ ┃223┃  ┃ ┣━━━┃  ┃ ┃333┃  ┃ ┣━━━┃  ┃ ┃443┃  ┃ ┣━━━┃  ┃ ┃543┃  ┃ ┗━━━┃  ┗━━━━━━━┛       [?25h
@@ -1 +1 @@
1
- [?25l                        ┏━━━━━━━┓┃ ┃┃ ┃┃┃┃ ┃┃┃┃┃ ┃┃┃┗━━━━━━━┛━━━┓ ┃━━━┫ ┃━━━┫ ┃━━━┫ ┃━━━┫ ┃━━━┛345344333322321[?25h
1
+ [?25l      ┏━━━━━━━┓  ┃━━━┓ ┃  ┃345┃ ┃  ┃━━━┫ ┃  ┃344┃ ┃  ┃━━━┫ ┃  ┃333┃ ┃  ┃━━━┫ ┃  ┃322┃ ┃  ┃━━━┫ ┃  ┃321┃ ┃  ┃━━━┛ ┃  ┗━━━━━━━┛       [?25h
@@ -1 +1 @@
1
- [?25l                        ┏━━━━━━━┓┃┃┃┃┃ ┃┃┃┃┃┃┃┗━━━━━━━┛┏━━━━━┓┃┣━━━━━┫┃ ┃┣━━━━━┫┃ ┃┣━━━━━┫┃ ┃12345223443333344322[?25h
1
+ [?25l      ┏━━━━━━━┓  ┃ ┃  ┃ ┃  ┃ ┃  ┃┏━━━━━┓┃  ┃┃12345┃┃  ┃┣━━━━━┫┃  ┃┃22344┃┃  ┃┣━━━━━┫┃  ┃┃33333┃┃  ┃┣━━━━━┫┃  ┃┃44322┃┃  ┗━━━━━━━┛       [?25h
@@ -1 +1 @@
1
- [?25l                        ┏━━━━━━━┓┃┃ ┃┃ ┃┃┃┃┃┃┃┃ ┃┃ ┃┗━━━━━━━┛ ┃┣━━━━━┫ ┃┣━━━━━┫ ┃┣━━━━━┫┃ ┃┗━━━━━┛22344333334432254321[?25h
1
+ [?25l      ┏━━━━━━━┓  ┃┃22344┃┃  ┃┣━━━━━┫┃  ┃┃33333┃┃  ┃┣━━━━━┫┃  ┃┃44322┃┃  ┃┣━━━━━┫┃  ┃┃54321┃┃  ┃┗━━━━━┛┃  ┃ ┃  ┃ ┃  ┃ ┃  ┗━━━━━━━┛       [?25h