create-kai 0.3.1 → 0.4.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/dist/index.js +837 -522
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -37,16 +37,16 @@ var require_src = __commonJS({
|
|
|
37
37
|
var CSI = `${ESC}[`;
|
|
38
38
|
var beep = "\x07";
|
|
39
39
|
var cursor = {
|
|
40
|
-
to(x2,
|
|
41
|
-
if (!
|
|
42
|
-
return `${CSI}${
|
|
40
|
+
to(x2, y4) {
|
|
41
|
+
if (!y4) return `${CSI}${x2 + 1}G`;
|
|
42
|
+
return `${CSI}${y4 + 1};${x2 + 1}H`;
|
|
43
43
|
},
|
|
44
|
-
move(x2,
|
|
44
|
+
move(x2, y4) {
|
|
45
45
|
let ret = "";
|
|
46
46
|
if (x2 < 0) ret += `${CSI}${-x2}D`;
|
|
47
47
|
else if (x2 > 0) ret += `${CSI}${x2}C`;
|
|
48
|
-
if (
|
|
49
|
-
else if (
|
|
48
|
+
if (y4 < 0) ret += `${CSI}${-y4}A`;
|
|
49
|
+
else if (y4 > 0) ret += `${CSI}${y4}B`;
|
|
50
50
|
return ret;
|
|
51
51
|
},
|
|
52
52
|
up: (count = 1) => `${CSI}${count}A`,
|
|
@@ -74,8 +74,8 @@ var require_src = __commonJS({
|
|
|
74
74
|
lineStart: `${CSI}1K`,
|
|
75
75
|
lines(count) {
|
|
76
76
|
let clear = "";
|
|
77
|
-
for (let
|
|
78
|
-
clear += this.line + (
|
|
77
|
+
for (let i2 = 0; i2 < count; i2++)
|
|
78
|
+
clear += this.line + (i2 < count - 1 ? cursor.up() : "");
|
|
79
79
|
if (count)
|
|
80
80
|
clear += cursor.left;
|
|
81
81
|
return clear;
|
|
@@ -88,10 +88,10 @@ var require_src = __commonJS({
|
|
|
88
88
|
// ../../node_modules/picocolors/picocolors.js
|
|
89
89
|
var require_picocolors = __commonJS({
|
|
90
90
|
"../../node_modules/picocolors/picocolors.js"(exports, module) {
|
|
91
|
-
var
|
|
92
|
-
var argv =
|
|
93
|
-
var env =
|
|
94
|
-
var isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") ||
|
|
91
|
+
var p3 = process || {};
|
|
92
|
+
var argv = p3.argv || [];
|
|
93
|
+
var env = p3.env || {};
|
|
94
|
+
var isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p3.platform === "win32" || (p3.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
|
|
95
95
|
var formatter = (open, close, replace = open) => (input) => {
|
|
96
96
|
let string = "" + input, index = string.indexOf(close, open.length);
|
|
97
97
|
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
|
@@ -106,50 +106,50 @@ var require_picocolors = __commonJS({
|
|
|
106
106
|
return result + string.substring(cursor);
|
|
107
107
|
};
|
|
108
108
|
var createColors = (enabled = isColorSupported) => {
|
|
109
|
-
let
|
|
109
|
+
let f2 = enabled ? formatter : () => String;
|
|
110
110
|
return {
|
|
111
111
|
isColorSupported: enabled,
|
|
112
|
-
reset:
|
|
113
|
-
bold:
|
|
114
|
-
dim:
|
|
115
|
-
italic:
|
|
116
|
-
underline:
|
|
117
|
-
inverse:
|
|
118
|
-
hidden:
|
|
119
|
-
strikethrough:
|
|
120
|
-
black:
|
|
121
|
-
red:
|
|
122
|
-
green:
|
|
123
|
-
yellow:
|
|
124
|
-
blue:
|
|
125
|
-
magenta:
|
|
126
|
-
cyan:
|
|
127
|
-
white:
|
|
128
|
-
gray:
|
|
129
|
-
bgBlack:
|
|
130
|
-
bgRed:
|
|
131
|
-
bgGreen:
|
|
132
|
-
bgYellow:
|
|
133
|
-
bgBlue:
|
|
134
|
-
bgMagenta:
|
|
135
|
-
bgCyan:
|
|
136
|
-
bgWhite:
|
|
137
|
-
blackBright:
|
|
138
|
-
redBright:
|
|
139
|
-
greenBright:
|
|
140
|
-
yellowBright:
|
|
141
|
-
blueBright:
|
|
142
|
-
magentaBright:
|
|
143
|
-
cyanBright:
|
|
144
|
-
whiteBright:
|
|
145
|
-
bgBlackBright:
|
|
146
|
-
bgRedBright:
|
|
147
|
-
bgGreenBright:
|
|
148
|
-
bgYellowBright:
|
|
149
|
-
bgBlueBright:
|
|
150
|
-
bgMagentaBright:
|
|
151
|
-
bgCyanBright:
|
|
152
|
-
bgWhiteBright:
|
|
112
|
+
reset: f2("\x1B[0m", "\x1B[0m"),
|
|
113
|
+
bold: f2("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
|
|
114
|
+
dim: f2("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
|
|
115
|
+
italic: f2("\x1B[3m", "\x1B[23m"),
|
|
116
|
+
underline: f2("\x1B[4m", "\x1B[24m"),
|
|
117
|
+
inverse: f2("\x1B[7m", "\x1B[27m"),
|
|
118
|
+
hidden: f2("\x1B[8m", "\x1B[28m"),
|
|
119
|
+
strikethrough: f2("\x1B[9m", "\x1B[29m"),
|
|
120
|
+
black: f2("\x1B[30m", "\x1B[39m"),
|
|
121
|
+
red: f2("\x1B[31m", "\x1B[39m"),
|
|
122
|
+
green: f2("\x1B[32m", "\x1B[39m"),
|
|
123
|
+
yellow: f2("\x1B[33m", "\x1B[39m"),
|
|
124
|
+
blue: f2("\x1B[34m", "\x1B[39m"),
|
|
125
|
+
magenta: f2("\x1B[35m", "\x1B[39m"),
|
|
126
|
+
cyan: f2("\x1B[36m", "\x1B[39m"),
|
|
127
|
+
white: f2("\x1B[37m", "\x1B[39m"),
|
|
128
|
+
gray: f2("\x1B[90m", "\x1B[39m"),
|
|
129
|
+
bgBlack: f2("\x1B[40m", "\x1B[49m"),
|
|
130
|
+
bgRed: f2("\x1B[41m", "\x1B[49m"),
|
|
131
|
+
bgGreen: f2("\x1B[42m", "\x1B[49m"),
|
|
132
|
+
bgYellow: f2("\x1B[43m", "\x1B[49m"),
|
|
133
|
+
bgBlue: f2("\x1B[44m", "\x1B[49m"),
|
|
134
|
+
bgMagenta: f2("\x1B[45m", "\x1B[49m"),
|
|
135
|
+
bgCyan: f2("\x1B[46m", "\x1B[49m"),
|
|
136
|
+
bgWhite: f2("\x1B[47m", "\x1B[49m"),
|
|
137
|
+
blackBright: f2("\x1B[90m", "\x1B[39m"),
|
|
138
|
+
redBright: f2("\x1B[91m", "\x1B[39m"),
|
|
139
|
+
greenBright: f2("\x1B[92m", "\x1B[39m"),
|
|
140
|
+
yellowBright: f2("\x1B[93m", "\x1B[39m"),
|
|
141
|
+
blueBright: f2("\x1B[94m", "\x1B[39m"),
|
|
142
|
+
magentaBright: f2("\x1B[95m", "\x1B[39m"),
|
|
143
|
+
cyanBright: f2("\x1B[96m", "\x1B[39m"),
|
|
144
|
+
whiteBright: f2("\x1B[97m", "\x1B[39m"),
|
|
145
|
+
bgBlackBright: f2("\x1B[100m", "\x1B[49m"),
|
|
146
|
+
bgRedBright: f2("\x1B[101m", "\x1B[49m"),
|
|
147
|
+
bgGreenBright: f2("\x1B[102m", "\x1B[49m"),
|
|
148
|
+
bgYellowBright: f2("\x1B[103m", "\x1B[49m"),
|
|
149
|
+
bgBlueBright: f2("\x1B[104m", "\x1B[49m"),
|
|
150
|
+
bgMagentaBright: f2("\x1B[105m", "\x1B[49m"),
|
|
151
|
+
bgCyanBright: f2("\x1B[106m", "\x1B[49m"),
|
|
152
|
+
bgWhiteBright: f2("\x1B[107m", "\x1B[49m")
|
|
153
153
|
};
|
|
154
154
|
};
|
|
155
155
|
module.exports = createColors();
|
|
@@ -175,8 +175,8 @@ import * as g from "node:readline";
|
|
|
175
175
|
import O from "node:readline";
|
|
176
176
|
import { Writable as X } from "node:stream";
|
|
177
177
|
function DD({ onlyFirst: e2 = false } = {}) {
|
|
178
|
-
const
|
|
179
|
-
return new RegExp(
|
|
178
|
+
const t2 = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");
|
|
179
|
+
return new RegExp(t2, e2 ? void 0 : "g");
|
|
180
180
|
}
|
|
181
181
|
var uD = DD();
|
|
182
182
|
function P(e2) {
|
|
@@ -188,27 +188,27 @@ function L(e2) {
|
|
|
188
188
|
}
|
|
189
189
|
var W = { exports: {} };
|
|
190
190
|
(function(e2) {
|
|
191
|
-
var
|
|
192
|
-
e2.exports =
|
|
193
|
-
var
|
|
194
|
-
return 55296 <=
|
|
195
|
-
},
|
|
196
|
-
var
|
|
197
|
-
return
|
|
191
|
+
var u3 = {};
|
|
192
|
+
e2.exports = u3, u3.eastAsianWidth = function(F2) {
|
|
193
|
+
var s2 = F2.charCodeAt(0), i2 = F2.length == 2 ? F2.charCodeAt(1) : 0, D2 = s2;
|
|
194
|
+
return 55296 <= s2 && s2 <= 56319 && 56320 <= i2 && i2 <= 57343 && (s2 &= 1023, i2 &= 1023, D2 = s2 << 10 | i2, D2 += 65536), D2 == 12288 || 65281 <= D2 && D2 <= 65376 || 65504 <= D2 && D2 <= 65510 ? "F" : D2 == 8361 || 65377 <= D2 && D2 <= 65470 || 65474 <= D2 && D2 <= 65479 || 65482 <= D2 && D2 <= 65487 || 65490 <= D2 && D2 <= 65495 || 65498 <= D2 && D2 <= 65500 || 65512 <= D2 && D2 <= 65518 ? "H" : 4352 <= D2 && D2 <= 4447 || 4515 <= D2 && D2 <= 4519 || 4602 <= D2 && D2 <= 4607 || 9001 <= D2 && D2 <= 9002 || 11904 <= D2 && D2 <= 11929 || 11931 <= D2 && D2 <= 12019 || 12032 <= D2 && D2 <= 12245 || 12272 <= D2 && D2 <= 12283 || 12289 <= D2 && D2 <= 12350 || 12353 <= D2 && D2 <= 12438 || 12441 <= D2 && D2 <= 12543 || 12549 <= D2 && D2 <= 12589 || 12593 <= D2 && D2 <= 12686 || 12688 <= D2 && D2 <= 12730 || 12736 <= D2 && D2 <= 12771 || 12784 <= D2 && D2 <= 12830 || 12832 <= D2 && D2 <= 12871 || 12880 <= D2 && D2 <= 13054 || 13056 <= D2 && D2 <= 19903 || 19968 <= D2 && D2 <= 42124 || 42128 <= D2 && D2 <= 42182 || 43360 <= D2 && D2 <= 43388 || 44032 <= D2 && D2 <= 55203 || 55216 <= D2 && D2 <= 55238 || 55243 <= D2 && D2 <= 55291 || 63744 <= D2 && D2 <= 64255 || 65040 <= D2 && D2 <= 65049 || 65072 <= D2 && D2 <= 65106 || 65108 <= D2 && D2 <= 65126 || 65128 <= D2 && D2 <= 65131 || 110592 <= D2 && D2 <= 110593 || 127488 <= D2 && D2 <= 127490 || 127504 <= D2 && D2 <= 127546 || 127552 <= D2 && D2 <= 127560 || 127568 <= D2 && D2 <= 127569 || 131072 <= D2 && D2 <= 194367 || 177984 <= D2 && D2 <= 196605 || 196608 <= D2 && D2 <= 262141 ? "W" : 32 <= D2 && D2 <= 126 || 162 <= D2 && D2 <= 163 || 165 <= D2 && D2 <= 166 || D2 == 172 || D2 == 175 || 10214 <= D2 && D2 <= 10221 || 10629 <= D2 && D2 <= 10630 ? "Na" : D2 == 161 || D2 == 164 || 167 <= D2 && D2 <= 168 || D2 == 170 || 173 <= D2 && D2 <= 174 || 176 <= D2 && D2 <= 180 || 182 <= D2 && D2 <= 186 || 188 <= D2 && D2 <= 191 || D2 == 198 || D2 == 208 || 215 <= D2 && D2 <= 216 || 222 <= D2 && D2 <= 225 || D2 == 230 || 232 <= D2 && D2 <= 234 || 236 <= D2 && D2 <= 237 || D2 == 240 || 242 <= D2 && D2 <= 243 || 247 <= D2 && D2 <= 250 || D2 == 252 || D2 == 254 || D2 == 257 || D2 == 273 || D2 == 275 || D2 == 283 || 294 <= D2 && D2 <= 295 || D2 == 299 || 305 <= D2 && D2 <= 307 || D2 == 312 || 319 <= D2 && D2 <= 322 || D2 == 324 || 328 <= D2 && D2 <= 331 || D2 == 333 || 338 <= D2 && D2 <= 339 || 358 <= D2 && D2 <= 359 || D2 == 363 || D2 == 462 || D2 == 464 || D2 == 466 || D2 == 468 || D2 == 470 || D2 == 472 || D2 == 474 || D2 == 476 || D2 == 593 || D2 == 609 || D2 == 708 || D2 == 711 || 713 <= D2 && D2 <= 715 || D2 == 717 || D2 == 720 || 728 <= D2 && D2 <= 731 || D2 == 733 || D2 == 735 || 768 <= D2 && D2 <= 879 || 913 <= D2 && D2 <= 929 || 931 <= D2 && D2 <= 937 || 945 <= D2 && D2 <= 961 || 963 <= D2 && D2 <= 969 || D2 == 1025 || 1040 <= D2 && D2 <= 1103 || D2 == 1105 || D2 == 8208 || 8211 <= D2 && D2 <= 8214 || 8216 <= D2 && D2 <= 8217 || 8220 <= D2 && D2 <= 8221 || 8224 <= D2 && D2 <= 8226 || 8228 <= D2 && D2 <= 8231 || D2 == 8240 || 8242 <= D2 && D2 <= 8243 || D2 == 8245 || D2 == 8251 || D2 == 8254 || D2 == 8308 || D2 == 8319 || 8321 <= D2 && D2 <= 8324 || D2 == 8364 || D2 == 8451 || D2 == 8453 || D2 == 8457 || D2 == 8467 || D2 == 8470 || 8481 <= D2 && D2 <= 8482 || D2 == 8486 || D2 == 8491 || 8531 <= D2 && D2 <= 8532 || 8539 <= D2 && D2 <= 8542 || 8544 <= D2 && D2 <= 8555 || 8560 <= D2 && D2 <= 8569 || D2 == 8585 || 8592 <= D2 && D2 <= 8601 || 8632 <= D2 && D2 <= 8633 || D2 == 8658 || D2 == 8660 || D2 == 8679 || D2 == 8704 || 8706 <= D2 && D2 <= 8707 || 8711 <= D2 && D2 <= 8712 || D2 == 8715 || D2 == 8719 || D2 == 8721 || D2 == 8725 || D2 == 8730 || 8733 <= D2 && D2 <= 8736 || D2 == 8739 || D2 == 8741 || 8743 <= D2 && D2 <= 8748 || D2 == 8750 || 8756 <= D2 && D2 <= 8759 || 8764 <= D2 && D2 <= 8765 || D2 == 8776 || D2 == 8780 || D2 == 8786 || 8800 <= D2 && D2 <= 8801 || 8804 <= D2 && D2 <= 8807 || 8810 <= D2 && D2 <= 8811 || 8814 <= D2 && D2 <= 8815 || 8834 <= D2 && D2 <= 8835 || 8838 <= D2 && D2 <= 8839 || D2 == 8853 || D2 == 8857 || D2 == 8869 || D2 == 8895 || D2 == 8978 || 9312 <= D2 && D2 <= 9449 || 9451 <= D2 && D2 <= 9547 || 9552 <= D2 && D2 <= 9587 || 9600 <= D2 && D2 <= 9615 || 9618 <= D2 && D2 <= 9621 || 9632 <= D2 && D2 <= 9633 || 9635 <= D2 && D2 <= 9641 || 9650 <= D2 && D2 <= 9651 || 9654 <= D2 && D2 <= 9655 || 9660 <= D2 && D2 <= 9661 || 9664 <= D2 && D2 <= 9665 || 9670 <= D2 && D2 <= 9672 || D2 == 9675 || 9678 <= D2 && D2 <= 9681 || 9698 <= D2 && D2 <= 9701 || D2 == 9711 || 9733 <= D2 && D2 <= 9734 || D2 == 9737 || 9742 <= D2 && D2 <= 9743 || 9748 <= D2 && D2 <= 9749 || D2 == 9756 || D2 == 9758 || D2 == 9792 || D2 == 9794 || 9824 <= D2 && D2 <= 9825 || 9827 <= D2 && D2 <= 9829 || 9831 <= D2 && D2 <= 9834 || 9836 <= D2 && D2 <= 9837 || D2 == 9839 || 9886 <= D2 && D2 <= 9887 || 9918 <= D2 && D2 <= 9919 || 9924 <= D2 && D2 <= 9933 || 9935 <= D2 && D2 <= 9953 || D2 == 9955 || 9960 <= D2 && D2 <= 9983 || D2 == 10045 || D2 == 10071 || 10102 <= D2 && D2 <= 10111 || 11093 <= D2 && D2 <= 11097 || 12872 <= D2 && D2 <= 12879 || 57344 <= D2 && D2 <= 63743 || 65024 <= D2 && D2 <= 65039 || D2 == 65533 || 127232 <= D2 && D2 <= 127242 || 127248 <= D2 && D2 <= 127277 || 127280 <= D2 && D2 <= 127337 || 127344 <= D2 && D2 <= 127386 || 917760 <= D2 && D2 <= 917999 || 983040 <= D2 && D2 <= 1048573 || 1048576 <= D2 && D2 <= 1114109 ? "A" : "N";
|
|
195
|
+
}, u3.characterLength = function(F2) {
|
|
196
|
+
var s2 = this.eastAsianWidth(F2);
|
|
197
|
+
return s2 == "F" || s2 == "W" || s2 == "A" ? 2 : 1;
|
|
198
198
|
};
|
|
199
|
-
function
|
|
199
|
+
function t2(F2) {
|
|
200
200
|
return F2.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || [];
|
|
201
201
|
}
|
|
202
|
-
|
|
203
|
-
for (var
|
|
204
|
-
return
|
|
205
|
-
},
|
|
206
|
-
textLen =
|
|
207
|
-
for (var D2 = "",
|
|
208
|
-
var
|
|
209
|
-
if (
|
|
202
|
+
u3.length = function(F2) {
|
|
203
|
+
for (var s2 = t2(F2), i2 = 0, D2 = 0; D2 < s2.length; D2++) i2 = i2 + this.characterLength(s2[D2]);
|
|
204
|
+
return i2;
|
|
205
|
+
}, u3.slice = function(F2, s2, i2) {
|
|
206
|
+
textLen = u3.length(F2), s2 = s2 || 0, i2 = i2 || 1, s2 < 0 && (s2 = textLen + s2), i2 < 0 && (i2 = textLen + i2);
|
|
207
|
+
for (var D2 = "", C3 = 0, n2 = t2(F2), E2 = 0; E2 < n2.length; E2++) {
|
|
208
|
+
var a2 = n2[E2], o2 = u3.length(a2);
|
|
209
|
+
if (C3 >= s2 - (o2 == 2 ? 1 : 0)) if (C3 + o2 <= i2) D2 += a2;
|
|
210
210
|
else break;
|
|
211
|
-
|
|
211
|
+
C3 += o2;
|
|
212
212
|
}
|
|
213
213
|
return D2;
|
|
214
214
|
};
|
|
@@ -219,21 +219,21 @@ var FD = function() {
|
|
|
219
219
|
return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
|
|
220
220
|
};
|
|
221
221
|
var sD = L(FD);
|
|
222
|
-
function p(e2,
|
|
223
|
-
if (typeof e2 != "string" || e2.length === 0 || (
|
|
222
|
+
function p(e2, u3 = {}) {
|
|
223
|
+
if (typeof e2 != "string" || e2.length === 0 || (u3 = { ambiguousIsNarrow: true, ...u3 }, e2 = P(e2), e2.length === 0)) return 0;
|
|
224
224
|
e2 = e2.replace(sD(), " ");
|
|
225
|
-
const
|
|
225
|
+
const t2 = u3.ambiguousIsNarrow ? 1 : 2;
|
|
226
226
|
let F2 = 0;
|
|
227
|
-
for (const
|
|
228
|
-
const
|
|
229
|
-
if (
|
|
230
|
-
switch (eD.eastAsianWidth(
|
|
227
|
+
for (const s2 of e2) {
|
|
228
|
+
const i2 = s2.codePointAt(0);
|
|
229
|
+
if (i2 <= 31 || i2 >= 127 && i2 <= 159 || i2 >= 768 && i2 <= 879) continue;
|
|
230
|
+
switch (eD.eastAsianWidth(s2)) {
|
|
231
231
|
case "F":
|
|
232
232
|
case "W":
|
|
233
233
|
F2 += 2;
|
|
234
234
|
break;
|
|
235
235
|
case "A":
|
|
236
|
-
F2 +=
|
|
236
|
+
F2 += t2;
|
|
237
237
|
break;
|
|
238
238
|
default:
|
|
239
239
|
F2 += 1;
|
|
@@ -242,9 +242,9 @@ function p(e2, u2 = {}) {
|
|
|
242
242
|
return F2;
|
|
243
243
|
}
|
|
244
244
|
var w = 10;
|
|
245
|
-
var N = (e2 = 0) => (
|
|
246
|
-
var I = (e2 = 0) => (
|
|
247
|
-
var R = (e2 = 0) => (
|
|
245
|
+
var N = (e2 = 0) => (u3) => `\x1B[${u3 + e2}m`;
|
|
246
|
+
var I = (e2 = 0) => (u3) => `\x1B[${38 + e2};5;${u3}m`;
|
|
247
|
+
var R = (e2 = 0) => (u3, t2, F2) => `\x1B[${38 + e2};2;${u3};${t2};${F2}m`;
|
|
248
248
|
var r = { modifier: { reset: [0, 0], bold: [1, 22], dim: [2, 22], italic: [3, 23], underline: [4, 24], overline: [53, 55], inverse: [7, 27], hidden: [8, 28], strikethrough: [9, 29] }, color: { black: [30, 39], red: [31, 39], green: [32, 39], yellow: [33, 39], blue: [34, 39], magenta: [35, 39], cyan: [36, 39], white: [37, 39], blackBright: [90, 39], gray: [90, 39], grey: [90, 39], redBright: [91, 39], greenBright: [92, 39], yellowBright: [93, 39], blueBright: [94, 39], magentaBright: [95, 39], cyanBright: [96, 39], whiteBright: [97, 39] }, bgColor: { bgBlack: [40, 49], bgRed: [41, 49], bgGreen: [42, 49], bgYellow: [43, 49], bgBlue: [44, 49], bgMagenta: [45, 49], bgCyan: [46, 49], bgWhite: [47, 49], bgBlackBright: [100, 49], bgGray: [100, 49], bgGrey: [100, 49], bgRedBright: [101, 49], bgGreenBright: [102, 49], bgYellowBright: [103, 49], bgBlueBright: [104, 49], bgMagentaBright: [105, 49], bgCyanBright: [106, 49], bgWhiteBright: [107, 49] } };
|
|
249
249
|
Object.keys(r.modifier);
|
|
250
250
|
var iD = Object.keys(r.color);
|
|
@@ -252,32 +252,32 @@ var CD = Object.keys(r.bgColor);
|
|
|
252
252
|
[...iD, ...CD];
|
|
253
253
|
function rD() {
|
|
254
254
|
const e2 = /* @__PURE__ */ new Map();
|
|
255
|
-
for (const [
|
|
256
|
-
for (const [F2,
|
|
257
|
-
Object.defineProperty(r,
|
|
258
|
-
}
|
|
259
|
-
return Object.defineProperty(r, "codes", { value: e2, enumerable: false }), r.color.close = "\x1B[39m", r.bgColor.close = "\x1B[49m", r.color.ansi = N(), r.color.ansi256 = I(), r.color.ansi16m = R(), r.bgColor.ansi = N(w), r.bgColor.ansi256 = I(w), r.bgColor.ansi16m = R(w), Object.defineProperties(r, { rgbToAnsi256: { value: (
|
|
260
|
-
const
|
|
261
|
-
if (!
|
|
262
|
-
let [F2] =
|
|
263
|
-
F2.length === 3 && (F2 = [...F2].map((
|
|
264
|
-
const
|
|
265
|
-
return [
|
|
266
|
-
}, enumerable: false }, hexToAnsi256: { value: (
|
|
267
|
-
if (
|
|
268
|
-
if (
|
|
269
|
-
let
|
|
270
|
-
if (
|
|
255
|
+
for (const [u3, t2] of Object.entries(r)) {
|
|
256
|
+
for (const [F2, s2] of Object.entries(t2)) r[F2] = { open: `\x1B[${s2[0]}m`, close: `\x1B[${s2[1]}m` }, t2[F2] = r[F2], e2.set(s2[0], s2[1]);
|
|
257
|
+
Object.defineProperty(r, u3, { value: t2, enumerable: false });
|
|
258
|
+
}
|
|
259
|
+
return Object.defineProperty(r, "codes", { value: e2, enumerable: false }), r.color.close = "\x1B[39m", r.bgColor.close = "\x1B[49m", r.color.ansi = N(), r.color.ansi256 = I(), r.color.ansi16m = R(), r.bgColor.ansi = N(w), r.bgColor.ansi256 = I(w), r.bgColor.ansi16m = R(w), Object.defineProperties(r, { rgbToAnsi256: { value: (u3, t2, F2) => u3 === t2 && t2 === F2 ? u3 < 8 ? 16 : u3 > 248 ? 231 : Math.round((u3 - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(u3 / 255 * 5) + 6 * Math.round(t2 / 255 * 5) + Math.round(F2 / 255 * 5), enumerable: false }, hexToRgb: { value: (u3) => {
|
|
260
|
+
const t2 = /[a-f\d]{6}|[a-f\d]{3}/i.exec(u3.toString(16));
|
|
261
|
+
if (!t2) return [0, 0, 0];
|
|
262
|
+
let [F2] = t2;
|
|
263
|
+
F2.length === 3 && (F2 = [...F2].map((i2) => i2 + i2).join(""));
|
|
264
|
+
const s2 = Number.parseInt(F2, 16);
|
|
265
|
+
return [s2 >> 16 & 255, s2 >> 8 & 255, s2 & 255];
|
|
266
|
+
}, enumerable: false }, hexToAnsi256: { value: (u3) => r.rgbToAnsi256(...r.hexToRgb(u3)), enumerable: false }, ansi256ToAnsi: { value: (u3) => {
|
|
267
|
+
if (u3 < 8) return 30 + u3;
|
|
268
|
+
if (u3 < 16) return 90 + (u3 - 8);
|
|
269
|
+
let t2, F2, s2;
|
|
270
|
+
if (u3 >= 232) t2 = ((u3 - 232) * 10 + 8) / 255, F2 = t2, s2 = t2;
|
|
271
271
|
else {
|
|
272
|
-
|
|
273
|
-
const
|
|
274
|
-
|
|
272
|
+
u3 -= 16;
|
|
273
|
+
const C3 = u3 % 36;
|
|
274
|
+
t2 = Math.floor(u3 / 36) / 5, F2 = Math.floor(C3 / 6) / 5, s2 = C3 % 6 / 5;
|
|
275
275
|
}
|
|
276
|
-
const
|
|
277
|
-
if (
|
|
278
|
-
let D2 = 30 + (Math.round(
|
|
279
|
-
return
|
|
280
|
-
}, enumerable: false }, rgbToAnsi: { value: (
|
|
276
|
+
const i2 = Math.max(t2, F2, s2) * 2;
|
|
277
|
+
if (i2 === 0) return 30;
|
|
278
|
+
let D2 = 30 + (Math.round(s2) << 2 | Math.round(F2) << 1 | Math.round(t2));
|
|
279
|
+
return i2 === 2 && (D2 += 60), D2;
|
|
280
|
+
}, enumerable: false }, rgbToAnsi: { value: (u3, t2, F2) => r.ansi256ToAnsi(r.rgbToAnsi256(u3, t2, F2)), enumerable: false }, hexToAnsi: { value: (u3) => r.ansi256ToAnsi(r.hexToAnsi256(u3)), enumerable: false } }), r;
|
|
281
281
|
}
|
|
282
282
|
var ED = rD();
|
|
283
283
|
var d = /* @__PURE__ */ new Set(["\x1B", "\x9B"]);
|
|
@@ -289,211 +289,211 @@ var G = "m";
|
|
|
289
289
|
var _ = `${nD}8;;`;
|
|
290
290
|
var z = (e2) => `${d.values().next().value}${V}${e2}${G}`;
|
|
291
291
|
var K = (e2) => `${d.values().next().value}${_}${e2}${y}`;
|
|
292
|
-
var aD = (e2) => e2.split(" ").map((
|
|
293
|
-
var k = (e2,
|
|
294
|
-
const F2 = [...
|
|
295
|
-
let
|
|
296
|
-
for (const [
|
|
297
|
-
const
|
|
298
|
-
if (D2 +
|
|
299
|
-
|
|
292
|
+
var aD = (e2) => e2.split(" ").map((u3) => p(u3));
|
|
293
|
+
var k = (e2, u3, t2) => {
|
|
294
|
+
const F2 = [...u3];
|
|
295
|
+
let s2 = false, i2 = false, D2 = p(P(e2[e2.length - 1]));
|
|
296
|
+
for (const [C3, n2] of F2.entries()) {
|
|
297
|
+
const E2 = p(n2);
|
|
298
|
+
if (D2 + E2 <= t2 ? e2[e2.length - 1] += n2 : (e2.push(n2), D2 = 0), d.has(n2) && (s2 = true, i2 = F2.slice(C3 + 1).join("").startsWith(_)), s2) {
|
|
299
|
+
i2 ? n2 === y && (s2 = false, i2 = false) : n2 === G && (s2 = false);
|
|
300
300
|
continue;
|
|
301
301
|
}
|
|
302
|
-
D2 +=
|
|
302
|
+
D2 += E2, D2 === t2 && C3 < F2.length - 1 && (e2.push(""), D2 = 0);
|
|
303
303
|
}
|
|
304
304
|
!D2 && e2[e2.length - 1].length > 0 && e2.length > 1 && (e2[e2.length - 2] += e2.pop());
|
|
305
305
|
};
|
|
306
306
|
var hD = (e2) => {
|
|
307
|
-
const
|
|
308
|
-
let
|
|
309
|
-
for (;
|
|
310
|
-
return
|
|
307
|
+
const u3 = e2.split(" ");
|
|
308
|
+
let t2 = u3.length;
|
|
309
|
+
for (; t2 > 0 && !(p(u3[t2 - 1]) > 0); ) t2--;
|
|
310
|
+
return t2 === u3.length ? e2 : u3.slice(0, t2).join(" ") + u3.slice(t2).join("");
|
|
311
311
|
};
|
|
312
|
-
var lD = (e2,
|
|
313
|
-
if (
|
|
314
|
-
let F2 = "",
|
|
312
|
+
var lD = (e2, u3, t2 = {}) => {
|
|
313
|
+
if (t2.trim !== false && e2.trim() === "") return "";
|
|
314
|
+
let F2 = "", s2, i2;
|
|
315
315
|
const D2 = aD(e2);
|
|
316
|
-
let
|
|
317
|
-
for (const [
|
|
318
|
-
|
|
319
|
-
let o2 = p(
|
|
320
|
-
if (
|
|
321
|
-
const
|
|
322
|
-
Math.floor((D2[
|
|
316
|
+
let C3 = [""];
|
|
317
|
+
for (const [E2, a2] of e2.split(" ").entries()) {
|
|
318
|
+
t2.trim !== false && (C3[C3.length - 1] = C3[C3.length - 1].trimStart());
|
|
319
|
+
let o2 = p(C3[C3.length - 1]);
|
|
320
|
+
if (E2 !== 0 && (o2 >= u3 && (t2.wordWrap === false || t2.trim === false) && (C3.push(""), o2 = 0), (o2 > 0 || t2.trim === false) && (C3[C3.length - 1] += " ", o2++)), t2.hard && D2[E2] > u3) {
|
|
321
|
+
const c2 = u3 - o2, f2 = 1 + Math.floor((D2[E2] - c2 - 1) / u3);
|
|
322
|
+
Math.floor((D2[E2] - 1) / u3) < f2 && C3.push(""), k(C3, a2, u3);
|
|
323
323
|
continue;
|
|
324
324
|
}
|
|
325
|
-
if (o2 + D2[
|
|
326
|
-
if (
|
|
327
|
-
k(
|
|
325
|
+
if (o2 + D2[E2] > u3 && o2 > 0 && D2[E2] > 0) {
|
|
326
|
+
if (t2.wordWrap === false && o2 < u3) {
|
|
327
|
+
k(C3, a2, u3);
|
|
328
328
|
continue;
|
|
329
329
|
}
|
|
330
|
-
|
|
330
|
+
C3.push("");
|
|
331
331
|
}
|
|
332
|
-
if (o2 + D2[
|
|
333
|
-
k(
|
|
332
|
+
if (o2 + D2[E2] > u3 && t2.wordWrap === false) {
|
|
333
|
+
k(C3, a2, u3);
|
|
334
334
|
continue;
|
|
335
335
|
}
|
|
336
|
-
|
|
336
|
+
C3[C3.length - 1] += a2;
|
|
337
337
|
}
|
|
338
|
-
|
|
339
|
-
const
|
|
338
|
+
t2.trim !== false && (C3 = C3.map((E2) => hD(E2)));
|
|
339
|
+
const n2 = [...C3.join(`
|
|
340
340
|
`)];
|
|
341
|
-
for (const [
|
|
342
|
-
if (F2 +=
|
|
343
|
-
const { groups:
|
|
344
|
-
if (
|
|
345
|
-
const
|
|
346
|
-
|
|
347
|
-
} else
|
|
341
|
+
for (const [E2, a2] of n2.entries()) {
|
|
342
|
+
if (F2 += a2, d.has(a2)) {
|
|
343
|
+
const { groups: c2 } = new RegExp(`(?:\\${V}(?<code>\\d+)m|\\${_}(?<uri>.*)${y})`).exec(n2.slice(E2).join("")) || { groups: {} };
|
|
344
|
+
if (c2.code !== void 0) {
|
|
345
|
+
const f2 = Number.parseFloat(c2.code);
|
|
346
|
+
s2 = f2 === oD ? void 0 : f2;
|
|
347
|
+
} else c2.uri !== void 0 && (i2 = c2.uri.length === 0 ? void 0 : c2.uri);
|
|
348
348
|
}
|
|
349
|
-
const o2 = ED.codes.get(Number(
|
|
350
|
-
|
|
351
|
-
` ? (
|
|
352
|
-
` && (
|
|
349
|
+
const o2 = ED.codes.get(Number(s2));
|
|
350
|
+
n2[E2 + 1] === `
|
|
351
|
+
` ? (i2 && (F2 += K("")), s2 && o2 && (F2 += z(o2))) : a2 === `
|
|
352
|
+
` && (s2 && o2 && (F2 += z(s2)), i2 && (F2 += K(i2)));
|
|
353
353
|
}
|
|
354
354
|
return F2;
|
|
355
355
|
};
|
|
356
|
-
function Y(e2,
|
|
356
|
+
function Y(e2, u3, t2) {
|
|
357
357
|
return String(e2).normalize().replace(/\r\n/g, `
|
|
358
358
|
`).split(`
|
|
359
|
-
`).map((F2) => lD(F2,
|
|
359
|
+
`).map((F2) => lD(F2, u3, t2)).join(`
|
|
360
360
|
`);
|
|
361
361
|
}
|
|
362
362
|
var xD = ["up", "down", "left", "right", "space", "enter", "cancel"];
|
|
363
363
|
var B = { actions: new Set(xD), aliases: /* @__PURE__ */ new Map([["k", "up"], ["j", "down"], ["h", "left"], ["l", "right"], ["", "cancel"], ["escape", "cancel"]]) };
|
|
364
|
-
function $(e2,
|
|
365
|
-
if (typeof e2 == "string") return B.aliases.get(e2) ===
|
|
366
|
-
for (const
|
|
364
|
+
function $(e2, u3) {
|
|
365
|
+
if (typeof e2 == "string") return B.aliases.get(e2) === u3;
|
|
366
|
+
for (const t2 of e2) if (t2 !== void 0 && $(t2, u3)) return true;
|
|
367
367
|
return false;
|
|
368
368
|
}
|
|
369
|
-
function BD(e2,
|
|
370
|
-
if (e2 ===
|
|
371
|
-
const
|
|
372
|
-
`), F2 =
|
|
373
|
-
`),
|
|
374
|
-
for (let
|
|
375
|
-
return
|
|
369
|
+
function BD(e2, u3) {
|
|
370
|
+
if (e2 === u3) return;
|
|
371
|
+
const t2 = e2.split(`
|
|
372
|
+
`), F2 = u3.split(`
|
|
373
|
+
`), s2 = [];
|
|
374
|
+
for (let i2 = 0; i2 < Math.max(t2.length, F2.length); i2++) t2[i2] !== F2[i2] && s2.push(i2);
|
|
375
|
+
return s2;
|
|
376
376
|
}
|
|
377
377
|
var AD = globalThis.process.platform.startsWith("win");
|
|
378
378
|
var S = /* @__PURE__ */ Symbol("clack:cancel");
|
|
379
379
|
function pD(e2) {
|
|
380
380
|
return e2 === S;
|
|
381
381
|
}
|
|
382
|
-
function m(e2,
|
|
383
|
-
const
|
|
384
|
-
|
|
382
|
+
function m(e2, u3) {
|
|
383
|
+
const t2 = e2;
|
|
384
|
+
t2.isTTY && t2.setRawMode(u3);
|
|
385
385
|
}
|
|
386
|
-
function fD({ input: e2 = j, output:
|
|
387
|
-
const
|
|
388
|
-
g.emitKeypressEvents(e2,
|
|
389
|
-
const
|
|
390
|
-
const
|
|
391
|
-
if ($([
|
|
392
|
-
F2 &&
|
|
386
|
+
function fD({ input: e2 = j, output: u3 = M, overwrite: t2 = true, hideCursor: F2 = true } = {}) {
|
|
387
|
+
const s2 = g.createInterface({ input: e2, output: u3, prompt: "", tabSize: 1 });
|
|
388
|
+
g.emitKeypressEvents(e2, s2), e2.isTTY && e2.setRawMode(true);
|
|
389
|
+
const i2 = (D2, { name: C3, sequence: n2 }) => {
|
|
390
|
+
const E2 = String(D2);
|
|
391
|
+
if ($([E2, C3, n2], "cancel")) {
|
|
392
|
+
F2 && u3.write(import_sisteransi.cursor.show), process.exit(0);
|
|
393
393
|
return;
|
|
394
394
|
}
|
|
395
|
-
if (!
|
|
396
|
-
const
|
|
397
|
-
g.moveCursor(
|
|
398
|
-
g.clearLine(
|
|
399
|
-
e2.once("keypress",
|
|
395
|
+
if (!t2) return;
|
|
396
|
+
const a2 = C3 === "return" ? 0 : -1, o2 = C3 === "return" ? -1 : 0;
|
|
397
|
+
g.moveCursor(u3, a2, o2, () => {
|
|
398
|
+
g.clearLine(u3, 1, () => {
|
|
399
|
+
e2.once("keypress", i2);
|
|
400
400
|
});
|
|
401
401
|
});
|
|
402
402
|
};
|
|
403
|
-
return F2 &&
|
|
404
|
-
e2.off("keypress",
|
|
403
|
+
return F2 && u3.write(import_sisteransi.cursor.hide), e2.once("keypress", i2), () => {
|
|
404
|
+
e2.off("keypress", i2), F2 && u3.write(import_sisteransi.cursor.show), e2.isTTY && !AD && e2.setRawMode(false), s2.terminal = false, s2.close();
|
|
405
405
|
};
|
|
406
406
|
}
|
|
407
407
|
var gD = Object.defineProperty;
|
|
408
|
-
var vD = (e2,
|
|
409
|
-
var h = (e2,
|
|
408
|
+
var vD = (e2, u3, t2) => u3 in e2 ? gD(e2, u3, { enumerable: true, configurable: true, writable: true, value: t2 }) : e2[u3] = t2;
|
|
409
|
+
var h = (e2, u3, t2) => (vD(e2, typeof u3 != "symbol" ? u3 + "" : u3, t2), t2);
|
|
410
410
|
var x = class {
|
|
411
|
-
constructor(
|
|
411
|
+
constructor(u3, t2 = true) {
|
|
412
412
|
h(this, "input"), h(this, "output"), h(this, "_abortSignal"), h(this, "rl"), h(this, "opts"), h(this, "_render"), h(this, "_track", false), h(this, "_prevFrame", ""), h(this, "_subscribers", /* @__PURE__ */ new Map()), h(this, "_cursor", 0), h(this, "state", "initial"), h(this, "error", ""), h(this, "value");
|
|
413
|
-
const { input: F2 = j, output:
|
|
414
|
-
this.opts =
|
|
413
|
+
const { input: F2 = j, output: s2 = M, render: i2, signal: D2, ...C3 } = u3;
|
|
414
|
+
this.opts = C3, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = i2.bind(this), this._track = t2, this._abortSignal = D2, this.input = F2, this.output = s2;
|
|
415
415
|
}
|
|
416
416
|
unsubscribe() {
|
|
417
417
|
this._subscribers.clear();
|
|
418
418
|
}
|
|
419
|
-
setSubscriber(
|
|
420
|
-
const F2 = this._subscribers.get(
|
|
421
|
-
F2.push(
|
|
419
|
+
setSubscriber(u3, t2) {
|
|
420
|
+
const F2 = this._subscribers.get(u3) ?? [];
|
|
421
|
+
F2.push(t2), this._subscribers.set(u3, F2);
|
|
422
422
|
}
|
|
423
|
-
on(
|
|
424
|
-
this.setSubscriber(
|
|
423
|
+
on(u3, t2) {
|
|
424
|
+
this.setSubscriber(u3, { cb: t2 });
|
|
425
425
|
}
|
|
426
|
-
once(
|
|
427
|
-
this.setSubscriber(
|
|
426
|
+
once(u3, t2) {
|
|
427
|
+
this.setSubscriber(u3, { cb: t2, once: true });
|
|
428
428
|
}
|
|
429
|
-
emit(
|
|
430
|
-
const F2 = this._subscribers.get(
|
|
431
|
-
for (const
|
|
432
|
-
for (const
|
|
429
|
+
emit(u3, ...t2) {
|
|
430
|
+
const F2 = this._subscribers.get(u3) ?? [], s2 = [];
|
|
431
|
+
for (const i2 of F2) i2.cb(...t2), i2.once && s2.push(() => F2.splice(F2.indexOf(i2), 1));
|
|
432
|
+
for (const i2 of s2) i2();
|
|
433
433
|
}
|
|
434
434
|
prompt() {
|
|
435
|
-
return new Promise((
|
|
435
|
+
return new Promise((u3, t2) => {
|
|
436
436
|
if (this._abortSignal) {
|
|
437
|
-
if (this._abortSignal.aborted) return this.state = "cancel", this.close(),
|
|
437
|
+
if (this._abortSignal.aborted) return this.state = "cancel", this.close(), u3(S);
|
|
438
438
|
this._abortSignal.addEventListener("abort", () => {
|
|
439
439
|
this.state = "cancel", this.close();
|
|
440
440
|
}, { once: true });
|
|
441
441
|
}
|
|
442
442
|
const F2 = new X();
|
|
443
|
-
F2._write = (
|
|
443
|
+
F2._write = (s2, i2, D2) => {
|
|
444
444
|
this._track && (this.value = this.rl?.line.replace(/\t/g, ""), this._cursor = this.rl?.cursor ?? 0, this.emit("value", this.value)), D2();
|
|
445
445
|
}, this.input.pipe(F2), this.rl = O.createInterface({ input: this.input, output: F2, tabSize: 2, prompt: "", escapeCodeTimeout: 50, terminal: true }), O.emitKeypressEvents(this.input, this.rl), this.rl.prompt(), this.opts.initialValue !== void 0 && this._track && this.rl.write(this.opts.initialValue), this.input.on("keypress", this.onKeypress), m(this.input, true), this.output.on("resize", this.render), this.render(), this.once("submit", () => {
|
|
446
|
-
this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), m(this.input, false),
|
|
446
|
+
this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), m(this.input, false), u3(this.value);
|
|
447
447
|
}), this.once("cancel", () => {
|
|
448
|
-
this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), m(this.input, false),
|
|
448
|
+
this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), m(this.input, false), u3(S);
|
|
449
449
|
});
|
|
450
450
|
});
|
|
451
451
|
}
|
|
452
|
-
onKeypress(
|
|
453
|
-
if (this.state === "error" && (this.state = "active"),
|
|
452
|
+
onKeypress(u3, t2) {
|
|
453
|
+
if (this.state === "error" && (this.state = "active"), t2?.name && (!this._track && B.aliases.has(t2.name) && this.emit("cursor", B.aliases.get(t2.name)), B.actions.has(t2.name) && this.emit("cursor", t2.name)), u3 && (u3.toLowerCase() === "y" || u3.toLowerCase() === "n") && this.emit("confirm", u3.toLowerCase() === "y"), u3 === " " && this.opts.placeholder && (this.value || (this.rl?.write(this.opts.placeholder), this.emit("value", this.opts.placeholder))), u3 && this.emit("key", u3.toLowerCase()), t2?.name === "return") {
|
|
454
454
|
if (this.opts.validate) {
|
|
455
455
|
const F2 = this.opts.validate(this.value);
|
|
456
456
|
F2 && (this.error = F2 instanceof Error ? F2.message : F2, this.state = "error", this.rl?.write(this.value));
|
|
457
457
|
}
|
|
458
458
|
this.state !== "error" && (this.state = "submit");
|
|
459
459
|
}
|
|
460
|
-
$([
|
|
460
|
+
$([u3, t2?.name, t2?.sequence], "cancel") && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
|
|
461
461
|
}
|
|
462
462
|
close() {
|
|
463
463
|
this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
|
|
464
464
|
`), m(this.input, false), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
|
|
465
465
|
}
|
|
466
466
|
restoreCursor() {
|
|
467
|
-
const
|
|
467
|
+
const u3 = Y(this._prevFrame, process.stdout.columns, { hard: true }).split(`
|
|
468
468
|
`).length - 1;
|
|
469
|
-
this.output.write(import_sisteransi.cursor.move(-999,
|
|
469
|
+
this.output.write(import_sisteransi.cursor.move(-999, u3 * -1));
|
|
470
470
|
}
|
|
471
471
|
render() {
|
|
472
|
-
const
|
|
473
|
-
if (
|
|
472
|
+
const u3 = Y(this._render(this) ?? "", process.stdout.columns, { hard: true });
|
|
473
|
+
if (u3 !== this._prevFrame) {
|
|
474
474
|
if (this.state === "initial") this.output.write(import_sisteransi.cursor.hide);
|
|
475
475
|
else {
|
|
476
|
-
const
|
|
477
|
-
if (this.restoreCursor(),
|
|
478
|
-
const F2 =
|
|
476
|
+
const t2 = BD(this._prevFrame, u3);
|
|
477
|
+
if (this.restoreCursor(), t2 && t2?.length === 1) {
|
|
478
|
+
const F2 = t2[0];
|
|
479
479
|
this.output.write(import_sisteransi.cursor.move(0, F2)), this.output.write(import_sisteransi.erase.lines(1));
|
|
480
|
-
const
|
|
480
|
+
const s2 = u3.split(`
|
|
481
481
|
`);
|
|
482
|
-
this.output.write(
|
|
482
|
+
this.output.write(s2[F2]), this._prevFrame = u3, this.output.write(import_sisteransi.cursor.move(0, s2.length - F2 - 1));
|
|
483
483
|
return;
|
|
484
484
|
}
|
|
485
|
-
if (
|
|
486
|
-
const F2 =
|
|
485
|
+
if (t2 && t2?.length > 1) {
|
|
486
|
+
const F2 = t2[0];
|
|
487
487
|
this.output.write(import_sisteransi.cursor.move(0, F2)), this.output.write(import_sisteransi.erase.down());
|
|
488
|
-
const
|
|
488
|
+
const s2 = u3.split(`
|
|
489
489
|
`).slice(F2);
|
|
490
|
-
this.output.write(
|
|
491
|
-
`)), this._prevFrame =
|
|
490
|
+
this.output.write(s2.join(`
|
|
491
|
+
`)), this._prevFrame = u3;
|
|
492
492
|
return;
|
|
493
493
|
}
|
|
494
494
|
this.output.write(import_sisteransi.erase.down());
|
|
495
495
|
}
|
|
496
|
-
this.output.write(
|
|
496
|
+
this.output.write(u3), this.state === "initial" && (this.state = "active"), this._prevFrame = u3;
|
|
497
497
|
}
|
|
498
498
|
}
|
|
499
499
|
};
|
|
@@ -504,11 +504,11 @@ var dD = class extends x {
|
|
|
504
504
|
get _value() {
|
|
505
505
|
return this.cursor === 0;
|
|
506
506
|
}
|
|
507
|
-
constructor(
|
|
508
|
-
super(
|
|
507
|
+
constructor(u3) {
|
|
508
|
+
super(u3, false), this.value = !!u3.initialValue, this.on("value", () => {
|
|
509
509
|
this.value = this._value;
|
|
510
|
-
}), this.on("confirm", (
|
|
511
|
-
this.output.write(import_sisteransi.cursor.move(0, -1)), this.value =
|
|
510
|
+
}), this.on("confirm", (t2) => {
|
|
511
|
+
this.output.write(import_sisteransi.cursor.move(0, -1)), this.value = t2, this.state = "submit", this.close();
|
|
512
512
|
}), this.on("cursor", () => {
|
|
513
513
|
this.value = !this.value;
|
|
514
514
|
});
|
|
@@ -517,14 +517,14 @@ var dD = class extends x {
|
|
|
517
517
|
var A;
|
|
518
518
|
A = /* @__PURE__ */ new WeakMap();
|
|
519
519
|
var kD = Object.defineProperty;
|
|
520
|
-
var $D = (e2,
|
|
521
|
-
var H = (e2,
|
|
520
|
+
var $D = (e2, u3, t2) => u3 in e2 ? kD(e2, u3, { enumerable: true, configurable: true, writable: true, value: t2 }) : e2[u3] = t2;
|
|
521
|
+
var H = (e2, u3, t2) => ($D(e2, typeof u3 != "symbol" ? u3 + "" : u3, t2), t2);
|
|
522
522
|
var SD = class extends x {
|
|
523
|
-
constructor(
|
|
524
|
-
super(
|
|
525
|
-
|
|
526
|
-
}), this.on("cursor", (
|
|
527
|
-
switch (
|
|
523
|
+
constructor(u3) {
|
|
524
|
+
super(u3, false), H(this, "options"), H(this, "cursor", 0), this.options = u3.options, this.value = [...u3.initialValues ?? []], this.cursor = Math.max(this.options.findIndex(({ value: t2 }) => t2 === u3.cursorAt), 0), this.on("key", (t2) => {
|
|
525
|
+
t2 === "a" && this.toggleAll();
|
|
526
|
+
}), this.on("cursor", (t2) => {
|
|
527
|
+
switch (t2) {
|
|
528
528
|
case "left":
|
|
529
529
|
case "up":
|
|
530
530
|
this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
|
|
@@ -543,21 +543,21 @@ var SD = class extends x {
|
|
|
543
543
|
return this.options[this.cursor].value;
|
|
544
544
|
}
|
|
545
545
|
toggleAll() {
|
|
546
|
-
const
|
|
547
|
-
this.value =
|
|
546
|
+
const u3 = this.value.length === this.options.length;
|
|
547
|
+
this.value = u3 ? [] : this.options.map((t2) => t2.value);
|
|
548
548
|
}
|
|
549
549
|
toggleValue() {
|
|
550
|
-
const
|
|
551
|
-
this.value =
|
|
550
|
+
const u3 = this.value.includes(this._value);
|
|
551
|
+
this.value = u3 ? this.value.filter((t2) => t2 !== this._value) : [...this.value, this._value];
|
|
552
552
|
}
|
|
553
553
|
};
|
|
554
554
|
var OD = Object.defineProperty;
|
|
555
|
-
var PD = (e2,
|
|
556
|
-
var J = (e2,
|
|
555
|
+
var PD = (e2, u3, t2) => u3 in e2 ? OD(e2, u3, { enumerable: true, configurable: true, writable: true, value: t2 }) : e2[u3] = t2;
|
|
556
|
+
var J = (e2, u3, t2) => (PD(e2, typeof u3 != "symbol" ? u3 + "" : u3, t2), t2);
|
|
557
557
|
var LD = class extends x {
|
|
558
|
-
constructor(
|
|
559
|
-
super(
|
|
560
|
-
switch (
|
|
558
|
+
constructor(u3) {
|
|
559
|
+
super(u3, false), J(this, "options"), J(this, "cursor", 0), this.options = u3.options, this.cursor = this.options.findIndex(({ value: t2 }) => t2 === u3.initialValue), this.cursor === -1 && (this.cursor = 0), this.changeValue(), this.on("cursor", (t2) => {
|
|
560
|
+
switch (t2) {
|
|
561
561
|
case "left":
|
|
562
562
|
case "up":
|
|
563
563
|
this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
|
|
@@ -581,15 +581,15 @@ var RD = class extends x {
|
|
|
581
581
|
get valueWithCursor() {
|
|
582
582
|
if (this.state === "submit") return this.value;
|
|
583
583
|
if (this.cursor >= this.value.length) return `${this.value}\u2588`;
|
|
584
|
-
const
|
|
585
|
-
return `${
|
|
584
|
+
const u3 = this.value.slice(0, this.cursor), [t2, ...F2] = this.value.slice(this.cursor);
|
|
585
|
+
return `${u3}${import_picocolors.default.inverse(t2)}${F2.join("")}`;
|
|
586
586
|
}
|
|
587
587
|
get cursor() {
|
|
588
588
|
return this._cursor;
|
|
589
589
|
}
|
|
590
|
-
constructor(
|
|
591
|
-
super(
|
|
592
|
-
this.value || (this.value =
|
|
590
|
+
constructor(u3) {
|
|
591
|
+
super(u3), this.on("finalize", () => {
|
|
592
|
+
this.value || (this.value = u3.defaultValue);
|
|
593
593
|
});
|
|
594
594
|
}
|
|
595
595
|
};
|
|
@@ -602,7 +602,7 @@ function ce() {
|
|
|
602
602
|
return y2.platform !== "win32" ? y2.env.TERM !== "linux" : !!y2.env.CI || !!y2.env.WT_SESSION || !!y2.env.TERMINUS_SUBLIME || y2.env.ConEmuTask === "{cmd::Cmder}" || y2.env.TERM_PROGRAM === "Terminus-Sublime" || y2.env.TERM_PROGRAM === "vscode" || y2.env.TERM === "xterm-256color" || y2.env.TERM === "alacritty" || y2.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
603
603
|
}
|
|
604
604
|
var V2 = ce();
|
|
605
|
-
var u = (
|
|
605
|
+
var u = (t2, n2) => V2 ? t2 : n2;
|
|
606
606
|
var le = u("\u25C6", "*");
|
|
607
607
|
var L2 = u("\u25A0", "x");
|
|
608
608
|
var W2 = u("\u25B2", "x");
|
|
@@ -624,8 +624,8 @@ var q = u("\u25CF", "\u2022");
|
|
|
624
624
|
var D = u("\u25C6", "*");
|
|
625
625
|
var U = u("\u25B2", "!");
|
|
626
626
|
var K2 = u("\u25A0", "x");
|
|
627
|
-
var b2 = (
|
|
628
|
-
switch (
|
|
627
|
+
var b2 = (t2) => {
|
|
628
|
+
switch (t2) {
|
|
629
629
|
case "initial":
|
|
630
630
|
case "active":
|
|
631
631
|
return import_picocolors2.default.cyan(le);
|
|
@@ -637,227 +637,227 @@ var b2 = (t) => {
|
|
|
637
637
|
return import_picocolors2.default.green(C);
|
|
638
638
|
}
|
|
639
639
|
};
|
|
640
|
-
var G2 = (
|
|
641
|
-
const { cursor:
|
|
642
|
-
let
|
|
643
|
-
|
|
644
|
-
const $2 =
|
|
645
|
-
return
|
|
646
|
-
const j2 =
|
|
647
|
-
return j2 ||
|
|
640
|
+
var G2 = (t2) => {
|
|
641
|
+
const { cursor: n2, options: r3, style: i2 } = t2, s2 = t2.maxItems ?? Number.POSITIVE_INFINITY, c2 = Math.max(process.stdout.rows - 4, 0), a2 = Math.min(c2, Math.max(s2, 5));
|
|
642
|
+
let l3 = 0;
|
|
643
|
+
n2 >= l3 + a2 - 3 ? l3 = Math.max(Math.min(n2 - a2 + 3, r3.length - a2), 0) : n2 < l3 + 2 && (l3 = Math.max(n2 - 2, 0));
|
|
644
|
+
const $2 = a2 < r3.length && l3 > 0, g3 = a2 < r3.length && l3 + a2 < r3.length;
|
|
645
|
+
return r3.slice(l3, l3 + a2).map((p3, v3, f2) => {
|
|
646
|
+
const j2 = v3 === 0 && $2, E2 = v3 === f2.length - 1 && g3;
|
|
647
|
+
return j2 || E2 ? import_picocolors2.default.dim("...") : i2(p3, v3 + l3 === n2);
|
|
648
648
|
});
|
|
649
649
|
};
|
|
650
|
-
var he = (
|
|
651
|
-
const
|
|
652
|
-
${b2(this.state)} ${
|
|
653
|
-
`,
|
|
650
|
+
var he = (t2) => new RD({ validate: t2.validate, placeholder: t2.placeholder, defaultValue: t2.defaultValue, initialValue: t2.initialValue, render() {
|
|
651
|
+
const n2 = `${import_picocolors2.default.gray(o)}
|
|
652
|
+
${b2(this.state)} ${t2.message}
|
|
653
|
+
`, r3 = t2.placeholder ? import_picocolors2.default.inverse(t2.placeholder[0]) + import_picocolors2.default.dim(t2.placeholder.slice(1)) : import_picocolors2.default.inverse(import_picocolors2.default.hidden("_")), i2 = this.value ? this.valueWithCursor : r3;
|
|
654
654
|
switch (this.state) {
|
|
655
655
|
case "error":
|
|
656
|
-
return `${
|
|
657
|
-
${import_picocolors2.default.yellow(o)} ${
|
|
656
|
+
return `${n2.trim()}
|
|
657
|
+
${import_picocolors2.default.yellow(o)} ${i2}
|
|
658
658
|
${import_picocolors2.default.yellow(d2)} ${import_picocolors2.default.yellow(this.error)}
|
|
659
659
|
`;
|
|
660
660
|
case "submit":
|
|
661
|
-
return `${
|
|
661
|
+
return `${n2}${import_picocolors2.default.gray(o)} ${import_picocolors2.default.dim(this.value || t2.placeholder)}`;
|
|
662
662
|
case "cancel":
|
|
663
|
-
return `${
|
|
663
|
+
return `${n2}${import_picocolors2.default.gray(o)} ${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(this.value ?? ""))}${this.value?.trim() ? `
|
|
664
664
|
${import_picocolors2.default.gray(o)}` : ""}`;
|
|
665
665
|
default:
|
|
666
|
-
return `${
|
|
666
|
+
return `${n2}${import_picocolors2.default.cyan(o)} ${i2}
|
|
667
667
|
${import_picocolors2.default.cyan(d2)}
|
|
668
668
|
`;
|
|
669
669
|
}
|
|
670
670
|
} }).prompt();
|
|
671
|
-
var ye = (
|
|
672
|
-
const
|
|
673
|
-
return new dD({ active:
|
|
674
|
-
const
|
|
675
|
-
${b2(this.state)} ${
|
|
676
|
-
`,
|
|
671
|
+
var ye = (t2) => {
|
|
672
|
+
const n2 = t2.active ?? "Yes", r3 = t2.inactive ?? "No";
|
|
673
|
+
return new dD({ active: n2, inactive: r3, initialValue: t2.initialValue ?? true, render() {
|
|
674
|
+
const i2 = `${import_picocolors2.default.gray(o)}
|
|
675
|
+
${b2(this.state)} ${t2.message}
|
|
676
|
+
`, s2 = this.value ? n2 : r3;
|
|
677
677
|
switch (this.state) {
|
|
678
678
|
case "submit":
|
|
679
|
-
return `${
|
|
679
|
+
return `${i2}${import_picocolors2.default.gray(o)} ${import_picocolors2.default.dim(s2)}`;
|
|
680
680
|
case "cancel":
|
|
681
|
-
return `${
|
|
681
|
+
return `${i2}${import_picocolors2.default.gray(o)} ${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(s2))}
|
|
682
682
|
${import_picocolors2.default.gray(o)}`;
|
|
683
683
|
default:
|
|
684
|
-
return `${
|
|
684
|
+
return `${i2}${import_picocolors2.default.cyan(o)} ${this.value ? `${import_picocolors2.default.green(k2)} ${n2}` : `${import_picocolors2.default.dim(P2)} ${import_picocolors2.default.dim(n2)}`} ${import_picocolors2.default.dim("/")} ${this.value ? `${import_picocolors2.default.dim(P2)} ${import_picocolors2.default.dim(r3)}` : `${import_picocolors2.default.green(k2)} ${r3}`}
|
|
685
685
|
${import_picocolors2.default.cyan(d2)}
|
|
686
686
|
`;
|
|
687
687
|
}
|
|
688
688
|
} }).prompt();
|
|
689
689
|
};
|
|
690
|
-
var ve = (
|
|
691
|
-
const
|
|
692
|
-
const
|
|
693
|
-
switch (
|
|
690
|
+
var ve = (t2) => {
|
|
691
|
+
const n2 = (r3, i2) => {
|
|
692
|
+
const s2 = r3.label ?? String(r3.value);
|
|
693
|
+
switch (i2) {
|
|
694
694
|
case "selected":
|
|
695
|
-
return `${import_picocolors2.default.dim(
|
|
695
|
+
return `${import_picocolors2.default.dim(s2)}`;
|
|
696
696
|
case "active":
|
|
697
|
-
return `${import_picocolors2.default.green(k2)} ${
|
|
697
|
+
return `${import_picocolors2.default.green(k2)} ${s2} ${r3.hint ? import_picocolors2.default.dim(`(${r3.hint})`) : ""}`;
|
|
698
698
|
case "cancelled":
|
|
699
|
-
return `${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(
|
|
699
|
+
return `${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(s2))}`;
|
|
700
700
|
default:
|
|
701
|
-
return `${import_picocolors2.default.dim(P2)} ${import_picocolors2.default.dim(
|
|
701
|
+
return `${import_picocolors2.default.dim(P2)} ${import_picocolors2.default.dim(s2)}`;
|
|
702
702
|
}
|
|
703
703
|
};
|
|
704
|
-
return new LD({ options:
|
|
705
|
-
const
|
|
706
|
-
${b2(this.state)} ${
|
|
704
|
+
return new LD({ options: t2.options, initialValue: t2.initialValue, render() {
|
|
705
|
+
const r3 = `${import_picocolors2.default.gray(o)}
|
|
706
|
+
${b2(this.state)} ${t2.message}
|
|
707
707
|
`;
|
|
708
708
|
switch (this.state) {
|
|
709
709
|
case "submit":
|
|
710
|
-
return `${
|
|
710
|
+
return `${r3}${import_picocolors2.default.gray(o)} ${n2(this.options[this.cursor], "selected")}`;
|
|
711
711
|
case "cancel":
|
|
712
|
-
return `${
|
|
712
|
+
return `${r3}${import_picocolors2.default.gray(o)} ${n2(this.options[this.cursor], "cancelled")}
|
|
713
713
|
${import_picocolors2.default.gray(o)}`;
|
|
714
714
|
default:
|
|
715
|
-
return `${
|
|
715
|
+
return `${r3}${import_picocolors2.default.cyan(o)} ${G2({ cursor: this.cursor, options: this.options, maxItems: t2.maxItems, style: (i2, s2) => n2(i2, s2 ? "active" : "inactive") }).join(`
|
|
716
716
|
${import_picocolors2.default.cyan(o)} `)}
|
|
717
717
|
${import_picocolors2.default.cyan(d2)}
|
|
718
718
|
`;
|
|
719
719
|
}
|
|
720
720
|
} }).prompt();
|
|
721
721
|
};
|
|
722
|
-
var fe = (
|
|
723
|
-
const
|
|
724
|
-
const
|
|
725
|
-
return
|
|
722
|
+
var fe = (t2) => {
|
|
723
|
+
const n2 = (r3, i2) => {
|
|
724
|
+
const s2 = r3.label ?? String(r3.value);
|
|
725
|
+
return i2 === "active" ? `${import_picocolors2.default.cyan(A2)} ${s2} ${r3.hint ? import_picocolors2.default.dim(`(${r3.hint})`) : ""}` : i2 === "selected" ? `${import_picocolors2.default.green(T)} ${import_picocolors2.default.dim(s2)} ${r3.hint ? import_picocolors2.default.dim(`(${r3.hint})`) : ""}` : i2 === "cancelled" ? `${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(s2))}` : i2 === "active-selected" ? `${import_picocolors2.default.green(T)} ${s2} ${r3.hint ? import_picocolors2.default.dim(`(${r3.hint})`) : ""}` : i2 === "submitted" ? `${import_picocolors2.default.dim(s2)}` : `${import_picocolors2.default.dim(F)} ${import_picocolors2.default.dim(s2)}`;
|
|
726
726
|
};
|
|
727
|
-
return new SD({ options:
|
|
728
|
-
if (this.required &&
|
|
727
|
+
return new SD({ options: t2.options, initialValues: t2.initialValues, required: t2.required ?? true, cursorAt: t2.cursorAt, validate(r3) {
|
|
728
|
+
if (this.required && r3.length === 0) return `Please select at least one option.
|
|
729
729
|
${import_picocolors2.default.reset(import_picocolors2.default.dim(`Press ${import_picocolors2.default.gray(import_picocolors2.default.bgWhite(import_picocolors2.default.inverse(" space ")))} to select, ${import_picocolors2.default.gray(import_picocolors2.default.bgWhite(import_picocolors2.default.inverse(" enter ")))} to submit`))}`;
|
|
730
730
|
}, render() {
|
|
731
|
-
const
|
|
732
|
-
${b2(this.state)} ${
|
|
733
|
-
`,
|
|
734
|
-
const
|
|
735
|
-
return
|
|
731
|
+
const r3 = `${import_picocolors2.default.gray(o)}
|
|
732
|
+
${b2(this.state)} ${t2.message}
|
|
733
|
+
`, i2 = (s2, c2) => {
|
|
734
|
+
const a2 = this.value.includes(s2.value);
|
|
735
|
+
return c2 && a2 ? n2(s2, "active-selected") : a2 ? n2(s2, "selected") : n2(s2, c2 ? "active" : "inactive");
|
|
736
736
|
};
|
|
737
737
|
switch (this.state) {
|
|
738
738
|
case "submit":
|
|
739
|
-
return `${
|
|
739
|
+
return `${r3}${import_picocolors2.default.gray(o)} ${this.options.filter(({ value: s2 }) => this.value.includes(s2)).map((s2) => n2(s2, "submitted")).join(import_picocolors2.default.dim(", ")) || import_picocolors2.default.dim("none")}`;
|
|
740
740
|
case "cancel": {
|
|
741
|
-
const
|
|
742
|
-
return `${
|
|
741
|
+
const s2 = this.options.filter(({ value: c2 }) => this.value.includes(c2)).map((c2) => n2(c2, "cancelled")).join(import_picocolors2.default.dim(", "));
|
|
742
|
+
return `${r3}${import_picocolors2.default.gray(o)} ${s2.trim() ? `${s2}
|
|
743
743
|
${import_picocolors2.default.gray(o)}` : ""}`;
|
|
744
744
|
}
|
|
745
745
|
case "error": {
|
|
746
|
-
const
|
|
747
|
-
`).map((
|
|
746
|
+
const s2 = this.error.split(`
|
|
747
|
+
`).map((c2, a2) => a2 === 0 ? `${import_picocolors2.default.yellow(d2)} ${import_picocolors2.default.yellow(c2)}` : ` ${c2}`).join(`
|
|
748
748
|
`);
|
|
749
|
-
return `${
|
|
749
|
+
return `${r3 + import_picocolors2.default.yellow(o)} ${G2({ options: this.options, cursor: this.cursor, maxItems: t2.maxItems, style: i2 }).join(`
|
|
750
750
|
${import_picocolors2.default.yellow(o)} `)}
|
|
751
|
-
${
|
|
751
|
+
${s2}
|
|
752
752
|
`;
|
|
753
753
|
}
|
|
754
754
|
default:
|
|
755
|
-
return `${
|
|
755
|
+
return `${r3}${import_picocolors2.default.cyan(o)} ${G2({ options: this.options, cursor: this.cursor, maxItems: t2.maxItems, style: i2 }).join(`
|
|
756
756
|
${import_picocolors2.default.cyan(o)} `)}
|
|
757
757
|
${import_picocolors2.default.cyan(d2)}
|
|
758
758
|
`;
|
|
759
759
|
}
|
|
760
760
|
} }).prompt();
|
|
761
761
|
};
|
|
762
|
-
var Me = (
|
|
763
|
-
const
|
|
764
|
-
${
|
|
762
|
+
var Me = (t2 = "", n2 = "") => {
|
|
763
|
+
const r3 = `
|
|
764
|
+
${t2}
|
|
765
765
|
`.split(`
|
|
766
|
-
`),
|
|
767
|
-
const $2 = S2(
|
|
768
|
-
return $2.length >
|
|
769
|
-
}, 0),
|
|
766
|
+
`), i2 = S2(n2).length, s2 = Math.max(r3.reduce((a2, l3) => {
|
|
767
|
+
const $2 = S2(l3);
|
|
768
|
+
return $2.length > a2 ? $2.length : a2;
|
|
769
|
+
}, 0), i2) + 2, c2 = r3.map((a2) => `${import_picocolors2.default.gray(o)} ${import_picocolors2.default.dim(a2)}${" ".repeat(s2 - S2(a2).length)}${import_picocolors2.default.gray(o)}`).join(`
|
|
770
770
|
`);
|
|
771
771
|
process.stdout.write(`${import_picocolors2.default.gray(o)}
|
|
772
|
-
${import_picocolors2.default.green(C)} ${import_picocolors2.default.reset(
|
|
773
|
-
${
|
|
774
|
-
${import_picocolors2.default.gray(de + _2.repeat(
|
|
772
|
+
${import_picocolors2.default.green(C)} ${import_picocolors2.default.reset(n2)} ${import_picocolors2.default.gray(_2.repeat(Math.max(s2 - i2 - 1, 1)) + me)}
|
|
773
|
+
${c2}
|
|
774
|
+
${import_picocolors2.default.gray(de + _2.repeat(s2 + 2) + pe)}
|
|
775
775
|
`);
|
|
776
776
|
};
|
|
777
|
-
var xe = (
|
|
778
|
-
process.stdout.write(`${import_picocolors2.default.gray(d2)} ${import_picocolors2.default.red(
|
|
777
|
+
var xe = (t2 = "") => {
|
|
778
|
+
process.stdout.write(`${import_picocolors2.default.gray(d2)} ${import_picocolors2.default.red(t2)}
|
|
779
779
|
|
|
780
780
|
`);
|
|
781
781
|
};
|
|
782
|
-
var Ie = (
|
|
783
|
-
process.stdout.write(`${import_picocolors2.default.gray(ue)} ${
|
|
782
|
+
var Ie = (t2 = "") => {
|
|
783
|
+
process.stdout.write(`${import_picocolors2.default.gray(ue)} ${t2}
|
|
784
784
|
`);
|
|
785
785
|
};
|
|
786
|
-
var Se = (
|
|
786
|
+
var Se = (t2 = "") => {
|
|
787
787
|
process.stdout.write(`${import_picocolors2.default.gray(o)}
|
|
788
|
-
${import_picocolors2.default.gray(d2)} ${
|
|
788
|
+
${import_picocolors2.default.gray(d2)} ${t2}
|
|
789
789
|
|
|
790
790
|
`);
|
|
791
791
|
};
|
|
792
|
-
var M2 = { message: (
|
|
793
|
-
const
|
|
794
|
-
if (
|
|
795
|
-
const [
|
|
792
|
+
var M2 = { message: (t2 = "", { symbol: n2 = import_picocolors2.default.gray(o) } = {}) => {
|
|
793
|
+
const r3 = [`${import_picocolors2.default.gray(o)}`];
|
|
794
|
+
if (t2) {
|
|
795
|
+
const [i2, ...s2] = t2.split(`
|
|
796
796
|
`);
|
|
797
|
-
|
|
797
|
+
r3.push(`${n2} ${i2}`, ...s2.map((c2) => `${import_picocolors2.default.gray(o)} ${c2}`));
|
|
798
798
|
}
|
|
799
|
-
process.stdout.write(`${
|
|
799
|
+
process.stdout.write(`${r3.join(`
|
|
800
800
|
`)}
|
|
801
801
|
`);
|
|
802
|
-
}, info: (
|
|
803
|
-
M2.message(
|
|
804
|
-
}, success: (
|
|
805
|
-
M2.message(
|
|
806
|
-
}, step: (
|
|
807
|
-
M2.message(
|
|
808
|
-
}, warn: (
|
|
809
|
-
M2.message(
|
|
810
|
-
}, warning: (
|
|
811
|
-
M2.warn(
|
|
812
|
-
}, error: (
|
|
813
|
-
M2.message(
|
|
802
|
+
}, info: (t2) => {
|
|
803
|
+
M2.message(t2, { symbol: import_picocolors2.default.blue(q) });
|
|
804
|
+
}, success: (t2) => {
|
|
805
|
+
M2.message(t2, { symbol: import_picocolors2.default.green(D) });
|
|
806
|
+
}, step: (t2) => {
|
|
807
|
+
M2.message(t2, { symbol: import_picocolors2.default.green(C) });
|
|
808
|
+
}, warn: (t2) => {
|
|
809
|
+
M2.message(t2, { symbol: import_picocolors2.default.yellow(U) });
|
|
810
|
+
}, warning: (t2) => {
|
|
811
|
+
M2.warn(t2);
|
|
812
|
+
}, error: (t2) => {
|
|
813
|
+
M2.message(t2, { symbol: import_picocolors2.default.red(K2) });
|
|
814
814
|
} };
|
|
815
815
|
var J2 = `${import_picocolors2.default.gray(o)} `;
|
|
816
|
-
var Y2 = ({ indicator:
|
|
817
|
-
const
|
|
818
|
-
let
|
|
819
|
-
const
|
|
820
|
-
const
|
|
821
|
-
|
|
822
|
-
},
|
|
823
|
-
process.on("uncaughtExceptionMonitor",
|
|
824
|
-
},
|
|
825
|
-
process.removeListener("uncaughtExceptionMonitor",
|
|
816
|
+
var Y2 = ({ indicator: t2 = "dots" } = {}) => {
|
|
817
|
+
const n2 = V2 ? ["\u25D2", "\u25D0", "\u25D3", "\u25D1"] : ["\u2022", "o", "O", "0"], r3 = V2 ? 80 : 120, i2 = process.env.CI === "true";
|
|
818
|
+
let s2, c2, a2 = false, l3 = "", $2, g3 = performance.now();
|
|
819
|
+
const p3 = (m3) => {
|
|
820
|
+
const h3 = m3 > 1 ? "Something went wrong" : "Canceled";
|
|
821
|
+
a2 && N2(h3, m3);
|
|
822
|
+
}, v3 = () => p3(2), f2 = () => p3(1), j2 = () => {
|
|
823
|
+
process.on("uncaughtExceptionMonitor", v3), process.on("unhandledRejection", v3), process.on("SIGINT", f2), process.on("SIGTERM", f2), process.on("exit", p3);
|
|
824
|
+
}, E2 = () => {
|
|
825
|
+
process.removeListener("uncaughtExceptionMonitor", v3), process.removeListener("unhandledRejection", v3), process.removeListener("SIGINT", f2), process.removeListener("SIGTERM", f2), process.removeListener("exit", p3);
|
|
826
826
|
}, B2 = () => {
|
|
827
827
|
if ($2 === void 0) return;
|
|
828
|
-
|
|
828
|
+
i2 && process.stdout.write(`
|
|
829
829
|
`);
|
|
830
|
-
const
|
|
830
|
+
const m3 = $2.split(`
|
|
831
831
|
`);
|
|
832
|
-
process.stdout.write(import_sisteransi2.cursor.move(-999,
|
|
833
|
-
},
|
|
834
|
-
const
|
|
835
|
-
return
|
|
836
|
-
}, H2 = (
|
|
837
|
-
|
|
832
|
+
process.stdout.write(import_sisteransi2.cursor.move(-999, m3.length - 1)), process.stdout.write(import_sisteransi2.erase.down(m3.length));
|
|
833
|
+
}, R3 = (m3) => m3.replace(/\.+$/, ""), O2 = (m3) => {
|
|
834
|
+
const h3 = (performance.now() - m3) / 1e3, w3 = Math.floor(h3 / 60), I2 = Math.floor(h3 % 60);
|
|
835
|
+
return w3 > 0 ? `[${w3}m ${I2}s]` : `[${I2}s]`;
|
|
836
|
+
}, H2 = (m3 = "") => {
|
|
837
|
+
a2 = true, s2 = fD(), l3 = R3(m3), g3 = performance.now(), process.stdout.write(`${import_picocolors2.default.gray(o)}
|
|
838
838
|
`);
|
|
839
|
-
let
|
|
840
|
-
j2(),
|
|
841
|
-
if (
|
|
842
|
-
B2(), $2 =
|
|
843
|
-
const I2 = import_picocolors2.default.magenta(
|
|
844
|
-
if (
|
|
845
|
-
else if (
|
|
839
|
+
let h3 = 0, w3 = 0;
|
|
840
|
+
j2(), c2 = setInterval(() => {
|
|
841
|
+
if (i2 && l3 === $2) return;
|
|
842
|
+
B2(), $2 = l3;
|
|
843
|
+
const I2 = import_picocolors2.default.magenta(n2[h3]);
|
|
844
|
+
if (i2) process.stdout.write(`${I2} ${l3}...`);
|
|
845
|
+
else if (t2 === "timer") process.stdout.write(`${I2} ${l3} ${O2(g3)}`);
|
|
846
846
|
else {
|
|
847
|
-
const z2 = ".".repeat(Math.floor(
|
|
848
|
-
process.stdout.write(`${I2} ${
|
|
847
|
+
const z2 = ".".repeat(Math.floor(w3)).slice(0, 3);
|
|
848
|
+
process.stdout.write(`${I2} ${l3}${z2}`);
|
|
849
849
|
}
|
|
850
|
-
|
|
851
|
-
},
|
|
852
|
-
}, N2 = (
|
|
853
|
-
|
|
854
|
-
const
|
|
855
|
-
|
|
856
|
-
`) : process.stdout.write(`${
|
|
857
|
-
`),
|
|
850
|
+
h3 = h3 + 1 < n2.length ? h3 + 1 : 0, w3 = w3 < n2.length ? w3 + 0.125 : 0;
|
|
851
|
+
}, r3);
|
|
852
|
+
}, N2 = (m3 = "", h3 = 0) => {
|
|
853
|
+
a2 = false, clearInterval(c2), B2();
|
|
854
|
+
const w3 = h3 === 0 ? import_picocolors2.default.green(C) : h3 === 1 ? import_picocolors2.default.red(L2) : import_picocolors2.default.red(W2);
|
|
855
|
+
l3 = R3(m3 ?? l3), t2 === "timer" ? process.stdout.write(`${w3} ${l3} ${O2(g3)}
|
|
856
|
+
`) : process.stdout.write(`${w3} ${l3}
|
|
857
|
+
`), E2(), s2();
|
|
858
858
|
};
|
|
859
|
-
return { start: H2, stop: N2, message: (
|
|
860
|
-
|
|
859
|
+
return { start: H2, stop: N2, message: (m3 = "") => {
|
|
860
|
+
l3 = R3(m3 ?? l3);
|
|
861
861
|
} };
|
|
862
862
|
};
|
|
863
863
|
|
|
@@ -2956,12 +2956,12 @@ var archetypes = [
|
|
|
2956
2956
|
var BASE_COMPONENT = "kai-chat";
|
|
2957
2957
|
function listCapabilityGroups() {
|
|
2958
2958
|
const seen = /* @__PURE__ */ new Map();
|
|
2959
|
-
for (const
|
|
2960
|
-
const components =
|
|
2959
|
+
for (const a2 of archetypes) {
|
|
2960
|
+
const components = a2.components.filter((c2) => c2 !== BASE_COMPONENT);
|
|
2961
2961
|
if (components.length === 0) continue;
|
|
2962
2962
|
const key = [...components].sort().join(",");
|
|
2963
2963
|
if (seen.has(key)) continue;
|
|
2964
|
-
seen.set(key, { id: components.map((
|
|
2964
|
+
seen.set(key, { id: components.map((c2) => c2.replace(/^kai-/, "")).join("+"), components });
|
|
2965
2965
|
}
|
|
2966
2966
|
return [...seen.values()];
|
|
2967
2967
|
}
|
|
@@ -2981,7 +2981,7 @@ var integrations = [
|
|
|
2981
2981
|
mock_default
|
|
2982
2982
|
];
|
|
2983
2983
|
function getIntegration(id) {
|
|
2984
|
-
return integrations.find((
|
|
2984
|
+
return integrations.find((i2) => i2.id === id);
|
|
2985
2985
|
}
|
|
2986
2986
|
function listIntegrations() {
|
|
2987
2987
|
return integrations;
|
|
@@ -3126,7 +3126,7 @@ var WIRED_GATEWAYS = /* @__PURE__ */ new Set(["mock", "openrouter", "anthropic"]
|
|
|
3126
3126
|
function wirableGateway(gatewayId, framework) {
|
|
3127
3127
|
if (gatewayId === "mock") return null;
|
|
3128
3128
|
if (!WIRED_GATEWAYS.has(gatewayId)) {
|
|
3129
|
-
return `gateway '${gatewayId}' is in the kit catalog but is not wired by this release yet. Available: ${[...WIRED_GATEWAYS].map((
|
|
3129
|
+
return `gateway '${gatewayId}' is in the kit catalog but is not wired by this release yet. Available: ${[...WIRED_GATEWAYS].map((g3) => g3 === "mock" ? "none" : g3).join(", ")}`;
|
|
3130
3130
|
}
|
|
3131
3131
|
if (framework.route === null) {
|
|
3132
3132
|
return `'${framework.id}' has no route destination yet, so gateway '${gatewayId}' cannot be wired for it. A keyed gateway needs a server route, and where that goes differs per framework. Run \`--list --json\` to see which frameworks declare one.`;
|
|
@@ -3149,13 +3149,13 @@ function rendererComponents() {
|
|
|
3149
3149
|
}
|
|
3150
3150
|
function wirableGateways(framework) {
|
|
3151
3151
|
return listGateways().filter(
|
|
3152
|
-
(
|
|
3152
|
+
(g3) => g3.wired && wirableGateway(g3.integration.id, framework) === null
|
|
3153
3153
|
);
|
|
3154
3154
|
}
|
|
3155
3155
|
function listGateways() {
|
|
3156
3156
|
const all = listIntegrations();
|
|
3157
|
-
const mock2 = all.filter((
|
|
3158
|
-
const rest = all.filter((
|
|
3157
|
+
const mock2 = all.filter((i2) => i2.id === "mock");
|
|
3158
|
+
const rest = all.filter((i2) => i2.id !== "mock");
|
|
3159
3159
|
return [...mock2, ...rest].map((integration) => ({
|
|
3160
3160
|
integration,
|
|
3161
3161
|
wired: WIRED_GATEWAYS.has(integration.id)
|
|
@@ -3208,10 +3208,10 @@ var FEATURES = [
|
|
|
3208
3208
|
}
|
|
3209
3209
|
];
|
|
3210
3210
|
function getFeature(id) {
|
|
3211
|
-
return FEATURES.find((
|
|
3211
|
+
return FEATURES.find((f2) => f2.id === id);
|
|
3212
3212
|
}
|
|
3213
|
-
var DEFAULT_FEATURES = FEATURES.filter((
|
|
3214
|
-
(
|
|
3213
|
+
var DEFAULT_FEATURES = FEATURES.filter((f2) => f2.default).map(
|
|
3214
|
+
(f2) => f2.id
|
|
3215
3215
|
);
|
|
3216
3216
|
var GENERATED_SURFACES_WIRED = false;
|
|
3217
3217
|
var GENERATED_SURFACE_GAP = "generated feature surfaces are not wired in this release \u2014 no such project has been run end to end, so emitting one would hand back an app nobody has seen work. The composed workspace is the surface that runs today";
|
|
@@ -3221,7 +3221,7 @@ function featureEmit(feature, framework) {
|
|
|
3221
3221
|
return framework.composedWorkspace ? "composed" : "unavailable";
|
|
3222
3222
|
}
|
|
3223
3223
|
const known = rendererComponents();
|
|
3224
|
-
if (!feature.components.every((
|
|
3224
|
+
if (!feature.components.every((c2) => known.has(c2))) return "unavailable";
|
|
3225
3225
|
return GENERATED_SURFACES_WIRED ? "renderer" : "unavailable";
|
|
3226
3226
|
}
|
|
3227
3227
|
function featureUnavailableReason(feature, framework) {
|
|
@@ -3230,17 +3230,17 @@ function featureUnavailableReason(feature, framework) {
|
|
|
3230
3230
|
return `feature '${feature.id}' cannot be emitted for ${framework.label}: it comes from the hand-composed workspace starter and ${framework.label} has none. No renderer emits a ${feature.components[0]} surface, so there is nothing to generate in its place.`;
|
|
3231
3231
|
}
|
|
3232
3232
|
const known = rendererComponents();
|
|
3233
|
-
const missing = feature.components.filter((
|
|
3233
|
+
const missing = feature.components.filter((c2) => !known.has(c2));
|
|
3234
3234
|
if (missing.length > 0) {
|
|
3235
3235
|
return `feature '${feature.id}' cannot be emitted for ${framework.label}: no renderer branches on ${missing.join(" / ")}, so the emitted project would compile and run without the feature in it. Compose those components in a kit archetype and this resolves itself.`;
|
|
3236
3236
|
}
|
|
3237
3237
|
return `feature '${feature.id}' cannot be emitted: ${GENERATED_SURFACE_GAP}.`;
|
|
3238
3238
|
}
|
|
3239
3239
|
function availableFeatures(framework) {
|
|
3240
|
-
return FEATURES.filter((
|
|
3240
|
+
return FEATURES.filter((f2) => featureEmit(f2, framework) !== "unavailable");
|
|
3241
3241
|
}
|
|
3242
3242
|
function composedWorkspaceFeatures(framework) {
|
|
3243
|
-
return FEATURES.filter((
|
|
3243
|
+
return FEATURES.filter((f2) => featureEmit(f2, framework) === "composed");
|
|
3244
3244
|
}
|
|
3245
3245
|
function resolveSurface(featureIds, framework) {
|
|
3246
3246
|
const chosen = [];
|
|
@@ -3251,13 +3251,13 @@ function resolveSurface(featureIds, framework) {
|
|
|
3251
3251
|
if (unavailable) return { ok: false, reason: unavailable };
|
|
3252
3252
|
chosen.push(feature);
|
|
3253
3253
|
}
|
|
3254
|
-
const composed = chosen.filter((
|
|
3254
|
+
const composed = chosen.filter((f2) => featureEmit(f2, framework) === "composed");
|
|
3255
3255
|
if (composed.length > 0 || chosen.length === 0 && !GENERATED_SURFACES_WIRED) {
|
|
3256
3256
|
if (chosen.length > composed.length) {
|
|
3257
|
-
const extra = chosen.filter((
|
|
3257
|
+
const extra = chosen.filter((f2) => !composed.includes(f2)).map((f2) => f2.id);
|
|
3258
3258
|
return {
|
|
3259
3259
|
ok: false,
|
|
3260
|
-
reason: `'${composed.map((
|
|
3260
|
+
reason: `'${composed.map((f2) => f2.id).join("', '")}' comes from the hand-composed workspace template, which this release cannot combine with generated features ('${extra.join("', '")}'). Pick one or the other.`
|
|
3261
3261
|
};
|
|
3262
3262
|
}
|
|
3263
3263
|
const emitted = composedWorkspaceFeatures(framework);
|
|
@@ -3272,8 +3272,8 @@ function resolveSurface(featureIds, framework) {
|
|
|
3272
3272
|
ok: true,
|
|
3273
3273
|
surface: {
|
|
3274
3274
|
kind: "composed",
|
|
3275
|
-
features: emitted.map((
|
|
3276
|
-
unasked: emitted.filter((
|
|
3275
|
+
features: emitted.map((f2) => f2.id),
|
|
3276
|
+
unasked: emitted.filter((f2) => !asked.has(f2.id)).map((f2) => f2.id)
|
|
3277
3277
|
}
|
|
3278
3278
|
};
|
|
3279
3279
|
}
|
|
@@ -3283,7 +3283,7 @@ function resolveSurface(featureIds, framework) {
|
|
|
3283
3283
|
};
|
|
3284
3284
|
}
|
|
3285
3285
|
function surfaceComponents(chosen) {
|
|
3286
|
-
return ["kai-chat", ...new Set(chosen.flatMap((
|
|
3286
|
+
return ["kai-chat", ...new Set(chosen.flatMap((f2) => f2.components))];
|
|
3287
3287
|
}
|
|
3288
3288
|
|
|
3289
3289
|
// src/routes.ts
|
|
@@ -3666,10 +3666,10 @@ var FRAMEWORKS = [
|
|
|
3666
3666
|
}
|
|
3667
3667
|
];
|
|
3668
3668
|
function getFramework(id) {
|
|
3669
|
-
return FRAMEWORKS.find((
|
|
3669
|
+
return FRAMEWORKS.find((f2) => f2.id === id);
|
|
3670
3670
|
}
|
|
3671
3671
|
function readyFrameworks() {
|
|
3672
|
-
return FRAMEWORKS.filter((
|
|
3672
|
+
return FRAMEWORKS.filter((f2) => f2.status === "ready");
|
|
3673
3673
|
}
|
|
3674
3674
|
var DEFAULT_FRAMEWORK = "react";
|
|
3675
3675
|
|
|
@@ -3685,8 +3685,8 @@ var TAKES_VALUE = /* @__PURE__ */ new Set([
|
|
|
3685
3685
|
]);
|
|
3686
3686
|
function parseArgs(argv) {
|
|
3687
3687
|
const out = { yes: false, list: false, json: false, help: false, version: false, errors: [] };
|
|
3688
|
-
for (let
|
|
3689
|
-
const arg = argv[
|
|
3688
|
+
for (let i2 = 0; i2 < argv.length; i2++) {
|
|
3689
|
+
const arg = argv[i2];
|
|
3690
3690
|
let flag = arg;
|
|
3691
3691
|
let value;
|
|
3692
3692
|
if (flag.startsWith("--") && flag.includes("=")) {
|
|
@@ -3694,7 +3694,7 @@ function parseArgs(argv) {
|
|
|
3694
3694
|
value = flag.slice(eq + 1);
|
|
3695
3695
|
flag = flag.slice(0, eq);
|
|
3696
3696
|
} else if (TAKES_VALUE.has(flag)) {
|
|
3697
|
-
value = argv[++
|
|
3697
|
+
value = argv[++i2];
|
|
3698
3698
|
if (value === void 0) {
|
|
3699
3699
|
out.errors.push(`${flag} needs a value`);
|
|
3700
3700
|
continue;
|
|
@@ -3714,7 +3714,7 @@ function parseArgs(argv) {
|
|
|
3714
3714
|
out.shape = value;
|
|
3715
3715
|
break;
|
|
3716
3716
|
case "--features":
|
|
3717
|
-
out.features = value === void 0 || value === "" || value === "none" ? [] : value.split(",").map((
|
|
3717
|
+
out.features = value === void 0 || value === "" || value === "none" ? [] : value.split(",").map((f2) => f2.trim()).filter(Boolean);
|
|
3718
3718
|
break;
|
|
3719
3719
|
case "--gateway":
|
|
3720
3720
|
out.gateway = value;
|
|
@@ -3807,10 +3807,10 @@ var LAYOUTS = [
|
|
|
3807
3807
|
}
|
|
3808
3808
|
];
|
|
3809
3809
|
function getLayout(id) {
|
|
3810
|
-
return LAYOUTS.find((
|
|
3810
|
+
return LAYOUTS.find((l3) => l3.id === id);
|
|
3811
3811
|
}
|
|
3812
3812
|
function readyLayouts() {
|
|
3813
|
-
return LAYOUTS.filter((
|
|
3813
|
+
return LAYOUTS.filter((l3) => l3.status === "ready");
|
|
3814
3814
|
}
|
|
3815
3815
|
|
|
3816
3816
|
// src/axes.ts
|
|
@@ -3822,7 +3822,7 @@ function decideAxis(axis) {
|
|
|
3822
3822
|
return { ask: false, only, statement };
|
|
3823
3823
|
}
|
|
3824
3824
|
function layoutAxis() {
|
|
3825
|
-
const options = readyLayouts().map((
|
|
3825
|
+
const options = readyLayouts().map((l3) => ({ id: l3.id, label: l3.label, hint: l3.hint }));
|
|
3826
3826
|
return {
|
|
3827
3827
|
id: "layout",
|
|
3828
3828
|
label: "Layout",
|
|
@@ -3832,10 +3832,10 @@ function layoutAxis() {
|
|
|
3832
3832
|
};
|
|
3833
3833
|
}
|
|
3834
3834
|
function gatewayAxis(framework) {
|
|
3835
|
-
const options = wirableGateways(framework).map((
|
|
3836
|
-
id:
|
|
3837
|
-
label:
|
|
3838
|
-
hint:
|
|
3835
|
+
const options = wirableGateways(framework).map((g3) => ({
|
|
3836
|
+
id: g3.integration.id,
|
|
3837
|
+
label: g3.integration.id === "mock" ? "None" : g3.integration.title,
|
|
3838
|
+
hint: g3.integration.id === "mock" ? "local mock, no key, no backend" : `${g3.integration.envVars.join(", ")} \u2014 a server route is scaffolded for you`
|
|
3839
3839
|
}));
|
|
3840
3840
|
return {
|
|
3841
3841
|
id: "gateway",
|
|
@@ -4479,10 +4479,10 @@ function goLiveThread(appSource, framework) {
|
|
|
4479
4479
|
if (call >= 0) {
|
|
4480
4480
|
const from = call + GO_LIVE_CALL.length;
|
|
4481
4481
|
let depth = 1;
|
|
4482
|
-
for (let
|
|
4483
|
-
const ch = appSource[
|
|
4482
|
+
for (let i2 = from; i2 < appSource.length; i2++) {
|
|
4483
|
+
const ch = appSource[i2];
|
|
4484
4484
|
if (ch === "(") depth++;
|
|
4485
|
-
else if (ch === ")" && --depth === 0) return appSource.slice(from,
|
|
4485
|
+
else if (ch === ")" && --depth === 0) return appSource.slice(from, i2);
|
|
4486
4486
|
}
|
|
4487
4487
|
}
|
|
4488
4488
|
throw new Error(
|
|
@@ -4505,7 +4505,7 @@ npm run dev
|
|
|
4505
4505
|
|
|
4506
4506
|
${integration.runNote}
|
|
4507
4507
|
|
|
4508
|
-
\`${framework.paths.env}\` was created with ${integration.envVars.length === 1 ? "the variable" : "the variables"} ${integration.envVars.map((
|
|
4508
|
+
\`${framework.paths.env}\` was created with ${integration.envVars.length === 1 ? "the variable" : "the variables"} ${integration.envVars.map((v3) => `\`${v3}\``).join(", ")} set to a placeholder.
|
|
4509
4509
|
Replace ${integration.envVars.length === 1 ? "it" : "them"} with your own before \`npm run dev\`.
|
|
4510
4510
|
That file is gitignored, and only the server route reads it \u2014 the key never
|
|
4511
4511
|
reaches the browser.
|
|
@@ -4594,18 +4594,287 @@ function detectPackageManager(userAgent = process.env.npm_config_user_agent) {
|
|
|
4594
4594
|
import { existsSync as existsSync2 } from "node:fs";
|
|
4595
4595
|
import { mkdir as mkdir2, readdir as readdir2, writeFile as writeFile2 } from "node:fs/promises";
|
|
4596
4596
|
import path3 from "node:path";
|
|
4597
|
+
|
|
4598
|
+
// ../ui/dist/construct-templates.js
|
|
4599
|
+
var r2 = "https://ui.kitn.ai/schemas/construct/v1.json";
|
|
4600
|
+
var t = { id: "identity", paths: ["name"] };
|
|
4601
|
+
var a = { id: "theme", paths: ["theme.accent", "theme.mode", "theme.unreadColor"] };
|
|
4602
|
+
var n = { id: "header", paths: ["header.title"] };
|
|
4603
|
+
var m2 = {
|
|
4604
|
+
id: "header",
|
|
4605
|
+
paths: ["header.title", "header.themeToggle", "header.actions"]
|
|
4606
|
+
};
|
|
4607
|
+
var u2 = { id: "empty", paths: ["empty.title", "empty.description", "empty.icon"] };
|
|
4608
|
+
var b3 = { id: "home", paths: ["home"] };
|
|
4609
|
+
var s = {
|
|
4610
|
+
id: "capabilities",
|
|
4611
|
+
paths: [
|
|
4612
|
+
"capabilities.starters",
|
|
4613
|
+
"capabilities.attachments",
|
|
4614
|
+
"capabilities.history",
|
|
4615
|
+
"capabilities.conversations",
|
|
4616
|
+
"capabilities.reasoning",
|
|
4617
|
+
"capabilities.reasoningOpen"
|
|
4618
|
+
]
|
|
4619
|
+
};
|
|
4620
|
+
var c = {
|
|
4621
|
+
id: "messageActions",
|
|
4622
|
+
paths: ["capabilities.messageActions.user", "capabilities.messageActions.assistant"]
|
|
4623
|
+
};
|
|
4624
|
+
var g2 = { id: "sources", paths: ["capabilities.sources.strip"] };
|
|
4625
|
+
var w2 = {
|
|
4626
|
+
id: "widget",
|
|
4627
|
+
paths: ["widget.position", "widget.launcherIcon", "widget.defaultOpen"]
|
|
4628
|
+
};
|
|
4629
|
+
var f = { id: "aside", paths: ["aside.position", "aside.width"] };
|
|
4630
|
+
var p2 = {
|
|
4631
|
+
id: "composerTriggers",
|
|
4632
|
+
paths: ["composer.triggers.slash", "composer.triggers.mention"]
|
|
4633
|
+
};
|
|
4634
|
+
var l2 = { id: "shell", paths: ["shell.commandPalette", "shell.userMenu"] };
|
|
4635
|
+
var y3 = { id: "cards", paths: ["cards"] };
|
|
4636
|
+
var i = { id: "provider", paths: ["provider"] };
|
|
4637
|
+
var v2 = {
|
|
4638
|
+
$schema: r2,
|
|
4639
|
+
name: "support-widget",
|
|
4640
|
+
layout: "widget",
|
|
4641
|
+
provider: { mode: "mock" },
|
|
4642
|
+
header: { title: "Support" },
|
|
4643
|
+
theme: { unreadColor: "#38BDF8", mode: "system" },
|
|
4644
|
+
empty: {
|
|
4645
|
+
title: "Hi, we're here to help",
|
|
4646
|
+
description: "Ask us about orders, refunds, and more."
|
|
4647
|
+
},
|
|
4648
|
+
home: {
|
|
4649
|
+
greeting: { title: "How can we help? \u{1F44B}", subtitle: "Orders, refunds, anything." },
|
|
4650
|
+
recentConversation: true,
|
|
4651
|
+
links: [
|
|
4652
|
+
{ label: "Help center", href: "https://ui.kitn.ai", description: "Guides and FAQs", icon: "book-open" }
|
|
4653
|
+
]
|
|
4654
|
+
},
|
|
4655
|
+
// States the kit default loudly (the anchored-on-the-default convention,
|
|
4656
|
+
// same as research's sources.strip) so the template's chrome fact is
|
|
4657
|
+
// visible/editable in its own JSON.
|
|
4658
|
+
widget: { position: "bottom-end" },
|
|
4659
|
+
capabilities: {
|
|
4660
|
+
starters: ["Where's my order?", "Request a refund"],
|
|
4661
|
+
attachments: { accept: ["image/*", "application/pdf"] },
|
|
4662
|
+
history: { persistence: "local" },
|
|
4663
|
+
conversations: true
|
|
4664
|
+
}
|
|
4665
|
+
};
|
|
4666
|
+
var k3 = {
|
|
4667
|
+
$schema: r2,
|
|
4668
|
+
name: "in-app-assistant",
|
|
4669
|
+
layout: "aside",
|
|
4670
|
+
provider: { mode: "mock" },
|
|
4671
|
+
header: { title: "Assistant" },
|
|
4672
|
+
// Dark-by-default (owner ruling, dark round): every buildable starter
|
|
4673
|
+
// EXCEPT widget ships mode: 'dark' — widget is embedded in a host site and
|
|
4674
|
+
// follows IT, not its own preference (T-3: this is registry data, not a
|
|
4675
|
+
// schema default; 'system' stays the schema's own default for anyone
|
|
4676
|
+
// hand-authoring a construct).
|
|
4677
|
+
theme: { accent: "#0ea5e9", mode: "dark" },
|
|
4678
|
+
// codegen's own defaults, stated so the geometry is visible/editable.
|
|
4679
|
+
aside: { position: "end", width: "380px" },
|
|
4680
|
+
capabilities: {
|
|
4681
|
+
starters: ["Deploy payments to production", "Check the canary status"],
|
|
4682
|
+
attachments: { accept: ["image/*", "application/pdf"] },
|
|
4683
|
+
history: { persistence: "local" }
|
|
4684
|
+
}
|
|
4685
|
+
};
|
|
4686
|
+
var A3 = {
|
|
4687
|
+
$schema: r2,
|
|
4688
|
+
name: "daily-assistant",
|
|
4689
|
+
layout: "fullscreen",
|
|
4690
|
+
provider: { mode: "mock" },
|
|
4691
|
+
header: { title: "Assistant" },
|
|
4692
|
+
// Dark-by-default (owner ruling, dark round) — see inAppAssistantStarter's
|
|
4693
|
+
// note above.
|
|
4694
|
+
theme: { accent: "#7c3aed", mode: "dark" },
|
|
4695
|
+
empty: {
|
|
4696
|
+
title: "What can I help with?",
|
|
4697
|
+
description: "Ask anything, or start from a suggestion below."
|
|
4698
|
+
},
|
|
4699
|
+
capabilities: {
|
|
4700
|
+
starters: ["Draft the Q3 board update", "Summarize a document", "Compare two options"],
|
|
4701
|
+
attachments: { accept: ["image/*", "application/pdf"] },
|
|
4702
|
+
history: { persistence: "local" },
|
|
4703
|
+
conversations: true
|
|
4704
|
+
}
|
|
4705
|
+
};
|
|
4706
|
+
var E = {
|
|
4707
|
+
$schema: r2,
|
|
4708
|
+
name: "research-assistant",
|
|
4709
|
+
layout: "fullscreen",
|
|
4710
|
+
provider: { mode: "mock" },
|
|
4711
|
+
header: { title: "Research" },
|
|
4712
|
+
// Dark-by-default (owner ruling, dark round) — see inAppAssistantStarter's
|
|
4713
|
+
// note above.
|
|
4714
|
+
theme: { accent: "#0f766e", mode: "dark" },
|
|
4715
|
+
capabilities: {
|
|
4716
|
+
starters: ["How does the wire adapter work?", "What are message parts?"],
|
|
4717
|
+
attachments: { accept: ["application/pdf"] },
|
|
4718
|
+
history: { persistence: "local" },
|
|
4719
|
+
// The template's defining fact, stated even though it matches the emit
|
|
4720
|
+
// default (B-4): the row already renders; strip: true is the visible
|
|
4721
|
+
// switch this template exists around.
|
|
4722
|
+
sources: { strip: true },
|
|
4723
|
+
// "assistant-style actions" (B-13) — the owner's A3 default matrix
|
|
4724
|
+
// (builder-message-actions.tsx: user Edit on; assistant
|
|
4725
|
+
// Copy/Like/Dislike on).
|
|
4726
|
+
messageActions: { user: ["edit"], assistant: ["copy", "like", "dislike"] }
|
|
4727
|
+
}
|
|
4728
|
+
};
|
|
4729
|
+
var S3 = {
|
|
4730
|
+
triggers: {
|
|
4731
|
+
slash: [
|
|
4732
|
+
{ id: "summarize", label: "summarize", description: "Summarize the thread so far" },
|
|
4733
|
+
{ id: "translate", label: "translate", description: "Translate the last message" }
|
|
4734
|
+
],
|
|
4735
|
+
mention: [
|
|
4736
|
+
{ id: "researcher", label: "researcher", description: "Hands off to the research agent" },
|
|
4737
|
+
{ id: "coder", label: "coder", description: "Hands off to the coding agent" }
|
|
4738
|
+
]
|
|
4739
|
+
}
|
|
4740
|
+
};
|
|
4741
|
+
var d3 = {
|
|
4742
|
+
$schema: r2,
|
|
4743
|
+
name: "build-workspace",
|
|
4744
|
+
layout: "split",
|
|
4745
|
+
provider: { mode: "mock" },
|
|
4746
|
+
header: {
|
|
4747
|
+
title: "Workspace",
|
|
4748
|
+
themeToggle: true,
|
|
4749
|
+
// The story's Share/Deploy rows, mapped onto the kit Button's real
|
|
4750
|
+
// variant names (B-6a's enum): 'secondary' → outline, 'primary' → default.
|
|
4751
|
+
actions: [
|
|
4752
|
+
{ label: "Share", variant: "outline" },
|
|
4753
|
+
{ label: "Deploy", variant: "default" }
|
|
4754
|
+
]
|
|
4755
|
+
},
|
|
4756
|
+
// Dark-by-default (owner ruling, dark round) — see inAppAssistantStarter's
|
|
4757
|
+
// note above. Both variants below spread ...workspaceBase without
|
|
4758
|
+
// overriding theme, so this covers artifactPreview and appPreview too.
|
|
4759
|
+
theme: { accent: "#ea580c", mode: "dark" },
|
|
4760
|
+
shell: { commandPalette: true, userMenu: { name: "Ada", plan: "Pro" } },
|
|
4761
|
+
composer: S3,
|
|
4762
|
+
capabilities: {
|
|
4763
|
+
starters: ["Build a pricing table", "Add a dark mode toggle"],
|
|
4764
|
+
attachments: { accept: ["image/*"] },
|
|
4765
|
+
history: { persistence: "local" }
|
|
4766
|
+
}
|
|
4767
|
+
};
|
|
4768
|
+
var T2 = {
|
|
4769
|
+
...d3,
|
|
4770
|
+
name: "artifact-workspace"
|
|
4771
|
+
};
|
|
4772
|
+
var C2 = {
|
|
4773
|
+
...d3,
|
|
4774
|
+
name: "app-workspace",
|
|
4775
|
+
capabilities: {
|
|
4776
|
+
...d3.capabilities,
|
|
4777
|
+
starters: ["Build a landing page for a coffee shop", "Make the hero work on mobile"]
|
|
4778
|
+
}
|
|
4779
|
+
};
|
|
4780
|
+
var h2 = [
|
|
4781
|
+
{
|
|
4782
|
+
id: "widget",
|
|
4783
|
+
name: "Support widget",
|
|
4784
|
+
description: "A floating chat that lives in the corner of your site.",
|
|
4785
|
+
availability: "buildable",
|
|
4786
|
+
starter: v2,
|
|
4787
|
+
controls: [t, a, n, b3, s, w2, i]
|
|
4788
|
+
},
|
|
4789
|
+
{
|
|
4790
|
+
id: "inAppAssistant",
|
|
4791
|
+
name: "In-app assistant",
|
|
4792
|
+
description: "An assistant docked inside your existing app.",
|
|
4793
|
+
availability: "buildable",
|
|
4794
|
+
starter: k3,
|
|
4795
|
+
// Design-parity fix wave (2026-08-29 audit): the story's In-app
|
|
4796
|
+
// assistant panel shows Composer triggers, Message actions and a
|
|
4797
|
+
// read-only Cards list, none of which were wired here even though the
|
|
4798
|
+
// vocabulary and the panel machinery both already exist (proven working
|
|
4799
|
+
// on Workspace/Assistant/Research). Voice/Reveal-mode/Rail-placement
|
|
4800
|
+
// stay absent — those are the story's own labeled preview-only,
|
|
4801
|
+
// T-5-deferred fields with no construct vocabulary at all.
|
|
4802
|
+
controls: [t, a, n, f, p2, s, c, y3, i]
|
|
4803
|
+
},
|
|
4804
|
+
{
|
|
4805
|
+
id: "assistant",
|
|
4806
|
+
name: "Assistant",
|
|
4807
|
+
description: "A full-page assistant with a history of past conversations.",
|
|
4808
|
+
availability: "buildable",
|
|
4809
|
+
starter: A3,
|
|
4810
|
+
// Design-parity fix wave: the story's Assistant panel shows an App
|
|
4811
|
+
// chrome / Shell section (Command palette toggle, User menu) that
|
|
4812
|
+
// wasn't wired here — same already-working vocabulary as Workspace's
|
|
4813
|
+
// SHELL section.
|
|
4814
|
+
controls: [t, a, n, l2, u2, s, c, i]
|
|
4815
|
+
},
|
|
4816
|
+
{
|
|
4817
|
+
id: "research",
|
|
4818
|
+
name: "Research",
|
|
4819
|
+
description: "Search-first answers with cited sources.",
|
|
4820
|
+
availability: "buildable",
|
|
4821
|
+
starter: E,
|
|
4822
|
+
controls: [t, a, n, s, g2, c, i]
|
|
4823
|
+
},
|
|
4824
|
+
{
|
|
4825
|
+
id: "workspace",
|
|
4826
|
+
name: "Workspace",
|
|
4827
|
+
description: "Chat drives a live work surface: previews, code, and artifacts build beside the conversation.",
|
|
4828
|
+
availability: "buildable",
|
|
4829
|
+
starter: d3,
|
|
4830
|
+
variants: [
|
|
4831
|
+
{
|
|
4832
|
+
id: "artifactPreview",
|
|
4833
|
+
name: "Artifact preview beside chat",
|
|
4834
|
+
description: "A code or rendered-output pane grows beside the conversation as you build.",
|
|
4835
|
+
starter: T2
|
|
4836
|
+
},
|
|
4837
|
+
{
|
|
4838
|
+
id: "appPreview",
|
|
4839
|
+
name: "App preview with device toggles",
|
|
4840
|
+
description: "A full browser-chrome preview of the running app, with desktop, tablet, and mobile views.",
|
|
4841
|
+
starter: C2
|
|
4842
|
+
}
|
|
4843
|
+
],
|
|
4844
|
+
controls: [
|
|
4845
|
+
t,
|
|
4846
|
+
a,
|
|
4847
|
+
m2,
|
|
4848
|
+
l2,
|
|
4849
|
+
p2,
|
|
4850
|
+
s,
|
|
4851
|
+
c,
|
|
4852
|
+
i
|
|
4853
|
+
]
|
|
4854
|
+
},
|
|
4855
|
+
{
|
|
4856
|
+
id: "voice",
|
|
4857
|
+
name: "Voice",
|
|
4858
|
+
description: "A voice-first assistant you talk to, push-to-talk and all.",
|
|
4859
|
+
availability: "story-only"
|
|
4860
|
+
}
|
|
4861
|
+
];
|
|
4862
|
+
function R2() {
|
|
4863
|
+
return h2.filter((e2) => e2.availability === "buildable");
|
|
4864
|
+
}
|
|
4865
|
+
|
|
4866
|
+
// src/wizard.ts
|
|
4597
4867
|
var SCHEMA_URL = "https://ui.kitn.ai/schemas/construct/v1.json";
|
|
4598
4868
|
function shapeAxis() {
|
|
4599
4869
|
const options = [
|
|
4870
|
+
// Derived from the registry (B-17a): labels/hints are the templates'
|
|
4871
|
+
// own names/one-liners, never restated. Only buildable templates are
|
|
4872
|
+
// offered — menu-honesty (voice stays a Labs story card).
|
|
4873
|
+
...R2().map((t2) => ({ id: t2.id, label: t2.name, hint: t2.description })),
|
|
4600
4874
|
{
|
|
4601
|
-
id: "
|
|
4602
|
-
label: "
|
|
4603
|
-
hint: "a
|
|
4604
|
-
},
|
|
4605
|
-
{
|
|
4606
|
-
id: "fullscreen",
|
|
4607
|
-
label: "Full-screen chat",
|
|
4608
|
-
hint: "the chat is the whole page"
|
|
4875
|
+
id: "scratch",
|
|
4876
|
+
label: "Start from scratch",
|
|
4877
|
+
hint: "a bare chat construct, everything off \u2014 you can switch to a template later"
|
|
4609
4878
|
},
|
|
4610
4879
|
{
|
|
4611
4880
|
id: "app",
|
|
@@ -4618,52 +4887,74 @@ function shapeAxis() {
|
|
|
4618
4887
|
label: "Shape",
|
|
4619
4888
|
question: "What are you building?",
|
|
4620
4889
|
options,
|
|
4621
|
-
because: 'each shape needs a different tool:
|
|
4890
|
+
because: 'each shape needs a different tool: the templates and "scratch" compose a construct (this wizard, seeded from the template registry), while "app" needs the project scaffold this wizard does not build'
|
|
4622
4891
|
};
|
|
4623
4892
|
}
|
|
4624
4893
|
var DEFAULT_ATTACHMENTS_ACCEPT = ["image/*", "application/pdf"];
|
|
4625
4894
|
var DEFAULT_HOME_GREETING_TITLE = "How can we help?";
|
|
4895
|
+
function wizardStarter(shape) {
|
|
4896
|
+
if (shape === "scratch") {
|
|
4897
|
+
return { $schema: SCHEMA_URL, name: "", layout: "fullscreen", provider: { mode: "mock" } };
|
|
4898
|
+
}
|
|
4899
|
+
const template = R2().find((t2) => t2.id === shape);
|
|
4900
|
+
if (!template) throw new Error(`no buildable template '${shape}' in the registry`);
|
|
4901
|
+
return structuredClone(template.starter);
|
|
4902
|
+
}
|
|
4626
4903
|
var CONSTRUCT_TAG_RE = /^[a-z][a-z0-9]*-[a-z0-9-]+$/;
|
|
4627
|
-
function constructTagName(projectName,
|
|
4904
|
+
function constructTagName(projectName, kind) {
|
|
4628
4905
|
if (CONSTRUCT_TAG_RE.test(projectName)) return projectName;
|
|
4629
4906
|
let base = projectName.toLowerCase().replace(/[^a-z0-9-]/g, "-").replace(/-+/g, "-").replace(/^-+|-+$/g, "");
|
|
4630
4907
|
if (!/^[a-z]/.test(base)) {
|
|
4631
4908
|
base = base.length > 0 ? `k-${base}` : "k";
|
|
4632
4909
|
}
|
|
4633
|
-
|
|
4634
|
-
return `${base}-${suffix}`;
|
|
4910
|
+
return `${base}-${kind}`;
|
|
4635
4911
|
}
|
|
4636
|
-
function composeConstruct(
|
|
4637
|
-
const
|
|
4638
|
-
|
|
4639
|
-
|
|
4640
|
-
if (
|
|
4641
|
-
|
|
4642
|
-
|
|
4643
|
-
|
|
4644
|
-
|
|
4645
|
-
|
|
4646
|
-
|
|
4647
|
-
// name and the construct's own `Construct.name` are different
|
|
4648
|
-
// vocabularies (directory rules vs. a custom-element tag rule), and this
|
|
4649
|
-
// is the one place they're allowed to diverge.
|
|
4650
|
-
name: constructTagName(a.name, a.shape),
|
|
4651
|
-
layout: a.shape,
|
|
4652
|
-
provider: { mode: "mock" }
|
|
4653
|
-
};
|
|
4654
|
-
if (a.headerTitle && a.headerTitle.length > 0) {
|
|
4655
|
-
construct.header = { title: a.headerTitle };
|
|
4912
|
+
function composeConstruct(a2) {
|
|
4913
|
+
const construct = wizardStarter(a2.shape);
|
|
4914
|
+
construct.$schema = SCHEMA_URL;
|
|
4915
|
+
construct.name = constructTagName(a2.name, construct.layout === "widget" ? "widget" : "chat");
|
|
4916
|
+
if (a2.headerTitle !== void 0) {
|
|
4917
|
+
if (a2.headerTitle.length > 0) {
|
|
4918
|
+
construct.header = { ...construct.header, title: a2.headerTitle };
|
|
4919
|
+
} else if (construct.header) {
|
|
4920
|
+
delete construct.header.title;
|
|
4921
|
+
if (Object.keys(construct.header).length === 0) delete construct.header;
|
|
4922
|
+
}
|
|
4656
4923
|
}
|
|
4657
|
-
if (
|
|
4658
|
-
|
|
4659
|
-
|
|
4924
|
+
if (a2.accent !== void 0) {
|
|
4925
|
+
if (a2.accent.length > 0) {
|
|
4926
|
+
construct.theme = { mode: "system", ...construct.theme, accent: a2.accent };
|
|
4927
|
+
} else if (construct.theme) {
|
|
4928
|
+
delete construct.theme.accent;
|
|
4929
|
+
if (Object.keys(construct.theme).length === 0) delete construct.theme;
|
|
4930
|
+
}
|
|
4660
4931
|
}
|
|
4661
|
-
if (
|
|
4662
|
-
|
|
4932
|
+
if (a2.home !== void 0) {
|
|
4933
|
+
if (a2.home) {
|
|
4934
|
+
const title = a2.homeGreeting && a2.homeGreeting.length > 0 ? a2.homeGreeting : DEFAULT_HOME_GREETING_TITLE;
|
|
4935
|
+
construct.home = { ...construct.home, greeting: { ...construct.home?.greeting, title } };
|
|
4936
|
+
} else {
|
|
4937
|
+
delete construct.home;
|
|
4938
|
+
}
|
|
4663
4939
|
}
|
|
4664
|
-
|
|
4665
|
-
|
|
4940
|
+
const capabilities = { ...construct.capabilities };
|
|
4941
|
+
if (a2.starters.length > 0) capabilities.starters = a2.starters.slice(0, 6);
|
|
4942
|
+
if (a2.attachments) {
|
|
4943
|
+
capabilities.attachments = capabilities.attachments ?? { accept: DEFAULT_ATTACHMENTS_ACCEPT };
|
|
4944
|
+
} else {
|
|
4945
|
+
delete capabilities.attachments;
|
|
4946
|
+
}
|
|
4947
|
+
if (a2.history) {
|
|
4948
|
+
if (!construct.capabilities?.history || construct.capabilities.history.persistence === "none") {
|
|
4949
|
+
capabilities.history = { persistence: "local" };
|
|
4950
|
+
capabilities.conversations = true;
|
|
4951
|
+
}
|
|
4952
|
+
} else {
|
|
4953
|
+
delete capabilities.history;
|
|
4954
|
+
delete capabilities.conversations;
|
|
4666
4955
|
}
|
|
4956
|
+
if (Object.keys(capabilities).length > 0) construct.capabilities = capabilities;
|
|
4957
|
+
else delete construct.capabilities;
|
|
4667
4958
|
return construct;
|
|
4668
4959
|
}
|
|
4669
4960
|
async function emitConstruct(dir, answers) {
|
|
@@ -4679,7 +4970,7 @@ async function emitConstruct(dir, answers) {
|
|
|
4679
4970
|
return {
|
|
4680
4971
|
file,
|
|
4681
4972
|
devCommand: `npx @kitn.ai/ui dev ${fileName}`,
|
|
4682
|
-
constructName:
|
|
4973
|
+
constructName: construct.name
|
|
4683
4974
|
};
|
|
4684
4975
|
}
|
|
4685
4976
|
function runDevPreview(devCommand, cwd, spawnFn) {
|
|
@@ -4706,30 +4997,54 @@ function runDevPreview(devCommand, cwd, spawnFn) {
|
|
|
4706
4997
|
});
|
|
4707
4998
|
}
|
|
4708
4999
|
async function runWizard(shape, name, io, nonInteractive) {
|
|
5000
|
+
const starter = wizardStarter(shape);
|
|
5001
|
+
const starterHasHistory = Boolean(
|
|
5002
|
+
starter.capabilities?.history && starter.capabilities.history.persistence !== "none"
|
|
5003
|
+
);
|
|
4709
5004
|
if (nonInteractive) {
|
|
4710
5005
|
return {
|
|
4711
5006
|
name,
|
|
4712
5007
|
shape,
|
|
4713
|
-
headerTitle:
|
|
4714
|
-
home:
|
|
5008
|
+
headerTitle: void 0,
|
|
5009
|
+
home: void 0,
|
|
4715
5010
|
homeGreeting: "",
|
|
4716
5011
|
starters: [],
|
|
4717
|
-
attachments:
|
|
4718
|
-
history:
|
|
4719
|
-
accent:
|
|
5012
|
+
attachments: Boolean(starter.capabilities?.attachments),
|
|
5013
|
+
history: starterHasHistory,
|
|
5014
|
+
accent: void 0
|
|
4720
5015
|
};
|
|
4721
5016
|
}
|
|
4722
5017
|
io.state("Schema", `${SCHEMA_URL} \u2014 every construct the wizard emits stamps this so tooling can validate it`);
|
|
4723
5018
|
io.state("Name", `${name} \u2014 the project directory already fixed this`);
|
|
4724
5019
|
io.state("Provider", "mock \u2014 a keyless first run; switch providers in the construct file after");
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
5020
|
+
if (shape !== "scratch") {
|
|
5021
|
+
io.state(
|
|
5022
|
+
"Template",
|
|
5023
|
+
`${shape} \u2014 seeded from the registry starter; each answer below overrides its field, and a blank answer keeps the template's value`
|
|
5024
|
+
);
|
|
5025
|
+
}
|
|
5026
|
+
if (shape === "workspace") {
|
|
5027
|
+
io.state(
|
|
5028
|
+
"Variant",
|
|
5029
|
+
"the base Workspace starter \u2014 pick artifact-preview or app-preview in the builder, or hand-edit the file"
|
|
5030
|
+
);
|
|
5031
|
+
}
|
|
5032
|
+
const headerTitle = await io.text("Header title? (clear the field for none)", starter.header?.title ?? "");
|
|
5033
|
+
const accent = await io.text("Accent color? (clear the field for the kit default)", starter.theme?.accent ?? "");
|
|
5034
|
+
const home = await io.confirm("Show a home/greeting screen?", Boolean(starter.home));
|
|
5035
|
+
const homeGreeting = home ? await io.text(
|
|
5036
|
+
"Greeting title? (clear the field for the default)",
|
|
5037
|
+
starter.home?.greeting?.title ?? DEFAULT_HOME_GREETING_TITLE
|
|
5038
|
+
) : "";
|
|
5039
|
+
const starters = await io.multilineList(
|
|
5040
|
+
"Starter prompts (comma-separated, up to 6, blank to keep the template's)"
|
|
5041
|
+
);
|
|
5042
|
+
const attachments = await io.confirm("Allow file attachments?", Boolean(starter.capabilities?.attachments));
|
|
5043
|
+
const history = await io.confirm(
|
|
5044
|
+
"Persist conversation history in this browser?",
|
|
5045
|
+
starterHasHistory || shape === "scratch"
|
|
5046
|
+
);
|
|
5047
|
+
if (history && !starterHasHistory) {
|
|
4733
5048
|
io.state("Conversations", "enabled \u2014 turned on automatically because history is on");
|
|
4734
5049
|
}
|
|
4735
5050
|
return {
|
|
@@ -4747,9 +5062,9 @@ async function runWizard(shape, name, io, nonInteractive) {
|
|
|
4747
5062
|
|
|
4748
5063
|
// src/index.ts
|
|
4749
5064
|
var OFFERABLE_FEATURE_IDS = [
|
|
4750
|
-
...new Set(readyFrameworks().flatMap((
|
|
5065
|
+
...new Set(readyFrameworks().flatMap((f2) => availableFeatures(f2).map((feature) => feature.id)))
|
|
4751
5066
|
];
|
|
4752
|
-
var DEFAULT_KIT_RANGE = "^0.
|
|
5067
|
+
var DEFAULT_KIT_RANGE = "^0.31.0";
|
|
4753
5068
|
var HELP = `
|
|
4754
5069
|
${import_picocolors3.default.bold("create-kai")} \u2014 scaffold a runnable @kitn.ai/ui chat app
|
|
4755
5070
|
|
|
@@ -4757,10 +5072,10 @@ ${import_picocolors3.default.bold("create-kai")} \u2014 scaffold a runnable @kit
|
|
|
4757
5072
|
${import_picocolors3.default.dim("npx create-kai my-app")}
|
|
4758
5073
|
|
|
4759
5074
|
Options
|
|
4760
|
-
--framework <id> ${readyFrameworks().map((
|
|
4761
|
-
--layout <id> ${readyLayouts().map((
|
|
5075
|
+
--framework <id> ${readyFrameworks().map((f2) => f2.id).join(", ")}
|
|
5076
|
+
--layout <id> ${readyLayouts().map((l3) => l3.id).join(", ")}
|
|
4762
5077
|
--features <a,b> ${OFFERABLE_FEATURE_IDS.join(", ")} (or 'none')
|
|
4763
|
-
--gateway <id> none${[...WIRED_GATEWAYS].filter((
|
|
5078
|
+
--gateway <id> none${[...WIRED_GATEWAYS].filter((g3) => g3 !== "mock").map((g3) => `, ${g3}`).join("")}
|
|
4764
5079
|
--kit <spec> @kitn.ai/ui spec to pin (default ${DEFAULT_KIT_RANGE})
|
|
4765
5080
|
-y, --yes accept every default (zero-config: React + full-screen + mock)
|
|
4766
5081
|
--no-install skip installing dependencies
|
|
@@ -4780,7 +5095,7 @@ async function main() {
|
|
|
4780
5095
|
return 0;
|
|
4781
5096
|
}
|
|
4782
5097
|
if (args.version) {
|
|
4783
|
-
console.log("0.
|
|
5098
|
+
console.log("0.4.0");
|
|
4784
5099
|
return 0;
|
|
4785
5100
|
}
|
|
4786
5101
|
if (args.list) {
|
|
@@ -4822,14 +5137,14 @@ async function main() {
|
|
|
4822
5137
|
ve({
|
|
4823
5138
|
message: "Which framework?",
|
|
4824
5139
|
initialValue: ZERO_CONFIG.framework,
|
|
4825
|
-
options: readyFrameworks().map((
|
|
5140
|
+
options: readyFrameworks().map((f2) => ({ value: f2.id, label: f2.label }))
|
|
4826
5141
|
})
|
|
4827
5142
|
));
|
|
4828
5143
|
const framework = getFramework(frameworkId);
|
|
4829
5144
|
if (!framework) return fail(`unknown framework '${frameworkId}'`);
|
|
4830
5145
|
if (framework.status !== "ready") {
|
|
4831
5146
|
return fail(
|
|
4832
|
-
`'${framework.id}' is not scaffoldable yet (${framework.note ?? "no template"}). Available: ${readyFrameworks().map((
|
|
5147
|
+
`'${framework.id}' is not scaffoldable yet (${framework.note ?? "no template"}). Available: ${readyFrameworks().map((f2) => f2.id).join(", ")}`
|
|
4833
5148
|
);
|
|
4834
5149
|
}
|
|
4835
5150
|
const layouts = layoutAxis();
|
|
@@ -4845,19 +5160,19 @@ async function main() {
|
|
|
4845
5160
|
if (!layout) return fail(`unknown layout '${layoutId}'`);
|
|
4846
5161
|
if (layout.status !== "ready") {
|
|
4847
5162
|
return fail(
|
|
4848
|
-
`layout '${layout.id}' is not scaffoldable yet (${layout.note ?? "no template"}). Available: ${layouts.options.map((
|
|
5163
|
+
`layout '${layout.id}' is not scaffoldable yet (${layout.note ?? "no template"}). Available: ${layouts.options.map((l3) => l3.id).join(", ")}`
|
|
4849
5164
|
);
|
|
4850
5165
|
}
|
|
4851
5166
|
const offered = availableFeatures(framework);
|
|
4852
5167
|
const included = composedWorkspaceFeatures(framework);
|
|
4853
|
-
const optional = offered.filter((
|
|
4854
|
-
const withheld = FEATURES.filter((
|
|
4855
|
-
const featureIds = args.features ?? (nonInteractive || optional.length === 0 ? DEFAULT_FEATURES.filter((id) => offered.some((
|
|
5168
|
+
const optional = offered.filter((f2) => !included.includes(f2));
|
|
5169
|
+
const withheld = FEATURES.filter((f2) => !offered.includes(f2));
|
|
5170
|
+
const featureIds = args.features ?? (nonInteractive || optional.length === 0 ? DEFAULT_FEATURES.filter((id) => offered.some((f2) => f2.id === id)) : await ask(
|
|
4856
5171
|
fe({
|
|
4857
5172
|
message: "Which features?",
|
|
4858
5173
|
required: false,
|
|
4859
|
-
initialValues: DEFAULT_FEATURES.filter((id) => optional.some((
|
|
4860
|
-
options: optional.map((
|
|
5174
|
+
initialValues: DEFAULT_FEATURES.filter((id) => optional.some((f2) => f2.id === id)),
|
|
5175
|
+
options: optional.map((f2) => ({ value: f2.id, label: f2.label, hint: f2.hint }))
|
|
4861
5176
|
})
|
|
4862
5177
|
));
|
|
4863
5178
|
for (const id of featureIds) {
|
|
@@ -4881,12 +5196,12 @@ Available for ${framework.label}: ${featureList(offered)}`);
|
|
|
4881
5196
|
}
|
|
4882
5197
|
if (!nonInteractive) {
|
|
4883
5198
|
if (optional.length === 0 && included.length > 0) {
|
|
4884
|
-
stated("Features", included.map((
|
|
5199
|
+
stated("Features", included.map((f2) => `${f2.label} \u2014 ${f2.hint}`).join("; "));
|
|
4885
5200
|
}
|
|
4886
5201
|
if (withheld.length > 0) {
|
|
4887
5202
|
stated(
|
|
4888
5203
|
"Not offered yet",
|
|
4889
|
-
`${withheld.map((
|
|
5204
|
+
`${withheld.map((f2) => f2.id).join(", ")} \u2014 ${import_picocolors3.default.dim("see `--list` for the whole table")}`
|
|
4890
5205
|
);
|
|
4891
5206
|
}
|
|
4892
5207
|
}
|
|
@@ -4896,7 +5211,7 @@ Available for ${framework.label}: ${featureList(offered)}`);
|
|
|
4896
5211
|
{ nonInteractive, fallback: ZERO_CONFIG.gateway, initialValue: ZERO_CONFIG.gateway },
|
|
4897
5212
|
clackAxisIo
|
|
4898
5213
|
);
|
|
4899
|
-
if (!gateways.some((
|
|
5214
|
+
if (!gateways.some((g3) => g3.integration.id === gatewayId)) {
|
|
4900
5215
|
return fail(`unknown gateway '${gatewayId}'`);
|
|
4901
5216
|
}
|
|
4902
5217
|
const gatewayProblem = wirableGateway(gatewayId, framework);
|
|
@@ -4914,7 +5229,7 @@ Available for ${framework.label}: ${featureList(offered)}`);
|
|
|
4914
5229
|
// which kit the CLI was built against, which stays true when `--kit` sends
|
|
4915
5230
|
// the dependency somewhere else — the emitted files are this version's shape
|
|
4916
5231
|
// whatever the project ends up installing.
|
|
4917
|
-
kitBuiltAgainst: "0.
|
|
5232
|
+
kitBuiltAgainst: "0.31.0"
|
|
4918
5233
|
};
|
|
4919
5234
|
const spinner = Y2();
|
|
4920
5235
|
spinner.start("Scaffolding");
|
|
@@ -4941,7 +5256,7 @@ Available for ${framework.label}: ${featureList(offered)}`);
|
|
|
4941
5256
|
}
|
|
4942
5257
|
}
|
|
4943
5258
|
const relative = path4.relative(process2.cwd(), dir);
|
|
4944
|
-
const integration = gateways.find((
|
|
5259
|
+
const integration = gateways.find((g3) => g3.integration.id === gatewayId)?.integration;
|
|
4945
5260
|
const keyStep = gatewayId !== "mock" && integration && integration.envVars.length > 0 ? `# put your key in ${framework.paths.env} (${integration.envVars.join(", ")})` : null;
|
|
4946
5261
|
const steps = [
|
|
4947
5262
|
relative ? `cd ${relative}` : null,
|
|
@@ -4982,7 +5297,7 @@ async function runConstructFlow(shape, name, dir, nonInteractive) {
|
|
|
4982
5297
|
defaultValue: ""
|
|
4983
5298
|
})
|
|
4984
5299
|
);
|
|
4985
|
-
return raw.split(",").map((
|
|
5300
|
+
return raw.split(",").map((s2) => s2.trim()).filter(Boolean).slice(0, 6);
|
|
4986
5301
|
},
|
|
4987
5302
|
state: stated
|
|
4988
5303
|
};
|
|
@@ -5046,7 +5361,7 @@ var clackAxisIo = {
|
|
|
5046
5361
|
state: stated
|
|
5047
5362
|
};
|
|
5048
5363
|
function featureList(features) {
|
|
5049
|
-
return features.length > 0 ? features.map((
|
|
5364
|
+
return features.length > 0 ? features.map((f2) => f2.id).join(", ") : "none";
|
|
5050
5365
|
}
|
|
5051
5366
|
function run(command, cwd) {
|
|
5052
5367
|
return new Promise((resolve) => {
|
|
@@ -5057,48 +5372,48 @@ function run(command, cwd) {
|
|
|
5057
5372
|
}
|
|
5058
5373
|
function printMatrix(asJson) {
|
|
5059
5374
|
const matrix = {
|
|
5060
|
-
cli: "0.
|
|
5375
|
+
cli: "0.4.0",
|
|
5061
5376
|
kit: DEFAULT_KIT_RANGE,
|
|
5062
5377
|
// The same pair `kai.json` carries. An agent reading this to decide what to
|
|
5063
5378
|
// install gets the range; one reasoning about which kit the templates match
|
|
5064
5379
|
// gets the exact version, without having to parse the range for a floor.
|
|
5065
|
-
kitBuiltAgainst: "0.
|
|
5066
|
-
frameworks: FRAMEWORKS.map((
|
|
5067
|
-
id:
|
|
5068
|
-
label:
|
|
5069
|
-
status:
|
|
5070
|
-
registration:
|
|
5071
|
-
composedWorkspace:
|
|
5380
|
+
kitBuiltAgainst: "0.31.0",
|
|
5381
|
+
frameworks: FRAMEWORKS.map((f2) => ({
|
|
5382
|
+
id: f2.id,
|
|
5383
|
+
label: f2.label,
|
|
5384
|
+
status: f2.status,
|
|
5385
|
+
registration: f2.registration,
|
|
5386
|
+
composedWorkspace: f2.composedWorkspace,
|
|
5072
5387
|
// Where a keyed gateway's route would go, or null when this framework has
|
|
5073
5388
|
// no destination declared yet. An agent reading this can tell "gateway not
|
|
5074
5389
|
// wired" from "gateway wired but not for this framework" without guessing.
|
|
5075
|
-
route:
|
|
5076
|
-
...
|
|
5390
|
+
route: f2.route ? { file: f2.route.file, runtime: f2.route.runtime, production: f2.route.production } : null,
|
|
5391
|
+
...f2.note ? { note: f2.note } : {}
|
|
5077
5392
|
})),
|
|
5078
|
-
layouts: LAYOUTS.map((
|
|
5079
|
-
features: FEATURES.map((
|
|
5080
|
-
id:
|
|
5081
|
-
components:
|
|
5082
|
-
default:
|
|
5393
|
+
layouts: LAYOUTS.map((l3) => ({ id: l3.id, status: l3.status, ...l3.note ? { note: l3.note } : {} })),
|
|
5394
|
+
features: FEATURES.map((f2) => ({
|
|
5395
|
+
id: f2.id,
|
|
5396
|
+
components: f2.components,
|
|
5397
|
+
default: f2.default,
|
|
5083
5398
|
// Derived, never restated — and the field the six-item menu needed: the
|
|
5084
5399
|
// ready frameworks whose prompt actually offers this feature. An empty
|
|
5085
5400
|
// array means the row is catalogued and cannot be scaffolded by anything,
|
|
5086
5401
|
// which is what an agent reading this has to be able to see.
|
|
5087
|
-
frameworks: readyFrameworks().filter((framework) => availableFeatures(framework).includes(
|
|
5402
|
+
frameworks: readyFrameworks().filter((framework) => availableFeatures(framework).includes(f2)).map((framework) => framework.id)
|
|
5088
5403
|
})),
|
|
5089
|
-
gateways: listGateways().map((
|
|
5090
|
-
id:
|
|
5091
|
-
title:
|
|
5092
|
-
wired:
|
|
5093
|
-
envVars:
|
|
5094
|
-
keyExposure:
|
|
5404
|
+
gateways: listGateways().map((g3) => ({
|
|
5405
|
+
id: g3.integration.id,
|
|
5406
|
+
title: g3.integration.title,
|
|
5407
|
+
wired: g3.wired,
|
|
5408
|
+
envVars: g3.integration.envVars,
|
|
5409
|
+
keyExposure: g3.integration.keyExposure,
|
|
5095
5410
|
// What a scaffold cannot provide for you: 'none' means a key is the whole
|
|
5096
5411
|
// of it, anything else means a process has to already be running.
|
|
5097
|
-
outOfBand:
|
|
5098
|
-
language:
|
|
5412
|
+
outOfBand: g3.integration.outOfBand,
|
|
5413
|
+
language: g3.integration.language,
|
|
5099
5414
|
// Derived, never restated: the frameworks this gateway can actually be
|
|
5100
5415
|
// scaffolded onto today.
|
|
5101
|
-
frameworks:
|
|
5416
|
+
frameworks: g3.wired ? FRAMEWORKS.filter((f2) => f2.status === "ready" && !wirableGateway(g3.integration.id, f2)).map((f2) => f2.id) : []
|
|
5102
5417
|
}))
|
|
5103
5418
|
};
|
|
5104
5419
|
if (asJson) {
|
|
@@ -5106,22 +5421,22 @@ function printMatrix(asJson) {
|
|
|
5106
5421
|
return;
|
|
5107
5422
|
}
|
|
5108
5423
|
console.log(import_picocolors3.default.bold("\nFrameworks"));
|
|
5109
|
-
for (const
|
|
5110
|
-
console.log(` ${mark(
|
|
5424
|
+
for (const f2 of matrix.frameworks) {
|
|
5425
|
+
console.log(` ${mark(f2.status === "ready")} ${f2.id.padEnd(16)}${f2.note ?? ""}`);
|
|
5111
5426
|
}
|
|
5112
5427
|
console.log(import_picocolors3.default.bold("\nLayouts"));
|
|
5113
|
-
for (const
|
|
5114
|
-
console.log(` ${mark(
|
|
5428
|
+
for (const l3 of matrix.layouts) {
|
|
5429
|
+
console.log(` ${mark(l3.status === "ready")} ${l3.id.padEnd(16)}${l3.note ?? ""}`);
|
|
5115
5430
|
}
|
|
5116
5431
|
console.log(import_picocolors3.default.bold("\nFeatures"));
|
|
5117
|
-
for (const
|
|
5432
|
+
for (const f2 of matrix.features) {
|
|
5118
5433
|
console.log(
|
|
5119
|
-
` ${mark(
|
|
5434
|
+
` ${mark(f2.frameworks.length > 0)} ${f2.id.padEnd(16)}${f2.frameworks.length > 0 ? "" : "not scaffoldable in this release"}`
|
|
5120
5435
|
);
|
|
5121
5436
|
}
|
|
5122
5437
|
console.log(import_picocolors3.default.bold("\nGateways"));
|
|
5123
|
-
for (const
|
|
5124
|
-
console.log(` ${mark(
|
|
5438
|
+
for (const g3 of matrix.gateways) {
|
|
5439
|
+
console.log(` ${mark(g3.wired)} ${g3.id.padEnd(16)}${g3.envVars.join(", ")}`);
|
|
5125
5440
|
}
|
|
5126
5441
|
console.log("");
|
|
5127
5442
|
}
|