termvas 0.3.0 → 0.3.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: d3cf29b6b2bd27eb84a1cda85bb993a8e5f642bb27c97aab69f944a968809374
4
- data.tar.gz: 646acf9519788a0944ae798247a5d82ee7f63c8db098fb65892b0876ddca285e
3
+ metadata.gz: d96a53546db38dd9887bd4f0368a1b818ea2eafd58bb7fc9024ef1bf5d6d08da
4
+ data.tar.gz: 01ccfbff4469d665303695ad61600c8e591604cc7ce9b8b5c6f64b1026d48199
5
5
  SHA512:
6
- metadata.gz: 2c23b3ec1a1a79e1126e976df5c4aba2ba1fae6af962c86ffbcbdfc8c021efd9340892485f7441dac1205d44b99c35e8762e716a3fef18990c6fd7f7c5efe330
7
- data.tar.gz: 768c92089cbec5566b6b7db8193cbedf5e51399ae86fcee805a7cfbb25b7af73438d734b48b7437b2ff29f8469d76dd059426f2f7815bb2a84bb2500a8769873
6
+ metadata.gz: af06e7b15123c603edef3f89b8c5b8e13e7a3fde78ae0ed052a07f9a7320985e81ab6e75ec396760a289f70d835bd01100329d7bee9aa1242077df47b7f99225
7
+ data.tar.gz: a416408455b495482c2cc057c284509de678fdf48e15d950caa9f36637c5bd929a2110f20155e8da083231cf9ef06c7cb173027460418734d0577d1553824a91
data/.codespellignore ADDED
@@ -0,0 +1 @@
1
+ iTerm
data/.yamllint ADDED
@@ -0,0 +1,16 @@
1
+ extends: default
2
+ ignore: |
3
+ build/
4
+ node_modules/
5
+ runtime/build/
6
+ tmp/
7
+ **/*.dSYM/**
8
+
9
+ rules:
10
+ comments:
11
+ min-spaces-from-content: 1
12
+ document-start: disable
13
+ line-length:
14
+ max: 200
15
+ truthy:
16
+ check-keys: false
data/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  # Changelog
2
2
 
3
- ## [0.3.0] - Unreleased
3
+ ## [0.3.1] - 2026-09-26
4
+
5
+ - Skip unsupported terminal control sequences instead of reporting them as key events.
6
+ - Reject non-finite terminal frame limits.
7
+
8
+ ## [0.3.0] - 2026-09-25
4
9
 
5
10
  - Expose terminal cell-size estimates for display fitting, with environment overrides.
6
11
 
data/Rakefile CHANGED
@@ -3,9 +3,7 @@
3
3
  require "bundler/gem_tasks"
4
4
  require "rspec/core/rake_task"
5
5
 
6
- RSpec::Core::RakeTask.new(:spec) do |task|
7
- task.ruby_opts = %w[-I../rbgl/lib -I../larb/lib -I../tessel/lib]
8
- end
6
+ RSpec::Core::RakeTask.new(:spec)
9
7
 
10
8
  task default: :spec
11
9
  task verify: :spec
data/lib/termvas/rbgl.rb CHANGED
@@ -17,7 +17,7 @@ module Termvas
17
17
  @fit = fit.to_sym
18
18
  raise ArgumentError, "fit must be :contain or :none" unless %i[contain none].include?(@fit)
19
19
  @max_fps = max_fps.nil? ? nil : Float(max_fps)
20
- raise ArgumentError, "max_fps must be positive" if @max_fps && !@max_fps.positive?
20
+ raise ArgumentError, "max_fps must be positive and finite" if @max_fps && (!@max_fps.positive? || !@max_fps.finite?)
21
21
  @terminal = Terminal.new(input: input, output: output, alt_screen: alt_screen, tmux: tmux)
22
22
  @output = output
23
23
  @input = input
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Termvas
4
- VERSION = "0.3.0"
4
+ VERSION = "0.3.1"
5
5
  end
data/lib/termvas.rb CHANGED
@@ -179,6 +179,14 @@ module Termvas
179
179
  @buffer << bytes
180
180
  events = []
181
181
  loop do
182
+ if @buffer.start_with?("\e[")
183
+ sequence = @buffer.match(/\A\e\[[0-?]*[ -\/]*[@-~]/)
184
+ break unless sequence
185
+ unless sequence[0].match?(/\A\e\[<\d+;\d+;\d+[Mm]\z|\A\e\[[0-9;]*[A-Za-z~]\z/)
186
+ @buffer = @buffer.byteslice(sequence[0].bytesize..).to_s.b
187
+ next
188
+ end
189
+ end
182
190
  if @buffer.start_with?("\e[<")
183
191
  match = @buffer.match(/\A\e\[<([0-9]+);([0-9]+);([0-9]+)([Mm])/
184
192
  )
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: termvas
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yudai Takada
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-09-25 00:00:00.000000000 Z
11
+ date: 2026-09-26 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Half block, Kitty, iTerm2, and Sixel terminal output with input parsing.
14
14
  email:
@@ -18,6 +18,8 @@ executables:
18
18
  extensions: []
19
19
  extra_rdoc_files: []
20
20
  files:
21
+ - ".codespellignore"
22
+ - ".yamllint"
21
23
  - CHANGELOG.md
22
24
  - LICENSE.txt
23
25
  - README.md