charming 0.2.0 → 0.2.2

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 (131) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/lib/charming/application.rb +144 -9
  4. data/lib/charming/audio/player.rb +104 -0
  5. data/lib/charming/audio/system.rb +69 -0
  6. data/lib/charming/cli.rb +63 -7
  7. data/lib/charming/controller/action_hooks.rb +124 -0
  8. data/lib/charming/controller/class_methods.rb +15 -1
  9. data/lib/charming/controller/dispatching.rb +31 -5
  10. data/lib/charming/controller/focus.rb +9 -0
  11. data/lib/charming/controller/focus_management.rb +0 -7
  12. data/lib/charming/controller/key_dispatch.rb +113 -0
  13. data/lib/charming/controller/session_state.rb +27 -1
  14. data/lib/charming/controller/sidebar_navigation.rb +63 -28
  15. data/lib/charming/controller/terminal.rb +33 -0
  16. data/lib/charming/controller.rb +43 -18
  17. data/lib/charming/database/commands.rb +123 -11
  18. data/lib/charming/escape.rb +81 -0
  19. data/lib/charming/events/focus_event.rb +12 -0
  20. data/lib/charming/events/mouse_event.rb +22 -9
  21. data/lib/charming/events/paste_event.rb +11 -0
  22. data/lib/charming/events/task_progress_event.rb +21 -0
  23. data/lib/charming/generators/app_generator.rb +41 -3
  24. data/lib/charming/generators/database_installer.rb +4 -15
  25. data/lib/charming/generators/migration_generator.rb +116 -0
  26. data/lib/charming/generators/migration_timestamp.rb +29 -0
  27. data/lib/charming/generators/model_generator.rb +4 -2
  28. data/lib/charming/generators/templates/app/Gemfile.template +6 -0
  29. data/lib/charming/generators/templates/app/application_controller.template +1 -1
  30. data/lib/charming/generators/templates/app/database_config.template +3 -1
  31. data/lib/charming/generators/templates/app/dot_rspec.template +2 -0
  32. data/lib/charming/generators/templates/app/layout.template +1 -1
  33. data/lib/charming/generators/templates/app/spec_helper.template +2 -1
  34. data/lib/charming/generators/templates/app/view.template +1 -1
  35. data/lib/charming/image/protocol/kitty.rb +126 -0
  36. data/lib/charming/image/protocol.rb +18 -0
  37. data/lib/charming/image/source.rb +85 -0
  38. data/lib/charming/image/terminal.rb +52 -0
  39. data/lib/charming/image/transmit.rb +11 -0
  40. data/lib/charming/image.rb +21 -0
  41. data/lib/charming/internal/event_loop.rb +155 -0
  42. data/lib/charming/internal/terminal/adapter.rb +14 -0
  43. data/lib/charming/internal/terminal/key_normalizer.rb +20 -0
  44. data/lib/charming/internal/terminal/memory_backend.rb +27 -3
  45. data/lib/charming/internal/terminal/modified_key_parser.rb +63 -0
  46. data/lib/charming/internal/terminal/mouse_parser.rb +32 -27
  47. data/lib/charming/internal/terminal/tty_backend.rb +143 -4
  48. data/lib/charming/presentation/component.rb +7 -0
  49. data/lib/charming/presentation/components/activity_indicator.rb +2 -19
  50. data/lib/charming/presentation/components/audio.rb +31 -0
  51. data/lib/charming/presentation/components/autocomplete.rb +108 -0
  52. data/lib/charming/presentation/components/badge.rb +31 -0
  53. data/lib/charming/presentation/components/breadcrumbs.rb +29 -0
  54. data/lib/charming/presentation/components/chart.rb +80 -0
  55. data/lib/charming/presentation/components/command_palette.rb +8 -5
  56. data/lib/charming/presentation/components/error_screen.rb +72 -0
  57. data/lib/charming/presentation/components/filepicker.rb +101 -0
  58. data/lib/charming/presentation/components/form/builder.rb +5 -0
  59. data/lib/charming/presentation/components/form/multiselect.rb +105 -0
  60. data/lib/charming/presentation/components/form.rb +9 -0
  61. data/lib/charming/presentation/components/fuzzy_matcher.rb +83 -0
  62. data/lib/charming/presentation/components/help_overlay.rb +65 -0
  63. data/lib/charming/presentation/components/image.rb +38 -0
  64. data/lib/charming/presentation/components/list.rb +22 -4
  65. data/lib/charming/presentation/components/markdown.rb +6 -2
  66. data/lib/charming/presentation/components/modal.rb +45 -5
  67. data/lib/charming/presentation/components/multi_select_list.rb +85 -0
  68. data/lib/charming/presentation/components/paginator.rb +54 -0
  69. data/lib/charming/presentation/components/progressbar.rb +26 -5
  70. data/lib/charming/presentation/components/sparkline.rb +38 -0
  71. data/lib/charming/presentation/components/spinner.rb +22 -3
  72. data/lib/charming/presentation/components/status_bar.rb +75 -0
  73. data/lib/charming/presentation/components/stopwatch.rb +55 -0
  74. data/lib/charming/presentation/components/tab_bar.rb +103 -0
  75. data/lib/charming/presentation/components/table.rb +82 -10
  76. data/lib/charming/presentation/components/text_area.rb +48 -12
  77. data/lib/charming/presentation/components/text_input.rb +85 -5
  78. data/lib/charming/presentation/components/time_display.rb +20 -0
  79. data/lib/charming/presentation/components/timer.rb +43 -0
  80. data/lib/charming/presentation/components/toast.rb +51 -0
  81. data/lib/charming/presentation/components/tree.rb +176 -0
  82. data/lib/charming/presentation/components/viewport/content_lines.rb +55 -0
  83. data/lib/charming/presentation/components/viewport/line_window.rb +71 -0
  84. data/lib/charming/presentation/components/viewport/position.rb +67 -0
  85. data/lib/charming/presentation/components/viewport.rb +37 -122
  86. data/lib/charming/presentation/layout/builder.rb +4 -1
  87. data/lib/charming/presentation/layout/overlay.rb +6 -4
  88. data/lib/charming/presentation/layout/pane.rb +2 -1
  89. data/lib/charming/presentation/layout/pane_geometry.rb +16 -8
  90. data/lib/charming/presentation/layout/screen_layout.rb +12 -3
  91. data/lib/charming/presentation/layout/split.rb +37 -3
  92. data/lib/charming/presentation/markdown/renderer.rb +99 -63
  93. data/lib/charming/presentation/markdown/style_config.rb +11 -5
  94. data/lib/charming/presentation/markdown/syntax_highlighter.rb +11 -1
  95. data/lib/charming/presentation/markdown/table_renderer.rb +59 -0
  96. data/lib/charming/presentation/markdown/url_resolver.rb +27 -0
  97. data/lib/charming/presentation/templates/erb_handler.rb +35 -2
  98. data/lib/charming/presentation/ui/adaptive_color.rb +20 -0
  99. data/lib/charming/presentation/ui/ansi_codes.rb +15 -1
  100. data/lib/charming/presentation/ui/ansi_slicer.rb +20 -13
  101. data/lib/charming/presentation/ui/background.rb +58 -0
  102. data/lib/charming/presentation/ui/border.rb +14 -1
  103. data/lib/charming/presentation/ui/border_painter.rb +23 -11
  104. data/lib/charming/presentation/ui/braille_canvas.rb +80 -0
  105. data/lib/charming/presentation/ui/canvas.rb +1 -0
  106. data/lib/charming/presentation/ui/color_support.rb +129 -0
  107. data/lib/charming/presentation/ui/gradient.rb +47 -0
  108. data/lib/charming/presentation/ui/style.rb +119 -19
  109. data/lib/charming/presentation/ui/text_wrapper.rb +40 -0
  110. data/lib/charming/presentation/ui/theme.rb +7 -0
  111. data/lib/charming/presentation/ui/themes/catppuccin-latte.json +35 -0
  112. data/lib/charming/presentation/ui/themes/catppuccin-mocha.json +35 -0
  113. data/lib/charming/presentation/ui/themes/gruvbox-dark.json +33 -0
  114. data/lib/charming/presentation/ui/themes/nord.json +32 -0
  115. data/lib/charming/presentation/ui/themes/tokyonight.json +34 -0
  116. data/lib/charming/presentation/ui/truncate.rb +29 -0
  117. data/lib/charming/presentation/ui/width.rb +38 -2
  118. data/lib/charming/presentation/ui.rb +52 -11
  119. data/lib/charming/presentation/view.rb +8 -6
  120. data/lib/charming/response.rb +11 -6
  121. data/lib/charming/router.rb +1 -1
  122. data/lib/charming/runtime.rb +236 -63
  123. data/lib/charming/tasks/cancelled.rb +11 -0
  124. data/lib/charming/tasks/inline_executor.rb +10 -4
  125. data/lib/charming/tasks/progress.rb +30 -0
  126. data/lib/charming/tasks/task.rb +24 -4
  127. data/lib/charming/tasks/threaded_executor.rb +35 -11
  128. data/lib/charming/test_helper.rb +120 -0
  129. data/lib/charming/version.rb +1 -1
  130. data/lib/charming.rb +43 -1
  131. metadata +63 -50
