lipgloss 0.2.1 → 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.
- checksums.yaml +4 -4
- data/lib/lipgloss/version.rb +1 -1
- data/lipgloss.gemspec +1 -0
- data/sig/lipgloss/border.rbs +48 -0
- data/sig/lipgloss/color.rbs +101 -0
- data/sig/lipgloss/lipgloss.rbs +181 -0
- data/sig/lipgloss/position.rbs +36 -0
- data/sig/lipgloss/style.rbs +17 -0
- data/sig/lipgloss/table.rbs +40 -0
- data/sig/lipgloss/version.rbs +5 -0
- data/sig/lipgloss.rbs +59 -0
- metadata +9 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: be9e2e8c665f23da1ba5aa8d5b934d65df1ee974ba3d97e5e294d3211b1afa16
|
|
4
|
+
data.tar.gz: efe00d6790c979a2fadf2f1e8eacd3289662ed2f05a1700132b76dafb4e8657b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f188d487f00874ebf6c572a7640b98d03ec3403c4fe6b187aed2581b88952f18f6d9481e325ba5b0851ac2133c2a75647b8513c8ddbc2e060a62adfdb451bda8
|
|
7
|
+
data.tar.gz: a4f376335a343fa269e32ed14ebc178206370962e3c102e26305d94218e3bba6713732432eb327b2a88cc0c63a189618c9d2dffa97d4425c28e966d6e15d92eb
|
data/lib/lipgloss/version.rb
CHANGED
data/lipgloss.gemspec
CHANGED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Generated from lib/lipgloss/border.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
module Lipgloss
|
|
4
|
+
module Border
|
|
5
|
+
# Standard border with normal weight and 90 degree corners
|
|
6
|
+
# ┌───┐
|
|
7
|
+
# │ │
|
|
8
|
+
# └───┘
|
|
9
|
+
NORMAL: ::Symbol
|
|
10
|
+
|
|
11
|
+
# Border with rounded corners
|
|
12
|
+
# ╭───╮
|
|
13
|
+
# │ │
|
|
14
|
+
# ╰───╯
|
|
15
|
+
ROUNDED: ::Symbol
|
|
16
|
+
|
|
17
|
+
# Thicker border
|
|
18
|
+
# ┏━━━┓
|
|
19
|
+
# ┃ ┃
|
|
20
|
+
# ┗━━━┛
|
|
21
|
+
THICK: ::Symbol
|
|
22
|
+
|
|
23
|
+
# Double-line border
|
|
24
|
+
# ╔═══╗
|
|
25
|
+
# ║ ║
|
|
26
|
+
# ╚═══╝
|
|
27
|
+
DOUBLE: ::Symbol
|
|
28
|
+
|
|
29
|
+
# ASCII border (compatible with all terminals)
|
|
30
|
+
# +---+
|
|
31
|
+
# | |
|
|
32
|
+
# +---+
|
|
33
|
+
ASCII: ::Symbol
|
|
34
|
+
|
|
35
|
+
# Hidden border (spaces, maintains layout)
|
|
36
|
+
HIDDEN: ::Symbol
|
|
37
|
+
|
|
38
|
+
# Block border (full blocks)
|
|
39
|
+
# ████
|
|
40
|
+
# █ █
|
|
41
|
+
# ████
|
|
42
|
+
BLOCK: ::Symbol
|
|
43
|
+
|
|
44
|
+
OUTER_HALF_BLOCK: ::Symbol
|
|
45
|
+
|
|
46
|
+
INNER_HALF_BLOCK: ::Symbol
|
|
47
|
+
end
|
|
48
|
+
end
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Generated from lib/lipgloss/color.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
module Lipgloss
|
|
4
|
+
type adaptive_color_hash = { light: String, dark: String }
|
|
5
|
+
|
|
6
|
+
type complete_color_hash = { true_color: String, ansi256: String, ansi: String }
|
|
7
|
+
|
|
8
|
+
type complete_adaptive_color_hash = { light: complete_color_hash, dark: complete_color_hash }
|
|
9
|
+
|
|
10
|
+
module ANSIColor
|
|
11
|
+
type ansi_color_symbol = :black | :red | :green | :yellow | :blue | :magenta | :cyan | :white | :bright_black | :bright_red | :bright_green | :bright_yellow | :bright_blue | :bright_magenta | :bright_cyan | :bright_white
|
|
12
|
+
|
|
13
|
+
type ansi_color_value = ansi_color_symbol | Symbol | String | Integer
|
|
14
|
+
|
|
15
|
+
COLORS: Hash[Symbol, String]
|
|
16
|
+
|
|
17
|
+
# @rbs value: ansi_color_value
|
|
18
|
+
# @rbs return: String
|
|
19
|
+
def self.resolve: (ansi_color_value value) -> String
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
# Adaptive color that changes based on terminal background
|
|
23
|
+
#
|
|
24
|
+
# @example
|
|
25
|
+
# color = Lipgloss::AdaptiveColor.new(light: "#000000", dark: "#FFFFFF")
|
|
26
|
+
# style = Lipgloss::Style.new.foreground(color)
|
|
27
|
+
class AdaptiveColor
|
|
28
|
+
@light: String
|
|
29
|
+
|
|
30
|
+
@dark: String
|
|
31
|
+
|
|
32
|
+
attr_reader light: String
|
|
33
|
+
|
|
34
|
+
attr_reader dark: String
|
|
35
|
+
|
|
36
|
+
# @rbs light: String -- color to use on light backgrounds
|
|
37
|
+
# @rbs dark: String -- color to use on dark backgrounds
|
|
38
|
+
# @rbs return: void
|
|
39
|
+
def initialize: (light: String, dark: String) -> void
|
|
40
|
+
|
|
41
|
+
# @rbs return: adaptive_color_hash
|
|
42
|
+
def to_h: () -> adaptive_color_hash
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Complete color with explicit values for each color profile
|
|
46
|
+
#
|
|
47
|
+
# @example
|
|
48
|
+
# color = Lipgloss::CompleteColor.new(
|
|
49
|
+
# true_color: "#0000FF",
|
|
50
|
+
# ansi256: 21,
|
|
51
|
+
# ansi: :blue
|
|
52
|
+
# )
|
|
53
|
+
class CompleteColor
|
|
54
|
+
@true_color: String
|
|
55
|
+
|
|
56
|
+
@ansi256: String
|
|
57
|
+
|
|
58
|
+
@ansi: String
|
|
59
|
+
|
|
60
|
+
attr_reader true_color: String
|
|
61
|
+
|
|
62
|
+
attr_reader ansi256: String
|
|
63
|
+
|
|
64
|
+
attr_reader ansi: String
|
|
65
|
+
|
|
66
|
+
# @rbs true_color: String -- 24-bit color (e.g., "#0000FF")
|
|
67
|
+
# @rbs ansi256: ANSIColor::ansi_color_value -- 8-bit ANSI color (0-255, or symbol for 0-15)
|
|
68
|
+
# @rbs ansi: ANSIColor::ansi_color_value -- 4-bit ANSI color (:red, :blue, etc., or 0-15)
|
|
69
|
+
# @rbs return: void
|
|
70
|
+
def initialize: (true_color: String, ansi256: ANSIColor::ansi_color_value, ansi: ANSIColor::ansi_color_value) -> void
|
|
71
|
+
|
|
72
|
+
# @rbs return: complete_color_hash
|
|
73
|
+
def to_h: () -> complete_color_hash
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Complete adaptive color with explicit values for each color profile
|
|
77
|
+
# and separate options for light and dark backgrounds
|
|
78
|
+
#
|
|
79
|
+
# @example
|
|
80
|
+
# color = Lipgloss::CompleteAdaptiveColor.new(
|
|
81
|
+
# light: Lipgloss::CompleteColor.new(true_color: "#000", ansi256: :black, ansi: :black),
|
|
82
|
+
# dark: Lipgloss::CompleteColor.new(true_color: "#FFF", ansi256: :bright_white, ansi: :bright_white)
|
|
83
|
+
# )
|
|
84
|
+
class CompleteAdaptiveColor
|
|
85
|
+
@light: CompleteColor
|
|
86
|
+
|
|
87
|
+
@dark: CompleteColor
|
|
88
|
+
|
|
89
|
+
attr_reader light: CompleteColor
|
|
90
|
+
|
|
91
|
+
attr_reader dark: CompleteColor
|
|
92
|
+
|
|
93
|
+
# @rbs light: CompleteColor -- color for light backgrounds
|
|
94
|
+
# @rbs dark: CompleteColor -- color for dark backgrounds
|
|
95
|
+
# @rbs return: void
|
|
96
|
+
def initialize: (light: CompleteColor, dark: CompleteColor) -> void
|
|
97
|
+
|
|
98
|
+
# @rbs return: complete_adaptive_color_hash
|
|
99
|
+
def to_h: () -> complete_adaptive_color_hash
|
|
100
|
+
end
|
|
101
|
+
end
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
# Signatures for the C extension (ext/lipgloss/extension.c)
|
|
2
|
+
|
|
3
|
+
module Lipgloss
|
|
4
|
+
def self._join_horizontal: (Float position, Array[String] strings) -> String
|
|
5
|
+
def self._join_vertical: (Float position, Array[String] strings) -> String
|
|
6
|
+
def self.width: (String string) -> Integer
|
|
7
|
+
def self.height: (String string) -> Integer
|
|
8
|
+
def self.size: (String string) -> [Integer, Integer]
|
|
9
|
+
def self._place: (Integer width, Integer height, Float horizontal_position, Float vertical_position, String string, **untyped opts) -> String
|
|
10
|
+
def self._place_horizontal: (Integer width, Float position, String string) -> String
|
|
11
|
+
def self._place_vertical: (Integer height, Float position, String string) -> String
|
|
12
|
+
def self.has_dark_background?: () -> bool
|
|
13
|
+
def self.upstream_version: () -> String
|
|
14
|
+
def self.version: () -> String
|
|
15
|
+
|
|
16
|
+
class Style
|
|
17
|
+
def initialize: () -> void
|
|
18
|
+
def render: (String string) -> String
|
|
19
|
+
def to_s: () -> String
|
|
20
|
+
|
|
21
|
+
def bold: (bool value) -> Style
|
|
22
|
+
def italic: (bool value) -> Style
|
|
23
|
+
def underline: (bool value) -> Style
|
|
24
|
+
def strikethrough: (bool value) -> Style
|
|
25
|
+
def reverse: (bool value) -> Style
|
|
26
|
+
def blink: (bool value) -> Style
|
|
27
|
+
def faint: (bool value) -> Style
|
|
28
|
+
|
|
29
|
+
def foreground: (String | AdaptiveColor | CompleteColor | CompleteAdaptiveColor color) -> Style
|
|
30
|
+
def background: (String | AdaptiveColor | CompleteColor | CompleteAdaptiveColor color) -> Style
|
|
31
|
+
def margin_background: (String color) -> Style
|
|
32
|
+
|
|
33
|
+
def width: (Integer width) -> Style
|
|
34
|
+
def height: (Integer height) -> Style
|
|
35
|
+
def max_width: (Integer width) -> Style
|
|
36
|
+
def max_height: (Integer height) -> Style
|
|
37
|
+
|
|
38
|
+
def padding: (*Integer values) -> Style
|
|
39
|
+
def padding_top: (Integer value) -> Style
|
|
40
|
+
def padding_right: (Integer value) -> Style
|
|
41
|
+
def padding_bottom: (Integer value) -> Style
|
|
42
|
+
def padding_left: (Integer value) -> Style
|
|
43
|
+
|
|
44
|
+
def margin: (*Integer values) -> Style
|
|
45
|
+
def margin_top: (Integer value) -> Style
|
|
46
|
+
def margin_right: (Integer value) -> Style
|
|
47
|
+
def margin_bottom: (Integer value) -> Style
|
|
48
|
+
def margin_left: (Integer value) -> Style
|
|
49
|
+
|
|
50
|
+
def border: (Symbol border_type, *bool sides) -> Style
|
|
51
|
+
def border_style: (Symbol border_type) -> Style
|
|
52
|
+
def border_foreground: (String color) -> Style
|
|
53
|
+
def border_background: (String color) -> Style
|
|
54
|
+
def border_top: (bool value) -> Style
|
|
55
|
+
def border_right: (bool value) -> Style
|
|
56
|
+
def border_bottom: (bool value) -> Style
|
|
57
|
+
def border_left: (bool value) -> Style
|
|
58
|
+
|
|
59
|
+
def border_top_foreground: (String color) -> Style
|
|
60
|
+
def border_right_foreground: (String color) -> Style
|
|
61
|
+
def border_bottom_foreground: (String color) -> Style
|
|
62
|
+
def border_left_foreground: (String color) -> Style
|
|
63
|
+
def border_top_background: (String color) -> Style
|
|
64
|
+
def border_right_background: (String color) -> Style
|
|
65
|
+
def border_bottom_background: (String color) -> Style
|
|
66
|
+
def border_left_background: (String color) -> Style
|
|
67
|
+
|
|
68
|
+
def border_custom: (
|
|
69
|
+
?top: String,
|
|
70
|
+
?bottom: String,
|
|
71
|
+
?left: String,
|
|
72
|
+
?right: String,
|
|
73
|
+
?top_left: String,
|
|
74
|
+
?top_right: String,
|
|
75
|
+
?bottom_left: String,
|
|
76
|
+
?bottom_right: String,
|
|
77
|
+
?middle_left: String,
|
|
78
|
+
?middle_right: String,
|
|
79
|
+
?middle: String,
|
|
80
|
+
?middle_top: String,
|
|
81
|
+
?middle_bottom: String
|
|
82
|
+
) -> Style
|
|
83
|
+
|
|
84
|
+
def _align: (*Float positions) -> Style
|
|
85
|
+
def _align_horizontal: (Float position) -> Style
|
|
86
|
+
def _align_vertical: (Float position) -> Style
|
|
87
|
+
|
|
88
|
+
def inline: (bool value) -> Style
|
|
89
|
+
def tab_width: (Integer width) -> Style
|
|
90
|
+
def underline_spaces: (bool value) -> Style
|
|
91
|
+
def strikethrough_spaces: (bool value) -> Style
|
|
92
|
+
|
|
93
|
+
def set_string: (String string) -> Style
|
|
94
|
+
def inherit: (Style other) -> Style
|
|
95
|
+
|
|
96
|
+
def unset_bold: () -> Style
|
|
97
|
+
def unset_italic: () -> Style
|
|
98
|
+
def unset_underline: () -> Style
|
|
99
|
+
def unset_strikethrough: () -> Style
|
|
100
|
+
def unset_reverse: () -> Style
|
|
101
|
+
def unset_blink: () -> Style
|
|
102
|
+
def unset_faint: () -> Style
|
|
103
|
+
def unset_foreground: () -> Style
|
|
104
|
+
def unset_background: () -> Style
|
|
105
|
+
def unset_width: () -> Style
|
|
106
|
+
def unset_height: () -> Style
|
|
107
|
+
def unset_padding_top: () -> Style
|
|
108
|
+
def unset_padding_right: () -> Style
|
|
109
|
+
def unset_padding_bottom: () -> Style
|
|
110
|
+
def unset_padding_left: () -> Style
|
|
111
|
+
def unset_margin_top: () -> Style
|
|
112
|
+
def unset_margin_right: () -> Style
|
|
113
|
+
def unset_margin_bottom: () -> Style
|
|
114
|
+
def unset_margin_left: () -> Style
|
|
115
|
+
def unset_border_style: () -> Style
|
|
116
|
+
def unset_inline: () -> Style
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
class Table
|
|
120
|
+
def initialize: () -> void
|
|
121
|
+
def headers: (Array[String] headers) -> Table
|
|
122
|
+
def row: (Array[String] row) -> Table
|
|
123
|
+
def rows: (Array[Array[String]] rows) -> Table
|
|
124
|
+
def border: (Symbol border_type) -> Table
|
|
125
|
+
def border_style: (Style style) -> Table
|
|
126
|
+
def border_top: (bool value) -> Table
|
|
127
|
+
def border_bottom: (bool value) -> Table
|
|
128
|
+
def border_left: (bool value) -> Table
|
|
129
|
+
def border_right: (bool value) -> Table
|
|
130
|
+
def border_header: (bool value) -> Table
|
|
131
|
+
def border_column: (bool value) -> Table
|
|
132
|
+
def border_row: (bool value) -> Table
|
|
133
|
+
def width: (Integer width) -> Table
|
|
134
|
+
def height: (Integer height) -> Table
|
|
135
|
+
def offset: (Integer offset) -> Table
|
|
136
|
+
def wrap: (bool value) -> Table
|
|
137
|
+
def clear_rows: () -> Table
|
|
138
|
+
def render: () -> String
|
|
139
|
+
def to_s: () -> String
|
|
140
|
+
def _style_func_map: (Hash[String, Style] style_map) -> Table
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
class List
|
|
144
|
+
def initialize: (*String items) -> void
|
|
145
|
+
def item: (String | List item) -> List
|
|
146
|
+
def items: (Array[String] items) -> List
|
|
147
|
+
def enumerator: (Symbol enum_type) -> List
|
|
148
|
+
def enumerator_style: (Style style) -> List
|
|
149
|
+
def item_style: (Style style) -> List
|
|
150
|
+
def render: () -> String
|
|
151
|
+
def to_s: () -> String
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
class Tree
|
|
155
|
+
def initialize: (?String root) -> void
|
|
156
|
+
def self.root: (String root) -> Tree
|
|
157
|
+
def root=: (String root) -> Tree
|
|
158
|
+
def child: (*(String | Tree) children) -> Tree
|
|
159
|
+
def children: (Array[String] children) -> Tree
|
|
160
|
+
def enumerator: (Symbol enum_type) -> Tree
|
|
161
|
+
def enumerator_style: (Style style) -> Tree
|
|
162
|
+
def item_style: (Style style) -> Tree
|
|
163
|
+
def root_style: (Style style) -> Tree
|
|
164
|
+
def offset: (Integer start, Integer end) -> Tree
|
|
165
|
+
def render: () -> String
|
|
166
|
+
def to_s: () -> String
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
module ColorBlend
|
|
170
|
+
LUV: Symbol
|
|
171
|
+
RGB: Symbol
|
|
172
|
+
HCL: Symbol
|
|
173
|
+
|
|
174
|
+
def self.blend: (String c1, String c2, Float t, ?mode: Symbol) -> String
|
|
175
|
+
def self.blend_luv: (String c1, String c2, Float t) -> String
|
|
176
|
+
def self.blend_rgb: (String c1, String c2, Float t) -> String
|
|
177
|
+
def self.blend_hcl: (String c1, String c2, Float t) -> String
|
|
178
|
+
def self.blends: (String c1, String c2, Integer steps, ?mode: Symbol) -> Array[String]
|
|
179
|
+
def self.grid: (String c1, String c2, String c3, String c4, Integer x, Integer y, ?mode: Symbol) -> Array[Array[String]]
|
|
180
|
+
end
|
|
181
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Generated from lib/lipgloss/position.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
module Lipgloss
|
|
4
|
+
# Position constants for alignment
|
|
5
|
+
#
|
|
6
|
+
# Positions are represented as floats from 0.0 to 1.0:
|
|
7
|
+
# - 0.0 = top/left
|
|
8
|
+
# - 0.5 = center
|
|
9
|
+
# - 1.0 = bottom/right
|
|
10
|
+
module Position
|
|
11
|
+
# Top alignment (0.0)
|
|
12
|
+
TOP: ::Float
|
|
13
|
+
|
|
14
|
+
# Bottom alignment (1.0)
|
|
15
|
+
BOTTOM: ::Float
|
|
16
|
+
|
|
17
|
+
# Left alignment (0.0)
|
|
18
|
+
LEFT: ::Float
|
|
19
|
+
|
|
20
|
+
# Right alignment (1.0)
|
|
21
|
+
RIGHT: ::Float
|
|
22
|
+
|
|
23
|
+
# Center alignment (0.5)
|
|
24
|
+
CENTER: ::Float
|
|
25
|
+
|
|
26
|
+
type position_symbol = :top | :bottom | :left | :right | :center
|
|
27
|
+
|
|
28
|
+
type position_value = position_symbol | Symbol | String | Integer | Float
|
|
29
|
+
|
|
30
|
+
SYMBOLS: Hash[Symbol, Float]
|
|
31
|
+
|
|
32
|
+
# @rbs value: position_value
|
|
33
|
+
# @rbs return: Float
|
|
34
|
+
def self.resolve: (position_value value) -> Float
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Generated from lib/lipgloss/style.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
module Lipgloss
|
|
4
|
+
class Style
|
|
5
|
+
# @rbs *positions: Position::position_value
|
|
6
|
+
# @rbs return: Style
|
|
7
|
+
def align: (*Position::position_value positions) -> Style
|
|
8
|
+
|
|
9
|
+
# @rbs position: Position::position_value
|
|
10
|
+
# @rbs return: Style
|
|
11
|
+
def align_horizontal: (Position::position_value position) -> Style
|
|
12
|
+
|
|
13
|
+
# @rbs position: Position::position_value
|
|
14
|
+
# @rbs return: Style
|
|
15
|
+
def align_vertical: (Position::position_value position) -> Style
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Generated from lib/lipgloss/table.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
module Lipgloss
|
|
4
|
+
# Ruby enhancements for the Table class
|
|
5
|
+
#
|
|
6
|
+
# The Table class is implemented in C, but this module adds
|
|
7
|
+
# Ruby-level conveniences like style_func with blocks.
|
|
8
|
+
class Table
|
|
9
|
+
# Header row constant (used in style_func)
|
|
10
|
+
HEADER_ROW: ::Integer
|
|
11
|
+
|
|
12
|
+
# Set a style function that determines the style for each cell
|
|
13
|
+
#
|
|
14
|
+
# @example Alternating row colors
|
|
15
|
+
# table.style_func(rows: 2, columns: 2) do |row, column|
|
|
16
|
+
# if row == Lipgloss::Table::HEADER_ROW
|
|
17
|
+
# Lipgloss::Style.new.bold(true)
|
|
18
|
+
# elsif row.even?
|
|
19
|
+
# Lipgloss::Style.new.background("#333")
|
|
20
|
+
# else
|
|
21
|
+
# Lipgloss::Style.new.background("#444")
|
|
22
|
+
# end
|
|
23
|
+
# end
|
|
24
|
+
#
|
|
25
|
+
# @example Column-specific styling
|
|
26
|
+
# table.style_func(rows: 2, columns: 2) do |row, column|
|
|
27
|
+
# case column
|
|
28
|
+
# when 0 then Lipgloss::Style.new.bold(true)
|
|
29
|
+
# when 1 then Lipgloss::Style.new.foreground("#00FF00")
|
|
30
|
+
# else Lipgloss::Style.new
|
|
31
|
+
# end
|
|
32
|
+
# end
|
|
33
|
+
#
|
|
34
|
+
# @rbs rows: Integer -- number of data rows in the table
|
|
35
|
+
# @rbs columns: Integer -- number of columns in the table
|
|
36
|
+
# @rbs &block: (Integer, Integer) -> Style? -- block called for each cell position
|
|
37
|
+
# @rbs return: Table -- a new table with the style function applied
|
|
38
|
+
def style_func: (rows: Integer, columns: Integer) { (Integer, Integer) -> Style? } -> Table
|
|
39
|
+
end
|
|
40
|
+
end
|
data/sig/lipgloss.rbs
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Generated from lib/lipgloss.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
module Lipgloss
|
|
4
|
+
TOP: Float
|
|
5
|
+
|
|
6
|
+
BOTTOM: Float
|
|
7
|
+
|
|
8
|
+
LEFT: Float
|
|
9
|
+
|
|
10
|
+
RIGHT: Float
|
|
11
|
+
|
|
12
|
+
CENTER: Float
|
|
13
|
+
|
|
14
|
+
NORMAL_BORDER: Symbol
|
|
15
|
+
|
|
16
|
+
ROUNDED_BORDER: Symbol
|
|
17
|
+
|
|
18
|
+
THICK_BORDER: Symbol
|
|
19
|
+
|
|
20
|
+
DOUBLE_BORDER: Symbol
|
|
21
|
+
|
|
22
|
+
HIDDEN_BORDER: Symbol
|
|
23
|
+
|
|
24
|
+
BLOCK_BORDER: Symbol
|
|
25
|
+
|
|
26
|
+
ASCII_BORDER: Symbol
|
|
27
|
+
|
|
28
|
+
NO_TAB_CONVERSION: Integer
|
|
29
|
+
|
|
30
|
+
# @rbs position: Position::position_value
|
|
31
|
+
# @rbs *strings: String
|
|
32
|
+
# @rbs return: String
|
|
33
|
+
def self.join_horizontal: (Position::position_value position, *String strings) -> String
|
|
34
|
+
|
|
35
|
+
# @rbs position: Position::position_value
|
|
36
|
+
# @rbs *strings: String
|
|
37
|
+
# @rbs return: String
|
|
38
|
+
def self.join_vertical: (Position::position_value position, *String strings) -> String
|
|
39
|
+
|
|
40
|
+
# @rbs width: Integer
|
|
41
|
+
# @rbs height: Integer
|
|
42
|
+
# @rbs horizontal: Position::position_value
|
|
43
|
+
# @rbs vertical: Position::position_value
|
|
44
|
+
# @rbs string: String
|
|
45
|
+
# @rbs return: String
|
|
46
|
+
def self.place: (Integer width, Integer height, Position::position_value horizontal, Position::position_value vertical, String string, **untyped opts) -> String
|
|
47
|
+
|
|
48
|
+
# @rbs width: Integer
|
|
49
|
+
# @rbs position: Position::position_value
|
|
50
|
+
# @rbs string: String
|
|
51
|
+
# @rbs return: String
|
|
52
|
+
def self.place_horizontal: (Integer width, Position::position_value position, String string) -> String
|
|
53
|
+
|
|
54
|
+
# @rbs height: Integer
|
|
55
|
+
# @rbs position: Position::position_value
|
|
56
|
+
# @rbs string: String
|
|
57
|
+
# @rbs return: String
|
|
58
|
+
def self.place_vertical: (Integer height, Position::position_value position, String string) -> String
|
|
59
|
+
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: lipgloss
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Marco Roth
|
|
@@ -50,6 +50,14 @@ files:
|
|
|
50
50
|
- lib/lipgloss/table.rb
|
|
51
51
|
- lib/lipgloss/version.rb
|
|
52
52
|
- lipgloss.gemspec
|
|
53
|
+
- sig/lipgloss.rbs
|
|
54
|
+
- sig/lipgloss/border.rbs
|
|
55
|
+
- sig/lipgloss/color.rbs
|
|
56
|
+
- sig/lipgloss/lipgloss.rbs
|
|
57
|
+
- sig/lipgloss/position.rbs
|
|
58
|
+
- sig/lipgloss/style.rbs
|
|
59
|
+
- sig/lipgloss/table.rbs
|
|
60
|
+
- sig/lipgloss/version.rbs
|
|
53
61
|
homepage: https://github.com/marcoroth/lipgloss-ruby
|
|
54
62
|
licenses:
|
|
55
63
|
- MIT
|