@dex-ai/vue-tui 0.1.10
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/package.json +51 -0
- package/src/app.ts +385 -0
- package/src/components/TuiCheckbox.ts +35 -0
- package/src/components/TuiField.ts +123 -0
- package/src/components/TuiSelect.ts +86 -0
- package/src/components/index.ts +7 -0
- package/src/composables/index.ts +19 -0
- package/src/composables/useFocusList.ts +101 -0
- package/src/composables/useForm.ts +335 -0
- package/src/composables/useSelectList.ts +199 -0
- package/src/env.d.ts +6 -0
- package/src/index.ts +131 -0
- package/src/input.ts +603 -0
- package/src/nodes.ts +153 -0
- package/src/panel.ts +51 -0
- package/src/plugin.ts +148 -0
- package/src/register.ts +4 -0
- package/src/render.ts +632 -0
- package/src/renderer.ts +120 -0
- package/src/style.ts +107 -0
- package/src/template.ts +326 -0
- package/src/text-buffer.ts +609 -0
- package/src/theme.ts +44 -0
- package/src/types/form.ts +90 -0
- package/src/widget-renderer.ts +237 -0
- package/src/widget.ts +326 -0
package/src/index.ts
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
// ---------------------------------------------------------------------------
|
|
2
|
+
// @dex-ai/vue-tui — Public barrel
|
|
3
|
+
// ---------------------------------------------------------------------------
|
|
4
|
+
|
|
5
|
+
// SFC Plugin — auto-registers on first import of this package
|
|
6
|
+
import { tuiVuePlugin } from "./plugin";
|
|
7
|
+
if (typeof globalThis.Bun !== "undefined") {
|
|
8
|
+
Bun.plugin(tuiVuePlugin);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
// Style system
|
|
12
|
+
export type { TerminalStyle, Theme } from "./style";
|
|
13
|
+
export { resolveTextStyle, resolveColor } from "./style";
|
|
14
|
+
|
|
15
|
+
// Default theme
|
|
16
|
+
export { defaultTheme } from "./theme";
|
|
17
|
+
|
|
18
|
+
// Node tree
|
|
19
|
+
export type { TNode, TElement, TText } from "./nodes";
|
|
20
|
+
|
|
21
|
+
// Renderer (not exported as a public API function — internal, but TElement is)
|
|
22
|
+
// App lifecycle
|
|
23
|
+
export type {
|
|
24
|
+
TerminalApp,
|
|
25
|
+
TerminalAppOptions,
|
|
26
|
+
KeyMap,
|
|
27
|
+
KeyBinding,
|
|
28
|
+
ActionHandler,
|
|
29
|
+
} from "./app";
|
|
30
|
+
export { createTerminalApp } from "./app";
|
|
31
|
+
|
|
32
|
+
// Render engine
|
|
33
|
+
export { renderToLines } from "./render";
|
|
34
|
+
|
|
35
|
+
// Input handling
|
|
36
|
+
export type {
|
|
37
|
+
KeyEvent,
|
|
38
|
+
KeyHandler,
|
|
39
|
+
RawInputHandle,
|
|
40
|
+
ClipboardContent,
|
|
41
|
+
} from "./input";
|
|
42
|
+
export { createRawInput, parseKey, readClipboard } from "./input";
|
|
43
|
+
|
|
44
|
+
// Text buffer
|
|
45
|
+
export type {
|
|
46
|
+
TextBuffer,
|
|
47
|
+
TextBufferOptions,
|
|
48
|
+
BufferAction,
|
|
49
|
+
BufferKeyResult,
|
|
50
|
+
PasteEntry,
|
|
51
|
+
PasteSlot,
|
|
52
|
+
PasteToken,
|
|
53
|
+
ImageToken,
|
|
54
|
+
} from "./text-buffer";
|
|
55
|
+
export { createTextBuffer, isKeyHandled } from "./text-buffer";
|
|
56
|
+
|
|
57
|
+
// Template
|
|
58
|
+
export { html } from "./template";
|
|
59
|
+
|
|
60
|
+
// SFC Plugin (for manual registration if needed)
|
|
61
|
+
export { tuiVuePlugin } from "./plugin";
|
|
62
|
+
|
|
63
|
+
// ---------------------------------------------------------------------------
|
|
64
|
+
// Interactive form composables
|
|
65
|
+
// ---------------------------------------------------------------------------
|
|
66
|
+
export type {
|
|
67
|
+
FormField,
|
|
68
|
+
FormState,
|
|
69
|
+
FormActions,
|
|
70
|
+
FormResult,
|
|
71
|
+
} from "./types/form";
|
|
72
|
+
|
|
73
|
+
export { useForm } from "./composables/useForm";
|
|
74
|
+
export type { UseFormOptions, UseFormReturn } from "./composables/useForm";
|
|
75
|
+
|
|
76
|
+
export { useFocusList } from "./composables/useFocusList";
|
|
77
|
+
export type {
|
|
78
|
+
UseFocusListOptions,
|
|
79
|
+
FocusListState,
|
|
80
|
+
} from "./composables/useFocusList";
|
|
81
|
+
|
|
82
|
+
export { useSelectList } from "./composables/useSelectList";
|
|
83
|
+
export type {
|
|
84
|
+
UseSelectListOptions,
|
|
85
|
+
SelectListState,
|
|
86
|
+
} from "./composables/useSelectList";
|
|
87
|
+
|
|
88
|
+
// ---------------------------------------------------------------------------
|
|
89
|
+
// Interactive form components
|
|
90
|
+
// ---------------------------------------------------------------------------
|
|
91
|
+
export { TuiField } from "./components/TuiField";
|
|
92
|
+
export { TuiSelect } from "./components/TuiSelect";
|
|
93
|
+
export { TuiCheckbox } from "./components/TuiCheckbox";
|
|
94
|
+
|
|
95
|
+
// ---------------------------------------------------------------------------
|
|
96
|
+
// Widget system — declarative UI description for panels
|
|
97
|
+
// ---------------------------------------------------------------------------
|
|
98
|
+
export type {
|
|
99
|
+
WidgetStyle,
|
|
100
|
+
WidgetNode,
|
|
101
|
+
WText,
|
|
102
|
+
WRow,
|
|
103
|
+
WStack,
|
|
104
|
+
WLine,
|
|
105
|
+
WSpacer,
|
|
106
|
+
WDivider,
|
|
107
|
+
WProgress,
|
|
108
|
+
WKeyValue,
|
|
109
|
+
WList,
|
|
110
|
+
WTable,
|
|
111
|
+
WWhen,
|
|
112
|
+
WSelectItem,
|
|
113
|
+
WSelectList,
|
|
114
|
+
WInput,
|
|
115
|
+
} from "./widget";
|
|
116
|
+
export { W } from "./widget";
|
|
117
|
+
export { WidgetRenderer } from "./widget-renderer";
|
|
118
|
+
export type { PanelContext, DynamicPanel } from "./panel";
|
|
119
|
+
|
|
120
|
+
// ---------------------------------------------------------------------------
|
|
121
|
+
// Vue convenience re-exports — so consumers don't need to import vue directly
|
|
122
|
+
// ---------------------------------------------------------------------------
|
|
123
|
+
export {
|
|
124
|
+
defineComponent,
|
|
125
|
+
h,
|
|
126
|
+
ref,
|
|
127
|
+
computed,
|
|
128
|
+
watch,
|
|
129
|
+
onMounted,
|
|
130
|
+
onUnmounted,
|
|
131
|
+
} from "@vue/runtime-core";
|