@@ -0,0 +1,120 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "charming"
4
+
5
+ module Charming
6
+ # TestHelper provides controller- and component-level test ergonomics for Charming apps,
7
+ # in the spirit of Rails' ActionController::TestCase:
8
+ #
9
+ # require "charming/test_helper"
10
+ #
11
+ # RSpec.describe HomeController do
12
+ # include Charming::TestHelper
13
+ #
14
+ # let(:ctrl) { build_controller(HomeController) }
15
+ #
16
+ # it "renders a greeting" do
17
+ # expect(ctrl.dispatch(:show)).to render_text("Welcome")
18
+ # end
19
+ #
20
+ # it "quits on q" do
21
+ # expect(press(ctrl_class: HomeController, key: "q")).to be_quit
22
+ # end
23
+ # end
24
+ #
25
+ # Helpers:
26
+ # - `build_controller(klass, app:, screen:, route:)` — controller instance wired to an app
27
+ # - `key_event("ctrl+p")` — build a KeyEvent from a human-readable string
28
+ # - `press(controller_or_class, "down")` — dispatch a key press, returns the Response
29
+ # - `press_sequence(klass, ["down", "down", "enter"], app:)` — dispatch several presses
30
+ #
31
+ # RSpec matchers (when RSpec is loaded):
32
+ # - `expect(response).to render_text("...")` / `render_match(/.../)`
33
+ # - `expect(response).to be_quit` / `be_navigate` (predicate matchers on Response)
34
+ # - `expect(response).to navigate_to("/path")`
35
+ module TestHelper
36
+ # Builds a controller instance with sensible test defaults: a fresh Application,
37
+ # an 80x24 screen, and no event.
38
+ def build_controller(controller_class, app: nil, screen: nil, route: nil, event: nil)
39
+ app ||= Charming::Application.new
40
+ screen ||= Charming::Screen.new(width: 80, height: 24)
41
+ controller_class.new(application: app, event: event, screen: screen, route: route)
42
+ end
43
+
44
+ # Builds a KeyEvent from a human-readable string like "q", "down", "ctrl+p",
45
+ # or "shift+tab". Modifier order is irrelevant.
46
+ def key_event(description)
47
+ parts = description.to_s.split("+")
48
+ key = parts.pop
49
+ modifiers = parts.map(&:downcase)
50
+ char = (key.length == 1) ? key : nil
51
+ Charming::Events::KeyEvent.new(
52
+ key: key.to_sym,
53
+ char: char,
54
+ ctrl: modifiers.include?("ctrl") || modifiers.include?("control"),
55
+ alt: modifiers.include?("alt"),
56
+ shift: modifiers.include?("shift")
57
+ )
58
+ end
59
+
60
+ # Dispatches a single key press against *controller_class* and returns the Response.
61
+ # Pass `app:` to share session state across presses.
62
+ def press(controller_class, key, app:, screen: nil, route: nil)
63
+ controller = build_controller(controller_class, app: app, screen: screen, route: route, event: key_event(key))
64
+ controller.dispatch_key
65
+ end
66
+
67
+ # Dispatches each key in *keys* in order against fresh controller instances sharing
68
+ # *app*'s session (mirroring the runtime's controller-per-event model). Returns the
69
+ # last Response.
70
+ def press_sequence(controller_class, keys, app:, screen: nil, route: nil)
71
+ keys.map { |key| press(controller_class, key, app: app, screen: screen, route: route) }.last
72
+ end
73
+
74
+ # Builds a MemoryBackend pre-seeded with KeyEvents parsed from *keys*, ready to be
75
+ # passed to Charming::Runtime for integration-style tests.
76
+ def memory_backend(*keys, width: 80, height: 24)
77
+ events = keys.map { |key| key.is_a?(String) ? key_event(key) : key }
78
+ Charming::Internal::Terminal::MemoryBackend.new(events: events, width: width, height: height)
79
+ end
80
+ end
81
+ end
82
+
83
+ if defined?(RSpec)
84
+ # Both matchers compare against the ANSI-stripped body: styled output interleaves
85
+ # escape codes mid-phrase (each styled segment emits its own codes), so raw
86
+ # substring matching would fail on any text spanning two styles.
87
+ RSpec::Matchers.define :render_text do |expected|
88
+ match do |response|
89
+ response.respond_to?(:body) &&
90
+ Charming::UI::Width.strip_ansi(response.body.to_s).include?(expected)
91
+ end
92
+
93
+ failure_message do |response|
94
+ body = response.respond_to?(:body) ? Charming::UI::Width.strip_ansi(response.body.to_s) : response.inspect
95
+ "expected response body to include #{expected.inspect}, got:\n#{body}"
96
+ end
97
+ end
98
+
99
+ RSpec::Matchers.define :render_match do |pattern|
100
+ match do |response|
101
+ response.respond_to?(:body) &&
102
+ Charming::UI::Width.strip_ansi(response.body.to_s).match?(pattern)
103
+ end
104
+
105
+ failure_message do |response|
106
+ body = response.respond_to?(:body) ? Charming::UI::Width.strip_ansi(response.body.to_s) : response.inspect
107
+ "expected response body to match #{pattern.inspect}, got:\n#{body}"
108
+ end
109
+ end
110
+
111
+ RSpec::Matchers.define :navigate_to do |expected_path|
112
+ match do |response|
113
+ response.respond_to?(:navigate?) && response.navigate? && response.path == expected_path
114
+ end
115
+
116
+ failure_message do |response|
117
+ "expected a navigation response to #{expected_path.inspect}, got: #{response.inspect}"
118
+ end
119
+ end
120
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Charming
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.2"
5
5
  end
