@sigx/terminal-ui 0.5.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.
Files changed (85) hide show
  1. package/LICENSE +21 -0
  2. package/dist/Spinner-JpmBtbPo.js +25 -0
  3. package/dist/Spinner-JpmBtbPo.js.map +1 -0
  4. package/dist/buttons/Button.d.ts +8 -0
  5. package/dist/buttons/index.d.ts +1 -0
  6. package/dist/buttons/index.js +2 -0
  7. package/dist/buttons-D5iaiJ6G.js +38 -0
  8. package/dist/buttons-D5iaiJ6G.js.map +1 -0
  9. package/dist/data/QRCode.d.ts +17 -0
  10. package/dist/data/Table.d.ts +11 -0
  11. package/dist/data/index.d.ts +2 -0
  12. package/dist/data/index.js +2 -0
  13. package/dist/data-DKKLsE5K.js +43 -0
  14. package/dist/data-DKKLsE5K.js.map +1 -0
  15. package/dist/feedback/Badge.d.ts +14 -0
  16. package/dist/feedback/ProgressBar.d.ts +31 -0
  17. package/dist/feedback/Spinner.d.ts +21 -0
  18. package/dist/feedback/index.d.ts +3 -0
  19. package/dist/feedback/index.js +3 -0
  20. package/dist/feedback-1WqdARfx.js +62 -0
  21. package/dist/feedback-1WqdARfx.js.map +1 -0
  22. package/dist/forms/Checkbox.d.ts +15 -0
  23. package/dist/forms/Confirm.d.ts +21 -0
  24. package/dist/forms/Input.d.ts +15 -0
  25. package/dist/forms/MultiSelect.d.ts +36 -0
  26. package/dist/forms/Radio.d.ts +23 -0
  27. package/dist/forms/Select.d.ts +22 -0
  28. package/dist/forms/TextArea.d.ts +37 -0
  29. package/dist/forms/index.d.ts +7 -0
  30. package/dist/forms/index.js +2 -0
  31. package/dist/forms-MgpyoQI5.js +399 -0
  32. package/dist/forms-MgpyoQI5.js.map +1 -0
  33. package/dist/fx/Banner.d.ts +19 -0
  34. package/dist/fx/Gradient.d.ts +18 -0
  35. package/dist/fx/PixelArt.d.ts +16 -0
  36. package/dist/fx/Shimmer.d.ts +18 -0
  37. package/dist/fx/blockFont.d.ts +13 -0
  38. package/dist/fx/index.d.ts +6 -0
  39. package/dist/fx/index.js +3 -0
  40. package/dist/fx/paint.d.ts +15 -0
  41. package/dist/fx/presets.d.ts +14 -0
  42. package/dist/fx-igWaVCkB.js +452 -0
  43. package/dist/fx-igWaVCkB.js.map +1 -0
  44. package/dist/index.d.ts +17 -0
  45. package/dist/index.js +13 -0
  46. package/dist/layout/Card.d.ts +11 -0
  47. package/dist/layout/index.d.ts +2 -0
  48. package/dist/layout/index.js +2 -0
  49. package/dist/layout-CJzMVMDf.js +18 -0
  50. package/dist/layout-CJzMVMDf.js.map +1 -0
  51. package/dist/navigation/KeyHints.d.ts +15 -0
  52. package/dist/navigation/StatusBar.d.ts +9 -0
  53. package/dist/navigation/SuggestionList.d.ts +22 -0
  54. package/dist/navigation/Tabs.d.ts +18 -0
  55. package/dist/navigation/index.d.ts +4 -0
  56. package/dist/navigation/index.js +2 -0
  57. package/dist/navigation-B-nI3g0k.js +133 -0
  58. package/dist/navigation-B-nI3g0k.js.map +1 -0
  59. package/dist/presets-uqseGRqO.js +31 -0
  60. package/dist/presets-uqseGRqO.js.map +1 -0
  61. package/dist/prompts/PromptShell.d.ts +11 -0
  62. package/dist/prompts/confirm.d.ts +14 -0
  63. package/dist/prompts/index.d.ts +35 -0
  64. package/dist/prompts/index.js +2 -0
  65. package/dist/prompts/multiselect.d.ts +14 -0
  66. package/dist/prompts/select.d.ts +20 -0
  67. package/dist/prompts/spinner.d.ts +22 -0
  68. package/dist/prompts/statics.d.ts +8 -0
  69. package/dist/prompts/text.d.ts +19 -0
  70. package/dist/prompts-BLtLCen_.js +381 -0
  71. package/dist/prompts-BLtLCen_.js.map +1 -0
  72. package/dist/tasks/LogPanel.d.ts +28 -0
  73. package/dist/tasks/LogView.d.ts +24 -0
  74. package/dist/tasks/TaskList.d.ts +26 -0
  75. package/dist/tasks/index.d.ts +4 -0
  76. package/dist/tasks/index.js +2 -0
  77. package/dist/tasks/logStore.d.ts +40 -0
  78. package/dist/tasks-CdVFFOFs.js +254 -0
  79. package/dist/tasks-CdVFFOFs.js.map +1 -0
  80. package/dist/theme/builtins.d.ts +7 -0
  81. package/dist/theme/index.d.ts +3 -0
  82. package/dist/theme/index.js +2 -0
  83. package/dist/theme-DASuxf6k.js +150 -0
  84. package/dist/theme-DASuxf6k.js.map +1 -0
  85. package/package.json +95 -0
