cli-menu-kit 0.1.2 → 0.1.9
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/dist/components/display/header.d.ts +30 -0
- package/dist/components/display/header.js +56 -0
- package/dist/components/display/index.d.ts +1 -0
- package/dist/components/display/index.js +3 -1
- package/dist/components/menus/checkbox-menu.js +24 -5
- package/dist/components/menus/radio-menu.js +37 -8
- package/dist/core/renderer.js +23 -3
- package/dist/i18n/languages/en.js +3 -2
- package/dist/i18n/languages/zh.js +3 -2
- package/dist/i18n/types.d.ts +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -2
- package/package.json +1 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Header component for CLI applications
|
|
3
|
+
* Displays ASCII art, title, description, version and URL
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Header configuration
|
|
7
|
+
*/
|
|
8
|
+
export interface HeaderConfig {
|
|
9
|
+
/** ASCII art lines (array of strings) */
|
|
10
|
+
asciiArt?: string[];
|
|
11
|
+
/** Application title */
|
|
12
|
+
title?: string;
|
|
13
|
+
/** Application description */
|
|
14
|
+
description?: string;
|
|
15
|
+
/** Version number */
|
|
16
|
+
version?: string;
|
|
17
|
+
/** Project URL */
|
|
18
|
+
url?: string;
|
|
19
|
+
/** Optional menu title (e.g., "请选择功能:") */
|
|
20
|
+
menuTitle?: string;
|
|
21
|
+
/** Box width (default: 60) */
|
|
22
|
+
boxWidth?: number;
|
|
23
|
+
/** Header color (default: cyan) */
|
|
24
|
+
color?: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Render a boxed header with ASCII art, title, and description
|
|
28
|
+
* @param config - Header configuration
|
|
29
|
+
*/
|
|
30
|
+
export declare function renderHeader(config: HeaderConfig): void;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Header component for CLI applications
|
|
4
|
+
* Displays ASCII art, title, description, version and URL
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.renderHeader = renderHeader;
|
|
8
|
+
const colors_js_1 = require("../../core/colors.js");
|
|
9
|
+
const terminal_js_1 = require("../../core/terminal.js");
|
|
10
|
+
/**
|
|
11
|
+
* Render a boxed header with ASCII art, title, and description
|
|
12
|
+
* @param config - Header configuration
|
|
13
|
+
*/
|
|
14
|
+
function renderHeader(config) {
|
|
15
|
+
const { asciiArt = [], title = '', description = '', version, url, menuTitle, boxWidth = 60, color = colors_js_1.colors.cyan } = config;
|
|
16
|
+
const boldColor = `${color}${colors_js_1.colors.bold}`;
|
|
17
|
+
// Top border
|
|
18
|
+
(0, terminal_js_1.writeLine)('');
|
|
19
|
+
(0, terminal_js_1.writeLine)(`${boldColor}╔${'═'.repeat(boxWidth - 2)}╗${colors_js_1.colors.reset}`);
|
|
20
|
+
// Empty line
|
|
21
|
+
(0, terminal_js_1.writeLine)(`${boldColor}║${' '.repeat(boxWidth - 2)}║${colors_js_1.colors.reset}`);
|
|
22
|
+
// ASCII art (left-aligned with 2 spaces padding)
|
|
23
|
+
if (asciiArt.length > 0) {
|
|
24
|
+
asciiArt.forEach(line => {
|
|
25
|
+
const paddedLine = ` ${line}`.padEnd(boxWidth - 2, ' ');
|
|
26
|
+
(0, terminal_js_1.writeLine)(`${boldColor}║${paddedLine}║${colors_js_1.colors.reset}`);
|
|
27
|
+
});
|
|
28
|
+
(0, terminal_js_1.writeLine)(`${boldColor}║${' '.repeat(boxWidth - 2)}║${colors_js_1.colors.reset}`);
|
|
29
|
+
}
|
|
30
|
+
// Title (left-aligned with 2 spaces padding)
|
|
31
|
+
if (title) {
|
|
32
|
+
const paddedTitle = ` ${title}`.padEnd(boxWidth - 2, ' ');
|
|
33
|
+
(0, terminal_js_1.writeLine)(`${boldColor}║${paddedTitle}║${colors_js_1.colors.reset}`);
|
|
34
|
+
(0, terminal_js_1.writeLine)(`${boldColor}║${' '.repeat(boxWidth - 2)}║${colors_js_1.colors.reset}`);
|
|
35
|
+
}
|
|
36
|
+
// Description (left-aligned with 2 spaces padding)
|
|
37
|
+
if (description) {
|
|
38
|
+
const paddedDesc = ` ${description}`.padEnd(boxWidth - 2, ' ');
|
|
39
|
+
(0, terminal_js_1.writeLine)(`${boldColor}║${paddedDesc}║${colors_js_1.colors.reset}`);
|
|
40
|
+
(0, terminal_js_1.writeLine)(`${boldColor}║${' '.repeat(boxWidth - 2)}║${colors_js_1.colors.reset}`);
|
|
41
|
+
}
|
|
42
|
+
// Bottom border
|
|
43
|
+
(0, terminal_js_1.writeLine)(`${boldColor}╚${'═'.repeat(boxWidth - 2)}╝${colors_js_1.colors.reset}`);
|
|
44
|
+
// Version and URL (outside the box, dimmed)
|
|
45
|
+
if (version || url) {
|
|
46
|
+
const versionText = version ? `Version: ${version}` : '';
|
|
47
|
+
const urlText = url || '';
|
|
48
|
+
const separator = version && url ? ' | ' : '';
|
|
49
|
+
(0, terminal_js_1.writeLine)(`${colors_js_1.colors.dim} ${versionText}${separator}${urlText}${colors_js_1.colors.reset}`);
|
|
50
|
+
}
|
|
51
|
+
(0, terminal_js_1.writeLine)('');
|
|
52
|
+
// Menu title (optional)
|
|
53
|
+
if (menuTitle) {
|
|
54
|
+
(0, terminal_js_1.writeLine)(`${color} ${menuTitle}${colors_js_1.colors.reset}`);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -6,3 +6,4 @@ export { renderSimpleHeader, renderAsciiHeader, createSimpleHeader, createAsciiH
|
|
|
6
6
|
export { renderProgressIndicator, renderStageHeader, renderStageSeparator, createProgressIndicator, createStageHeader, createStageSeparator } from './progress.js';
|
|
7
7
|
export { renderMessage, showSuccess, showError, showWarning, showInfo, showQuestion, createMessage } from './messages.js';
|
|
8
8
|
export { renderSummaryTable, createSummaryTable, createSimpleSummary } from './summary.js';
|
|
9
|
+
export { renderHeader, type HeaderConfig } from './header.js';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Exports all display component functions
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.createSimpleSummary = exports.createSummaryTable = exports.renderSummaryTable = exports.createMessage = exports.showQuestion = exports.showInfo = exports.showWarning = exports.showError = exports.showSuccess = exports.renderMessage = exports.createStageSeparator = exports.createStageHeader = exports.createProgressIndicator = exports.renderStageSeparator = exports.renderStageHeader = exports.renderProgressIndicator = exports.createAsciiHeader = exports.createSimpleHeader = exports.renderAsciiHeader = exports.renderSimpleHeader = void 0;
|
|
7
|
+
exports.renderHeader = exports.createSimpleSummary = exports.createSummaryTable = exports.renderSummaryTable = exports.createMessage = exports.showQuestion = exports.showInfo = exports.showWarning = exports.showError = exports.showSuccess = exports.renderMessage = exports.createStageSeparator = exports.createStageHeader = exports.createProgressIndicator = exports.renderStageSeparator = exports.renderStageHeader = exports.renderProgressIndicator = exports.createAsciiHeader = exports.createSimpleHeader = exports.renderAsciiHeader = exports.renderSimpleHeader = void 0;
|
|
8
8
|
var headers_js_1 = require("./headers.js");
|
|
9
9
|
Object.defineProperty(exports, "renderSimpleHeader", { enumerable: true, get: function () { return headers_js_1.renderSimpleHeader; } });
|
|
10
10
|
Object.defineProperty(exports, "renderAsciiHeader", { enumerable: true, get: function () { return headers_js_1.renderAsciiHeader; } });
|
|
@@ -29,3 +29,5 @@ var summary_js_1 = require("./summary.js");
|
|
|
29
29
|
Object.defineProperty(exports, "renderSummaryTable", { enumerable: true, get: function () { return summary_js_1.renderSummaryTable; } });
|
|
30
30
|
Object.defineProperty(exports, "createSummaryTable", { enumerable: true, get: function () { return summary_js_1.createSummaryTable; } });
|
|
31
31
|
Object.defineProperty(exports, "createSimpleSummary", { enumerable: true, get: function () { return summary_js_1.createSimpleSummary; } });
|
|
32
|
+
var header_js_1 = require("./header.js");
|
|
33
|
+
Object.defineProperty(exports, "renderHeader", { enumerable: true, get: function () { return header_js_1.renderHeader; } });
|
|
@@ -9,13 +9,32 @@ const layout_types_js_1 = require("../../types/layout.types.js");
|
|
|
9
9
|
const terminal_js_1 = require("../../core/terminal.js");
|
|
10
10
|
const keyboard_js_1 = require("../../core/keyboard.js");
|
|
11
11
|
const renderer_js_1 = require("../../core/renderer.js");
|
|
12
|
+
const registry_js_1 = require("../../i18n/registry.js");
|
|
13
|
+
/**
|
|
14
|
+
* Generate hints based on menu configuration
|
|
15
|
+
*/
|
|
16
|
+
function generateHints(allowSelectAll, allowInvert) {
|
|
17
|
+
const hints = [(0, registry_js_1.t)('hints.arrows'), (0, registry_js_1.t)('hints.space')];
|
|
18
|
+
if (allowSelectAll) {
|
|
19
|
+
hints.push((0, registry_js_1.t)('hints.selectAll'));
|
|
20
|
+
}
|
|
21
|
+
if (allowInvert) {
|
|
22
|
+
hints.push((0, registry_js_1.t)('hints.invert'));
|
|
23
|
+
}
|
|
24
|
+
hints.push((0, registry_js_1.t)('hints.enter'));
|
|
25
|
+
return hints;
|
|
26
|
+
}
|
|
12
27
|
/**
|
|
13
28
|
* Show a checkbox menu (multi-select)
|
|
14
29
|
* @param config - Menu configuration
|
|
15
30
|
* @returns Promise resolving to selected options
|
|
16
31
|
*/
|
|
17
32
|
async function showCheckboxMenu(config) {
|
|
18
|
-
const { options, title, prompt
|
|
33
|
+
const { options, title, prompt, hints, layout = { ...layout_types_js_1.LAYOUT_PRESETS.SUB_MENU, order: ['input', 'options', 'hints'] }, defaultSelected = [], minSelections = 0, maxSelections, allowSelectAll = true, allowInvert = true, onExit } = config;
|
|
34
|
+
// Use i18n for default prompt if not provided
|
|
35
|
+
const displayPrompt = prompt || (0, registry_js_1.t)('menus.multiSelectPrompt');
|
|
36
|
+
// Generate hints dynamically if not provided
|
|
37
|
+
const displayHints = hints || generateHints(allowSelectAll, allowInvert);
|
|
19
38
|
// Validate options
|
|
20
39
|
if (!options || options.length === 0) {
|
|
21
40
|
throw new Error('CheckboxMenu requires at least one option');
|
|
@@ -82,8 +101,8 @@ async function showCheckboxMenu(config) {
|
|
|
82
101
|
case 'input':
|
|
83
102
|
if (layout.visible.input) {
|
|
84
103
|
const selectedCount = selected.size;
|
|
85
|
-
const displayValue = `${selectedCount}
|
|
86
|
-
(0, renderer_js_1.renderInputPrompt)(
|
|
104
|
+
const displayValue = `${selectedCount} ${(0, registry_js_1.t)('menus.selectedCount')}`;
|
|
105
|
+
(0, renderer_js_1.renderInputPrompt)(displayPrompt, displayValue);
|
|
87
106
|
lineCount++;
|
|
88
107
|
}
|
|
89
108
|
break;
|
|
@@ -100,8 +119,8 @@ async function showCheckboxMenu(config) {
|
|
|
100
119
|
});
|
|
101
120
|
break;
|
|
102
121
|
case 'hints':
|
|
103
|
-
if (layout.visible.hints &&
|
|
104
|
-
(0, renderer_js_1.renderHints)(
|
|
122
|
+
if (layout.visible.hints && displayHints.length > 0) {
|
|
123
|
+
(0, renderer_js_1.renderHints)(displayHints);
|
|
105
124
|
lineCount++;
|
|
106
125
|
}
|
|
107
126
|
break;
|
|
@@ -10,13 +10,32 @@ const terminal_js_1 = require("../../core/terminal.js");
|
|
|
10
10
|
const keyboard_js_1 = require("../../core/keyboard.js");
|
|
11
11
|
const renderer_js_1 = require("../../core/renderer.js");
|
|
12
12
|
const colors_js_1 = require("../../core/colors.js");
|
|
13
|
+
const registry_js_1 = require("../../i18n/registry.js");
|
|
14
|
+
/**
|
|
15
|
+
* Generate hints based on menu configuration
|
|
16
|
+
*/
|
|
17
|
+
function generateHints(allowNumberKeys, allowLetterKeys) {
|
|
18
|
+
const hints = [(0, registry_js_1.t)('hints.arrows')];
|
|
19
|
+
if (allowNumberKeys) {
|
|
20
|
+
hints.push((0, registry_js_1.t)('hints.numbers'));
|
|
21
|
+
}
|
|
22
|
+
if (allowLetterKeys) {
|
|
23
|
+
hints.push((0, registry_js_1.t)('hints.letters'));
|
|
24
|
+
}
|
|
25
|
+
hints.push((0, registry_js_1.t)('hints.enter'));
|
|
26
|
+
return hints;
|
|
27
|
+
}
|
|
13
28
|
/**
|
|
14
29
|
* Show a radio menu (single-select)
|
|
15
30
|
* @param config - Menu configuration
|
|
16
31
|
* @returns Promise resolving to selected option
|
|
17
32
|
*/
|
|
18
33
|
async function showRadioMenu(config) {
|
|
19
|
-
const { options, title, prompt
|
|
34
|
+
const { options, title, prompt, hints, layout = layout_types_js_1.LAYOUT_PRESETS.MAIN_MENU, defaultIndex = 0, allowNumberKeys = true, allowLetterKeys = false, onExit } = config;
|
|
35
|
+
// Use i18n for default prompt if not provided
|
|
36
|
+
const displayPrompt = prompt || (0, registry_js_1.t)('menus.selectPrompt');
|
|
37
|
+
// Generate hints dynamically if not provided
|
|
38
|
+
const displayHints = hints || generateHints(allowNumberKeys, allowLetterKeys);
|
|
20
39
|
// Validate options
|
|
21
40
|
if (!options || options.length === 0) {
|
|
22
41
|
throw new Error('RadioMenu requires at least one option');
|
|
@@ -92,11 +111,21 @@ async function showRadioMenu(config) {
|
|
|
92
111
|
(0, renderer_js_1.renderSectionLabel)(item.label);
|
|
93
112
|
}
|
|
94
113
|
else {
|
|
95
|
-
//
|
|
96
|
-
const
|
|
97
|
-
const
|
|
114
|
+
// Check if option starts with a number or letter prefix
|
|
115
|
+
const numberMatch = item.value.match(/^(\d+)\.\s*/);
|
|
116
|
+
const letterMatch = item.value.match(/^([a-zA-Z])\.\s*/);
|
|
117
|
+
// Don't add prefix if option already has number or letter prefix
|
|
118
|
+
const prefix = (numberMatch || letterMatch) ? '' : `${selectableIndices.indexOf(index) + 1}. `;
|
|
119
|
+
// Check if this is an Exit option (contains "Exit" or "Quit")
|
|
120
|
+
const isExitOption = /\b(exit|quit)\b/i.test(item.value);
|
|
121
|
+
const displayValue = isExitOption ? `${colors_js_1.colors.red}${item.value}${colors_js_1.colors.reset}` : item.value;
|
|
98
122
|
// For radio menus, don't show selection indicator (pass undefined instead of false)
|
|
99
|
-
(0, renderer_js_1.renderOption)(
|
|
123
|
+
(0, renderer_js_1.renderOption)(displayValue, undefined, index === selectedIndex, prefix);
|
|
124
|
+
// Add blank line after last item before next separator
|
|
125
|
+
const nextIndex = index + 1;
|
|
126
|
+
if (nextIndex < optionData.length && optionData[nextIndex].isSeparator) {
|
|
127
|
+
(0, terminal_js_1.writeLine)('');
|
|
128
|
+
}
|
|
100
129
|
}
|
|
101
130
|
lineCount++;
|
|
102
131
|
});
|
|
@@ -115,13 +144,13 @@ async function showRadioMenu(config) {
|
|
|
115
144
|
displayValue = String(selectableIndices.indexOf(selectedIndex) + 1);
|
|
116
145
|
}
|
|
117
146
|
}
|
|
118
|
-
(0, renderer_js_1.renderInputPrompt)(
|
|
147
|
+
(0, renderer_js_1.renderInputPrompt)(displayPrompt, displayValue);
|
|
119
148
|
lineCount++;
|
|
120
149
|
}
|
|
121
150
|
break;
|
|
122
151
|
case 'hints':
|
|
123
|
-
if (layout.visible.hints &&
|
|
124
|
-
(0, renderer_js_1.renderHints)(
|
|
152
|
+
if (layout.visible.hints && displayHints.length > 0) {
|
|
153
|
+
(0, renderer_js_1.renderHints)(displayHints);
|
|
125
154
|
lineCount++;
|
|
126
155
|
}
|
|
127
156
|
break;
|
package/dist/core/renderer.js
CHANGED
|
@@ -80,7 +80,7 @@ function renderOption(text, isSelected, isHighlighted, prefix) {
|
|
|
80
80
|
* @param showCursor - Whether to show cursor
|
|
81
81
|
*/
|
|
82
82
|
function renderInputPrompt(prompt, value, showCursor = false) {
|
|
83
|
-
let line = ` ${
|
|
83
|
+
let line = ` ${prompt} `;
|
|
84
84
|
if (value) {
|
|
85
85
|
line += `${colors_js_1.colors.cyan}${value}${colors_js_1.colors.reset}`;
|
|
86
86
|
}
|
|
@@ -96,7 +96,19 @@ function renderInputPrompt(prompt, value, showCursor = false) {
|
|
|
96
96
|
function renderHints(hints) {
|
|
97
97
|
if (hints.length === 0)
|
|
98
98
|
return;
|
|
99
|
-
|
|
99
|
+
// Format each hint: symbols/numbers in black, text in gray
|
|
100
|
+
const formattedHints = hints.map(hint => {
|
|
101
|
+
const parts = hint.split(' ');
|
|
102
|
+
if (parts.length >= 2) {
|
|
103
|
+
// First part (symbols/numbers) in normal color, rest in dim
|
|
104
|
+
const symbols = parts[0];
|
|
105
|
+
const text = parts.slice(1).join(' ');
|
|
106
|
+
return `${symbols} ${colors_js_1.colors.dim}${text}${colors_js_1.colors.reset}`;
|
|
107
|
+
}
|
|
108
|
+
// If no space, keep entire hint in dim
|
|
109
|
+
return `${colors_js_1.colors.dim}${hint}${colors_js_1.colors.reset}`;
|
|
110
|
+
});
|
|
111
|
+
const hintLine = ` ${formattedHints.join(' • ')}`;
|
|
100
112
|
(0, terminal_js_1.writeLine)(hintLine);
|
|
101
113
|
}
|
|
102
114
|
/**
|
|
@@ -115,7 +127,15 @@ function renderSeparator(char = '─', width) {
|
|
|
115
127
|
*/
|
|
116
128
|
function renderSectionLabel(label) {
|
|
117
129
|
if (label) {
|
|
118
|
-
|
|
130
|
+
const totalWidth = 50; // Fixed total width for consistency
|
|
131
|
+
const padding = 2; // Spaces around label
|
|
132
|
+
const labelWithPadding = ` ${label} `;
|
|
133
|
+
const labelLength = labelWithPadding.length;
|
|
134
|
+
const dashesTotal = totalWidth - labelLength;
|
|
135
|
+
const dashesLeft = Math.floor(dashesTotal / 2);
|
|
136
|
+
const dashesRight = dashesTotal - dashesLeft;
|
|
137
|
+
const line = ` ${colors_js_1.colors.dim}${'─'.repeat(dashesLeft)}${labelWithPadding}${'─'.repeat(dashesRight)}${colors_js_1.colors.reset}`;
|
|
138
|
+
(0, terminal_js_1.writeLine)(line);
|
|
119
139
|
}
|
|
120
140
|
else {
|
|
121
141
|
(0, terminal_js_1.writeLine)('');
|
|
@@ -16,10 +16,11 @@ exports.en = {
|
|
|
16
16
|
space: 'Space Toggle',
|
|
17
17
|
enter: '⏎ Confirm',
|
|
18
18
|
numbers: '0-9 Number keys',
|
|
19
|
-
letters: '
|
|
19
|
+
letters: 'Letter Shortcuts',
|
|
20
20
|
selectAll: 'A Select all',
|
|
21
21
|
invert: 'I Invert',
|
|
22
|
-
yesNo: 'Y/N Quick keys'
|
|
22
|
+
yesNo: 'Y/N Quick keys',
|
|
23
|
+
exit: 'Ctrl+C Exit'
|
|
23
24
|
},
|
|
24
25
|
messages: {
|
|
25
26
|
success: 'Success',
|
|
@@ -16,10 +16,11 @@ exports.zh = {
|
|
|
16
16
|
space: '空格 选中/取消',
|
|
17
17
|
enter: '⏎ 确认',
|
|
18
18
|
numbers: '0-9 输入序号',
|
|
19
|
-
letters: '
|
|
19
|
+
letters: '字母 快捷键',
|
|
20
20
|
selectAll: 'A 全选',
|
|
21
21
|
invert: 'I 反选',
|
|
22
|
-
yesNo: 'Y/N 快捷键'
|
|
22
|
+
yesNo: 'Y/N 快捷键',
|
|
23
|
+
exit: 'Ctrl+C 退出'
|
|
23
24
|
},
|
|
24
25
|
messages: {
|
|
25
26
|
success: '成功',
|
package/dist/i18n/types.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export { menuAPI as menu, inputAPI as input, wizardAPI as wizard } from './api.j
|
|
|
6
6
|
export { default } from './api.js';
|
|
7
7
|
export { showRadioMenu, showCheckboxMenu, showBooleanMenu } from './components/menus/index.js';
|
|
8
8
|
export { showTextInput, showNumberInput, showLanguageSelector, showModifyField } from './components/inputs/index.js';
|
|
9
|
-
export { renderSimpleHeader, renderAsciiHeader, createSimpleHeader, createAsciiHeader, renderProgressIndicator, renderStageHeader, renderStageSeparator, createProgressIndicator, createStageHeader, createStageSeparator, renderMessage, showSuccess, showError, showWarning, showInfo, showQuestion, createMessage, renderSummaryTable, createSummaryTable, createSimpleSummary } from './components/display/index.js';
|
|
9
|
+
export { renderSimpleHeader, renderAsciiHeader, createSimpleHeader, createAsciiHeader, renderProgressIndicator, renderStageHeader, renderStageSeparator, createProgressIndicator, createStageHeader, createStageSeparator, renderMessage, showSuccess, showError, showWarning, showInfo, showQuestion, createMessage, renderSummaryTable, createSummaryTable, createSimpleSummary, renderHeader, type HeaderConfig } from './components/display/index.js';
|
|
10
10
|
export { runWizard, createWizard, WizardConfig, WizardStep, WizardResult } from './features/wizard.js';
|
|
11
11
|
export { registerCommand, unregisterCommand, clearCustomCommands, isCommand, parseCommand, handleCommand, getAvailableCommands, showCommandHelp } from './features/commands.js';
|
|
12
12
|
export { getCurrentLanguage, setLanguage, t, registerLanguage, getAvailableLanguages, getCurrentLanguageMap } from './i18n/registry.js';
|
package/dist/index.js
CHANGED
|
@@ -21,8 +21,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
21
21
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
22
22
|
};
|
|
23
23
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
-
exports.
|
|
25
|
-
exports.LAYOUT_PRESETS = exports.KEY_CODES = exports.colorize = void 0;
|
|
24
|
+
exports.createGradient = exports.colors = exports.getCurrentLanguageMap = exports.getAvailableLanguages = exports.registerLanguage = exports.t = exports.setLanguage = exports.getCurrentLanguage = exports.showCommandHelp = exports.getAvailableCommands = exports.handleCommand = exports.parseCommand = exports.isCommand = exports.clearCustomCommands = exports.unregisterCommand = exports.registerCommand = exports.createWizard = exports.runWizard = exports.renderHeader = exports.createSimpleSummary = exports.createSummaryTable = exports.renderSummaryTable = exports.createMessage = exports.showQuestion = exports.showInfo = exports.showWarning = exports.showError = exports.showSuccess = exports.renderMessage = exports.createStageSeparator = exports.createStageHeader = exports.createProgressIndicator = exports.renderStageSeparator = exports.renderStageHeader = exports.renderProgressIndicator = exports.createAsciiHeader = exports.createSimpleHeader = exports.renderAsciiHeader = exports.renderSimpleHeader = exports.showModifyField = exports.showLanguageSelector = exports.showNumberInput = exports.showTextInput = exports.showBooleanMenu = exports.showCheckboxMenu = exports.showRadioMenu = exports.default = exports.wizard = exports.input = exports.menu = void 0;
|
|
25
|
+
exports.LAYOUT_PRESETS = exports.KEY_CODES = exports.colorize = exports.applyGradient = void 0;
|
|
26
26
|
// Export unified API
|
|
27
27
|
var api_js_1 = require("./api.js");
|
|
28
28
|
Object.defineProperty(exports, "menu", { enumerable: true, get: function () { return api_js_1.menuAPI; } });
|
|
@@ -63,6 +63,7 @@ Object.defineProperty(exports, "createMessage", { enumerable: true, get: functio
|
|
|
63
63
|
Object.defineProperty(exports, "renderSummaryTable", { enumerable: true, get: function () { return index_js_3.renderSummaryTable; } });
|
|
64
64
|
Object.defineProperty(exports, "createSummaryTable", { enumerable: true, get: function () { return index_js_3.createSummaryTable; } });
|
|
65
65
|
Object.defineProperty(exports, "createSimpleSummary", { enumerable: true, get: function () { return index_js_3.createSimpleSummary; } });
|
|
66
|
+
Object.defineProperty(exports, "renderHeader", { enumerable: true, get: function () { return index_js_3.renderHeader; } });
|
|
66
67
|
// Export features
|
|
67
68
|
var wizard_js_1 = require("./features/wizard.js");
|
|
68
69
|
Object.defineProperty(exports, "runWizard", { enumerable: true, get: function () { return wizard_js_1.runWizard; } });
|
package/package.json
CHANGED