data/lib/charming.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "active_support/inflector"
4
+ require "active_support/string_inquirer"
4
5
  require "logger"
5
6
  require "zeitwerk"
6
7
 
@@ -15,7 +16,8 @@ loader.inflector.inflect(
15
16
  "erb_handler" => "ErbHandler",
16
17
  "key_normalizer" => "KeyNormalizer",
17
18
  "mouse_parser" => "MouseParser",
18
- "tty_backend" => "TTYBackend"
19
+ "tty_backend" => "TTYBackend",
20
+ "url_resolver" => "URLResolver"
19
21
  )
20
22
  loader.collapse("#{__dir__}/charming/presentation")
21
23
  loader.setup
@@ -24,6 +26,17 @@ module Charming
24
26
  # Base error class for all Charming-specific exceptions (used by templates, generators, runtime, etc.).
25
27
  class Error < StandardError; end
26
28
 
29
+ # The current environment, read from CHARMING_ENV (default "development"). Returns a
30
+ # StringInquirer so callers can write `Charming.env.test?` / `Charming.env.production?`.
31
+ def self.env
32
+ @env ||= ActiveSupport::StringInquirer.new(ENV["CHARMING_ENV"] || "development")
33
+ end
34
+
35
+ # Overrides the environment (used by tests and the CLI).
36
+ def self.env=(value)
37
+ @env = value.nil? ? nil : ActiveSupport::StringInquirer.new(value.to_s)
38
+ end
39
+
27
40
  # Entry point for running a Charming application. Instantiates a Runtime for *application* and starts
