@outfitter/tui 0.2.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.
- package/README.md +250 -0
- package/dist/borders/index.d.ts +3 -0
- package/dist/borders/index.js +13 -0
- package/dist/box/index.d.ts +4 -0
- package/dist/box/index.js +10 -0
- package/dist/confirm.d.ts +37 -0
- package/dist/confirm.js +36 -0
- package/dist/demo/index.d.ts +77 -0
- package/dist/demo/index.js +142 -0
- package/dist/demo/registry.d.ts +6 -0
- package/dist/demo/registry.js +28 -0
- package/dist/demo/renderers/borders.d.ts +7 -0
- package/dist/demo/renderers/borders.js +14 -0
- package/dist/demo/renderers/box.d.ts +7 -0
- package/dist/demo/renderers/box.js +15 -0
- package/dist/demo/renderers/colors.d.ts +7 -0
- package/dist/demo/renderers/colors.js +15 -0
- package/dist/demo/renderers/indicators.d.ts +7 -0
- package/dist/demo/renderers/indicators.js +14 -0
- package/dist/demo/renderers/list.d.ts +7 -0
- package/dist/demo/renderers/list.js +16 -0
- package/dist/demo/renderers/markdown.d.ts +7 -0
- package/dist/demo/renderers/markdown.js +15 -0
- package/dist/demo/renderers/progress.d.ts +7 -0
- package/dist/demo/renderers/progress.js +14 -0
- package/dist/demo/renderers/spinner.d.ts +7 -0
- package/dist/demo/renderers/spinner.js +16 -0
- package/dist/demo/renderers/table.d.ts +7 -0
- package/dist/demo/renderers/table.js +16 -0
- package/dist/demo/renderers/text.d.ts +7 -0
- package/dist/demo/renderers/text.js +13 -0
- package/dist/demo/renderers/tree.d.ts +7 -0
- package/dist/demo/renderers/tree.js +15 -0
- package/dist/demo/section.d.ts +4 -0
- package/dist/demo/section.js +20 -0
- package/dist/demo/templates.d.ts +3 -0
- package/dist/demo/templates.js +10 -0
- package/dist/demo/types.d.ts +2 -0
- package/dist/demo/types.js +8 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.js +77 -0
- package/dist/list/index.d.ts +3 -0
- package/dist/list/index.js +9 -0
- package/dist/preset/full.d.ts +12 -0
- package/dist/preset/full.js +37 -0
- package/dist/preset/standard.d.ts +9 -0
- package/dist/preset/standard.js +26 -0
- package/dist/prompt/confirm.d.ts +4 -0
- package/dist/prompt/confirm.js +9 -0
- package/dist/prompt/group.d.ts +4 -0
- package/dist/prompt/group.js +9 -0
- package/dist/prompt/index.d.ts +7 -0
- package/dist/prompt/index.js +32 -0
- package/dist/prompt/select.d.ts +4 -0
- package/dist/prompt/select.js +11 -0
- package/dist/prompt/text.d.ts +4 -0
- package/dist/prompt/text.js +11 -0
- package/dist/prompt/types.d.ts +3 -0
- package/dist/prompt/types.js +8 -0
- package/dist/prompt/validators.d.ts +2 -0
- package/dist/prompt/validators.js +8 -0
- package/dist/render/borders.d.ts +2 -0
- package/dist/render/borders.js +15 -0
- package/dist/render/box.d.ts +3 -0
- package/dist/render/box.js +20 -0
- package/dist/render/date.d.ts +2 -0
- package/dist/render/date.js +12 -0
- package/dist/render/format-relative.d.ts +2 -0
- package/dist/render/format-relative.js +8 -0
- package/dist/render/format.d.ts +2 -0
- package/dist/render/format.js +10 -0
- package/dist/render/heading.d.ts +3 -0
- package/dist/render/heading.js +11 -0
- package/dist/render/index.d.ts +31 -0
- package/dist/render/index.js +222 -0
- package/dist/render/indicators.d.ts +2 -0
- package/dist/render/indicators.js +16 -0
- package/dist/render/json.d.ts +2 -0
- package/dist/render/json.js +10 -0
- package/dist/render/layout.d.ts +5 -0
- package/dist/render/layout.js +22 -0
- package/dist/render/list.d.ts +2 -0
- package/dist/render/list.js +8 -0
- package/dist/render/markdown.d.ts +2 -0
- package/dist/render/markdown.js +8 -0
- package/dist/render/progress.d.ts +2 -0
- package/dist/render/progress.js +8 -0
- package/dist/render/separator.d.ts +3 -0
- package/dist/render/separator.js +11 -0
- package/dist/render/shapes.d.ts +2 -0
- package/dist/render/shapes.js +32 -0
- package/dist/render/spinner.d.ts +2 -0
- package/dist/render/spinner.js +12 -0
- package/dist/render/stack.d.ts +3 -0
- package/dist/render/stack.js +35 -0
- package/dist/render/table.d.ts +3 -0
- package/dist/render/table.js +9 -0
- package/dist/render/tree.d.ts +2 -0
- package/dist/render/tree.js +10 -0
- package/dist/render/types.d.ts +2 -0
- package/dist/render/types.js +1 -0
- package/dist/shared/@outfitter/tui-011579t8.d.ts +24 -0
- package/dist/shared/@outfitter/tui-06dntkse.js +146 -0
- package/dist/shared/@outfitter/tui-0awf316b.js +71 -0
- package/dist/shared/@outfitter/tui-0b85rht7.js +1 -0
- package/dist/shared/@outfitter/tui-0mpqnyc1.js +55 -0
- package/dist/shared/@outfitter/tui-1qh888th.d.ts +106 -0
- package/dist/shared/@outfitter/tui-1tk0kxa6.js +94 -0
- package/dist/shared/@outfitter/tui-1wggw2zj.d.ts +56 -0
- package/dist/shared/@outfitter/tui-2pwhzg55.js +123 -0
- package/dist/shared/@outfitter/tui-2tkva96b.d.ts +20 -0
- package/dist/shared/@outfitter/tui-2wfat6jb.js +22 -0
- package/dist/shared/@outfitter/tui-34q2aenf.d.ts +24 -0
- package/dist/shared/@outfitter/tui-37hjcqhb.d.ts +3 -0
- package/dist/shared/@outfitter/tui-3dyxg62j.d.ts +97 -0
- package/dist/shared/@outfitter/tui-3kza6p9k.d.ts +132 -0
- package/dist/shared/@outfitter/tui-43bnfxv9.js +30 -0
- package/dist/shared/@outfitter/tui-4yz7jcyq.js +214 -0
- package/dist/shared/@outfitter/tui-52ndmswq.js +23 -0
- package/dist/shared/@outfitter/tui-53ms1ba4.d.ts +41 -0
- package/dist/shared/@outfitter/tui-5dsn6d6d.js +86 -0
- package/dist/shared/@outfitter/tui-5pb72vf9.js +51 -0
- package/dist/shared/@outfitter/tui-6605wa2j.js +127 -0
- package/dist/shared/@outfitter/tui-6ptks7jj.js +19 -0
- package/dist/shared/@outfitter/tui-6svngg69.js +126 -0
- package/dist/shared/@outfitter/tui-733asbd8.js +37 -0
- package/dist/shared/@outfitter/tui-75bztyfp.d.ts +50 -0
- package/dist/shared/@outfitter/tui-83zaah9b.d.ts +17 -0
- package/dist/shared/@outfitter/tui-8ejx8gq5.d.ts +71 -0
- package/dist/shared/@outfitter/tui-8j1gbehy.d.ts +164 -0
- package/dist/shared/@outfitter/tui-8mypsnva.d.ts +74 -0
- package/dist/shared/@outfitter/tui-997aapz0.js +61 -0
- package/dist/shared/@outfitter/tui-9dbykt4g.d.ts +42 -0
- package/dist/shared/@outfitter/tui-9h1kdd98.d.ts +119 -0
- package/dist/shared/@outfitter/tui-9rj9yesd.js +118 -0
- package/dist/shared/@outfitter/tui-a65efhsk.d.ts +23 -0
- package/dist/shared/@outfitter/tui-a8nkrbds.js +1 -0
- package/dist/shared/@outfitter/tui-ajp1153q.d.ts +59 -0
- package/dist/shared/@outfitter/tui-ay1fv41j.d.ts +30 -0
- package/dist/shared/@outfitter/tui-azh1w4ak.js +67 -0
- package/dist/shared/@outfitter/tui-b14ry1j1.d.ts +53 -0
- package/dist/shared/@outfitter/tui-c56sxcm8.d.ts +87 -0
- package/dist/shared/@outfitter/tui-c6ft5w6q.d.ts +91 -0
- package/dist/shared/@outfitter/tui-cq7za0cz.js +62 -0
- package/dist/shared/@outfitter/tui-dh15zwg0.js +95 -0
- package/dist/shared/@outfitter/tui-esc46z2v.js +20 -0
- package/dist/shared/@outfitter/tui-f1mj6h6p.d.ts +2 -0
- package/dist/shared/@outfitter/tui-gcpz529w.js +122 -0
- package/dist/shared/@outfitter/tui-gqsdhmk9.d.ts +42 -0
- package/dist/shared/@outfitter/tui-hescagw2.js +32 -0
- package/dist/shared/@outfitter/tui-j2kd7eej.js +126 -0
- package/dist/shared/@outfitter/tui-j3bkjt2g.js +7 -0
- package/dist/shared/@outfitter/tui-jnn9d8cd.js +8 -0
- package/dist/shared/@outfitter/tui-jz5nws55.d.ts +51 -0
- package/dist/shared/@outfitter/tui-k3mby2kk.js +70 -0
- package/dist/shared/@outfitter/tui-kc4nxak0.js +20 -0
- package/dist/shared/@outfitter/tui-kcxv8txp.js +7 -0
- package/dist/shared/@outfitter/tui-kydbggmj.js +39 -0
- package/dist/shared/@outfitter/tui-mch672g9.js +30 -0
- package/dist/shared/@outfitter/tui-n9kxkdrh.js +82 -0
- package/dist/shared/@outfitter/tui-na4dnjpw.js +348 -0
- package/dist/shared/@outfitter/tui-ncaatp4j.js +25 -0
- package/dist/shared/@outfitter/tui-nce7fgtf.js +48 -0
- package/dist/shared/@outfitter/tui-ngz2fbdw.js +144 -0
- package/dist/shared/@outfitter/tui-nprd7g0d.js +52 -0
- package/dist/shared/@outfitter/tui-nr580mbv.js +272 -0
- package/dist/shared/@outfitter/tui-nr93tf31.d.ts +64 -0
- package/dist/shared/@outfitter/tui-pdwbbzwr.js +179 -0
- package/dist/shared/@outfitter/tui-qb07rtct.js +19 -0
- package/dist/shared/@outfitter/tui-qkyazctw.d.ts +36 -0
- package/dist/shared/@outfitter/tui-qn1rgz9v.d.ts +93 -0
- package/dist/shared/@outfitter/tui-qs3fhwp8.js +43 -0
- package/dist/shared/@outfitter/tui-r8hywf9m.d.ts +48 -0
- package/dist/shared/@outfitter/tui-rbbcc034.js +20 -0
- package/dist/shared/@outfitter/tui-rgkerz72.js +85 -0
- package/dist/shared/@outfitter/tui-rh52sycm.d.ts +45 -0
- package/dist/shared/@outfitter/tui-rr924x4z.d.ts +59 -0
- package/dist/shared/@outfitter/tui-rwpdjrt3.js +20 -0
- package/dist/shared/@outfitter/tui-rx9xq9s7.d.ts +26 -0
- package/dist/shared/@outfitter/tui-sk05ye6g.js +1 -0
- package/dist/shared/@outfitter/tui-sv2xmh3w.d.ts +26 -0
- package/dist/shared/@outfitter/tui-t1a9xgbd.js +111 -0
- package/dist/shared/@outfitter/tui-t9vd88jr.js +273 -0
- package/dist/shared/@outfitter/tui-tq1z78x0.js +11 -0
- package/dist/shared/@outfitter/tui-ts1f957s.d.ts +128 -0
- package/dist/shared/@outfitter/tui-ve0083wa.d.ts +61 -0
- package/dist/shared/@outfitter/tui-vt0wg6c4.js +54 -0
- package/dist/shared/@outfitter/tui-wfnnq0zq.d.ts +328 -0
- package/dist/shared/@outfitter/tui-x3yg0887.d.ts +223 -0
- package/dist/shared/@outfitter/tui-x9vvtfkk.js +20 -0
- package/dist/shared/@outfitter/tui-xbvz707j.js +20 -0
- package/dist/shared/@outfitter/tui-xbx6d4t7.js +1 -0
- package/dist/shared/@outfitter/tui-xph95b7h.js +67 -0
- package/dist/shared/@outfitter/tui-xqjx7d1f.js +135 -0
- package/dist/shared/@outfitter/tui-xrgrp99k.d.ts +112 -0
- package/dist/shared/@outfitter/tui-xzjv96ps.d.ts +300 -0
- package/dist/shared/@outfitter/tui-ykzs6v4v.d.ts +66 -0
- package/dist/shared/@outfitter/tui-yw9n5h6q.d.ts +54 -0
- package/dist/shared/@outfitter/tui-ywmakc6b.js +30 -0
- package/dist/shared/@outfitter/tui-z6nf9b9h.js +7 -0
- package/dist/shared/@outfitter/tui-zcspg6z6.d.ts +190 -0
- package/dist/shared/@outfitter/tui-zhbsnj7w.js +1 -0
- package/dist/streaming/ansi.d.ts +2 -0
- package/dist/streaming/ansi.js +8 -0
- package/dist/streaming/index.d.ts +4 -0
- package/dist/streaming/index.js +17 -0
- package/dist/streaming/spinner.d.ts +3 -0
- package/dist/streaming/spinner.js +10 -0
- package/dist/streaming/writer.d.ts +2 -0
- package/dist/streaming/writer.js +9 -0
- package/dist/table/index.d.ts +4 -0
- package/dist/table/index.js +10 -0
- package/dist/theme/context.d.ts +9 -0
- package/dist/theme/context.js +12 -0
- package/dist/theme/create.d.ts +8 -0
- package/dist/theme/create.js +10 -0
- package/dist/theme/index.d.ts +17 -0
- package/dist/theme/index.js +40 -0
- package/dist/theme/presets/bold.d.ts +8 -0
- package/dist/theme/presets/bold.js +10 -0
- package/dist/theme/presets/default.d.ts +8 -0
- package/dist/theme/presets/default.js +9 -0
- package/dist/theme/presets/index.d.ts +12 -0
- package/dist/theme/presets/index.js +22 -0
- package/dist/theme/presets/minimal.d.ts +8 -0
- package/dist/theme/presets/minimal.js +10 -0
- package/dist/theme/presets/rounded.d.ts +8 -0
- package/dist/theme/presets/rounded.js +10 -0
- package/dist/theme/resolve.d.ts +8 -0
- package/dist/theme/resolve.js +11 -0
- package/dist/theme/types.d.ts +7 -0
- package/dist/theme/types.js +1 -0
- package/dist/tree/index.d.ts +3 -0
- package/dist/tree/index.js +11 -0
- package/package.json +263 -0
package/README.md
ADDED
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
# @outfitter/tui
|
|
2
|
+
|
|
3
|
+
Terminal UI rendering: tables, lists, boxes, trees, spinners, themes, prompts, and streaming for Bun.
|
|
4
|
+
|
|
5
|
+
**Stability: Active** -- APIs evolving based on usage.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
bun add @outfitter/tui
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
### Peer Dependencies
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
bun add @outfitter/cli @outfitter/contracts @outfitter/types
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
`@outfitter/tui` depends on `@outfitter/cli` for colors, text utilities, and terminal detection. It does not bundle these -- they must be installed separately.
|
|
20
|
+
|
|
21
|
+
## Quick Start
|
|
22
|
+
|
|
23
|
+
```typescript
|
|
24
|
+
import { renderTable } from "@outfitter/tui/table";
|
|
25
|
+
import { renderList } from "@outfitter/tui/list";
|
|
26
|
+
import { renderBox } from "@outfitter/tui/box";
|
|
27
|
+
|
|
28
|
+
// Render a table
|
|
29
|
+
console.log(renderTable([
|
|
30
|
+
{ name: "config", status: "loaded", entries: 12 },
|
|
31
|
+
{ name: "cache", status: "warm", entries: 847 },
|
|
32
|
+
]));
|
|
33
|
+
|
|
34
|
+
// Render a bullet list
|
|
35
|
+
console.log(renderList(["First item", "Second item", "Third item"]));
|
|
36
|
+
|
|
37
|
+
// Render a bordered box
|
|
38
|
+
console.log(renderBox("Operation complete", { title: "Status" }));
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Subpath Exports
|
|
42
|
+
|
|
43
|
+
Every module is available as a subpath import. No deep imports into `dist/` needed.
|
|
44
|
+
|
|
45
|
+
### Rendering Primitives
|
|
46
|
+
|
|
47
|
+
| Subpath | What's In It |
|
|
48
|
+
|---------|-------------|
|
|
49
|
+
| `@outfitter/tui/render` | All rendering utilities (tables, lists, boxes, trees, formatting, layout, shapes) |
|
|
50
|
+
| `@outfitter/tui/table` | `renderTable`, `TableOptions` |
|
|
51
|
+
| `@outfitter/tui/list` | `renderList`, `ListOptions`, `ListStyle` |
|
|
52
|
+
| `@outfitter/tui/box` | `renderBox`, `createBox`, `BoxOptions` |
|
|
53
|
+
| `@outfitter/tui/tree` | `renderTree`, `TreeOptions`, `TREE_GUIDES` |
|
|
54
|
+
| `@outfitter/tui/borders` | `BORDERS`, `getBorderCharacters`, `drawHorizontalLine` |
|
|
55
|
+
|
|
56
|
+
### Themes
|
|
57
|
+
|
|
58
|
+
| Subpath | What's In It |
|
|
59
|
+
|---------|-------------|
|
|
60
|
+
| `@outfitter/tui/theme` | `createVisualTheme`, `defaultTheme`, `roundedTheme`, `boldTheme`, `minimalTheme` |
|
|
61
|
+
| `@outfitter/tui/theme/presets` | All preset themes |
|
|
62
|
+
| `@outfitter/tui/theme/presets/default` | Default theme only |
|
|
63
|
+
| `@outfitter/tui/theme/presets/rounded` | Rounded theme only |
|
|
64
|
+
| `@outfitter/tui/theme/presets/bold` | Bold theme only |
|
|
65
|
+
| `@outfitter/tui/theme/presets/minimal` | Minimal theme only |
|
|
66
|
+
| `@outfitter/tui/theme/context` | `createThemedContext`, `getContextTheme` |
|
|
67
|
+
| `@outfitter/tui/theme/create` | `createVisualTheme` factory |
|
|
68
|
+
| `@outfitter/tui/theme/resolve` | `resolveGlyph`, `resolveStateMarker` |
|
|
69
|
+
|
|
70
|
+
### Streaming Output
|
|
71
|
+
|
|
72
|
+
| Subpath | What's In It |
|
|
73
|
+
|---------|-------------|
|
|
74
|
+
| `@outfitter/tui/streaming` | `createSpinner`, `createStreamWriter`, `ANSI` |
|
|
75
|
+
| `@outfitter/tui/streaming/spinner` | `createSpinner`, `Spinner`, `SpinnerOptions` |
|
|
76
|
+
| `@outfitter/tui/streaming/writer` | `createStreamWriter`, `StreamWriter` |
|
|
77
|
+
| `@outfitter/tui/streaming/ansi` | ANSI escape sequence constants |
|
|
78
|
+
|
|
79
|
+
### Interactive Prompts
|
|
80
|
+
|
|
81
|
+
| Subpath | What's In It |
|
|
82
|
+
|---------|-------------|
|
|
83
|
+
| `@outfitter/tui/prompt` | `promptText`, `promptSelect`, `promptConfirm`, `promptGroup`, `validators` |
|
|
84
|
+
| `@outfitter/tui/prompt/text` | `promptText`, `promptPassword` |
|
|
85
|
+
| `@outfitter/tui/prompt/select` | `promptSelect`, `promptMultiSelect` |
|
|
86
|
+
| `@outfitter/tui/prompt/confirm` | `promptConfirm` |
|
|
87
|
+
| `@outfitter/tui/prompt/group` | `promptGroup` |
|
|
88
|
+
| `@outfitter/tui/prompt/validators` | Validation helpers |
|
|
89
|
+
| `@outfitter/tui/confirm` | `confirmDestructive` (destructive operation confirmation) |
|
|
90
|
+
|
|
91
|
+
### Presets
|
|
92
|
+
|
|
93
|
+
| Subpath | What's In It |
|
|
94
|
+
|---------|-------------|
|
|
95
|
+
| `@outfitter/tui/preset/standard` | Table + list + box + colors (most common bundle) |
|
|
96
|
+
| `@outfitter/tui/preset/full` | Standard + tree + borders |
|
|
97
|
+
|
|
98
|
+
### Demo Infrastructure
|
|
99
|
+
|
|
100
|
+
| Subpath | What's In It |
|
|
101
|
+
|---------|-------------|
|
|
102
|
+
| `@outfitter/tui/demo` | `renderDemo`, `renderAllDemos`, primitive metadata |
|
|
103
|
+
| `@outfitter/tui/demo/section` | Section helpers for building demos |
|
|
104
|
+
|
|
105
|
+
## Themes
|
|
106
|
+
|
|
107
|
+
The visual theme system provides a unified design language for borders, delimiters, markers, colors, and spacing.
|
|
108
|
+
|
|
109
|
+
```typescript
|
|
110
|
+
import {
|
|
111
|
+
defaultTheme,
|
|
112
|
+
roundedTheme,
|
|
113
|
+
createVisualTheme,
|
|
114
|
+
createThemedContext,
|
|
115
|
+
} from "@outfitter/tui/theme";
|
|
116
|
+
|
|
117
|
+
// Use a preset theme
|
|
118
|
+
import { renderBox } from "@outfitter/tui/box";
|
|
119
|
+
const box = renderBox("Hello", { theme: roundedTheme });
|
|
120
|
+
|
|
121
|
+
// Create a custom theme extending a preset
|
|
122
|
+
const brandTheme = createVisualTheme({
|
|
123
|
+
extends: roundedTheme,
|
|
124
|
+
overrides: {
|
|
125
|
+
colors: { success: "\x1b[38;5;82m" },
|
|
126
|
+
spacing: { boxPadding: 2 },
|
|
127
|
+
},
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
// Create a themed context for cascading theme options
|
|
131
|
+
const ctx = createThemedContext({ theme: brandTheme, width: 80 });
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
**Available presets:** `defaultTheme`, `roundedTheme`, `boldTheme`, `minimalTheme`
|
|
135
|
+
|
|
136
|
+
## Streaming
|
|
137
|
+
|
|
138
|
+
In-place terminal updates for spinners and progress indicators.
|
|
139
|
+
|
|
140
|
+
```typescript
|
|
141
|
+
import { createSpinner, createStreamWriter } from "@outfitter/tui/streaming";
|
|
142
|
+
|
|
143
|
+
// Spinner for async operations
|
|
144
|
+
const spinner = createSpinner("Indexing files...");
|
|
145
|
+
spinner.start();
|
|
146
|
+
await indexFiles();
|
|
147
|
+
spinner.succeed("Indexed 847 files");
|
|
148
|
+
|
|
149
|
+
// Stream writer for custom in-place updates
|
|
150
|
+
const writer = createStreamWriter();
|
|
151
|
+
writer.write("Progress: 0%");
|
|
152
|
+
writer.update("Progress: 50%");
|
|
153
|
+
writer.update("Progress: 100%");
|
|
154
|
+
writer.persist();
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
## Prompts
|
|
158
|
+
|
|
159
|
+
Result-wrapped interactive prompts using Clack, with validators and group utilities.
|
|
160
|
+
|
|
161
|
+
```typescript
|
|
162
|
+
import {
|
|
163
|
+
promptText,
|
|
164
|
+
promptSelect,
|
|
165
|
+
promptConfirm,
|
|
166
|
+
promptGroup,
|
|
167
|
+
validators,
|
|
168
|
+
} from "@outfitter/tui/prompt";
|
|
169
|
+
|
|
170
|
+
// Single prompt
|
|
171
|
+
const name = await promptText({
|
|
172
|
+
message: "Project name:",
|
|
173
|
+
validate: validators.required(),
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
if (name.isOk()) {
|
|
177
|
+
console.log(`Creating ${name.value}...`);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// Grouped prompts for wizard-style flows
|
|
181
|
+
const config = await promptGroup({
|
|
182
|
+
name: () => promptText({ message: "Name:" }),
|
|
183
|
+
template: () => promptSelect({
|
|
184
|
+
message: "Template:",
|
|
185
|
+
options: [
|
|
186
|
+
{ value: "basic", label: "Basic" },
|
|
187
|
+
{ value: "full", label: "Full Stack" },
|
|
188
|
+
],
|
|
189
|
+
}),
|
|
190
|
+
debug: () => promptConfirm({ message: "Enable debug mode?" }),
|
|
191
|
+
});
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### Destructive Confirmation
|
|
195
|
+
|
|
196
|
+
For operations that delete or overwrite data, use `confirmDestructive` from `@outfitter/tui/confirm`:
|
|
197
|
+
|
|
198
|
+
```typescript
|
|
199
|
+
import { confirmDestructive } from "@outfitter/tui/confirm";
|
|
200
|
+
|
|
201
|
+
const result = await confirmDestructive({
|
|
202
|
+
message: "Delete 5 notes?",
|
|
203
|
+
bypassFlag: flags.yes,
|
|
204
|
+
itemCount: 5,
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
if (result.isErr()) {
|
|
208
|
+
console.error("Operation cancelled");
|
|
209
|
+
process.exit(0);
|
|
210
|
+
}
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
This respects `--yes` flags for non-interactive mode and returns an error in non-TTY environments.
|
|
214
|
+
|
|
215
|
+
## Presets
|
|
216
|
+
|
|
217
|
+
Presets bundle common imports to reduce boilerplate.
|
|
218
|
+
|
|
219
|
+
```typescript
|
|
220
|
+
// Standard: covers most use cases
|
|
221
|
+
import {
|
|
222
|
+
renderTable,
|
|
223
|
+
renderList,
|
|
224
|
+
renderBox,
|
|
225
|
+
createTheme,
|
|
226
|
+
} from "@outfitter/tui/preset/standard";
|
|
227
|
+
|
|
228
|
+
// Full: standard + tree + borders
|
|
229
|
+
import {
|
|
230
|
+
renderTable,
|
|
231
|
+
renderTree,
|
|
232
|
+
BORDERS,
|
|
233
|
+
getBorderCharacters,
|
|
234
|
+
} from "@outfitter/tui/preset/full";
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
## Relationship to @outfitter/cli
|
|
238
|
+
|
|
239
|
+
`@outfitter/tui` extracts visual rendering concerns from `@outfitter/cli`. The split:
|
|
240
|
+
|
|
241
|
+
| Package | Responsibility |
|
|
242
|
+
|---------|---------------|
|
|
243
|
+
| `@outfitter/cli` | Output modes, input parsing, pagination, terminal detection, colors, text utilities, command building |
|
|
244
|
+
| `@outfitter/tui` | Tables, lists, boxes, trees, borders, themes, spinners, streaming, prompts |
|
|
245
|
+
|
|
246
|
+
`@outfitter/cli` provides the foundation (colors, text, terminal). `@outfitter/tui` builds visual components on top.
|
|
247
|
+
|
|
248
|
+
## License
|
|
249
|
+
|
|
250
|
+
MIT
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import "../shared/@outfitter/tui-zymw0p74";
|
|
2
|
+
import { BORDERS, BorderCharacters, BorderStyle, LinePosition, drawHorizontalLine, getBorderCharacters } from "../shared/@outfitter/tui-1qh888th";
|
|
3
|
+
export { getBorderCharacters, drawHorizontalLine, LinePosition, BorderStyle, BorderCharacters, BORDERS };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import"../shared/@outfitter/tui-z6nf9b9h.js";
|
|
3
|
+
import {
|
|
4
|
+
BORDERS,
|
|
5
|
+
drawHorizontalLine,
|
|
6
|
+
getBorderCharacters
|
|
7
|
+
} from "../shared/@outfitter/tui-2pwhzg55.js";
|
|
8
|
+
import"../shared/@outfitter/tui-hescagw2.js";
|
|
9
|
+
export {
|
|
10
|
+
getBorderCharacters,
|
|
11
|
+
drawHorizontalLine,
|
|
12
|
+
BORDERS
|
|
13
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { CancelledError } from "@outfitter/contracts";
|
|
2
|
+
import { Result } from "better-result";
|
|
3
|
+
/**
|
|
4
|
+
* Options for confirmDestructive().
|
|
5
|
+
*/
|
|
6
|
+
interface ConfirmDestructiveOptions {
|
|
7
|
+
/** Message to display to the user */
|
|
8
|
+
readonly message: string;
|
|
9
|
+
/** Whether to bypass confirmation (e.g., --yes flag) */
|
|
10
|
+
readonly bypassFlag?: boolean;
|
|
11
|
+
/** Number of items affected (shown in confirmation) */
|
|
12
|
+
readonly itemCount?: number;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Prompt for confirmation before destructive operations.
|
|
16
|
+
*
|
|
17
|
+
* Respects --yes flag for non-interactive mode.
|
|
18
|
+
*
|
|
19
|
+
* @param options - Confirmation options
|
|
20
|
+
* @returns Whether the user confirmed
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```typescript
|
|
24
|
+
* const confirmed = await confirmDestructive({
|
|
25
|
+
* message: "Delete 5 notes?",
|
|
26
|
+
* bypassFlag: flags.yes,
|
|
27
|
+
* itemCount: 5,
|
|
28
|
+
* });
|
|
29
|
+
*
|
|
30
|
+
* if (confirmed.isErr()) {
|
|
31
|
+
* // User cancelled
|
|
32
|
+
* process.exit(0);
|
|
33
|
+
* }
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
declare function confirmDestructive(options: ConfirmDestructiveOptions): Promise<Result<boolean, InstanceType<typeof CancelledError>>>;
|
|
37
|
+
export { confirmDestructive, ConfirmDestructiveOptions };
|
package/dist/confirm.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
__require
|
|
4
|
+
} from "./shared/@outfitter/tui-hescagw2.js";
|
|
5
|
+
|
|
6
|
+
// packages/tui/src/confirm.ts
|
|
7
|
+
import { CancelledError } from "@outfitter/contracts";
|
|
8
|
+
import { Err, Ok } from "better-result";
|
|
9
|
+
async function confirmDestructive(options) {
|
|
10
|
+
const { message, bypassFlag = false, itemCount } = options;
|
|
11
|
+
if (bypassFlag) {
|
|
12
|
+
return new Ok(true);
|
|
13
|
+
}
|
|
14
|
+
const isTTY = process.stdout.isTTY;
|
|
15
|
+
const isDumbTerminal = process.env["TERM"] === "dumb";
|
|
16
|
+
if (!isTTY || isDumbTerminal) {
|
|
17
|
+
return new Err(new CancelledError({
|
|
18
|
+
message: "Cannot prompt for confirmation in non-interactive mode. Use --yes to bypass."
|
|
19
|
+
}));
|
|
20
|
+
}
|
|
21
|
+
let promptMessage = message;
|
|
22
|
+
if (itemCount !== undefined) {
|
|
23
|
+
promptMessage = `${message} (${itemCount} items)`;
|
|
24
|
+
}
|
|
25
|
+
const { confirm, isCancel } = await import("@clack/prompts");
|
|
26
|
+
const response = await confirm({ message: promptMessage });
|
|
27
|
+
if (isCancel(response) || response === false) {
|
|
28
|
+
return new Err(new CancelledError({
|
|
29
|
+
message: "Operation cancelled by user."
|
|
30
|
+
}));
|
|
31
|
+
}
|
|
32
|
+
return new Ok(true);
|
|
33
|
+
}
|
|
34
|
+
export {
|
|
35
|
+
confirmDestructive
|
|
36
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { DEFAULT_EXAMPLES, getExample } from "../shared/@outfitter/tui-83zaah9b";
|
|
2
|
+
import { SectionOptions, SubsectionOptions, codeBlock, demoContent, demoSection, demoSubsection, description } from "../shared/@outfitter/tui-ts1f957s";
|
|
3
|
+
import { BORDER_STYLE_META, LIST_STYLE_META, PRIMITIVE_META, SPINNER_STYLE_META, THEME_METHOD_META, getBorderStyles, getListStyles, getPrimitiveIds, getSpinnerStyles, getThemeMethodsByCategory } from "../shared/@outfitter/tui-1wggw2zj";
|
|
4
|
+
import { DemoConfig, DemoRegistryEntry, DemoRenderer, ExampleTexts, PrimitiveId, PrimitiveMeta, ThemeMethodCategory, ThemeMethodMeta, VariantMeta, isPrimitiveId } from "../shared/@outfitter/tui-xrgrp99k";
|
|
5
|
+
import "../shared/@outfitter/tui-jz5nws55";
|
|
6
|
+
import "../shared/@outfitter/tui-3kza6p9k";
|
|
7
|
+
import "../shared/@outfitter/tui-75bztyfp";
|
|
8
|
+
import "../shared/@outfitter/tui-c6ft5w6q";
|
|
9
|
+
import "../shared/@outfitter/tui-1qh888th";
|
|
10
|
+
/**
|
|
11
|
+
* Renders a demo for a specific primitive.
|
|
12
|
+
*
|
|
13
|
+
* @param id - The primitive to demo
|
|
14
|
+
* @param config - Optional configuration for customization
|
|
15
|
+
* @returns Formatted demo output string
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```typescript
|
|
19
|
+
* // Default examples
|
|
20
|
+
* console.log(renderDemo("colors"));
|
|
21
|
+
*
|
|
22
|
+
* // Custom examples
|
|
23
|
+
* console.log(renderDemo("colors", {
|
|
24
|
+
* examples: { success: "Build completed" }
|
|
25
|
+
* }));
|
|
26
|
+
*
|
|
27
|
+
* // No code examples
|
|
28
|
+
* console.log(renderDemo("table", { showCode: false }));
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
declare function renderDemo(id: PrimitiveId, config?: DemoConfig): string;
|
|
32
|
+
/**
|
|
33
|
+
* Renders demos for all primitives.
|
|
34
|
+
*
|
|
35
|
+
* @param config - Optional configuration applied to all demos
|
|
36
|
+
* @returns Combined output from all demos, separated by blank lines
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```typescript
|
|
40
|
+
* console.log(renderAllDemos());
|
|
41
|
+
*
|
|
42
|
+
* // With custom config
|
|
43
|
+
* console.log(renderAllDemos({
|
|
44
|
+
* showCode: false,
|
|
45
|
+
* showDescriptions: true,
|
|
46
|
+
* }));
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
declare function renderAllDemos(config?: DemoConfig): string;
|
|
50
|
+
/**
|
|
51
|
+
* Gets metadata for a specific primitive.
|
|
52
|
+
*
|
|
53
|
+
* @param id - The primitive ID
|
|
54
|
+
* @returns Primitive metadata including name, description, and import example
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```typescript
|
|
58
|
+
* const meta = getPrimitive("colors");
|
|
59
|
+
* console.log(meta.name); // "Colors"
|
|
60
|
+
* console.log(meta.importExample); // 'import { createTheme } from "@outfitter/tui/render";'
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
declare function getPrimitive(id: PrimitiveId): PrimitiveMeta;
|
|
64
|
+
/**
|
|
65
|
+
* Gets all primitives with their metadata.
|
|
66
|
+
*
|
|
67
|
+
* @returns Array of all primitive metadata
|
|
68
|
+
*/
|
|
69
|
+
declare function getAllPrimitives(): PrimitiveMeta[];
|
|
70
|
+
/**
|
|
71
|
+
* Gets a registry entry with both metadata and renderer.
|
|
72
|
+
*
|
|
73
|
+
* @param id - The primitive ID
|
|
74
|
+
* @returns Registry entry with meta and render function
|
|
75
|
+
*/
|
|
76
|
+
declare function getDemoEntry(id: PrimitiveId): DemoRegistryEntry;
|
|
77
|
+
export { renderDemo, renderAllDemos, isPrimitiveId, getThemeMethodsByCategory, getSpinnerStyles, getPrimitiveIds, getPrimitive, getListStyles, getExample, getDemoEntry, getBorderStyles, getAllPrimitives, description, demoSubsection, demoSection, demoContent, codeBlock, VariantMeta, ThemeMethodMeta, ThemeMethodCategory, THEME_METHOD_META, SubsectionOptions, SectionOptions, SPINNER_STYLE_META, PrimitiveMeta, PrimitiveId, PRIMITIVE_META, LIST_STYLE_META, ExampleTexts, DemoRenderer, DemoRegistryEntry, DemoConfig, DEFAULT_EXAMPLES, BORDER_STYLE_META };
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
renderBoxDemo
|
|
4
|
+
} from "../shared/@outfitter/tui-4yz7jcyq.js";
|
|
5
|
+
import {
|
|
6
|
+
renderTreeDemo
|
|
7
|
+
} from "../shared/@outfitter/tui-gcpz529w.js";
|
|
8
|
+
import {
|
|
9
|
+
renderSpinnerDemo
|
|
10
|
+
} from "../shared/@outfitter/tui-azh1w4ak.js";
|
|
11
|
+
import {
|
|
12
|
+
renderProgressDemo
|
|
13
|
+
} from "../shared/@outfitter/tui-997aapz0.js";
|
|
14
|
+
import {
|
|
15
|
+
renderTableDemo
|
|
16
|
+
} from "../shared/@outfitter/tui-1tk0kxa6.js";
|
|
17
|
+
import {
|
|
18
|
+
renderTextDemo
|
|
19
|
+
} from "../shared/@outfitter/tui-6svngg69.js";
|
|
20
|
+
import {
|
|
21
|
+
renderMarkdownDemo
|
|
22
|
+
} from "../shared/@outfitter/tui-k3mby2kk.js";
|
|
23
|
+
import {
|
|
24
|
+
renderIndicatorsDemo
|
|
25
|
+
} from "../shared/@outfitter/tui-9rj9yesd.js";
|
|
26
|
+
import {
|
|
27
|
+
renderBordersDemo
|
|
28
|
+
} from "../shared/@outfitter/tui-cq7za0cz.js";
|
|
29
|
+
import {
|
|
30
|
+
renderListDemo
|
|
31
|
+
} from "../shared/@outfitter/tui-j2kd7eej.js";
|
|
32
|
+
import {
|
|
33
|
+
isPrimitiveId
|
|
34
|
+
} from "../shared/@outfitter/tui-rbbcc034.js";
|
|
35
|
+
import {
|
|
36
|
+
renderColorsDemo
|
|
37
|
+
} from "../shared/@outfitter/tui-6605wa2j.js";
|
|
38
|
+
import {
|
|
39
|
+
DEFAULT_EXAMPLES,
|
|
40
|
+
getExample
|
|
41
|
+
} from "../shared/@outfitter/tui-nprd7g0d.js";
|
|
42
|
+
import {
|
|
43
|
+
codeBlock,
|
|
44
|
+
demoContent,
|
|
45
|
+
demoSection,
|
|
46
|
+
demoSubsection,
|
|
47
|
+
description
|
|
48
|
+
} from "../shared/@outfitter/tui-733asbd8.js";
|
|
49
|
+
import {
|
|
50
|
+
BORDER_STYLE_META,
|
|
51
|
+
LIST_STYLE_META,
|
|
52
|
+
PRIMITIVE_META,
|
|
53
|
+
SPINNER_STYLE_META,
|
|
54
|
+
THEME_METHOD_META,
|
|
55
|
+
getBorderStyles,
|
|
56
|
+
getListStyles,
|
|
57
|
+
getPrimitiveIds,
|
|
58
|
+
getPrimitiveMeta,
|
|
59
|
+
getSpinnerStyles,
|
|
60
|
+
getThemeMethodsByCategory
|
|
61
|
+
} from "../shared/@outfitter/tui-nr580mbv.js";
|
|
62
|
+
import"../shared/@outfitter/tui-kydbggmj.js";
|
|
63
|
+
import"../shared/@outfitter/tui-n9kxkdrh.js";
|
|
64
|
+
import"../shared/@outfitter/tui-06dntkse.js";
|
|
65
|
+
import"../shared/@outfitter/tui-t9vd88jr.js";
|
|
66
|
+
import"../shared/@outfitter/tui-5pb72vf9.js";
|
|
67
|
+
import"../shared/@outfitter/tui-qb07rtct.js";
|
|
68
|
+
import"../shared/@outfitter/tui-vt0wg6c4.js";
|
|
69
|
+
import"../shared/@outfitter/tui-5dsn6d6d.js";
|
|
70
|
+
import"../shared/@outfitter/tui-t1a9xgbd.js";
|
|
71
|
+
import"../shared/@outfitter/tui-pdwbbzwr.js";
|
|
72
|
+
import"../shared/@outfitter/tui-2pwhzg55.js";
|
|
73
|
+
import"../shared/@outfitter/tui-hescagw2.js";
|
|
74
|
+
|
|
75
|
+
// packages/tui/src/demo/index.ts
|
|
76
|
+
import { createTheme } from "@outfitter/cli/colors";
|
|
77
|
+
var DEMO_RENDERERS = {
|
|
78
|
+
colors: renderColorsDemo,
|
|
79
|
+
borders: renderBordersDemo,
|
|
80
|
+
spinner: renderSpinnerDemo,
|
|
81
|
+
list: renderListDemo,
|
|
82
|
+
box: renderBoxDemo,
|
|
83
|
+
table: renderTableDemo,
|
|
84
|
+
progress: renderProgressDemo,
|
|
85
|
+
tree: renderTreeDemo,
|
|
86
|
+
text: renderTextDemo,
|
|
87
|
+
markdown: renderMarkdownDemo,
|
|
88
|
+
indicators: renderIndicatorsDemo
|
|
89
|
+
};
|
|
90
|
+
function renderDemo(id, config = {}) {
|
|
91
|
+
const renderer = DEMO_RENDERERS[id];
|
|
92
|
+
const theme = createTheme();
|
|
93
|
+
return renderer(config, theme);
|
|
94
|
+
}
|
|
95
|
+
function renderAllDemos(config = {}) {
|
|
96
|
+
const theme = createTheme();
|
|
97
|
+
const outputs = [];
|
|
98
|
+
for (const id of getPrimitiveIds()) {
|
|
99
|
+
const renderer = DEMO_RENDERERS[id];
|
|
100
|
+
outputs.push(renderer(config, theme));
|
|
101
|
+
outputs.push("");
|
|
102
|
+
}
|
|
103
|
+
return outputs.join(`
|
|
104
|
+
`).trimEnd();
|
|
105
|
+
}
|
|
106
|
+
function getPrimitive(id) {
|
|
107
|
+
return getPrimitiveMeta(id);
|
|
108
|
+
}
|
|
109
|
+
function getAllPrimitives() {
|
|
110
|
+
return getPrimitiveIds().map((id) => PRIMITIVE_META[id]);
|
|
111
|
+
}
|
|
112
|
+
function getDemoEntry(id) {
|
|
113
|
+
return {
|
|
114
|
+
meta: getPrimitiveMeta(id),
|
|
115
|
+
render: DEMO_RENDERERS[id]
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
export {
|
|
119
|
+
renderDemo,
|
|
120
|
+
renderAllDemos,
|
|
121
|
+
isPrimitiveId,
|
|
122
|
+
getThemeMethodsByCategory,
|
|
123
|
+
getSpinnerStyles,
|
|
124
|
+
getPrimitiveIds,
|
|
125
|
+
getPrimitive,
|
|
126
|
+
getListStyles,
|
|
127
|
+
getExample,
|
|
128
|
+
getDemoEntry,
|
|
129
|
+
getBorderStyles,
|
|
130
|
+
getAllPrimitives,
|
|
131
|
+
description,
|
|
132
|
+
demoSubsection,
|
|
133
|
+
demoSection,
|
|
134
|
+
demoContent,
|
|
135
|
+
codeBlock,
|
|
136
|
+
THEME_METHOD_META,
|
|
137
|
+
SPINNER_STYLE_META,
|
|
138
|
+
PRIMITIVE_META,
|
|
139
|
+
LIST_STYLE_META,
|
|
140
|
+
DEFAULT_EXAMPLES,
|
|
141
|
+
BORDER_STYLE_META
|
|
142
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BORDER_STYLE_META, LIST_STYLE_META, PRIMITIVE_META, SPINNER_STYLE_META, THEME_METHOD_META, getBorderStyles, getListStyles, getPrimitiveIds, getPrimitiveMeta, getSpinnerStyles, getThemeMethodsByCategory } from "../shared/@outfitter/tui-1wggw2zj";
|
|
2
|
+
import "../shared/@outfitter/tui-xrgrp99k";
|
|
3
|
+
import "../shared/@outfitter/tui-3kza6p9k";
|
|
4
|
+
import "../shared/@outfitter/tui-c6ft5w6q";
|
|
5
|
+
import "../shared/@outfitter/tui-1qh888th";
|
|
6
|
+
export { getThemeMethodsByCategory, getSpinnerStyles, getPrimitiveMeta, getPrimitiveIds, getListStyles, getBorderStyles, THEME_METHOD_META, SPINNER_STYLE_META, PRIMITIVE_META, LIST_STYLE_META, BORDER_STYLE_META };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
BORDER_STYLE_META,
|
|
4
|
+
LIST_STYLE_META,
|
|
5
|
+
PRIMITIVE_META,
|
|
6
|
+
SPINNER_STYLE_META,
|
|
7
|
+
THEME_METHOD_META,
|
|
8
|
+
getBorderStyles,
|
|
9
|
+
getListStyles,
|
|
10
|
+
getPrimitiveIds,
|
|
11
|
+
getPrimitiveMeta,
|
|
12
|
+
getSpinnerStyles,
|
|
13
|
+
getThemeMethodsByCategory
|
|
14
|
+
} from "../shared/@outfitter/tui-nr580mbv.js";
|
|
15
|
+
import"../shared/@outfitter/tui-hescagw2.js";
|
|
16
|
+
export {
|
|
17
|
+
getThemeMethodsByCategory,
|
|
18
|
+
getSpinnerStyles,
|
|
19
|
+
getPrimitiveMeta,
|
|
20
|
+
getPrimitiveIds,
|
|
21
|
+
getListStyles,
|
|
22
|
+
getBorderStyles,
|
|
23
|
+
THEME_METHOD_META,
|
|
24
|
+
SPINNER_STYLE_META,
|
|
25
|
+
PRIMITIVE_META,
|
|
26
|
+
LIST_STYLE_META,
|
|
27
|
+
BORDER_STYLE_META
|
|
28
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DemoConfig } from "../../shared/@outfitter/tui-xrgrp99k";
|
|
2
|
+
import { Theme } from "@outfitter/cli/colors";
|
|
3
|
+
/**
|
|
4
|
+
* Renders the borders demo section.
|
|
5
|
+
*/
|
|
6
|
+
declare function renderBordersDemo(config: DemoConfig, theme: Theme): string;
|
|
7
|
+
export { renderBordersDemo };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
renderBordersDemo
|
|
4
|
+
} from "../../shared/@outfitter/tui-cq7za0cz.js";
|
|
5
|
+
import"../../shared/@outfitter/tui-733asbd8.js";
|
|
6
|
+
import"../../shared/@outfitter/tui-nr580mbv.js";
|
|
7
|
+
import"../../shared/@outfitter/tui-n9kxkdrh.js";
|
|
8
|
+
import"../../shared/@outfitter/tui-06dntkse.js";
|
|
9
|
+
import"../../shared/@outfitter/tui-t9vd88jr.js";
|
|
10
|
+
import"../../shared/@outfitter/tui-2pwhzg55.js";
|
|
11
|
+
import"../../shared/@outfitter/tui-hescagw2.js";
|
|
12
|
+
export {
|
|
13
|
+
renderBordersDemo
|
|
14
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
renderBoxDemo
|
|
4
|
+
} from "../../shared/@outfitter/tui-4yz7jcyq.js";
|
|
5
|
+
import"../../shared/@outfitter/tui-nprd7g0d.js";
|
|
6
|
+
import"../../shared/@outfitter/tui-733asbd8.js";
|
|
7
|
+
import"../../shared/@outfitter/tui-nr580mbv.js";
|
|
8
|
+
import"../../shared/@outfitter/tui-n9kxkdrh.js";
|
|
9
|
+
import"../../shared/@outfitter/tui-06dntkse.js";
|
|
10
|
+
import"../../shared/@outfitter/tui-t9vd88jr.js";
|
|
11
|
+
import"../../shared/@outfitter/tui-2pwhzg55.js";
|
|
12
|
+
import"../../shared/@outfitter/tui-hescagw2.js";
|
|
13
|
+
export {
|
|
14
|
+
renderBoxDemo
|
|
15
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DemoConfig } from "../../shared/@outfitter/tui-xrgrp99k";
|
|
2
|
+
import { Theme } from "@outfitter/cli/colors";
|
|
3
|
+
/**
|
|
4
|
+
* Renders the colors demo section.
|
|
5
|
+
*/
|
|
6
|
+
declare function renderColorsDemo(config: DemoConfig, theme: Theme): string;
|
|
7
|
+
export { renderColorsDemo };
|