ntcharts 0.0.1 → 0.1.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.
@@ -0,0 +1,248 @@
1
+ #include "extension.h"
2
+
3
+ static void wavelinechart_free(void *pointer) {
4
+ ntcharts_wavelinechart_t *chart = (ntcharts_wavelinechart_t *)pointer;
5
+ if (chart->handle != 0) {
6
+ ntcharts_wavelinechart_free(chart->handle);
7
+ }
8
+ xfree(chart);
9
+ }
10
+
11
+ static size_t wavelinechart_memsize(const void *pointer) {
12
+ return sizeof(ntcharts_wavelinechart_t);
13
+ }
14
+
15
+ const rb_data_type_t wavelinechart_type = {
16
+ .wrap_struct_name = "Ntcharts::Wavelinechart",
17
+ .function = {
18
+ .dmark = NULL,
19
+ .dfree = wavelinechart_free,
20
+ .dsize = wavelinechart_memsize,
21
+ },
22
+ .flags = RUBY_TYPED_FREE_IMMEDIATELY
23
+ };
24
+
25
+ static VALUE wavelinechart_alloc(VALUE klass) {
26
+ ntcharts_wavelinechart_t *chart = ALLOC(ntcharts_wavelinechart_t);
27
+ chart->handle = 0;
28
+ return TypedData_Wrap_Struct(klass, &wavelinechart_type, chart);
29
+ }
30
+
31
+ static VALUE wavelinechart_initialize(VALUE self, VALUE width, VALUE height) {
32
+ GET_WAVELINECHART(self, chart);
33
+ chart->handle = ntcharts_wavelinechart_new(NUM2INT(width), NUM2INT(height));
34
+ return self;
35
+ }
36
+
37
+ static VALUE wavelinechart_width(VALUE self) {
38
+ GET_WAVELINECHART(self, chart);
39
+ return INT2NUM(ntcharts_wavelinechart_width(chart->handle));
40
+ }
41
+
42
+ static VALUE wavelinechart_height(VALUE self) {
43
+ GET_WAVELINECHART(self, chart);
44
+ return INT2NUM(ntcharts_wavelinechart_height(chart->handle));
45
+ }
46
+
47
+ static VALUE wavelinechart_graph_width(VALUE self) {
48
+ GET_WAVELINECHART(self, chart);
49
+ return INT2NUM(ntcharts_wavelinechart_graph_width(chart->handle));
50
+ }
51
+
52
+ static VALUE wavelinechart_graph_height(VALUE self) {
53
+ GET_WAVELINECHART(self, chart);
54
+ return INT2NUM(ntcharts_wavelinechart_graph_height(chart->handle));
55
+ }
56
+
57
+ static VALUE wavelinechart_min_x(VALUE self) {
58
+ GET_WAVELINECHART(self, chart);
59
+ return DBL2NUM(ntcharts_wavelinechart_min_x(chart->handle));
60
+ }
61
+
62
+ static VALUE wavelinechart_max_x(VALUE self) {
63
+ GET_WAVELINECHART(self, chart);
64
+ return DBL2NUM(ntcharts_wavelinechart_max_x(chart->handle));
65
+ }
66
+
67
+ static VALUE wavelinechart_min_y(VALUE self) {
68
+ GET_WAVELINECHART(self, chart);
69
+ return DBL2NUM(ntcharts_wavelinechart_min_y(chart->handle));
70
+ }
71
+
72
+ static VALUE wavelinechart_max_y(VALUE self) {
73
+ GET_WAVELINECHART(self, chart);
74
+ return DBL2NUM(ntcharts_wavelinechart_max_y(chart->handle));
75
+ }
76
+
77
+ static VALUE wavelinechart_set_y_range(VALUE self, VALUE min_val, VALUE max_val) {
78
+ GET_WAVELINECHART(self, chart);
79
+ ntcharts_wavelinechart_set_y_range(chart->handle, NUM2DBL(min_val), NUM2DBL(max_val));
80
+ return self;
81
+ }
82
+
83
+ static VALUE wavelinechart_set_view_x_range(VALUE self, VALUE min_val, VALUE max_val) {
84
+ GET_WAVELINECHART(self, chart);
85
+ ntcharts_wavelinechart_set_view_x_range(chart->handle, NUM2DBL(min_val), NUM2DBL(max_val));
86
+ return self;
87
+ }
88
+
89
+ static VALUE wavelinechart_set_view_y_range(VALUE self, VALUE min_val, VALUE max_val) {
90
+ GET_WAVELINECHART(self, chart);
91
+ ntcharts_wavelinechart_set_view_y_range(chart->handle, NUM2DBL(min_val), NUM2DBL(max_val));
92
+ return self;
93
+ }
94
+
95
+ static VALUE wavelinechart_resize(VALUE self, VALUE width, VALUE height) {
96
+ GET_WAVELINECHART(self, chart);
97
+ ntcharts_wavelinechart_resize(chart->handle, NUM2INT(width), NUM2INT(height));
98
+ return self;
99
+ }
100
+
101
+ static VALUE wavelinechart_clear(VALUE self) {
102
+ GET_WAVELINECHART(self, chart);
103
+ ntcharts_wavelinechart_clear(chart->handle);
104
+ return self;
105
+ }
106
+
107
+ static VALUE wavelinechart_clear_all_data(VALUE self) {
108
+ GET_WAVELINECHART(self, chart);
109
+ ntcharts_wavelinechart_clear_all_data(chart->handle);
110
+ return self;
111
+ }
112
+
113
+ static VALUE wavelinechart_clear_data_set(VALUE self, VALUE name) {
114
+ GET_WAVELINECHART(self, chart);
115
+ ntcharts_wavelinechart_clear_data_set(chart->handle, StringValueCStr(name));
116
+ return self;
117
+ }
118
+
119
+ static VALUE wavelinechart_plot(VALUE self, VALUE x, VALUE y) {
120
+ GET_WAVELINECHART(self, chart);
121
+ ntcharts_wavelinechart_plot(chart->handle, NUM2DBL(x), NUM2DBL(y));
122
+ return self;
123
+ }
124
+
125
+ static VALUE wavelinechart_plot_data_set(VALUE self, VALUE name, VALUE x, VALUE y) {
126
+ GET_WAVELINECHART(self, chart);
127
+ ntcharts_wavelinechart_plot_data_set(chart->handle, StringValueCStr(name), NUM2DBL(x), NUM2DBL(y));
128
+ return self;
129
+ }
130
+
131
+ static VALUE wavelinechart_set_styles(VALUE self, VALUE line_style, VALUE style) {
132
+ GET_WAVELINECHART(self, chart);
133
+ ntcharts_style_t *style_ptr;
134
+ TypedData_Get_Struct(style, ntcharts_style_t, &style_type, style_ptr);
135
+ ntcharts_wavelinechart_set_styles(chart->handle, NUM2INT(line_style), style_ptr->handle);
136
+ return self;
137
+ }
138
+
139
+ static VALUE wavelinechart_set_data_set_styles(VALUE self, VALUE name, VALUE line_style, VALUE style) {
140
+ GET_WAVELINECHART(self, chart);
141
+ ntcharts_style_t *style_ptr;
142
+ TypedData_Get_Struct(style, ntcharts_style_t, &style_type, style_ptr);
143
+ ntcharts_wavelinechart_set_data_set_styles(chart->handle, StringValueCStr(name), NUM2INT(line_style), style_ptr->handle);
144
+ return self;
145
+ }
146
+
147
+ static VALUE wavelinechart_set_style(VALUE self, VALUE style) {
148
+ GET_WAVELINECHART(self, chart);
149
+ ntcharts_style_t *style_ptr;
150
+ TypedData_Get_Struct(style, ntcharts_style_t, &style_type, style_ptr);
151
+ ntcharts_wavelinechart_set_style(chart->handle, style_ptr->handle);
152
+ return self;
153
+ }
154
+
155
+ static VALUE wavelinechart_set_axis_style(VALUE self, VALUE style) {
156
+ GET_WAVELINECHART(self, chart);
157
+ ntcharts_style_t *style_ptr;
158
+ TypedData_Get_Struct(style, ntcharts_style_t, &style_type, style_ptr);
159
+ ntcharts_wavelinechart_set_axis_style(chart->handle, style_ptr->handle);
160
+ return self;
161
+ }
162
+
163
+ static VALUE wavelinechart_set_label_style(VALUE self, VALUE style) {
164
+ GET_WAVELINECHART(self, chart);
165
+ ntcharts_style_t *style_ptr;
166
+ TypedData_Get_Struct(style, ntcharts_style_t, &style_type, style_ptr);
167
+ ntcharts_wavelinechart_set_label_style(chart->handle, style_ptr->handle);
168
+ return self;
169
+ }
170
+
171
+ static VALUE wavelinechart_draw(VALUE self) {
172
+ GET_WAVELINECHART(self, chart);
173
+ ntcharts_wavelinechart_draw(chart->handle);
174
+ return self;
175
+ }
176
+
177
+ static VALUE wavelinechart_draw_all(VALUE self) {
178
+ GET_WAVELINECHART(self, chart);
179
+ ntcharts_wavelinechart_draw_all(chart->handle);
180
+ return self;
181
+ }
182
+
183
+ static VALUE wavelinechart_view(VALUE self) {
184
+ GET_WAVELINECHART(self, chart);
185
+ char *result = ntcharts_wavelinechart_view(chart->handle);
186
+ VALUE rb_result = rb_utf8_str_new_cstr(result);
187
+ ntcharts_free(result);
188
+ return rb_result;
189
+ }
190
+
191
+ static VALUE wavelinechart_render(VALUE self) {
192
+ wavelinechart_draw(self);
193
+ return wavelinechart_view(self);
194
+ }
195
+
196
+ static VALUE wavelinechart_render_all(VALUE self) {
197
+ wavelinechart_draw_all(self);
198
+ return wavelinechart_view(self);
199
+ }
200
+
201
+ static VALUE wavelinechart_to_s(VALUE self) {
202
+ return wavelinechart_view(self);
203
+ }
204
+
205
+ void Init_ntcharts_wavelinechart(void) {
206
+ cWavelinechart = rb_define_class_under(mNtcharts, "Wavelinechart", rb_cObject);
207
+
208
+ rb_define_alloc_func(cWavelinechart, wavelinechart_alloc);
209
+ rb_define_method(cWavelinechart, "initialize", wavelinechart_initialize, 2);
210
+
211
+ rb_define_method(cWavelinechart, "width", wavelinechart_width, 0);
212
+ rb_define_method(cWavelinechart, "height", wavelinechart_height, 0);
213
+ rb_define_method(cWavelinechart, "graph_width", wavelinechart_graph_width, 0);
214
+ rb_define_method(cWavelinechart, "graph_height", wavelinechart_graph_height, 0);
215
+
216
+ rb_define_method(cWavelinechart, "min_x", wavelinechart_min_x, 0);
217
+ rb_define_method(cWavelinechart, "max_x", wavelinechart_max_x, 0);
218
+ rb_define_method(cWavelinechart, "min_y", wavelinechart_min_y, 0);
219
+ rb_define_method(cWavelinechart, "max_y", wavelinechart_max_y, 0);
220
+
221
+ rb_define_method(cWavelinechart, "set_y_range", wavelinechart_set_y_range, 2);
222
+ rb_define_method(cWavelinechart, "set_view_x_range", wavelinechart_set_view_x_range, 2);
223
+ rb_define_method(cWavelinechart, "set_view_y_range", wavelinechart_set_view_y_range, 2);
224
+
225
+ rb_define_method(cWavelinechart, "resize", wavelinechart_resize, 2);
226
+ rb_define_method(cWavelinechart, "clear", wavelinechart_clear, 0);
227
+ rb_define_method(cWavelinechart, "clear_all_data", wavelinechart_clear_all_data, 0);
228
+ rb_define_method(cWavelinechart, "clear_data_set", wavelinechart_clear_data_set, 1);
229
+
230
+ rb_define_method(cWavelinechart, "plot", wavelinechart_plot, 2);
231
+ rb_define_method(cWavelinechart, "plot_data_set", wavelinechart_plot_data_set, 3);
232
+
233
+ rb_define_method(cWavelinechart, "set_styles", wavelinechart_set_styles, 2);
234
+ rb_define_method(cWavelinechart, "set_data_set_styles", wavelinechart_set_data_set_styles, 3);
235
+ rb_define_method(cWavelinechart, "_set_style", wavelinechart_set_style, 1);
236
+ rb_define_method(cWavelinechart, "_set_axis_style", wavelinechart_set_axis_style, 1);
237
+ rb_define_method(cWavelinechart, "_set_label_style", wavelinechart_set_label_style, 1);
238
+
239
+ rb_define_method(cWavelinechart, "draw", wavelinechart_draw, 0);
240
+ rb_define_method(cWavelinechart, "draw_all", wavelinechart_draw_all, 0);
241
+ rb_define_method(cWavelinechart, "view", wavelinechart_view, 0);
242
+ rb_define_method(cWavelinechart, "render", wavelinechart_render, 0);
243
+ rb_define_method(cWavelinechart, "render_all", wavelinechart_render_all, 0);
244
+ rb_define_method(cWavelinechart, "to_s", wavelinechart_to_s, 0);
245
+
246
+ rb_define_const(cWavelinechart, "LINE_STYLE_THIN", INT2NUM(0));
247
+ rb_define_const(cWavelinechart, "LINE_STYLE_ARC", INT2NUM(1));
248
+ }
data/go/barchart.go ADDED
@@ -0,0 +1,356 @@
1
+ package main
2
+
3
+ import "C"
4
+
5
+ import (
6
+ "encoding/json"
7
+ "github.com/NimbleMarkets/ntcharts/barchart"
8
+ "github.com/charmbracelet/lipgloss"
9
+ )
10
+
11
+ type BarValueJSON struct {
12
+ Name string `json:"name"`
13
+ Value float64 `json:"value"`
14
+ StyleHandle uint64 `json:"style_handle,omitempty"`
15
+ }
16
+
17
+ type BarDataJSON struct {
18
+ Label string `json:"label"`
19
+ Values []BarValueJSON `json:"values"`
20
+ }
21
+
22
+ func parseBarData(jsonStr string) barchart.BarData {
23
+ var data BarDataJSON
24
+
25
+ if err := json.Unmarshal([]byte(jsonStr), &data); err != nil {
26
+ return barchart.BarData{}
27
+ }
28
+
29
+ barData := barchart.BarData{Label: data.Label}
30
+
31
+ for _, v := range data.Values {
32
+ style := lipgloss.NewStyle()
33
+
34
+ if v.StyleHandle != 0 {
35
+ if s, ok := getStyle(v.StyleHandle); ok {
36
+ style = s
37
+ }
38
+ }
39
+
40
+ barValue := barchart.BarValue{
41
+ Name: v.Name,
42
+ Value: v.Value,
43
+ Style: style,
44
+ }
45
+
46
+ barData.Values = append(barData.Values, barValue)
47
+ }
48
+
49
+ return barData
50
+ }
51
+
52
+ //export ntcharts_barchart_new
53
+ func ntcharts_barchart_new(width C.int, height C.int) C.ulonglong {
54
+ b := barchart.New(int(width), int(height))
55
+ return C.ulonglong(allocBarchart(&b))
56
+ }
57
+
58
+ //export ntcharts_barchart_free
59
+ func ntcharts_barchart_free(id C.ulonglong) {
60
+ freeBarchart(uint64(id))
61
+ }
62
+
63
+ //export ntcharts_barchart_width
64
+ func ntcharts_barchart_width(id C.ulonglong) C.int {
65
+ b := getBarchart(uint64(id))
66
+
67
+ if b == nil {
68
+ return 0
69
+ }
70
+
71
+ return C.int(b.Width())
72
+ }
73
+
74
+ //export ntcharts_barchart_height
75
+ func ntcharts_barchart_height(id C.ulonglong) C.int {
76
+ b := getBarchart(uint64(id))
77
+
78
+ if b == nil {
79
+ return 0
80
+ }
81
+
82
+ return C.int(b.Height())
83
+ }
84
+
85
+ //export ntcharts_barchart_max_value
86
+ func ntcharts_barchart_max_value(id C.ulonglong) C.double {
87
+ b := getBarchart(uint64(id))
88
+
89
+ if b == nil {
90
+ return 0
91
+ }
92
+
93
+ return C.double(b.MaxValue())
94
+ }
95
+
96
+ //export ntcharts_barchart_scale
97
+ func ntcharts_barchart_scale(id C.ulonglong) C.double {
98
+ b := getBarchart(uint64(id))
99
+
100
+ if b == nil {
101
+ return 0
102
+ }
103
+
104
+ return C.double(b.Scale())
105
+ }
106
+
107
+ //export ntcharts_barchart_bar_width
108
+ func ntcharts_barchart_bar_width(id C.ulonglong) C.int {
109
+ b := getBarchart(uint64(id))
110
+
111
+ if b == nil {
112
+ return 0
113
+ }
114
+
115
+ return C.int(b.BarWidth())
116
+ }
117
+
118
+ //export ntcharts_barchart_bar_gap
119
+ func ntcharts_barchart_bar_gap(id C.ulonglong) C.int {
120
+ b := getBarchart(uint64(id))
121
+
122
+ if b == nil {
123
+ return 0
124
+ }
125
+
126
+ return C.int(b.BarGap())
127
+ }
128
+
129
+ //export ntcharts_barchart_show_axis
130
+ func ntcharts_barchart_show_axis(id C.ulonglong) C.int {
131
+ b := getBarchart(uint64(id))
132
+
133
+ if b == nil {
134
+ return 0
135
+ }
136
+
137
+ if b.ShowAxis() {
138
+ return 1
139
+ }
140
+
141
+ return 0
142
+ }
143
+
144
+ //export ntcharts_barchart_horizontal
145
+ func ntcharts_barchart_horizontal(id C.ulonglong) C.int {
146
+ b := getBarchart(uint64(id))
147
+
148
+ if b == nil {
149
+ return 0
150
+ }
151
+
152
+ if b.Horizontal() {
153
+ return 1
154
+ }
155
+
156
+ return 0
157
+ }
158
+
159
+ //export ntcharts_barchart_set_max
160
+ func ntcharts_barchart_set_max(id C.ulonglong, maxVal C.double) {
161
+ b := getBarchart(uint64(id))
162
+
163
+ if b == nil {
164
+ return
165
+ }
166
+
167
+ b.SetMax(float64(maxVal))
168
+ }
169
+
170
+ //export ntcharts_barchart_set_bar_width
171
+ func ntcharts_barchart_set_bar_width(id C.ulonglong, width C.int) {
172
+ b := getBarchart(uint64(id))
173
+
174
+ if b == nil {
175
+ return
176
+ }
177
+
178
+ b.AutoBarWidth = false
179
+ b.SetBarWidth(int(width))
180
+ }
181
+
182
+ //export ntcharts_barchart_set_bar_gap
183
+ func ntcharts_barchart_set_bar_gap(id C.ulonglong, gap C.int) {
184
+ b := getBarchart(uint64(id))
185
+
186
+ if b == nil {
187
+ return
188
+ }
189
+
190
+ b.SetBarGap(int(gap))
191
+ }
192
+
193
+ //export ntcharts_barchart_set_horizontal
194
+ func ntcharts_barchart_set_horizontal(id C.ulonglong, horizontal C.int) {
195
+ b := getBarchart(uint64(id))
196
+
197
+ if b == nil {
198
+ return
199
+ }
200
+
201
+ b.SetHorizontal(horizontal != 0)
202
+ }
203
+
204
+ //export ntcharts_barchart_set_show_axis
205
+ func ntcharts_barchart_set_show_axis(id C.ulonglong, showAxis C.int) {
206
+ b := getBarchart(uint64(id))
207
+
208
+ if b == nil {
209
+ return
210
+ }
211
+
212
+ b.SetShowAxis(showAxis != 0)
213
+ }
214
+
215
+ //export ntcharts_barchart_set_auto_max_value
216
+ func ntcharts_barchart_set_auto_max_value(id C.ulonglong, autoMax C.int) {
217
+ b := getBarchart(uint64(id))
218
+
219
+ if b == nil {
220
+ return
221
+ }
222
+
223
+ b.AutoMaxValue = autoMax != 0
224
+ }
225
+
226
+ //export ntcharts_barchart_set_auto_bar_width
227
+ func ntcharts_barchart_set_auto_bar_width(id C.ulonglong, autoWidth C.int) {
228
+ b := getBarchart(uint64(id))
229
+
230
+ if b == nil {
231
+ return
232
+ }
233
+
234
+ b.AutoBarWidth = autoWidth != 0
235
+ }
236
+
237
+ //export ntcharts_barchart_set_axis_style
238
+ func ntcharts_barchart_set_axis_style(id C.ulonglong, styleID C.ulonglong) {
239
+ b := getBarchart(uint64(id))
240
+
241
+ if b == nil {
242
+ return
243
+ }
244
+
245
+ if style, ok := getStyle(uint64(styleID)); ok {
246
+ b.AxisStyle = style
247
+ }
248
+ }
249
+
250
+ //export ntcharts_barchart_set_label_style
251
+ func ntcharts_barchart_set_label_style(id C.ulonglong, styleID C.ulonglong) {
252
+ b := getBarchart(uint64(id))
253
+
254
+ if b == nil {
255
+ return
256
+ }
257
+
258
+ if style, ok := getStyle(uint64(styleID)); ok {
259
+ b.LabelStyle = style
260
+ }
261
+ }
262
+
263
+ //export ntcharts_barchart_resize
264
+ func ntcharts_barchart_resize(id C.ulonglong, width C.int, height C.int) {
265
+ b := getBarchart(uint64(id))
266
+
267
+ if b == nil {
268
+ return
269
+ }
270
+
271
+ b.Resize(int(width), int(height))
272
+ }
273
+
274
+ //export ntcharts_barchart_clear
275
+ func ntcharts_barchart_clear(id C.ulonglong) {
276
+ b := getBarchart(uint64(id))
277
+
278
+ if b == nil {
279
+ return
280
+ }
281
+
282
+ b.Clear()
283
+ }
284
+
285
+ //export ntcharts_barchart_push
286
+ func ntcharts_barchart_push(id C.ulonglong, barDataJSON *C.char) {
287
+ b := getBarchart(uint64(id))
288
+
289
+ if b == nil {
290
+ return
291
+ }
292
+
293
+ barData := parseBarData(C.GoString(barDataJSON))
294
+ b.Push(barData)
295
+ }
296
+
297
+ //export ntcharts_barchart_push_all
298
+ func ntcharts_barchart_push_all(id C.ulonglong, barDataArrayJSON *C.char) {
299
+ b := getBarchart(uint64(id))
300
+
301
+ if b == nil {
302
+ return
303
+ }
304
+
305
+ var dataArray []BarDataJSON
306
+
307
+ if err := json.Unmarshal([]byte(C.GoString(barDataArrayJSON)), &dataArray); err != nil {
308
+ return
309
+ }
310
+
311
+ for _, data := range dataArray {
312
+ barData := barchart.BarData{Label: data.Label}
313
+
314
+ for _, v := range data.Values {
315
+ style := lipgloss.NewStyle()
316
+
317
+ if v.StyleHandle != 0 {
318
+ if s, ok := getStyle(v.StyleHandle); ok {
319
+ style = s
320
+ }
321
+ }
322
+
323
+ barValue := barchart.BarValue{
324
+ Name: v.Name,
325
+ Value: v.Value,
326
+ Style: style,
327
+ }
328
+
329
+ barData.Values = append(barData.Values, barValue)
330
+ }
331
+
332
+ b.Push(barData)
333
+ }
334
+ }
335
+
336
+ //export ntcharts_barchart_draw
337
+ func ntcharts_barchart_draw(id C.ulonglong) {
338
+ b := getBarchart(uint64(id))
339
+
340
+ if b == nil {
341
+ return
342
+ }
343
+
344
+ b.Draw()
345
+ }
346
+
347
+ //export ntcharts_barchart_view
348
+ func ntcharts_barchart_view(id C.ulonglong) *C.char {
349
+ b := getBarchart(uint64(id))
350
+
351
+ if b == nil {
352
+ return C.CString("")
353
+ }
354
+
355
+ return C.CString(b.View())
356
+ }
data/go/go.mod ADDED
@@ -0,0 +1,32 @@
1
+ module github.com/marcoroth/ntcharts-ruby/go
2
+
3
+ go 1.23.0
4
+
5
+ require (
6
+ github.com/NimbleMarkets/ntcharts v0.3.1
7
+ github.com/charmbracelet/lipgloss v1.1.0
8
+ )
9
+
10
+ require (
11
+ github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
12
+ github.com/charmbracelet/bubbles v0.20.0 // indirect
13
+ github.com/charmbracelet/bubbletea v1.2.2 // indirect
14
+ github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc // indirect
15
+ github.com/charmbracelet/x/ansi v0.8.0 // indirect
16
+ github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd // indirect
17
+ github.com/charmbracelet/x/term v0.2.1 // indirect
18
+ github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect
19
+ github.com/lrstanley/bubblezone v0.0.0-20240914071701-b48c55a5e78e // indirect
20
+ github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
21
+ github.com/mattn/go-isatty v0.0.20 // indirect
22
+ github.com/mattn/go-localereader v0.0.1 // indirect
23
+ github.com/mattn/go-runewidth v0.0.16 // indirect
24
+ github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect
25
+ github.com/muesli/cancelreader v0.2.2 // indirect
26
+ github.com/muesli/termenv v0.16.0 // indirect
27
+ github.com/rivo/uniseg v0.4.7 // indirect
28
+ github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
29
+ golang.org/x/sync v0.9.0 // indirect
30
+ golang.org/x/sys v0.30.0 // indirect
31
+ golang.org/x/text v0.20.0 // indirect
32
+ )
data/go/go.sum ADDED
@@ -0,0 +1,51 @@
1
+ github.com/NimbleMarkets/ntcharts v0.3.1 h1:EH4O80RMy5rqDmZM7aWjTbCSuRDDJ5fXOv/qAzdwOjk=
2
+ github.com/NimbleMarkets/ntcharts v0.3.1/go.mod h1:zVeRqYkh2n59YPe1bflaSL4O2aD2ZemNmrbdEqZ70hk=
3
+ github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k=
4
+ github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8=
5
+ github.com/charmbracelet/bubbles v0.20.0 h1:jSZu6qD8cRQ6k9OMfR1WlM+ruM8fkPWkHvQWD9LIutE=
6
+ github.com/charmbracelet/bubbles v0.20.0/go.mod h1:39slydyswPy+uVOHZ5x/GjwVAFkCsV8IIVy+4MhzwwU=
7
+ github.com/charmbracelet/bubbletea v1.2.2 h1:EMz//Ky/aFS2uLcKqpCst5UOE6z5CFDGRsUpyXz0chs=
8
+ github.com/charmbracelet/bubbletea v1.2.2/go.mod h1:Qr6fVQw+wX7JkWWkVyXYk/ZUQ92a6XNekLXa3rR18MM=
9
+ github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc h1:4pZI35227imm7yK2bGPcfpFEmuY1gc2YSTShr4iJBfs=
10
+ github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc/go.mod h1:X4/0JoqgTIPSFcRA/P6INZzIuyqdFY5rm8tb41s9okk=
11
+ github.com/charmbracelet/lipgloss v1.1.0 h1:vYXsiLHVkK7fp74RkV7b2kq9+zDLoEU4MZoFqR/noCY=
12
+ github.com/charmbracelet/lipgloss v1.1.0/go.mod h1:/6Q8FR2o+kj8rz4Dq0zQc3vYf7X+B0binUUBwA0aL30=
13
+ github.com/charmbracelet/x/ansi v0.8.0 h1:9GTq3xq9caJW8ZrBTe0LIe2fvfLR/bYXKTx2llXn7xE=
14
+ github.com/charmbracelet/x/ansi v0.8.0/go.mod h1:wdYl/ONOLHLIVmQaxbIYEC/cRKOQyjTkowiI4blgS9Q=
15
+ github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd h1:vy0GVL4jeHEwG5YOXDmi86oYw2yuYUGqz6a8sLwg0X8=
16
+ github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd/go.mod h1:xe0nKWGd3eJgtqZRaN9RjMtK7xUYchjzPr7q6kcvCCs=
17
+ github.com/charmbracelet/x/term v0.2.1 h1:AQeHeLZ1OqSXhrAWpYUtZyX1T3zVxfpZuEQMIQaGIAQ=
18
+ github.com/charmbracelet/x/term v0.2.1/go.mod h1:oQ4enTYFV7QN4m0i9mzHrViD7TQKvNEEkHUMCmsxdUg=
19
+ github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f h1:Y/CXytFA4m6baUTXGLOoWe4PQhGxaX0KpnayAqC48p4=
20
+ github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f/go.mod h1:vw97MGsxSvLiUE2X8qFplwetxpGLQrlU1Q9AUEIzCaM=
21
+ github.com/lrstanley/bubblezone v0.0.0-20240914071701-b48c55a5e78e h1:OLwZ8xVaeVrru0xyeuOX+fne0gQTFEGlzfNjipCbxlU=
22
+ github.com/lrstanley/bubblezone v0.0.0-20240914071701-b48c55a5e78e/go.mod h1:NQ34EGeu8FAYGBMDzwhfNJL8YQYoWZP5xYJPRDAwN3E=
23
+ github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY=
24
+ github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
25
+ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
26
+ github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
27
+ github.com/mattn/go-localereader v0.0.1 h1:ygSAOl7ZXTx4RdPYinUpg6W99U8jWvWi9Ye2JC/oIi4=
28
+ github.com/mattn/go-localereader v0.0.1/go.mod h1:8fBrzywKY7BI3czFoHkuzRoWE9C+EiG4R1k4Cjx5p88=
29
+ github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc=
30
+ github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
31
+ github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 h1:ZK8zHtRHOkbHy6Mmr5D264iyp3TiX5OmNcI5cIARiQI=
32
+ github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6/go.mod h1:CJlz5H+gyd6CUWT45Oy4q24RdLyn7Md9Vj2/ldJBSIo=
33
+ github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELUXHmA=
34
+ github.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo=
35
+ github.com/muesli/termenv v0.16.0 h1:S5AlUN9dENB57rsbnkPyfdGuWIlkmzJjbFf0Tf5FWUc=
36
+ github.com/muesli/termenv v0.16.0/go.mod h1:ZRfOIKPFDYQoDFF4Olj7/QJbW60Ol/kL1pU3VfY/Cnk=
37
+ github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
38
+ github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
39
+ github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
40
+ github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no=
41
+ github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM=
42
+ golang.org/x/exp v0.0.0-20220909182711-5c715a9e8561 h1:MDc5xs78ZrZr3HMQugiXOAkSZtfTpbJLDr/lwfgO53E=
43
+ golang.org/x/exp v0.0.0-20220909182711-5c715a9e8561/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE=
44
+ golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ=
45
+ golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
46
+ golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
47
+ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
48
+ golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc=
49
+ golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
50
+ golang.org/x/text v0.20.0 h1:gK/Kv2otX8gz+wn7Rmb3vT96ZwuoxnQlY+HlJVj7Qug=
51
+ golang.org/x/text v0.20.0/go.mod h1:D4IsuqiFMhST5bX19pQ9ikHC2GsaKyk/oF+pn3ducp4=