28
41
  # the event loop. *backend* defaults to TTYBackend; tests pass MemoryBackend directly via `Charming::Runtime.new`.
29
42
  def self.run(application, backend: nil)
@@ -36,6 +49,35 @@ module Charming
36
49
  key = event.respond_to?(:key) ? event.key : event
37
50
  key.to_sym
38
51
  end
52
+
53
+ # Returns the key signature used for controller bindings, including modifier flags.
54
+ def self.key_signature(event)
55
+ key = key_of(event)
56
+ modifiers = []
57
+ modifiers << "ctrl" if event.respond_to?(:ctrl) && event.ctrl
58
+ modifiers << "alt" if event.respond_to?(:alt) && event.alt
59
+ modifiers << "shift" if event.respond_to?(:shift) && event.shift
60
+
61
+ return key if modifiers.empty?
62
+
63
+ :"#{modifiers.join("+")}+#{key}"
64
+ end
65
+
66
+ # Normalizes key declarations so `control+p` and `ctrl+p` resolve to the same binding.
67
+ def self.key_binding_name(name)
68
+ parts = name.to_s.split("+")
69
+ return name.to_sym if parts.size == 1
70
+
71
+ key = parts.pop.downcase
72
+ modifiers = parts.map do |part|
73
+ modifier = part.downcase
74
+ (modifier == "control") ? "ctrl" : modifier
75
+ end
76
+ ordered_modifiers = %w[ctrl alt shift].select { |modifier| modifiers.include?(modifier) }
77
+ ordered_modifiers += modifiers - ordered_modifiers
78
+
79
+ :"#{(ordered_modifiers + [key]).join("+")}"
80
+ end
39
81
  end
