zaniah 0.12.0 → 0.12.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/zaniah/input/dispatcher.rb +6 -0
- data/lib/zaniah/layout/style.rb +5 -1
- data/lib/zaniah/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2a2129697924f8c947c192512c04feadb9a24e2573874b3d33c221ee57f264b4
|
|
4
|
+
data.tar.gz: ac0e3df1f93298c90b927718699ee209aa28dc9a74e08f2c793e83f6b7da6b34
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ef5918ddb7423a37cde8864ec5f85d4474b2c749d0339debe4994f3ac8aab41477cd2cfd8c13e6b9a93867edfce2d44af4ffc8b9f9f949ee4c69809d73ccecb9
|
|
7
|
+
data.tar.gz: a46e5523427daff5318e54515b95e832f5a4762f10e7dadcb759e6bfbebd00800ca114a1c1cc830d4dc1a6c21d088c0b3511db0d102e93a382a6f8453f855d87
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.12.2 — 2026-10-02
|
|
4
|
+
|
|
5
|
+
- Reduce redraw allocations to improve rendering responsiveness.
|
|
6
|
+
|
|
7
|
+
## 0.12.1 — 2026-10-02
|
|
8
|
+
|
|
9
|
+
- Prevent obsolete focus controls from accumulating across redraws, reducing memory use and keeping keyboard navigation on current controls.
|
|
10
|
+
|
|
3
11
|
## 0.12.0 — 2026-10-02
|
|
4
12
|
|
|
5
13
|
- Add streaming virtual tables with lazy cells, stable selection, row styling, configurable columns, and tail following.
|
|
@@ -20,6 +20,7 @@ module Zaniah
|
|
|
20
20
|
@keymap, @hits = keymap, []
|
|
21
21
|
@transforms = [Transform.identity]
|
|
22
22
|
@focus_tree = FocusTree.new
|
|
23
|
+
@automatic_focus_parents = []
|
|
23
24
|
end
|
|
24
25
|
|
|
25
26
|
def focus(handle, origin: :programmatic)
|
|
@@ -100,6 +101,7 @@ module Zaniah
|
|
|
100
101
|
if owner.respond_to?(:focus_handle) && (parent = owner.focus_handle)
|
|
101
102
|
unless parent.equal?(handle)
|
|
102
103
|
handle.parent = parent
|
|
104
|
+
@automatic_focus_parents << [handle, parent]
|
|
103
105
|
break
|
|
104
106
|
end
|
|
105
107
|
end
|
|
@@ -116,6 +118,10 @@ module Zaniah
|
|
|
116
118
|
|
|
117
119
|
def clear_hits
|
|
118
120
|
@hits.clear
|
|
121
|
+
@automatic_focus_parents.each do |handle, parent|
|
|
122
|
+
handle.parent = nil if handle.parent.equal?(parent)
|
|
123
|
+
end
|
|
124
|
+
@automatic_focus_parents.clear
|
|
119
125
|
@focus_tree.clear
|
|
120
126
|
@transforms.replace([Transform.identity])
|
|
121
127
|
end
|
data/lib/zaniah/layout/style.rb
CHANGED
|
@@ -22,7 +22,11 @@ module Zaniah
|
|
|
22
22
|
|
|
23
23
|
def initialize(**properties) = @values = DEFAULTS.merge(properties).freeze
|
|
24
24
|
def [](name) = @values[name]
|
|
25
|
-
def merge(**properties)
|
|
25
|
+
def merge(**properties)
|
|
26
|
+
style = Style.allocate
|
|
27
|
+
style.instance_variable_set(:@values, @values.merge(properties).freeze)
|
|
28
|
+
style
|
|
29
|
+
end
|
|
26
30
|
def to_h = @values
|
|
27
31
|
|
|
28
32
|
def inherit(parent)
|
data/lib/zaniah/version.rb
CHANGED