@@ -0,0 +1,452 @@
1
+ import { t as e } from "./presets-uqseGRqO.js";
2
+ import { getColorDepth as t, getTick as n, gradient as r, hexToSGR as i, mixHex as a, resolveBg as o, resolveColor as s, resolveFg as c, subscribeTicker as l } from "@sigx/terminal-zero";
3
+ import { component as u, onMounted as d, onUnmounted as f } from "@sigx/runtime-core";
4
+ import { jsx as p } from "@sigx/runtime-core/jsx-runtime";
5
+ //#region src/fx/paint.ts
6
+ function m(e, t) {
7
+ let n = [...e], r = "", a = null, o = !1;
8
+ for (let e = 0; e < n.length; e++) {
9
+ let s = n[e];
10
+ if (s === " ") {
11
+ r += s;
12
+ continue;
13
+ }
14
+ let c = t(e, n.length);
15
+ if (c !== a) {
16
+ let e = i(c);
17
+ e && (r += e, o = !0), a = c;
18
+ }
19
+ r += s;
20
+ }
21
+ return o ? r + "\x1B[39m" : r;
22
+ }
23
+ function h(t, n) {
24
+ return (t && t.length > 0 ? t : [...e[n || "sigx"] ?? e.sigx]).map((e) => s(e));
25
+ }
26
+ function g(e) {
27
+ return e.length <= 2 ? e : e.concat(e.slice(1, -1).reverse());
28
+ }
29
+ //#endregion
30
+ //#region src/fx/Gradient.tsx
31
+ var _ = u(({ props: e }) => {
32
+ let i = null;
33
+ return d(() => {
34
+ e.animate && (i = l());
35
+ }), f(() => {
36
+ i?.();
37
+ }), () => {
38
+ let i = e.text ?? "", a = t();
39
+ if (a === "none") return /* @__PURE__ */ p("box", { children: /* @__PURE__ */ p("text", { children: i }) });
40
+ if (a === "ansi16") return /* @__PURE__ */ p("box", { children: /* @__PURE__ */ p("text", {
41
+ color: s("accent"),
42
+ children: i
43
+ }) });
44
+ let o = h(e.colors, e.preset), c = [...i].length, l = r(o, Math.max(c, 2));
45
+ if (!e.animate) return /* @__PURE__ */ p("box", { children: /* @__PURE__ */ p("text", { children: m(i, (e) => l[Math.min(e, l.length - 1)]) }) });
46
+ let u = g(l), d = Math.floor(n() * (e.speed || 1));
47
+ return /* @__PURE__ */ p("box", { children: /* @__PURE__ */ p("text", { children: m(i, (e) => u[(e + d) % u.length]) }) });
48
+ };
49
+ }, { name: "Gradient" }), v = u(({ props: e }) => {
50
+ let r = null;
51
+ return d(() => {
52
+ r = l();
53
+ }), f(() => {
54
+ r?.();
55
+ }), () => {
56
+ let r = e.text ?? "", i = e.color || "dim", o = t();
57
+ if (o === "none") return /* @__PURE__ */ p("box", { children: /* @__PURE__ */ p("text", { children: r }) });
58
+ if (o === "ansi16") return /* @__PURE__ */ p("box", { children: /* @__PURE__ */ p("text", {
59
+ color: s(i),
60
+ children: r
61
+ }) });
62
+ let c = s(i), l = s(e.highlight || "fg"), u = Math.max(1, e.width || 3), d = [...r].length + 2 * u, f = n() * (e.speed || 1) % d - u;
63
+ return /* @__PURE__ */ p("box", { children: /* @__PURE__ */ p("text", { children: m(r, (e) => {
64
+ let t = Math.abs(e - f);
65
+ return t < u ? a(c, l, 1 - t / u) : c;
66
+ }) }) });
67
+ };
68
+ }, { name: "Shimmer" }), y = {
69
+ A: [
70
+ ".##.",
71
+ "#..#",
72
+ "####",
73
+ "#..#",
74
+ "#..#"
75
+ ],
76
+ B: [
77
+ "###.",
78
+ "#..#",
79
+ "###.",
80
+ "#..#",
81
+ "###."
82
+ ],
83
+ C: [
84
+ ".###",
85
+ "#...",
86
+ "#...",
87
+ "#...",
88
+ ".###"
89
+ ],
90
+ D: [
91
+ "###.",
92
+ "#..#",
93
+ "#..#",
94
+ "#..#",
95
+ "###."
96
+ ],
97
+ E: [
98
+ "####",
99
+ "#...",
100
+ "###.",
101
+ "#...",
102
+ "####"
103
+ ],
104
+ F: [
105
+ "####",
106
+ "#...",
107
+ "###.",
108
+ "#...",
109
+ "#..."
110
+ ],
111
+ G: [
112
+ ".###",
113
+ "#...",
114
+ "#.##",
115
+ "#..#",
116
+ ".##."
117
+ ],
118
+ H: [
119
+ "#..#",
120
+ "#..#",
121
+ "####",
122
+ "#..#",
123
+ "#..#"
124
+ ],
125
+ I: [
126
+ "###",
127
+ ".#.",
128
+ ".#.",
129
+ ".#.",
130
+ "###"
131
+ ],
132
+ J: [
133
+ "..##",
134
+ "...#",
135
+ "...#",
136
+ "#..#",
137
+ ".##."
138
+ ],
139
+ K: [
140
+ "#..#",
141
+ "#.#.",
142
+ "##..",
143
+ "#.#.",
144
+ "#..#"
145
+ ],
146
+ L: [
147
+ "#...",
148
+ "#...",
149
+ "#...",
150
+ "#...",
151
+ "####"
152
+ ],
153
+ M: [
154
+ "#...#",
155
+ "##.##",
156
+ "#.#.#",
157
+ "#...#",
158
+ "#...#"
159
+ ],
160
+ N: [
161
+ "#...#",
162
+ "##..#",
163
+ "#.#.#",
164
+ "#..##",
165
+ "#...#"
166
+ ],
167
+ O: [
168
+ ".##.",
169
+ "#..#",
170
+ "#..#",
171
+ "#..#",
172
+ ".##."
173
+ ],
174
+ P: [
175
+ "###.",
176
+ "#..#",
177
+ "###.",
178
+ "#...",
179
+ "#..."
180
+ ],
181
+ Q: [
182
+ ".##.",
183
+ "#..#",
184
+ "#..#",
185
+ "#.##",
186
+ ".###"
187
+ ],
188
+ R: [
189
+ "###.",
190
+ "#..#",
191
+ "###.",
192
+ "#.#.",
193
+ "#..#"
194
+ ],
195
+ S: [
196
+ ".###",
197
+ "#...",
198
+ ".##.",
199
+ "...#",
200
+ "###."
201
+ ],
202
+ T: [
203
+ "#####",
204
+ "..#..",
205
+ "..#..",
206
+ "..#..",
207
+ "..#.."
208
+ ],
209
+ U: [
210
+ "#..#",
211
+ "#..#",
212
+ "#..#",
213
+ "#..#",
214
+ ".##."
215
+ ],
216
+ V: [
217
+ "#...#",
218
+ "#...#",
219
+ "#...#",
220
+ ".#.#.",
221
+ "..#.."
222
+ ],
223
+ W: [
224
+ "#...#",
225
+ "#...#",
226
+ "#.#.#",
227
+ "##.##",
228
+ "#...#"
229
+ ],
230
+ X: [
231
+ "#...#",
232
+ ".#.#.",
233
+ "..#..",
234
+ ".#.#.",
235
+ "#...#"
236
+ ],
237
+ Y: [
238
+ "#...#",
239
+ ".#.#.",
240
+ "..#..",
241
+ "..#..",
242
+ "..#.."
243
+ ],
244
+ Z: [
245
+ "####",
246
+ "...#",
247
+ "..#.",
248
+ ".#..",
249
+ "####"
250
+ ],
251
+ 0: [
252
+ ".##.",
253
+ "#..#",
254
+ "#..#",
255
+ "#..#",
256
+ ".##."
257
+ ],
258
+ 1: [
259
+ ".#.",
260
+ "##.",
261
+ ".#.",
262
+ ".#.",
263
+ "###"
264
+ ],
265
+ 2: [
266
+ ".##.",
267
+ "#..#",
268
+ "..#.",
269
+ ".#..",
270
+ "####"
271
+ ],
272
+ 3: [
273
+ "###.",
274
+ "...#",
275
+ ".##.",
276
+ "...#",
277
+ "###."
278
+ ],
279
+ 4: [
280
+ "#..#",
281
+ "#..#",
282
+ "####",
283
+ "...#",
284
+ "...#"
285
+ ],
286
+ 5: [
287
+ "####",
288
+ "#...",
289
+ "###.",
290
+ "...#",
291
+ "###."
292
+ ],
293
+ 6: [
294
+ ".##.",
295
+ "#...",
296
+ "###.",
297
+ "#..#",
298
+ ".##."
299
+ ],
300
+ 7: [
301
+ "####",
302
+ "...#",
303
+ "..#.",
304
+ ".#..",
305
+ ".#.."
306
+ ],
307
+ 8: [
308
+ ".##.",
309
+ "#..#",
310
+ ".##.",
311
+ "#..#",
312
+ ".##."
313
+ ],
314
+ 9: [
315
+ ".##.",
316
+ "#..#",
317
+ ".###",
318
+ "...#",
319
+ ".##."
320
+ ],
321
+ " ": [
322
+ "..",
323
+ "..",
324
+ "..",
325
+ "..",
326
+ ".."
327
+ ],
328
+ "-": [
329
+ "...",
330
+ "...",
331
+ "###",
332
+ "...",
333
+ "..."
334
+ ],
335
+ ".": [
336
+ ".",
337
+ ".",
338
+ ".",
339
+ ".",
340
+ "#"
341
+ ],
342
+ "!": [
343
+ "#",
344
+ "#",
345
+ "#",
346
+ ".",
347
+ "#"
348
+ ],
349
+ ":": [
350
+ ".",
351
+ "#",
352
+ ".",
353
+ "#",
354
+ "."
355
+ ],
356
+ "/": [
357
+ "...#",
358
+ "..#.",
359
+ "..#.",
360
+ ".#..",
361
+ "#..."
362
+ ]
363
+ }, b = 5, x = {};
364
+ for (let [e, t] of Object.entries(y)) x[e] = t.map((e) => e.replace(/#/g, "█").replace(/\./g, " "));
365
+ function S(e) {
366
+ let t = [
367
+ "",
368
+ "",
369
+ "",
370
+ "",
371
+ ""
372
+ ], n = [...e.toUpperCase()];
373
+ for (let e = 0; e < n.length; e++) {
374
+ let r = x[n[e]] ?? x[" "];
375
+ for (let n = 0; n < 5; n++) t[n] += (e > 0 ? " " : "") + r[n];
376
+ }
377
+ return t;
378
+ }
379
+ //#endregion
380
+ //#region src/fx/Banner.tsx
381
+ var C = u(({ props: e }) => {
382
+ let a = null;
383
+ return d(() => {
384
+ e.animate && (a = l());
385
+ }), f(() => {
386
+ a?.();
387
+ }), () => {
388
+ let a = S(e.text ?? ""), o = t();
389
+ if (o === "none" || o === "ansi16") {
390
+ let e = o === "none" ? void 0 : s("accent");
391
+ return /* @__PURE__ */ p("box", { children: a.flatMap((t, n) => {
392
+ let r = /* @__PURE__ */ p("text", {
393
+ color: e,
394
+ children: t
395
+ });
396
+ return n > 0 ? [/* @__PURE__ */ p("br", {}), r] : [r];
397
+ }) });
398
+ }
399
+ let c = h(e.colors, e.preset), l = e.direction || "horizontal", u = a[0]?.length ?? 0, d = l === "horizontal" ? u : l === "vertical" ? 5 : u + 5 - 1, f = r(c, Math.max(d, 2)), m = e.animate ? g(f) : f, _ = e.animate ? Math.floor(n() * (e.speed || 1)) : 0, v = (e, t) => m[((l === "horizontal" ? e : l === "vertical" ? t : e + t) + _) % m.length];
400
+ return /* @__PURE__ */ p("box", { children: a.flatMap((e, t) => {
401
+ let n = "", r = null;
402
+ for (let a = 0; a < e.length; a++) {
403
+ let o = e[a];
404
+ if (o === " ") {
405
+ n += o;
406
+ continue;
407
+ }
408
+ let s = v(a, t);
409
+ s !== r && (n += i(s), r = s), n += o;
410
+ }
411
+ r !== null && (n += "\x1B[39m");
412
+ let a = /* @__PURE__ */ p("text", { children: n });
413
+ return t > 0 ? [/* @__PURE__ */ p("br", {}), a] : [a];
414
+ }) });
415
+ };
416
+ }, { name: "Banner" });
417
+ //#endregion
418
+ //#region src/fx/PixelArt.tsx
419
+ function w(e, t) {
420
+ let n = (e) => {
421
+ if (!e || e === "." || e === " ") return null;
422
+ let n = t[e];
423
+ return n ? s(n) : null;
424
+ }, r = [];
425
+ for (let t = 0; t < e.length; t += 2) {
426
+ let i = e[t], a = e[t + 1] ?? "", s = Math.max(i.length, a.length), l = "", u = null, d = null, f = !1;
427
+ for (let e = 0; e < s; e++) {
428
+ let t = n(i[e]), r = n(a[e]);
429
+ if (!t && !r) {
430
+ d !== null && (f && (l += "\x1B[0m"), u = null, d = null), l += " ";
431
+ continue;
432
+ }
433
+ let s = t ? "▀" : "▄", p = t ?? r, m = t && r ? r : null;
434
+ if (p !== u || m !== d) {
435
+ d !== null && m === null && f && (l += "\x1B[0m");
436
+ let e = (p ? c(p) : "") + (m ? o(m) : "");
437
+ l += e, e && (f = !0), u = p, d = m;
438
+ }
439
+ l += s;
440
+ }
441
+ f && (l += "\x1B[0m"), r.push(l);
442
+ }
443
+ return r;
444
+ }
445
+ var T = u(({ props: e }) => () => /* @__PURE__ */ p("box", { children: w(e.rows ?? [], e.palette ?? {}).flatMap((e, t) => {
446
+ let n = /* @__PURE__ */ p("text", { children: e });
447
+ return t > 0 ? [/* @__PURE__ */ p("br", {}), n] : [n];
448
+ }) }), { name: "PixelArt" });
449
+ //#endregion
450
+ export { S as a, b as i, w as n, v as o, C as r, _ as s, T as t };
451
+
452
+ //# sourceMappingURL=fx-igWaVCkB.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fx-igWaVCkB.js","names":[],"sources":["../src/fx/paint.ts","../src/fx/Gradient.tsx","../src/fx/Shimmer.tsx","../src/fx/blockFont.ts","../src/fx/Banner.tsx","../src/fx/PixelArt.tsx"],"sourcesContent":["/**\r\n * Internal helpers for the FX components: build a single string with embedded\r\n * SGR escapes (one text node per line — one prop patch per frame, no per-char\r\n * vdom churn). The renderer passes embedded escapes through intact and its\r\n * truncation/measurement are escape-aware.\r\n */\r\nimport { hexToSGR, resolveColor } from '@sigx/terminal-zero';\r\nimport { GRADIENT_PRESETS, type GradientPreset } from './presets';\r\n\r\n/**\r\n * Colorize per code point. `hexAt(i, len)` returns the hex for visible char\r\n * `i`. Run-length emission: an SGR is only emitted when the sampled color\r\n * changes (spaces keep the current run). Ends with default-fg (`\\x1b[39m`,\r\n * not a full reset — it must not clobber renderer-applied backgrounds) when\r\n * any color was emitted.\r\n */\r\nexport function colorizeByIndex(text: string, hexAt: (i: number, len: number) => string): string {\r\n const chars = [...text];\r\n let out = '';\r\n let lastHex: string | null = null;\r\n let emitted = false;\r\n for (let i = 0; i < chars.length; i++) {\r\n const ch = chars[i];\r\n if (ch === ' ') {\r\n out += ch;\r\n continue;\r\n }\r\n const hex = hexAt(i, chars.length);\r\n if (hex !== lastHex) {\r\n const sgr = hexToSGR(hex);\r\n if (sgr) {\r\n out += sgr;\r\n emitted = true;\r\n }\r\n lastHex = hex;\r\n }\r\n out += ch;\r\n }\r\n return emitted ? out + '\\x1b[39m' : out;\r\n}\r\n\r\n/** Resolve gradient stops: explicit colors win over a preset; tokens → hex. */\r\nexport function resolveStops(colors: string[] | undefined, preset: string | undefined): string[] {\r\n const raw = colors && colors.length > 0\r\n ? colors\r\n : [...GRADIENT_PRESETS[(preset as GradientPreset) || 'sigx'] ?? GRADIENT_PRESETS.sigx];\r\n return raw.map((c) => resolveColor(c));\r\n}\r\n\r\n/**\r\n * Ping-pong a sample sequence (a → b → a without repeating the endpoints), so\r\n * scrolling a non-cyclic palette has no seam.\r\n */\r\nexport function pingPong(samples: string[]): string[] {\r\n if (samples.length <= 2) return samples;\r\n return samples.concat(samples.slice(1, -1).reverse());\r\n}\r\n","/** @jsxImportSource @sigx/runtime-core */\r\nimport { component, onMounted, onUnmounted, type Define } from '@sigx/runtime-core';\r\nimport { resolveColor, getColorDepth, gradient, getTick, subscribeTicker } from '@sigx/terminal-zero';\r\nimport { colorizeByIndex, resolveStops, pingPong } from './paint';\r\nimport type { GradientPreset } from './presets';\r\n\r\n/**\r\n * Text colored across a multi-stop gradient, one sample per character.\r\n * Stops are theme tokens or hex; `animate` scrolls the gradient through the\r\n * text (ping-pong, seamless). Degrades by color depth: a single accent color\r\n * at ansi16 (per-char nearest-16 is speckle noise), plain text at none.\r\n */\r\nexport const Gradient = component<\r\n Define.Prop<\"text\", string, true> &\r\n Define.Prop<\"colors\", string[], false> &\r\n Define.Prop<\"preset\", GradientPreset, false> &\r\n Define.Prop<\"animate\", boolean, false> &\r\n Define.Prop<\"speed\", number, false>\r\n>(({ props }) => {\r\n let unsub: (() => void) | null = null;\r\n\r\n onMounted(() => {\r\n if (props.animate) unsub = subscribeTicker();\r\n });\r\n onUnmounted(() => { unsub?.(); });\r\n\r\n return () => {\r\n // Block root (<box>), like every other component in the library — an\r\n // inline root glues onto whatever line precedes it. For inline\r\n // gradient strings, use colorizeByIndex/paintToken directly.\r\n const text = props.text ?? '';\r\n const depth = getColorDepth();\r\n if (depth === 'none') return <box><text>{text}</text></box>;\r\n if (depth === 'ansi16') return <box><text color={resolveColor('accent')}>{text}</text></box>;\r\n\r\n const stops = resolveStops(props.colors, props.preset);\r\n const len = [...text].length;\r\n const samples = gradient(stops, Math.max(len, 2));\r\n\r\n if (!props.animate) {\r\n return <box><text>{colorizeByIndex(text, (i) => samples[Math.min(i, samples.length - 1)])}</text></box>;\r\n }\r\n const cycle = pingPong(samples);\r\n const phase = Math.floor(getTick() * (props.speed || 1));\r\n return <box><text>{colorizeByIndex(text, (i) => cycle[(i + phase) % cycle.length])}</text></box>;\r\n };\r\n}, { name: 'Gradient' });\r\n\r\nexport default Gradient;\r\n","/** @jsxImportSource @sigx/runtime-core */\r\nimport { component, onMounted, onUnmounted, type Define } from '@sigx/runtime-core';\r\nimport { resolveColor, getColorDepth, mixHex, getTick, subscribeTicker } from '@sigx/terminal-zero';\r\nimport { colorizeByIndex } from './paint';\r\n\r\n/**\r\n * A highlight sweep travelling across muted text — the \"thinking…\" effect.\r\n * `color` is the base (default `dim`), `highlight` the sweep peak (default\r\n * `fg`), `width` the sweep half-width in characters. Static base color at\r\n * ansi16/none depth.\r\n */\r\nexport const Shimmer = component<\r\n Define.Prop<\"text\", string, true> &\r\n Define.Prop<\"color\", string, false> &\r\n Define.Prop<\"highlight\", string, false> &\r\n Define.Prop<\"width\", number, false> &\r\n Define.Prop<\"speed\", number, false>\r\n>(({ props }) => {\r\n let unsub: (() => void) | null = null;\r\n\r\n onMounted(() => { unsub = subscribeTicker(); });\r\n onUnmounted(() => { unsub?.(); });\r\n\r\n return () => {\r\n // Block root (<box>), like every other component in the library — an\r\n // inline root glues onto whatever line precedes it (a thinking…\r\n // shimmer must not land on the input's row).\r\n const text = props.text ?? '';\r\n const baseToken = props.color || 'dim';\r\n const depth = getColorDepth();\r\n if (depth === 'none') return <box><text>{text}</text></box>;\r\n if (depth === 'ansi16') return <box><text color={resolveColor(baseToken)}>{text}</text></box>;\r\n\r\n const base = resolveColor(baseToken);\r\n const highlight = resolveColor(props.highlight || 'fg');\r\n const w = Math.max(1, props.width || 3);\r\n const len = [...text].length;\r\n // The sweep runs off both ends so the text rests between passes.\r\n const span = len + 2 * w;\r\n const pos = (getTick() * (props.speed || 1)) % span - w;\r\n\r\n return (\r\n <box>\r\n <text>\r\n {colorizeByIndex(text, (i) => {\r\n const d = Math.abs(i - pos);\r\n return d < w ? mixHex(base, highlight, 1 - d / w) : base;\r\n })}\r\n </text>\r\n </box>\r\n );\r\n };\r\n}, { name: 'Shimmer' });\r\n\r\nexport default Shimmer;\r\n","/**\r\n * Built-in 5-row block font for <Banner> — full blocks and spaces only, so\r\n * every cell is width-1 (gradient-fillable, no wide-glyph drift). Glyphs are\r\n * authored as '#'/'.' strings for readability and converted once at load.\r\n * No external font dependency.\r\n */\r\n\r\nconst RAW: Record<string, string[]> = {\r\n A: ['.##.', '#..#', '####', '#..#', '#..#'],\r\n B: ['###.', '#..#', '###.', '#..#', '###.'],\r\n C: ['.###', '#...', '#...', '#...', '.###'],\r\n D: ['###.', '#..#', '#..#', '#..#', '###.'],\r\n E: ['####', '#...', '###.', '#...', '####'],\r\n F: ['####', '#...', '###.', '#...', '#...'],\r\n G: ['.###', '#...', '#.##', '#..#', '.##.'],\r\n H: ['#..#', '#..#', '####', '#..#', '#..#'],\r\n I: ['###', '.#.', '.#.', '.#.', '###'],\r\n J: ['..##', '...#', '...#', '#..#', '.##.'],\r\n K: ['#..#', '#.#.', '##..', '#.#.', '#..#'],\r\n L: ['#...', '#...', '#...', '#...', '####'],\r\n M: ['#...#', '##.##', '#.#.#', '#...#', '#...#'],\r\n N: ['#...#', '##..#', '#.#.#', '#..##', '#...#'],\r\n O: ['.##.', '#..#', '#..#', '#..#', '.##.'],\r\n P: ['###.', '#..#', '###.', '#...', '#...'],\r\n Q: ['.##.', '#..#', '#..#', '#.##', '.###'],\r\n R: ['###.', '#..#', '###.', '#.#.', '#..#'],\r\n S: ['.###', '#...', '.##.', '...#', '###.'],\r\n T: ['#####', '..#..', '..#..', '..#..', '..#..'],\r\n U: ['#..#', '#..#', '#..#', '#..#', '.##.'],\r\n V: ['#...#', '#...#', '#...#', '.#.#.', '..#..'],\r\n W: ['#...#', '#...#', '#.#.#', '##.##', '#...#'],\r\n X: ['#...#', '.#.#.', '..#..', '.#.#.', '#...#'],\r\n Y: ['#...#', '.#.#.', '..#..', '..#..', '..#..'],\r\n Z: ['####', '...#', '..#.', '.#..', '####'],\r\n '0': ['.##.', '#..#', '#..#', '#..#', '.##.'],\r\n '1': ['.#.', '##.', '.#.', '.#.', '###'],\r\n '2': ['.##.', '#..#', '..#.', '.#..', '####'],\r\n '3': ['###.', '...#', '.##.', '...#', '###.'],\r\n '4': ['#..#', '#..#', '####', '...#', '...#'],\r\n '5': ['####', '#...', '###.', '...#', '###.'],\r\n '6': ['.##.', '#...', '###.', '#..#', '.##.'],\r\n '7': ['####', '...#', '..#.', '.#..', '.#..'],\r\n '8': ['.##.', '#..#', '.##.', '#..#', '.##.'],\r\n '9': ['.##.', '#..#', '.###', '...#', '.##.'],\r\n ' ': ['..', '..', '..', '..', '..'],\r\n '-': ['...', '...', '###', '...', '...'],\r\n '.': ['.', '.', '.', '.', '#'],\r\n '!': ['#', '#', '#', '.', '#'],\r\n ':': ['.', '#', '.', '#', '.'],\r\n '/': ['...#', '..#.', '..#.', '.#..', '#...'],\r\n};\r\n\r\nexport const BLOCK_FONT_HEIGHT = 5;\r\n\r\nconst FONT: Record<string, string[]> = {};\r\nfor (const [ch, rows] of Object.entries(RAW)) {\r\n FONT[ch] = rows.map((r) => r.replace(/#/g, '█').replace(/\\./g, ' '));\r\n}\r\n\r\n/**\r\n * Render text in the block font: 5 equal-width rows of '█'/space. Input is\r\n * uppercased; unsupported characters render as a space glyph. Glyphs are\r\n * separated by a one-column gap.\r\n */\r\nexport function renderBlock(text: string): string[] {\r\n const rows: string[] = ['', '', '', '', ''];\r\n const chars = [...text.toUpperCase()];\r\n for (let c = 0; c < chars.length; c++) {\r\n const glyph = FONT[chars[c]] ?? FONT[' '];\r\n for (let r = 0; r < BLOCK_FONT_HEIGHT; r++) {\r\n rows[r] += (c > 0 ? ' ' : '') + glyph[r];\r\n }\r\n }\r\n return rows;\r\n}\r\n","/** @jsxImportSource @sigx/runtime-core */\r\nimport { component, onMounted, onUnmounted, type Define } from '@sigx/runtime-core';\r\nimport { resolveColor, getColorDepth, gradient, hexToSGR, getTick, subscribeTicker } from '@sigx/terminal-zero';\r\nimport { renderBlock, BLOCK_FONT_HEIGHT } from './blockFont';\r\nimport { resolveStops, pingPong } from './paint';\r\nimport type { GradientPreset } from './presets';\r\n\r\n/**\r\n * A large gradient-filled headline in the built-in 5-row block font\r\n * (A–Z 0–9 and basic punctuation; other characters render as spaces).\r\n * `direction` picks the gradient axis; `animate` scrolls it.\r\n */\r\nexport const Banner = component<\r\n Define.Prop<\"text\", string, true> &\r\n Define.Prop<\"colors\", string[], false> &\r\n Define.Prop<\"preset\", GradientPreset, false> &\r\n Define.Prop<\"direction\", 'horizontal' | 'vertical' | 'diagonal', false> &\r\n Define.Prop<\"animate\", boolean, false> &\r\n Define.Prop<\"speed\", number, false>\r\n>(({ props }) => {\r\n let unsub: (() => void) | null = null;\r\n\r\n onMounted(() => {\r\n if (props.animate) unsub = subscribeTicker();\r\n });\r\n onUnmounted(() => { unsub?.(); });\r\n\r\n return () => {\r\n const rows = renderBlock(props.text ?? '');\r\n const depth = getColorDepth();\r\n\r\n if (depth === 'none' || depth === 'ansi16') {\r\n const color = depth === 'none' ? undefined : resolveColor('accent');\r\n return (\r\n <box>\r\n {rows.flatMap((row, r) => {\r\n const line = <text color={color}>{row}</text>;\r\n return r > 0 ? [<br />, line] : [line];\r\n })}\r\n </box>\r\n );\r\n }\r\n\r\n const stops = resolveStops(props.colors, props.preset);\r\n const direction = props.direction || 'horizontal';\r\n const W = rows[0]?.length ?? 0;\r\n const H = BLOCK_FONT_HEIGHT;\r\n const axis = direction === 'horizontal' ? W : direction === 'vertical' ? H : W + H - 1;\r\n const samples = gradient(stops, Math.max(axis, 2));\r\n const cycle = props.animate ? pingPong(samples) : samples;\r\n const phase = props.animate ? Math.floor(getTick() * (props.speed || 1)) : 0;\r\n const sampleAt = (col: number, row: number) => {\r\n const i = direction === 'horizontal' ? col : direction === 'vertical' ? row : col + row;\r\n return cycle[(i + phase) % cycle.length];\r\n };\r\n\r\n return (\r\n <box>\r\n {rows.flatMap((row, r) => {\r\n // Run-length SGR per row: only emit when the cell color changes.\r\n let painted = '';\r\n let lastHex: string | null = null;\r\n for (let c = 0; c < row.length; c++) {\r\n const ch = row[c];\r\n if (ch === ' ') {\r\n painted += ch;\r\n continue;\r\n }\r\n const hex = sampleAt(c, r);\r\n if (hex !== lastHex) {\r\n painted += hexToSGR(hex);\r\n lastHex = hex;\r\n }\r\n painted += ch;\r\n }\r\n if (lastHex !== null) painted += '\\x1b[39m';\r\n const line = <text>{painted}</text>;\r\n return r > 0 ? [<br />, line] : [line];\r\n })}\r\n </box>\r\n );\r\n };\r\n}, { name: 'Banner' });\r\n\r\nexport default Banner;\r\n","/** @jsxImportSource @sigx/runtime-core */\r\nimport { component, type Define } from '@sigx/runtime-core';\r\nimport { resolveColor, resolveFg, resolveBg } from '@sigx/terminal-zero';\r\n\r\n/**\r\n * Render a pixel grid as terminal half-blocks (two pixel rows per terminal\r\n * line). Each character in `rows` is a pixel keyed into `palette`; `.` and\r\n * space are transparent. Palette values are theme tokens or `#hex` —\r\n * resolved per color depth (plain block glyphs at depth none).\r\n *\r\n * The pure builder is exported so apps can `printStatic` a logo into the\r\n * scrollback transcript; the component renders it live.\r\n */\r\nexport function renderPixelArt(rows: string[], palette: Record<string, string>): string[] {\r\n const resolve = (ch: string | undefined): string | null => {\r\n if (!ch || ch === '.' || ch === ' ') return null;\r\n const color = palette[ch];\r\n return color ? resolveColor(color) : null;\r\n };\r\n\r\n const lines: string[] = [];\r\n for (let r = 0; r < rows.length; r += 2) {\r\n const upperRow = rows[r];\r\n const lowerRow = rows[r + 1] ?? '';\r\n const cols = Math.max(upperRow.length, lowerRow.length);\r\n let line = '';\r\n let lastFg: string | null = null;\r\n let lastBg: string | null = null;\r\n let emitted = false;\r\n\r\n for (let c = 0; c < cols; c++) {\r\n const upper = resolve(upperRow[c]);\r\n const lower = resolve(lowerRow[c]);\r\n\r\n if (!upper && !lower) {\r\n if (lastBg !== null) {\r\n if (emitted) line += '\\x1b[0m'; // close any open background run\r\n lastFg = null;\r\n lastBg = null;\r\n }\r\n line += ' ';\r\n continue;\r\n }\r\n\r\n // Pick glyph + colors: both → fg=upper on bg=lower '▀';\r\n // upper only → fg '▀'; lower only → fg '▄' (no bg bleed).\r\n const glyph = upper ? '▀' : '▄';\r\n const fg = upper ?? lower;\r\n const bg = upper && lower ? lower : null;\r\n\r\n if (fg !== lastFg || bg !== lastBg) {\r\n if (lastBg !== null && bg === null && emitted) line += '\\x1b[0m';\r\n const sgr = (fg ? resolveFg(fg) : '') + (bg ? resolveBg(bg) : '');\r\n line += sgr;\r\n if (sgr) emitted = true;\r\n lastFg = fg;\r\n lastBg = bg;\r\n }\r\n line += glyph;\r\n }\r\n if (emitted) line += '\\x1b[0m';\r\n lines.push(line);\r\n }\r\n return lines;\r\n}\r\n\r\nexport const PixelArt = component<\r\n Define.Prop<'rows', string[], true> &\r\n Define.Prop<'palette', Record<string, string>, true>\r\n>(({ props }) => {\r\n return () => {\r\n const lines = renderPixelArt(props.rows ?? [], props.palette ?? {});\r\n return (\r\n <box>\r\n {lines.flatMap((line, i) => {\r\n const node = <text>{line}</text>;\r\n return i > 0 ? [<br />, node] : [node];\r\n })}\r\n </box>\r\n );\r\n };\r\n}, { name: 'PixelArt' });\r\n\r\nexport default PixelArt;\r\n"],"mappings":";;;;;AAgBA,SAAgB,EAAgB,GAAc,GAAmD;CAC7F,IAAM,IAAQ,CAAC,GAAG,EAAK,EACnB,IAAM,IACN,IAAyB,MACzB,IAAU;CACd,KAAK,IAAI,IAAI,GAAG,IAAI,EAAM,QAAQ,KAAK;EACnC,IAAM,IAAK,EAAM;EACjB,IAAI,MAAO,KAAK;GACZ,KAAO;GACP;;EAEJ,IAAM,IAAM,EAAM,GAAG,EAAM,OAAO;EAClC,IAAI,MAAQ,GAAS;GACjB,IAAM,IAAM,EAAS,EAAI;GAKzB,AAJI,MACA,KAAO,GACP,IAAU,KAEd,IAAU;;EAEd,KAAO;;CAEX,OAAO,IAAU,IAAM,aAAa;;AAIxC,SAAgB,EAAa,GAA8B,GAAsC;CAI7F,QAHY,KAAU,E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MAAS,KAAQ,YACrB,EAAM,KAAK,EAAK;;CAEpB,OAAO;;AAGX,IAAa,IAAW,GAGrB,EAAE,qBAIO,kBAAC,OAAD,EAAA,UAFU,EAAe,EAAM,QAAQ,EAAE,EAAE,EAAM,WAAW,EAAE,CAGzD,CAAM,SAAS,GAAM,MAAM;CACxB,IAAM,IAAO,kBAAC,QAAD,EAAA,UAAO,GAAY,CAAA;CAChC,OAAO,IAAI,IAAI,CAAC,kBAAC,MAAD,EAAM,CAAA,EAAE,EAAK,GAAG,CAAC,EAAK;EACxC,EACA,CAAA,EAGf,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @sigx/terminal-ui — the SigX-tui design-system skin for SignalX terminal UIs.
3
+ *
4
+ * Styled components organized by semantic category (buttons, forms, feedback,
5
+ * navigation, layout, data), built on the @sigx/terminal-zero foundation.
6
+ * Importing this package registers the five SigX-tui themes (default: obsidian).
7
+ */
8
+ export * from './theme';
9
+ export * from './buttons';
10
+ export * from './forms';
11
+ export * from './feedback';
12
+ export * from './navigation';
13
+ export * from './layout';
14
+ export * from './data';
15
+ export * from './fx';
16
+ export * from './tasks';
17
+ export * from './prompts';
package/dist/index.js ADDED
@@ -0,0 +1,13 @@
1
+ import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c, u as l } from "./theme-DASuxf6k.js";
2
+ import { t as u } from "./buttons-D5iaiJ6G.js";
3
+ import { a as d, i as f, n as p, o as m, r as h, s as g, t as _ } from "./forms-MgpyoQI5.js";
4
+ import { t as v } from "./presets-uqseGRqO.js";
5
+ import { n as y, t as b } from "./feedback-1WqdARfx.js";
6
+ import { t as x } from "./Spinner-JpmBtbPo.js";
7
+ import { i as S, n as C, r as w, t as T } from "./navigation-B-nI3g0k.js";
8
+ import { a as E, i as D, n as O, r as k, t as A } from "./layout-CJzMVMDf.js";
9
+ import { n as j, t as M } from "./data-DKKLsE5K.js";
10
+ import { a as N, i as P, n as F, o as I, r as L, s as R, t as z } from "./fx-igWaVCkB.js";
11
+ import { a as B, i as V, n as H, r as U, t as W } from "./tasks-CdVFFOFs.js";
12
+ import { a as G, c as K, d as q, f as J, i as Y, l as X, m as Z, n as Q, o as $, p as ee, r as te, s as ne, t as re, u as ie } from "./prompts-BLtLCen_.js";
13
+ export { P as BLOCK_FONT_HEIGHT, b as Badge, L as Banner, A as Box, u as Button, re as CANCEL, E as Card, m as Checkbox, O as Col, p as Confirm, k as Divider, v as GRADIENT_PRESETS, R as Gradient, g as Input, C as KeyHints, B as LogPanel, W as LogView, h as MultiSelect, z as PixelArt, y as ProgressBar, M as QRCode, f as Radio, d as Select, I as Shimmer, D as Spacer, x as Spinner, w as StatusBar, T as SuggestionList, l as THEMES, j as Table, S as Tabs, V as TaskList, _ as TextArea, Q as __setInteractiveOverride, c as applyThemeCanvas, $ as cancel, H as collapseTask, ie as confirm, U as createLogStore, i as disableThemeCanvas, o as getActiveTheme, n as getTheme, e as hasTheme, ne as intro, te as isCancel, a as listThemes, q as multiselect, K as note, X as outro, ee as password, Y as prompt, s as registerTheme, N as renderBlock, F as renderPixelArt, t as resolveColor, J as select, r as setTheme, G as spinner, Z as text };
@@ -0,0 +1,11 @@
1
+ /** @jsxImportSource @sigx/runtime-core */
2
+ import { type Define } from '@sigx/runtime-core';
3
+ /** A rounded panel with horizontal padding, an optional title, and shadow. */
4
+ export declare const Card: import("@sigx/runtime-core").ComponentFactory<{
5
+ title?: string | undefined;
6
+ } & {
7
+ dropShadow?: boolean | undefined;
8
+ } & Define.Slot<"default", void>, void, {
9
+ default: () => import("@sigx/runtime-core").JSXElement | import("@sigx/runtime-core").JSXElement[] | null;
10
+ }>;
11
+ export default Card;
@@ -0,0 +1,2 @@
1
+ export { Card } from './Card';
2
+ export { Box, Col, Spacer, Divider } from '@sigx/terminal-zero';
@@ -0,0 +1,2 @@
1
+ import { a as e, i as t, n, r, t as i } from "../layout-CJzMVMDf.js";
2
+ export { i as Box, e as Card, n as Col, r as Divider, t as Spacer };
@@ -0,0 +1,18 @@
1
+ import { Box as e, Col as t, Divider as n, Spacer as r, resolveColor as i } from "@sigx/terminal-zero";
2
+ import { component as a } from "@sigx/runtime-core";
3
+ import { jsx as o } from "@sigx/runtime-core/jsx-runtime";
4
+ //#region src/layout/Card.tsx
5
+ var s = a(({ props: e, slots: t }) => () => /* @__PURE__ */ o("box", {
6
+ border: "rounded",
7
+ borderColor: i("line"),
8
+ label: e.title,
9
+ labelColor: i("accent"),
10
+ padX: 1,
11
+ dropShadow: e.dropShadow,
12
+ shadowColor: i("shadow"),
13
+ children: t.default?.()
14
+ }), { name: "Card" });
15
+ //#endregion
16
+ export { s as a, r as i, t as n, n as r, e as t };
17
+
18
+ //# sourceMappingURL=layout-CJzMVMDf.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout-CJzMVMDf.js","names":[],"sources":["../src/layout/Card.tsx"],"sourcesContent":["/** @jsxImportSource @sigx/runtime-core */\r\nimport { component, type Define } from '@sigx/runtime-core';\r\nimport { resolveColor } from '@sigx/terminal-zero';\r\n\r\n/** A rounded panel with horizontal padding, an optional title, and shadow. */\r\nexport const Card = component<\r\n Define.Prop<\"title\", string, false> &\r\n Define.Prop<\"dropShadow\", boolean, false> &\r\n Define.Slot<'default'>\r\n>(({ props, slots }) => {\r\n return () => (\r\n <box\r\n border=\"rounded\"\r\n borderColor={resolveColor('line')}\r\n label={props.title}\r\n labelColor={resolveColor('accent')}\r\n padX={1}\r\n dropShadow={props.dropShadow}\r\n shadowColor={resolveColor('shadow')}\r\n >\r\n {slots.default?.()}\r\n </box>\r\n );\r\n}, { name: 'Card' });\r\n\r\nexport default Card;\r\n"],"mappings":";;;;AAKA,IAAa,IAAO,GAIjB,EAAE,UAAO,qBAEJ,kBAAC,OAAD;CACI,QAAO;CACP,aAAa,EAAa,OAAO;CACjC,OAAO,EAAM;CACb,YAAY,EAAa,SAAS;CAClC,MAAM;CACN,YAAY,EAAM;CAClB,aAAa,EAAa,SAAS;WAElC,EAAM,WAAW;CAChB,CAAA,EAEX,EAAE,MAAM,QAAQ,CAAC"}
@@ -0,0 +1,15 @@
1
+ export interface KeyHint {
2
+ key: string;
3
+ label: string;
4
+ }
5
+ /**
6
+ * The dev-server shortcuts footer: `r reload · d devices · q quit`.
7
+ * Deliberately lighter than StatusBar (no chips, no background fill) —
8
+ * accent keys, dim labels, faint separators, one line.
9
+ */
10
+ export declare const KeyHints: import("@sigx/runtime-core").ComponentFactory<{
11
+ hints: KeyHint[];
12
+ } & {
13
+ separator?: string | undefined;
14
+ }, void, {}>;
15
+ export default KeyHints;
@@ -0,0 +1,9 @@
1
+ export interface StatusItem {
2
+ key: string;
3
+ label: string;
4
+ }
5
+ /** Key-hint footer: each item is ` key ` (accent fill) + ` label ` (dim). */
6
+ export declare const StatusBar: import("@sigx/runtime-core").ComponentFactory<{
7
+ items: StatusItem[];
8
+ }, void, {}>;
9
+ export default StatusBar;
@@ -0,0 +1,22 @@
1
+ /** @jsxImportSource @sigx/runtime-core */
2
+ import { type Define } from '@sigx/runtime-core';
3
+ export interface SuggestionItem {
4
+ value: string;
5
+ /** Defaults to value. */
6
+ label?: string;
7
+ description?: string;
8
+ }
9
+ /**
10
+ * Intellisense popup for an input: mount it to open it (typically rendered
11
+ * conditionally under a TextArea while the value matches a trigger like `/`).
12
+ * It registers an OVERLAY-layer key handler that consumes only navigation
13
+ * keys — ↑/↓ move, Tab/Enter accept the highlighted item, Esc dismisses —
14
+ * while printable characters, backspace, etc. fall through to the input
15
+ * below, so filtering keeps working as the user types.
16
+ */
17
+ export declare const SuggestionList: import("@sigx/runtime-core").ComponentFactory<{
18
+ items: SuggestionItem[];
19
+ } & {
20
+ maxVisible?: number | undefined;
21
+ } & Define.Event<"accept", string> & Define.Event<"dismiss", void>, void, {}>;
22
+ export default SuggestionList;
@@ -0,0 +1,18 @@
1
+ /** @jsxImportSource @sigx/runtime-core */
2
+ import { type Define } from '@sigx/runtime-core';
3
+ export interface TabOption<T = string> {
4
+ label: string;
5
+ value: T;
6
+ }
7
+ /** Horizontal tab switcher. Active tab fills accent; ←/→ (or h/l) switch. */
8
+ export declare const Tabs: import("@sigx/runtime-core").ComponentFactory<{
9
+ model?: import("@sigx/runtime-core").Model<string> | undefined;
10
+ __modelBindings?: {
11
+ model: string;
12
+ } | undefined;
13
+ } & Define.Event<"update:modelValue", string> & {
14
+ options: TabOption<string>[];
15
+ } & {
16
+ autofocus?: boolean | undefined;
17
+ } & Define.Event<"change", string>, void, {}>;
18
+ export default Tabs;
@@ -0,0 +1,4 @@
1
+ export { Tabs, type TabOption } from './Tabs';
2
+ export { StatusBar, type StatusItem } from './StatusBar';
3
+ export { KeyHints, type KeyHint } from './KeyHints';
4
+ export { SuggestionList, type SuggestionItem } from './SuggestionList';
@@ -0,0 +1,2 @@
1
+ import { i as e, n as t, r as n, t as r } from "../navigation-B-nI3g0k.js";
2
+ export { t as KeyHints, n as StatusBar, r as SuggestionList, e as Tabs };