40
82
 
41
83
  Charming::Templates.register ".tui.erb", Charming::Templates::ErbHandler
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: charming
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - pando
@@ -29,26 +29,6 @@ dependencies:
29
29
  - - ">="
30
30
  - !ruby/object:Gem::Version
31
31
  version: 8.1.2
32
- - !ruby/object:Gem::Dependency
33
- name: activerecord
34
- requirement: !ruby/object:Gem::Requirement
35
- requirements:
36
- - - "~>"
37
- - !ruby/object:Gem::Version
38
- version: '8.1'
39
- - - ">="
40
- - !ruby/object:Gem::Version
41
- version: 8.1.2
42
- type: :runtime
43
- prerelease: false
44
- version_requirements: !ruby/object:Gem::Requirement
45
- requirements:
46
- - - "~>"
47
- - !ruby/object:Gem::Version
48
- version: '8.1'
49
- - - ">="
50
- - !ruby/object:Gem::Version
51
- version: 8.1.2
52
32
  - !ruby/object:Gem::Dependency
53
33
  name: activesupport
54
34
  requirement: !ruby/object:Gem::Requirement
@@ -111,20 +91,6 @@ dependencies:
111
91
  - - "~>"
112
92
  - !ruby/object:Gem::Version
113
93
  version: '5.0'
114
- - !ruby/object:Gem::Dependency
115
- name: sqlite3
116
- requirement: !ruby/object:Gem::Requirement
117
- requirements:
118
- - - "~>"
119
- - !ruby/object:Gem::Version
120
- version: '2.0'
121
- type: :runtime
122
- prerelease: false
123
- version_requirements: !ruby/object:Gem::Requirement
124
- requirements:
125
- - - "~>"
126
- - !ruby/object:Gem::Version
127
- version: '2.0'
128
94
  - !ruby/object:Gem::Dependency
129
95
  name: tty-cursor
130
96
  requirement: !ruby/object:Gem::Requirement
@@ -153,20 +119,6 @@ dependencies:
153
119
  - - "~>"
154
120
  - !ruby/object:Gem::Version
155
121
  version: '2.6'
156
- - !ruby/object:Gem::Dependency
157
- name: tty-progressbar
158
- requirement: !ruby/object:Gem::Requirement
159
- requirements:
160
- - - "~>"
161
- - !ruby/object:Gem::Version
162
- version: '0.18'
163
- type: :runtime
164
- prerelease: false
165
- version_requirements: !ruby/object:Gem::Requirement
166
- requirements:
167
- - - "~>"
168
- - !ruby/object:Gem::Version
169
- version: '0.18'
170
122
  - !ruby/object:Gem::Dependency
171
123
  name: tty-table
172
124
  requirement: !ruby/object:Gem::Requirement
@@ -238,22 +190,31 @@ files:
238
190
  - lib/charming.rb
239
191
  - lib/charming/application.rb
240
192
  - lib/charming/application_state.rb
193
+ - lib/charming/audio/player.rb
194
+ - lib/charming/audio/system.rb
241
195
  - lib/charming/cli.rb
242
196
  - lib/charming/controller.rb
197
+ - lib/charming/controller/action_hooks.rb
243
198
  - lib/charming/controller/class_methods.rb
244
199
  - lib/charming/controller/command_palette.rb
245
200
  - lib/charming/controller/component_dispatching.rb
246
201
  - lib/charming/controller/dispatching.rb
247
202
  - lib/charming/controller/focus.rb
248
203
  - lib/charming/controller/focus_management.rb
204
+ - lib/charming/controller/key_dispatch.rb
249
205
  - lib/charming/controller/rendering.rb
250
206
  - lib/charming/controller/session_state.rb
251
207
  - lib/charming/controller/sidebar_navigation.rb
208
+ - lib/charming/controller/terminal.rb
252
209
  - lib/charming/database/commands.rb
210
+ - lib/charming/escape.rb
211
+ - lib/charming/events/focus_event.rb
253
212
  - lib/charming/events/key_event.rb
254
213
  - lib/charming/events/mouse_event.rb
214
+ - lib/charming/events/paste_event.rb
255
215
  - lib/charming/events/resize_event.rb
256
216
  - lib/charming/events/task_event.rb
217
+ - lib/charming/events/task_progress_event.rb
257
218
  - lib/charming/events/timer_event.rb
258
219
  - lib/charming/generators/app_file_generator.rb
259
220
  - lib/charming/generators/app_generator.rb
@@ -262,6 +223,8 @@ files:
262
223
  - lib/charming/generators/controller_generator.rb
263
224
  - lib/charming/generators/database_installer.rb
264
225
  - lib/charming/generators/error.rb
226
+ - lib/charming/generators/migration_generator.rb
227
+ - lib/charming/generators/migration_timestamp.rb
265
228
  - lib/charming/generators/model_generator.rb
266
229
  - lib/charming/generators/name.rb
267
230
  - lib/charming/generators/screen_generator.rb
@@ -273,6 +236,7 @@ files:
273
236
  - lib/charming/generators/templates/app/application_record.template
274
237
  - lib/charming/generators/templates/app/application_state.template
275
238
  - lib/charming/generators/templates/app/database_config.template
239
+ - lib/charming/generators/templates/app/dot_rspec.template
276
240
  - lib/charming/generators/templates/app/executable.template
277
241
  - lib/charming/generators/templates/app/gemspec.template
278
242
  - lib/charming/generators/templates/app/home_controller.template
@@ -301,36 +265,68 @@ files:
301
265
  - lib/charming/generators/templates/screen/view.rb.template
302
266
  - lib/charming/generators/templates/view/view.rb.template
303
267
  - lib/charming/generators/view_generator.rb
268
+ - lib/charming/image.rb
269
+ - lib/charming/image/protocol.rb
270
+ - lib/charming/image/protocol/kitty.rb
271
+ - lib/charming/image/source.rb
272
+ - lib/charming/image/terminal.rb
273
+ - lib/charming/image/transmit.rb
274
+ - lib/charming/internal/event_loop.rb
304
275
  - lib/charming/internal/renderer/differential.rb
305
276
  - lib/charming/internal/renderer/full_repaint.rb
306
277
  - lib/charming/internal/terminal/adapter.rb
307
278
  - lib/charming/internal/terminal/key_normalizer.rb
308
279
  - lib/charming/internal/terminal/memory_backend.rb
280
+ - lib/charming/internal/terminal/modified_key_parser.rb
309
281
  - lib/charming/internal/terminal/mouse_parser.rb
310
282
  - lib/charming/internal/terminal/tty_backend.rb
311
283
  - lib/charming/presentation/component.rb
312
284
  - lib/charming/presentation/components/activity_indicator.rb
285
+ - lib/charming/presentation/components/audio.rb
286
+ - lib/charming/presentation/components/autocomplete.rb
287
+ - lib/charming/presentation/components/badge.rb
288
+ - lib/charming/presentation/components/breadcrumbs.rb
289
+ - lib/charming/presentation/components/chart.rb
313
290
  - lib/charming/presentation/components/command_palette.rb
314
291
  - lib/charming/presentation/components/command_palette_modal.rb
315
292
  - lib/charming/presentation/components/empty_state.rb
293
+ - lib/charming/presentation/components/error_screen.rb
294
+ - lib/charming/presentation/components/filepicker.rb
316
295
  - lib/charming/presentation/components/form.rb
317
296
  - lib/charming/presentation/components/form/builder.rb
318
297
  - lib/charming/presentation/components/form/confirm.rb
319
298
  - lib/charming/presentation/components/form/field.rb
320
299
  - lib/charming/presentation/components/form/input.rb
300
+ - lib/charming/presentation/components/form/multiselect.rb
321
301
  - lib/charming/presentation/components/form/note.rb
322
302
  - lib/charming/presentation/components/form/select.rb
323
303
  - lib/charming/presentation/components/form/textarea.rb
304
+ - lib/charming/presentation/components/fuzzy_matcher.rb
305
+ - lib/charming/presentation/components/help_overlay.rb
306
+ - lib/charming/presentation/components/image.rb
324
307
  - lib/charming/presentation/components/keyboard_handler.rb
325
308
  - lib/charming/presentation/components/list.rb
326
309
  - lib/charming/presentation/components/markdown.rb
327
310
  - lib/charming/presentation/components/modal.rb
311
+ - lib/charming/presentation/components/multi_select_list.rb
312
+ - lib/charming/presentation/components/paginator.rb
328
313
  - lib/charming/presentation/components/progressbar.rb
314
+ - lib/charming/presentation/components/sparkline.rb
329
315
  - lib/charming/presentation/components/spinner.rb
316
+ - lib/charming/presentation/components/status_bar.rb
317
+ - lib/charming/presentation/components/stopwatch.rb
318
+ - lib/charming/presentation/components/tab_bar.rb
330
319
  - lib/charming/presentation/components/table.rb
331
320
  - lib/charming/presentation/components/text_area.rb
332
321
  - lib/charming/presentation/components/text_input.rb
322
+ - lib/charming/presentation/components/time_display.rb
323
+ - lib/charming/presentation/components/timer.rb
324
+ - lib/charming/presentation/components/toast.rb
325
+ - lib/charming/presentation/components/tree.rb
333
326
  - lib/charming/presentation/components/viewport.rb
327
+ - lib/charming/presentation/components/viewport/content_lines.rb
328
+ - lib/charming/presentation/components/viewport/line_window.rb
329
+ - lib/charming/presentation/components/viewport/position.rb
334
330
  - lib/charming/presentation/layout.rb
335
331
  - lib/charming/presentation/layout/builder.rb
336
332
  - lib/charming/presentation/layout/overlay.rb
@@ -346,27 +342,44 @@ files:
346
342
  - lib/charming/presentation/markdown/renderer.rb
347
343
  - lib/charming/presentation/markdown/style_config.rb
348
344
  - lib/charming/presentation/markdown/syntax_highlighter.rb
345
+ - lib/charming/presentation/markdown/table_renderer.rb
346
+ - lib/charming/presentation/markdown/url_resolver.rb
349
347
  - lib/charming/presentation/template_view.rb
350
348
  - lib/charming/presentation/templates.rb
351
349
  - lib/charming/presentation/templates/erb_handler.rb
352
350
  - lib/charming/presentation/ui.rb
351
+ - lib/charming/presentation/ui/adaptive_color.rb
353
352
  - lib/charming/presentation/ui/ansi_codes.rb
354
353
  - lib/charming/presentation/ui/ansi_slicer.rb
354
+ - lib/charming/presentation/ui/background.rb
355
355
  - lib/charming/presentation/ui/border.rb
356
356
  - lib/charming/presentation/ui/border_painter.rb
357
+ - lib/charming/presentation/ui/braille_canvas.rb
357
358
  - lib/charming/presentation/ui/canvas.rb
359
+ - lib/charming/presentation/ui/color_support.rb
360
+ - lib/charming/presentation/ui/gradient.rb
358
361
  - lib/charming/presentation/ui/style.rb
362
+ - lib/charming/presentation/ui/text_wrapper.rb
359
363
  - lib/charming/presentation/ui/theme.rb
364
+ - lib/charming/presentation/ui/themes/catppuccin-latte.json
365
+ - lib/charming/presentation/ui/themes/catppuccin-mocha.json
366
+ - lib/charming/presentation/ui/themes/gruvbox-dark.json
367
+ - lib/charming/presentation/ui/themes/nord.json
360
368
  - lib/charming/presentation/ui/themes/phosphor.json
369
+ - lib/charming/presentation/ui/themes/tokyonight.json
370
+ - lib/charming/presentation/ui/truncate.rb
361
371
  - lib/charming/presentation/ui/width.rb
362
372
  - lib/charming/presentation/view.rb
363
373
  - lib/charming/response.rb
364
374
  - lib/charming/router.rb
365
375
  - lib/charming/runtime.rb
366
376
  - lib/charming/screen.rb
377
+ - lib/charming/tasks/cancelled.rb
367
378
  - lib/charming/tasks/inline_executor.rb
379
+ - lib/charming/tasks/progress.rb
368
380
  - lib/charming/tasks/task.rb
369
381
  - lib/charming/tasks/threaded_executor.rb
382
+ - lib/charming/test_helper.rb
370
383
  - lib/charming/version.rb
371
384
  - sig/charming.rbs
372
385
  homepage: https://github.com/pandorocks/charming
@@ -390,7 +403,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
390
403
  - !ruby/object:Gem::Version
391
404
  version: '0'
392
405
  requirements: []
393
- rubygems_version: 4.0.12
406
+ rubygems_version: 4.0.16
394
407
  specification_version: 4
395
408
  summary: A Rails-inspired TUI framework for Ruby.
396
409
  test_files: []