citadel_cli 1.3.0 → 1.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/README.md +61 -3
- package/dist/.vite/manifest.json +0 -4
- package/dist/citadel.es.js +1150 -1688
- package/dist/citadel.umd.js +281 -836
- package/dist/components/Citadel/config/defaults.d.ts +2 -2
- package/dist/components/Citadel/config/types.d.ts +2 -4
- package/dist/components/Citadel/utils/typography.d.ts +0 -1
- package/package.json +8 -5
- package/dist/citadel.css +0 -1
package/dist/citadel.es.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { jsx as m, jsxs as
|
|
5
|
-
import
|
|
6
|
-
import { createRoot as
|
|
7
|
-
var
|
|
8
|
-
class
|
|
1
|
+
var Ae = Object.defineProperty;
|
|
2
|
+
var Pe = (n, e, t) => e in n ? Ae(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
+
var f = (n, e, t) => Pe(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { jsx as m, jsxs as I, Fragment as He } from "react/jsx-runtime";
|
|
5
|
+
import U, { createContext as Re, useState as _, useMemo as A, useEffect as P, useContext as Q, useCallback as w, useReducer as _e, useRef as z, useLayoutEffect as Me } from "react";
|
|
6
|
+
import { createRoot as Te } from "react-dom/client";
|
|
7
|
+
var q = /* @__PURE__ */ ((n) => (n.Pending = "pending", n.Success = "success", n.Failure = "failure", n.Timeout = "timeout", n))(q || {});
|
|
8
|
+
class W {
|
|
9
9
|
constructor(e = Date.now()) {
|
|
10
|
-
|
|
10
|
+
f(this, "_status", "pending");
|
|
11
11
|
this.timestamp = e;
|
|
12
12
|
}
|
|
13
13
|
get status() {
|
|
@@ -23,80 +23,80 @@ class O {
|
|
|
23
23
|
this._status = "timeout";
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
class
|
|
27
|
-
constructor(e,
|
|
28
|
-
super(
|
|
26
|
+
class ze extends W {
|
|
27
|
+
constructor(e, t) {
|
|
28
|
+
super(t), this.data = e;
|
|
29
29
|
}
|
|
30
30
|
render() {
|
|
31
|
-
return /* @__PURE__ */ m("pre", { className: "
|
|
31
|
+
return /* @__PURE__ */ m("pre", { className: "citadel-result-json", children: JSON.stringify(this.data, null, 2) });
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
class Y extends
|
|
35
|
-
constructor(e,
|
|
36
|
-
super(
|
|
34
|
+
class Y extends W {
|
|
35
|
+
constructor(e, t) {
|
|
36
|
+
super(t), this.text = e;
|
|
37
37
|
}
|
|
38
38
|
render() {
|
|
39
|
-
return /* @__PURE__ */ m("div", { className: "
|
|
39
|
+
return /* @__PURE__ */ m("div", { className: "citadel-result-text", children: this.text });
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
class
|
|
43
|
-
constructor(e,
|
|
44
|
-
super(
|
|
42
|
+
class we extends W {
|
|
43
|
+
constructor(e, t) {
|
|
44
|
+
super(t), this.error = e, this.markFailure();
|
|
45
45
|
}
|
|
46
46
|
render() {
|
|
47
|
-
return /* @__PURE__ */ m("div", { className: "
|
|
47
|
+
return /* @__PURE__ */ m("div", { className: "citadel-result-error", children: this.error });
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
class
|
|
50
|
+
class De extends W {
|
|
51
51
|
render() {
|
|
52
|
-
return /* @__PURE__ */ m("div", { className: "
|
|
52
|
+
return /* @__PURE__ */ m("div", { className: "citadel-result-pending", children: "..." });
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
class
|
|
56
|
-
constructor(e,
|
|
57
|
-
super(
|
|
55
|
+
class Fe extends W {
|
|
56
|
+
constructor(e, t = "", s) {
|
|
57
|
+
super(s), this.imageUrl = e, this.altText = t;
|
|
58
58
|
}
|
|
59
59
|
render() {
|
|
60
|
-
return /* @__PURE__ */ m("div", { className: "
|
|
60
|
+
return /* @__PURE__ */ m("div", { className: "citadel-result-image-wrap", children: /* @__PURE__ */ m(
|
|
61
61
|
"img",
|
|
62
62
|
{
|
|
63
63
|
src: this.imageUrl,
|
|
64
64
|
alt: this.altText,
|
|
65
|
-
className: "
|
|
65
|
+
className: "citadel-result-image"
|
|
66
66
|
}
|
|
67
67
|
) });
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
const
|
|
71
|
-
const
|
|
72
|
-
const
|
|
70
|
+
const Le = (n) => async function() {
|
|
71
|
+
const t = n.commands.filter((s) => s.fullPath[0] !== "help").map((s) => {
|
|
72
|
+
const a = `${s.segments.map((c) => c.type === "argument" ? `<${c.name}>` : c.name).join(" ")} - ${s.description}`, o = s.segments.filter((c) => c.type === "argument" && c.description).map((c) => ` <${c.name}>: ${c.description}`);
|
|
73
73
|
return {
|
|
74
|
-
commandLine:
|
|
75
|
-
argumentLines:
|
|
74
|
+
commandLine: a,
|
|
75
|
+
argumentLines: o
|
|
76
76
|
};
|
|
77
|
-
}).sort((
|
|
78
|
-
|
|
79
|
-
...
|
|
77
|
+
}).sort((s, r) => s.commandLine.localeCompare(r.commandLine)).flatMap((s) => [
|
|
78
|
+
s.commandLine,
|
|
79
|
+
...s.argumentLines
|
|
80
80
|
]);
|
|
81
|
-
return
|
|
81
|
+
return t.length === 0 ? new Y(
|
|
82
82
|
"No commands available yet. Add some commands to get started!"
|
|
83
|
-
) : (
|
|
83
|
+
) : (t.push("help - Show available commands"), new Y(
|
|
84
84
|
`Available Commands:
|
|
85
|
-
` +
|
|
85
|
+
` + t.join(`
|
|
86
86
|
`)
|
|
87
87
|
));
|
|
88
88
|
};
|
|
89
|
-
var
|
|
90
|
-
const
|
|
89
|
+
var ie = /* @__PURE__ */ ((n) => (n[n.NONE = 0] = "NONE", n[n.ERROR = 1] = "ERROR", n[n.WARN = 2] = "WARN", n[n.INFO = 3] = "INFO", n[n.DEBUG = 4] = "DEBUG", n[n.TRACE = 5] = "TRACE", n))(ie || {});
|
|
90
|
+
const ue = !0;
|
|
91
91
|
class k {
|
|
92
92
|
static configure(e) {
|
|
93
93
|
this.level = e.level, this.prefix = e.prefix || "[Citadel]";
|
|
94
94
|
}
|
|
95
95
|
static trace(...e) {
|
|
96
|
-
this.level >= 5 && !
|
|
96
|
+
this.level >= 5 && !ue && console.trace(this.prefix, ...e);
|
|
97
97
|
}
|
|
98
98
|
static debug(...e) {
|
|
99
|
-
this.level >= 4 && !
|
|
99
|
+
this.level >= 4 && !ue && console.debug(this.prefix, ...e);
|
|
100
100
|
}
|
|
101
101
|
static info(...e) {
|
|
102
102
|
this.level >= 3 && console.info(this.prefix, ...e);
|
|
@@ -108,7 +108,7 @@ class k {
|
|
|
108
108
|
this.level >= 1 && console.error(this.prefix, ...e);
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
-
|
|
111
|
+
f(k, "level", 0), f(k, "prefix", "");
|
|
112
112
|
const N = {
|
|
113
113
|
commandTimeoutMs: 1e4,
|
|
114
114
|
cursorColor: "var(--cursor-color, #fff)",
|
|
@@ -117,8 +117,8 @@ const N = {
|
|
|
117
117
|
includeHelpCommand: !0,
|
|
118
118
|
fontFamily: "monospace",
|
|
119
119
|
fontSize: "0.875rem",
|
|
120
|
-
initialHeight: "
|
|
121
|
-
logLevel:
|
|
120
|
+
initialHeight: "50vh",
|
|
121
|
+
logLevel: ie.ERROR,
|
|
122
122
|
maxHeight: "80vh",
|
|
123
123
|
minHeight: "200",
|
|
124
124
|
outputFontSize: "0.875rem",
|
|
@@ -129,51 +129,51 @@ const N = {
|
|
|
129
129
|
type: "localStorage",
|
|
130
130
|
maxCommands: 100
|
|
131
131
|
}
|
|
132
|
-
},
|
|
133
|
-
class
|
|
134
|
-
constructor(e,
|
|
135
|
-
this.type = e, this.name =
|
|
132
|
+
}, Ce = async () => new Y("");
|
|
133
|
+
class ce {
|
|
134
|
+
constructor(e, t, s) {
|
|
135
|
+
this.type = e, this.name = t, this.description = s;
|
|
136
136
|
}
|
|
137
137
|
toString() {
|
|
138
138
|
return this.name;
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
|
-
class
|
|
141
|
+
class le extends ce {
|
|
142
142
|
constructor() {
|
|
143
143
|
super("null", ">null<", "Empty segment");
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
|
-
class
|
|
147
|
-
constructor(e,
|
|
148
|
-
super("word", e,
|
|
146
|
+
class ve extends ce {
|
|
147
|
+
constructor(e, t) {
|
|
148
|
+
super("word", e, t);
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
|
-
class
|
|
152
|
-
constructor(e,
|
|
153
|
-
super("argument", e,
|
|
151
|
+
class O extends ce {
|
|
152
|
+
constructor(e, t, s, r) {
|
|
153
|
+
super("argument", e, t), this.value = s, this.valid = r;
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
|
-
const
|
|
157
|
-
if (
|
|
158
|
-
return new
|
|
159
|
-
if (
|
|
160
|
-
const e =
|
|
161
|
-
return new
|
|
156
|
+
const $e = (n) => {
|
|
157
|
+
if (n.type === "word")
|
|
158
|
+
return new ve(n.name, n.description);
|
|
159
|
+
if (n.type === "argument") {
|
|
160
|
+
const e = n;
|
|
161
|
+
return new O(
|
|
162
162
|
e.name,
|
|
163
163
|
e.description,
|
|
164
164
|
e.value,
|
|
165
165
|
e.valid
|
|
166
166
|
);
|
|
167
167
|
}
|
|
168
|
-
return new
|
|
169
|
-
},
|
|
170
|
-
class
|
|
171
|
-
constructor(e,
|
|
172
|
-
|
|
173
|
-
|
|
168
|
+
return new le();
|
|
169
|
+
}, D = (n) => n.map((e) => $e(e));
|
|
170
|
+
class je {
|
|
171
|
+
constructor(e, t, s = Ce) {
|
|
172
|
+
f(this, "_segments");
|
|
173
|
+
f(this, "_description");
|
|
174
174
|
// Used by `Help` command, etc.
|
|
175
|
-
|
|
176
|
-
this._segments = e, this._description =
|
|
175
|
+
f(this, "_handler");
|
|
176
|
+
this._segments = e, this._description = t, this._handler = s;
|
|
177
177
|
}
|
|
178
178
|
get segments() {
|
|
179
179
|
return this._segments;
|
|
@@ -199,7 +199,7 @@ class De {
|
|
|
199
199
|
}
|
|
200
200
|
class X {
|
|
201
201
|
constructor() {
|
|
202
|
-
|
|
202
|
+
f(this, "_commands", []);
|
|
203
203
|
}
|
|
204
204
|
get commands() {
|
|
205
205
|
return this._commands;
|
|
@@ -215,20 +215,20 @@ class X {
|
|
|
215
215
|
* @param handler Async handler executed when the command is submitted; defaults to `NoopHandler`.
|
|
216
216
|
* @throws {Error} If the segment list is empty or the path collides with an existing command.
|
|
217
217
|
*/
|
|
218
|
-
addCommand(e,
|
|
218
|
+
addCommand(e, t, s = Ce) {
|
|
219
219
|
if (e === void 0 || e.length === 0)
|
|
220
220
|
throw new Error("Command path cannot be empty");
|
|
221
|
-
const
|
|
222
|
-
const
|
|
223
|
-
(
|
|
224
|
-
).join(" "),
|
|
225
|
-
(
|
|
221
|
+
const r = new je(e, t, s), a = this._commands.find((o) => {
|
|
222
|
+
const c = o.segments.map(
|
|
223
|
+
(d) => d.type === "argument" ? "*" : d.name
|
|
224
|
+
).join(" "), i = e.map(
|
|
225
|
+
(d) => d.type === "argument" ? "*" : d.name
|
|
226
226
|
).join(" ");
|
|
227
|
-
return
|
|
227
|
+
return c === i;
|
|
228
228
|
});
|
|
229
|
-
if (
|
|
230
|
-
throw new Error(`Duplicate commands: '${
|
|
231
|
-
this._commands.push(
|
|
229
|
+
if (a)
|
|
230
|
+
throw new Error(`Duplicate commands: '${a.fullPath_s}' and '${r.fullPath_s}'`);
|
|
231
|
+
this._commands.push(r);
|
|
232
232
|
}
|
|
233
233
|
/**
|
|
234
234
|
* Removes a command that exactly matches the provided path.
|
|
@@ -237,8 +237,8 @@ class X {
|
|
|
237
237
|
* @returns True if a command was removed; otherwise false.
|
|
238
238
|
*/
|
|
239
239
|
removeCommand(e) {
|
|
240
|
-
const
|
|
241
|
-
return
|
|
240
|
+
const t = e.join(" "), s = this._commands.findIndex((r) => r.fullPath.join(" ") === t);
|
|
241
|
+
return s === -1 ? !1 : (this._commands.splice(s, 1), !0);
|
|
242
242
|
}
|
|
243
243
|
/**
|
|
244
244
|
* Retrieves a command from the registry for the given path.
|
|
@@ -247,26 +247,26 @@ class X {
|
|
|
247
247
|
* @returns The command node or undefined if not found.
|
|
248
248
|
*/
|
|
249
249
|
getCommand(e) {
|
|
250
|
-
return this._commands.find((
|
|
251
|
-
const
|
|
252
|
-
if (
|
|
250
|
+
return this._commands.find((t) => {
|
|
251
|
+
const s = t.fullPath.join(" "), r = e.join(" ");
|
|
252
|
+
if (s === r)
|
|
253
253
|
return !0;
|
|
254
|
-
const
|
|
255
|
-
return
|
|
254
|
+
const o = t.segments.filter((c) => c.type === "word").map((c) => c.name);
|
|
255
|
+
return o.length === e.length && o.join(" ") === r;
|
|
256
256
|
});
|
|
257
257
|
}
|
|
258
258
|
commandExistsForPath(e) {
|
|
259
|
-
const
|
|
260
|
-
(
|
|
261
|
-
(
|
|
259
|
+
const t = this._commands.map(
|
|
260
|
+
(r) => r.segments.map(
|
|
261
|
+
(a) => a.type === "argument" ? "*" : a.name
|
|
262
262
|
).join(" ")
|
|
263
|
-
),
|
|
264
|
-
(
|
|
265
|
-
var
|
|
266
|
-
return ((
|
|
263
|
+
), s = e.map((r, a) => this._commands.some(
|
|
264
|
+
(c) => {
|
|
265
|
+
var i;
|
|
266
|
+
return ((i = c.segments[a]) == null ? void 0 : i.type) === "argument";
|
|
267
267
|
}
|
|
268
|
-
) ? "*" :
|
|
269
|
-
return
|
|
268
|
+
) ? "*" : r).join(" ");
|
|
269
|
+
return t.includes(s);
|
|
270
270
|
}
|
|
271
271
|
/**
|
|
272
272
|
* Gets possible matches for a given path.
|
|
@@ -275,26 +275,26 @@ class X {
|
|
|
275
275
|
* @returns An array of completion strings.
|
|
276
276
|
*/
|
|
277
277
|
getCompletionNames(e) {
|
|
278
|
-
return this.getCompletions(e).map((
|
|
278
|
+
return this.getCompletions(e).map((t) => t.name);
|
|
279
279
|
}
|
|
280
280
|
/**
|
|
281
281
|
* Returns completion segments whose names start with the given prefix.
|
|
282
282
|
* Matching is case-insensitive.
|
|
283
283
|
*/
|
|
284
|
-
getMatchingCompletions(e,
|
|
285
|
-
const
|
|
286
|
-
return
|
|
287
|
-
(
|
|
288
|
-
) :
|
|
284
|
+
getMatchingCompletions(e, t) {
|
|
285
|
+
const s = t.trim().toLowerCase(), r = this.getCompletions(e);
|
|
286
|
+
return s ? r.filter(
|
|
287
|
+
(a) => a.name.toLowerCase().startsWith(s)
|
|
288
|
+
) : r;
|
|
289
289
|
}
|
|
290
290
|
/**
|
|
291
291
|
* Returns a single completion when prefix matching is unambiguous.
|
|
292
292
|
* Returns undefined for ambiguous or no-match prefixes.
|
|
293
293
|
*/
|
|
294
|
-
getUniqueCompletion(e,
|
|
295
|
-
const
|
|
296
|
-
if (
|
|
297
|
-
return
|
|
294
|
+
getUniqueCompletion(e, t) {
|
|
295
|
+
const s = this.getMatchingCompletions(e, t);
|
|
296
|
+
if (s.length === 1)
|
|
297
|
+
return s[0];
|
|
298
298
|
}
|
|
299
299
|
/**
|
|
300
300
|
* Gets an array of segments reachable from a given path
|
|
@@ -304,28 +304,28 @@ class X {
|
|
|
304
304
|
*/
|
|
305
305
|
getCompletions(e) {
|
|
306
306
|
if (k.debug("[getCompletions] path: ", e), !e.length) {
|
|
307
|
-
const
|
|
308
|
-
return
|
|
309
|
-
(
|
|
307
|
+
const a = this._commands.map((i) => i.segments[0]), o = (i, d) => i.type === d.type && i.name === d.name;
|
|
308
|
+
return a.filter(
|
|
309
|
+
(i, d, g) => d === g.findIndex((u) => o(u, i))
|
|
310
310
|
);
|
|
311
311
|
}
|
|
312
|
-
const
|
|
313
|
-
return this._commands.filter((
|
|
314
|
-
const
|
|
315
|
-
if (
|
|
312
|
+
const t = e.length;
|
|
313
|
+
return this._commands.filter((a) => {
|
|
314
|
+
const o = a.segments;
|
|
315
|
+
if (o.length <= t - 1)
|
|
316
316
|
return !1;
|
|
317
|
-
for (let
|
|
318
|
-
const
|
|
319
|
-
if (!(
|
|
317
|
+
for (let c = 0; c < t; c++) {
|
|
318
|
+
const i = e[c], d = o[c];
|
|
319
|
+
if (!(i === "*" && d.type === "argument") && i !== d.name)
|
|
320
320
|
return !1;
|
|
321
321
|
}
|
|
322
322
|
return !0;
|
|
323
|
-
}).filter((
|
|
324
|
-
const
|
|
325
|
-
return new
|
|
323
|
+
}).filter((a) => a.segments.length > t).map((a) => {
|
|
324
|
+
const o = a.segments[t], c = o.type === "argument" ? O : ve;
|
|
325
|
+
return new c(o.name, o.description);
|
|
326
326
|
}).filter(
|
|
327
|
-
(
|
|
328
|
-
(
|
|
327
|
+
(a, o, c) => o === c.findIndex(
|
|
328
|
+
(i) => i.type === a.type && i.name === a.name
|
|
329
329
|
)
|
|
330
330
|
);
|
|
331
331
|
}
|
|
@@ -333,9 +333,9 @@ class X {
|
|
|
333
333
|
return this.getCompletions(e).length > 0;
|
|
334
334
|
}
|
|
335
335
|
}
|
|
336
|
-
class
|
|
336
|
+
class Se {
|
|
337
337
|
constructor(e) {
|
|
338
|
-
|
|
338
|
+
f(this, "config");
|
|
339
339
|
this.config = {
|
|
340
340
|
type: "localStorage",
|
|
341
341
|
maxCommands: 100,
|
|
@@ -346,88 +346,88 @@ class be {
|
|
|
346
346
|
* Add a command to history, enforcing storage limits
|
|
347
347
|
*/
|
|
348
348
|
async addStoredCommand(e) {
|
|
349
|
-
const
|
|
350
|
-
for (
|
|
351
|
-
|
|
352
|
-
await this.saveCommands(
|
|
349
|
+
const t = await this.getStoredCommands();
|
|
350
|
+
for (t.push(e); t.length > this.config.maxCommands; )
|
|
351
|
+
t.shift();
|
|
352
|
+
await this.saveCommands(t);
|
|
353
353
|
}
|
|
354
354
|
}
|
|
355
|
-
class Ue extends
|
|
356
|
-
constructor(
|
|
357
|
-
super(
|
|
358
|
-
|
|
355
|
+
class Ue extends Se {
|
|
356
|
+
constructor(t) {
|
|
357
|
+
super(t);
|
|
358
|
+
f(this, "storageKey", "citadel_command_history");
|
|
359
359
|
}
|
|
360
360
|
async getStoredCommands() {
|
|
361
361
|
try {
|
|
362
|
-
const
|
|
363
|
-
return
|
|
364
|
-
commandSegments: Array.isArray(
|
|
365
|
-
timestamp:
|
|
362
|
+
const t = window.localStorage.getItem(this.storageKey);
|
|
363
|
+
return t ? JSON.parse(t).map((r) => ({
|
|
364
|
+
commandSegments: Array.isArray(r.commandSegments) ? D(r.commandSegments) : [],
|
|
365
|
+
timestamp: r.timestamp
|
|
366
366
|
})) : [];
|
|
367
|
-
} catch (
|
|
368
|
-
return console.warn("Failed to load commands from localStorage:",
|
|
367
|
+
} catch (t) {
|
|
368
|
+
return console.warn("Failed to load commands from localStorage:", t), [];
|
|
369
369
|
}
|
|
370
370
|
}
|
|
371
371
|
async clear() {
|
|
372
372
|
try {
|
|
373
373
|
window.localStorage.removeItem(this.storageKey);
|
|
374
|
-
} catch (
|
|
375
|
-
console.warn("Failed to clear localStorage:",
|
|
374
|
+
} catch (t) {
|
|
375
|
+
console.warn("Failed to clear localStorage:", t);
|
|
376
376
|
}
|
|
377
377
|
}
|
|
378
|
-
async saveCommands(
|
|
378
|
+
async saveCommands(t) {
|
|
379
379
|
try {
|
|
380
|
-
const
|
|
381
|
-
commandSegments: Array.isArray(
|
|
382
|
-
type:
|
|
383
|
-
name:
|
|
384
|
-
description:
|
|
385
|
-
...
|
|
380
|
+
const s = t.map((r) => ({
|
|
381
|
+
commandSegments: Array.isArray(r.commandSegments) ? D(r.commandSegments).map((a) => ({
|
|
382
|
+
type: a.type,
|
|
383
|
+
name: a.name,
|
|
384
|
+
description: a.description,
|
|
385
|
+
...a instanceof O ? { value: a.value } : {}
|
|
386
386
|
})) : [],
|
|
387
|
-
timestamp:
|
|
387
|
+
timestamp: r.timestamp
|
|
388
388
|
}));
|
|
389
|
-
window.localStorage.setItem(this.storageKey, JSON.stringify(
|
|
390
|
-
} catch (
|
|
391
|
-
throw console.warn("Failed to save commands to localStorage:",
|
|
389
|
+
window.localStorage.setItem(this.storageKey, JSON.stringify(s));
|
|
390
|
+
} catch (s) {
|
|
391
|
+
throw console.warn("Failed to save commands to localStorage:", s), s;
|
|
392
392
|
}
|
|
393
393
|
}
|
|
394
394
|
}
|
|
395
|
-
class
|
|
396
|
-
constructor(
|
|
397
|
-
super(
|
|
398
|
-
|
|
395
|
+
class pe extends Se {
|
|
396
|
+
constructor(t) {
|
|
397
|
+
super(t);
|
|
398
|
+
f(this, "storedCommands", []);
|
|
399
399
|
}
|
|
400
400
|
async getStoredCommands() {
|
|
401
|
-
return this.storedCommands.map((
|
|
402
|
-
commandSegments: Array.isArray(
|
|
403
|
-
timestamp:
|
|
401
|
+
return this.storedCommands.map((t) => ({
|
|
402
|
+
commandSegments: Array.isArray(t.commandSegments) ? D(t.commandSegments) : [],
|
|
403
|
+
timestamp: t.timestamp
|
|
404
404
|
}));
|
|
405
405
|
}
|
|
406
406
|
async clear() {
|
|
407
407
|
this.storedCommands = [];
|
|
408
408
|
}
|
|
409
|
-
async saveCommands(
|
|
410
|
-
this.storedCommands =
|
|
411
|
-
commandSegments: Array.isArray(
|
|
412
|
-
timestamp:
|
|
409
|
+
async saveCommands(t) {
|
|
410
|
+
this.storedCommands = t.map((s) => ({
|
|
411
|
+
commandSegments: Array.isArray(s.commandSegments) ? D(s.commandSegments) : [],
|
|
412
|
+
timestamp: s.timestamp
|
|
413
413
|
}));
|
|
414
414
|
}
|
|
415
415
|
}
|
|
416
|
-
const
|
|
416
|
+
const $ = class $ {
|
|
417
417
|
constructor() {
|
|
418
|
-
|
|
418
|
+
f(this, "currentStorage");
|
|
419
419
|
}
|
|
420
420
|
static reset() {
|
|
421
|
-
|
|
421
|
+
$.instance = void 0;
|
|
422
422
|
}
|
|
423
423
|
static getInstance() {
|
|
424
|
-
return
|
|
424
|
+
return $.instance || ($.instance = new $()), $.instance;
|
|
425
425
|
}
|
|
426
426
|
initializeStorage(e) {
|
|
427
427
|
try {
|
|
428
|
-
e.type === "memory" ? this.currentStorage = new
|
|
429
|
-
} catch (
|
|
430
|
-
console.warn("Failed to create storage, falling back to memory storage:",
|
|
428
|
+
e.type === "memory" ? this.currentStorage = new pe(e) : this.currentStorage = new Ue(e);
|
|
429
|
+
} catch (t) {
|
|
430
|
+
console.warn("Failed to create storage, falling back to memory storage:", t), this.currentStorage = new pe(e);
|
|
431
431
|
}
|
|
432
432
|
}
|
|
433
433
|
getStorage() {
|
|
@@ -436,19 +436,19 @@ const U = class U {
|
|
|
436
436
|
return this.currentStorage;
|
|
437
437
|
}
|
|
438
438
|
};
|
|
439
|
-
|
|
440
|
-
let
|
|
439
|
+
f($, "instance");
|
|
440
|
+
let J = $;
|
|
441
441
|
class xe {
|
|
442
442
|
constructor() {
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
443
|
+
f(this, "segments", []);
|
|
444
|
+
f(this, "nullSegment", new le());
|
|
445
|
+
f(this, "observers", []);
|
|
446
446
|
}
|
|
447
447
|
subscribe(e) {
|
|
448
448
|
this.observers.push(e);
|
|
449
449
|
}
|
|
450
450
|
unsubscribe(e) {
|
|
451
|
-
this.observers = this.observers.filter((
|
|
451
|
+
this.observers = this.observers.filter((t) => t !== e);
|
|
452
452
|
}
|
|
453
453
|
notifyObservers() {
|
|
454
454
|
this.observers.forEach((e) => e.update());
|
|
@@ -469,7 +469,7 @@ class xe {
|
|
|
469
469
|
* Pushes an array of segments onto the stack
|
|
470
470
|
*/
|
|
471
471
|
pushAll(e) {
|
|
472
|
-
e.forEach((
|
|
472
|
+
e.forEach((t) => this.push(t));
|
|
473
473
|
}
|
|
474
474
|
/**
|
|
475
475
|
* Removes and returns the top segment from the stack
|
|
@@ -525,420 +525,411 @@ class xe {
|
|
|
525
525
|
return [...this.segments];
|
|
526
526
|
}
|
|
527
527
|
}
|
|
528
|
-
const
|
|
528
|
+
const Oe = {
|
|
529
529
|
config: N,
|
|
530
530
|
commands: new X(),
|
|
531
531
|
segmentStack: new xe()
|
|
532
|
-
},
|
|
533
|
-
const [
|
|
532
|
+
}, B = Re(Oe), We = ({ config: n = N, commandRegistry: e, children: t }) => {
|
|
533
|
+
const [s, r] = U.useState(), [a] = _(() => new xe()), o = A(() => ({
|
|
534
534
|
...N,
|
|
535
|
-
...
|
|
535
|
+
...n,
|
|
536
536
|
// Ensure nested objects are properly merged
|
|
537
537
|
storage: {
|
|
538
538
|
...N.storage,
|
|
539
|
-
...
|
|
539
|
+
...n.storage
|
|
540
540
|
},
|
|
541
541
|
// Ensure explicit values from config take precedence
|
|
542
|
-
cursorType:
|
|
543
|
-
cursorColor:
|
|
544
|
-
cursorSpeed:
|
|
545
|
-
showCitadelKey:
|
|
546
|
-
}), [
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
),
|
|
551
|
-
}, [
|
|
542
|
+
cursorType: n.cursorType ?? N.cursorType,
|
|
543
|
+
cursorColor: n.cursorColor ?? N.cursorColor,
|
|
544
|
+
cursorSpeed: n.cursorSpeed ?? N.cursorSpeed,
|
|
545
|
+
showCitadelKey: n.showCitadelKey || "."
|
|
546
|
+
}), [n]);
|
|
547
|
+
P(() => {
|
|
548
|
+
J.getInstance().initializeStorage(
|
|
549
|
+
o.storage ?? N.storage
|
|
550
|
+
), r(J.getInstance().getStorage());
|
|
551
|
+
}, [o.storage]), P(() => {
|
|
552
552
|
if (e) {
|
|
553
|
-
if (
|
|
553
|
+
if (o.includeHelpCommand) {
|
|
554
554
|
if (!e.commandExistsForPath(["help"])) {
|
|
555
|
-
const
|
|
555
|
+
const i = Le(e);
|
|
556
556
|
e.addCommand(
|
|
557
557
|
[{ type: "word", name: "help" }],
|
|
558
558
|
"Show available commands",
|
|
559
|
-
|
|
559
|
+
i
|
|
560
560
|
);
|
|
561
561
|
}
|
|
562
562
|
return;
|
|
563
563
|
}
|
|
564
564
|
e.removeCommand(["help"]);
|
|
565
565
|
}
|
|
566
|
-
}, [e,
|
|
567
|
-
const
|
|
568
|
-
config:
|
|
566
|
+
}, [e, o.includeHelpCommand]);
|
|
567
|
+
const c = A(() => ({
|
|
568
|
+
config: o,
|
|
569
569
|
commands: e || new X(),
|
|
570
|
-
storage:
|
|
571
|
-
segmentStack:
|
|
572
|
-
}), [
|
|
573
|
-
return /* @__PURE__ */ m(
|
|
570
|
+
storage: s,
|
|
571
|
+
segmentStack: a
|
|
572
|
+
}), [o, e, s, a]);
|
|
573
|
+
return /* @__PURE__ */ m(B.Provider, { value: c, children: t });
|
|
574
574
|
}, j = () => {
|
|
575
|
-
const
|
|
576
|
-
if (
|
|
575
|
+
const n = Q(B);
|
|
576
|
+
if (n === void 0)
|
|
577
577
|
throw new Error("useCitadelConfig must be used within a CitadelConfigProvider");
|
|
578
|
-
return
|
|
579
|
-
},
|
|
580
|
-
const
|
|
581
|
-
if (
|
|
578
|
+
return n.config;
|
|
579
|
+
}, Z = () => {
|
|
580
|
+
const n = Q(B);
|
|
581
|
+
if (n === void 0)
|
|
582
582
|
throw new Error("useCitadelCommands must be used within a CitadelConfigProvider");
|
|
583
|
-
return
|
|
584
|
-
},
|
|
585
|
-
const
|
|
586
|
-
if (
|
|
583
|
+
return n.commands;
|
|
584
|
+
}, be = () => {
|
|
585
|
+
const n = Q(B);
|
|
586
|
+
if (n === void 0)
|
|
587
587
|
throw new Error("useCitadelStorage must be used within a CitadelConfigProvider");
|
|
588
|
-
return
|
|
589
|
-
},
|
|
590
|
-
const
|
|
591
|
-
if (
|
|
588
|
+
return n.storage;
|
|
589
|
+
}, V = () => {
|
|
590
|
+
const n = Q(B);
|
|
591
|
+
if (n === void 0)
|
|
592
592
|
throw new Error("useSegmentStack must be used within a CitadelConfigProvider");
|
|
593
|
-
return
|
|
593
|
+
return n.segmentStack;
|
|
594
594
|
}, G = class G {
|
|
595
|
-
constructor(e,
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
this.id = `output-${Date.now()}-${G.idCounter++}`, this.command = e.toArray().map((
|
|
595
|
+
constructor(e, t) {
|
|
596
|
+
f(this, "id");
|
|
597
|
+
f(this, "timestamp");
|
|
598
|
+
f(this, "command");
|
|
599
|
+
f(this, "result");
|
|
600
|
+
this.id = `output-${Date.now()}-${G.idCounter++}`, this.command = e.toArray().map((s) => s.type === "argument" ? s.value || "" : s.name), this.timestamp = Date.now(), this.result = t ?? new De();
|
|
601
601
|
}
|
|
602
602
|
};
|
|
603
|
-
|
|
604
|
-
let
|
|
605
|
-
function
|
|
603
|
+
f(G, "idCounter", 0);
|
|
604
|
+
let oe = G;
|
|
605
|
+
function Ke(n) {
|
|
606
606
|
return {
|
|
607
|
-
commandSegments:
|
|
607
|
+
commandSegments: D(n),
|
|
608
608
|
timestamp: Date.now()
|
|
609
609
|
};
|
|
610
610
|
}
|
|
611
|
-
function
|
|
612
|
-
const
|
|
611
|
+
function ke() {
|
|
612
|
+
const n = be(), [e, t] = _({
|
|
613
613
|
storedCommands: [],
|
|
614
614
|
position: null
|
|
615
|
-
}),
|
|
616
|
-
if (
|
|
615
|
+
}), s = w(async (c) => {
|
|
616
|
+
if (n)
|
|
617
617
|
try {
|
|
618
|
-
const
|
|
619
|
-
await
|
|
620
|
-
...
|
|
621
|
-
storedCommands: [...
|
|
622
|
-
...
|
|
623
|
-
commandSegments:
|
|
618
|
+
const i = Ke(c);
|
|
619
|
+
await n.addStoredCommand(i), t((d) => ({
|
|
620
|
+
...d,
|
|
621
|
+
storedCommands: [...d.storedCommands, {
|
|
622
|
+
...i,
|
|
623
|
+
commandSegments: D(i.commandSegments)
|
|
624
624
|
}],
|
|
625
625
|
position: null
|
|
626
626
|
}));
|
|
627
|
-
} catch (
|
|
628
|
-
console.warn("Failed to save command to history:",
|
|
627
|
+
} catch (i) {
|
|
628
|
+
console.warn("Failed to save command to history:", i);
|
|
629
629
|
}
|
|
630
|
-
}, [
|
|
631
|
-
...
|
|
632
|
-
commandSegments:
|
|
633
|
-
})) : [], [
|
|
634
|
-
|
|
635
|
-
if (!
|
|
630
|
+
}, [n]), r = w(async () => n ? (await n.getStoredCommands()).map((i) => ({
|
|
631
|
+
...i,
|
|
632
|
+
commandSegments: D(i.commandSegments)
|
|
633
|
+
})) : [], [n]);
|
|
634
|
+
P(() => {
|
|
635
|
+
if (!n) return;
|
|
636
636
|
(async () => {
|
|
637
637
|
try {
|
|
638
|
-
const
|
|
638
|
+
const d = (await n.getStoredCommands()).map((g) => ({
|
|
639
639
|
...g,
|
|
640
|
-
commandSegments:
|
|
640
|
+
commandSegments: D(g.commandSegments)
|
|
641
641
|
}));
|
|
642
|
-
return
|
|
642
|
+
return t((g) => ({
|
|
643
643
|
...g,
|
|
644
|
-
storedCommands:
|
|
645
|
-
})),
|
|
646
|
-
} catch (
|
|
647
|
-
console.warn("Failed to load command history:",
|
|
644
|
+
storedCommands: d
|
|
645
|
+
})), d;
|
|
646
|
+
} catch (i) {
|
|
647
|
+
console.warn("Failed to load command history:", i);
|
|
648
648
|
}
|
|
649
649
|
})();
|
|
650
|
-
}, [
|
|
651
|
-
const
|
|
652
|
-
const
|
|
653
|
-
if (
|
|
654
|
-
return
|
|
655
|
-
...
|
|
650
|
+
}, [n]);
|
|
651
|
+
const a = w(async (c) => {
|
|
652
|
+
const i = await r();
|
|
653
|
+
if (i.length === 0)
|
|
654
|
+
return t((u) => ({
|
|
655
|
+
...u,
|
|
656
656
|
storedCommands: [],
|
|
657
657
|
position: null
|
|
658
658
|
})), { segments: null, position: null };
|
|
659
|
-
let
|
|
660
|
-
if (
|
|
661
|
-
...
|
|
662
|
-
storedCommands:
|
|
663
|
-
...
|
|
664
|
-
commandSegments:
|
|
659
|
+
let d = null;
|
|
660
|
+
if (c === "up" ? e.position === null ? d = i.length - 1 : e.position > 0 ? d = e.position - 1 : d = 0 : e.position === null || e.position >= i.length - 1 ? d = null : d = e.position + 1, t((u) => ({
|
|
661
|
+
...u,
|
|
662
|
+
storedCommands: i.map((h) => ({
|
|
663
|
+
...h,
|
|
664
|
+
commandSegments: D(h.commandSegments)
|
|
665
665
|
})),
|
|
666
|
-
position:
|
|
667
|
-
})),
|
|
666
|
+
position: d
|
|
667
|
+
})), d === null)
|
|
668
668
|
return {
|
|
669
669
|
segments: [],
|
|
670
670
|
position: null
|
|
671
671
|
};
|
|
672
|
-
const g =
|
|
672
|
+
const g = i[d];
|
|
673
673
|
return g ? {
|
|
674
|
-
segments:
|
|
675
|
-
position:
|
|
674
|
+
segments: D(g.commandSegments),
|
|
675
|
+
position: d
|
|
676
676
|
} : {
|
|
677
677
|
segments: [],
|
|
678
678
|
position: null
|
|
679
679
|
};
|
|
680
|
-
}, [e.position,
|
|
680
|
+
}, [e.position, r]), o = w(async () => {
|
|
681
681
|
try {
|
|
682
|
-
if (!
|
|
683
|
-
await
|
|
682
|
+
if (!n) return;
|
|
683
|
+
await n.clear(), t({
|
|
684
684
|
storedCommands: [],
|
|
685
685
|
position: null
|
|
686
686
|
});
|
|
687
|
-
} catch (
|
|
688
|
-
console.warn("Failed to clear command history:",
|
|
687
|
+
} catch (c) {
|
|
688
|
+
console.warn("Failed to clear command history:", c);
|
|
689
689
|
}
|
|
690
|
-
}, [
|
|
690
|
+
}, [n]);
|
|
691
691
|
return {
|
|
692
692
|
history: e,
|
|
693
|
-
addStoredCommand:
|
|
694
|
-
getStoredCommands:
|
|
695
|
-
navigateHistory:
|
|
696
|
-
clear:
|
|
693
|
+
addStoredCommand: s,
|
|
694
|
+
getStoredCommands: r,
|
|
695
|
+
navigateHistory: a,
|
|
696
|
+
clear: o
|
|
697
697
|
};
|
|
698
698
|
}
|
|
699
|
-
const
|
|
700
|
-
const
|
|
699
|
+
const de = () => {
|
|
700
|
+
const n = j(), e = Z(), t = ke(), s = V(), r = be(), [a, o] = _({
|
|
701
701
|
currentInput: "",
|
|
702
702
|
isEnteringArg: !1,
|
|
703
703
|
output: [],
|
|
704
704
|
history: {
|
|
705
705
|
commands: [],
|
|
706
706
|
position: null,
|
|
707
|
-
storage:
|
|
707
|
+
storage: r
|
|
708
708
|
}
|
|
709
709
|
});
|
|
710
|
-
|
|
711
|
-
}, [
|
|
712
|
-
|
|
713
|
-
...
|
|
710
|
+
P(() => {
|
|
711
|
+
}, [r]), P(() => {
|
|
712
|
+
o((i) => ({
|
|
713
|
+
...i,
|
|
714
714
|
history: {
|
|
715
|
-
commands:
|
|
716
|
-
position:
|
|
717
|
-
storage:
|
|
715
|
+
commands: t.history.storedCommands,
|
|
716
|
+
position: t.history.position,
|
|
717
|
+
storage: r
|
|
718
718
|
}
|
|
719
719
|
}));
|
|
720
|
-
}, [
|
|
721
|
-
const
|
|
722
|
-
setCurrentInput:
|
|
723
|
-
k.debug("[CitadelActions] setCurrentInput: ",
|
|
720
|
+
}, [t.history, r]);
|
|
721
|
+
const c = {
|
|
722
|
+
setCurrentInput: w((i) => {
|
|
723
|
+
k.debug("[CitadelActions] setCurrentInput: ", i), o((d) => ({ ...d, currentInput: i }));
|
|
724
724
|
}, []),
|
|
725
|
-
setIsEnteringArg:
|
|
726
|
-
k.debug("[CitadelActions] setIsEnteringArg: ",
|
|
725
|
+
setIsEnteringArg: w((i) => {
|
|
726
|
+
k.debug("[CitadelActions] setIsEnteringArg: ", i), o((d) => ({ ...d, isEnteringArg: i }));
|
|
727
727
|
}, []),
|
|
728
|
-
addOutput:
|
|
729
|
-
k.debug("[CitadelActions]addOutput: ",
|
|
730
|
-
...
|
|
731
|
-
output: [...
|
|
728
|
+
addOutput: w((i) => {
|
|
729
|
+
k.debug("[CitadelActions]addOutput: ", i), o((d) => ({
|
|
730
|
+
...d,
|
|
731
|
+
output: [...d.output, i]
|
|
732
732
|
}));
|
|
733
733
|
}, []),
|
|
734
|
-
executeCommand:
|
|
735
|
-
const
|
|
736
|
-
if (!
|
|
737
|
-
console.error("[CitadelActions][executeCommand] Cannot execute command because no command was found for the given path: ",
|
|
734
|
+
executeCommand: w(async () => {
|
|
735
|
+
const i = s.path(), d = e.getCommand(i);
|
|
736
|
+
if (!d) {
|
|
737
|
+
console.error("[CitadelActions][executeCommand] Cannot execute command because no command was found for the given path: ", i);
|
|
738
738
|
return;
|
|
739
739
|
}
|
|
740
|
-
const g = new
|
|
741
|
-
|
|
742
|
-
...
|
|
743
|
-
output: [...
|
|
740
|
+
const g = new oe(s);
|
|
741
|
+
o((u) => ({
|
|
742
|
+
...u,
|
|
743
|
+
output: [...u.output, g]
|
|
744
744
|
}));
|
|
745
745
|
try {
|
|
746
|
-
const
|
|
746
|
+
const u = new Promise((y, v) => {
|
|
747
747
|
setTimeout(() => {
|
|
748
|
-
|
|
749
|
-
},
|
|
750
|
-
}),
|
|
751
|
-
|
|
752
|
-
|
|
748
|
+
v(new Error("Request timed out"));
|
|
749
|
+
}, n.commandTimeoutMs);
|
|
750
|
+
}), h = s.arguments.map((y) => y.value || ""), x = await Promise.race([
|
|
751
|
+
d.handler(h),
|
|
752
|
+
u
|
|
753
753
|
]);
|
|
754
|
-
if (!(
|
|
754
|
+
if (!(x instanceof W))
|
|
755
755
|
throw new Error(
|
|
756
|
-
`The ${
|
|
756
|
+
`The ${i.join(".")} command returned an invalid result type. Commands must return an instance of a CommandResult.
|
|
757
757
|
For example:
|
|
758
758
|
return new JsonCommandResult({ text: "Hello World" });
|
|
759
|
-
Check the definition of the ${
|
|
759
|
+
Check the definition of the ${i.join(".")} command and update the return type for its handler.`
|
|
760
760
|
);
|
|
761
|
-
|
|
762
|
-
...
|
|
763
|
-
output:
|
|
764
|
-
(
|
|
761
|
+
x.markSuccess(), o((y) => ({
|
|
762
|
+
...y,
|
|
763
|
+
output: y.output.map(
|
|
764
|
+
(v) => v.id === g.id ? { ...v, result: x } : v
|
|
765
765
|
)
|
|
766
766
|
}));
|
|
767
|
-
} catch (
|
|
768
|
-
const
|
|
769
|
-
|
|
767
|
+
} catch (u) {
|
|
768
|
+
const h = new we(
|
|
769
|
+
u instanceof Error ? u.message : "Unknown error"
|
|
770
770
|
);
|
|
771
|
-
|
|
772
|
-
...
|
|
773
|
-
output:
|
|
774
|
-
(
|
|
771
|
+
h.markFailure(), o((x) => ({
|
|
772
|
+
...x,
|
|
773
|
+
output: x.output.map(
|
|
774
|
+
(y) => y.id === g.id ? { ...y, result: h } : y
|
|
775
775
|
)
|
|
776
776
|
}));
|
|
777
777
|
}
|
|
778
|
-
}, [e,
|
|
779
|
-
clearHistory:
|
|
778
|
+
}, [e, n.commandTimeoutMs, s]),
|
|
779
|
+
clearHistory: w(async () => {
|
|
780
780
|
try {
|
|
781
|
-
await
|
|
782
|
-
} catch (
|
|
783
|
-
console.warn("Failed to clear history:",
|
|
781
|
+
await t.clear();
|
|
782
|
+
} catch (i) {
|
|
783
|
+
console.warn("Failed to clear history:", i);
|
|
784
784
|
}
|
|
785
|
-
}, [
|
|
785
|
+
}, [t])
|
|
786
786
|
};
|
|
787
|
-
return { state:
|
|
788
|
-
},
|
|
789
|
-
|
|
790
|
-
const
|
|
791
|
-
var
|
|
792
|
-
!
|
|
787
|
+
return { state: a, actions: c };
|
|
788
|
+
}, qe = ({ onOpen: n, onClose: e, isVisible: t, showCitadelKey: s }) => {
|
|
789
|
+
P(() => {
|
|
790
|
+
const r = (a) => {
|
|
791
|
+
var o, c;
|
|
792
|
+
!t && a.key === s && !["input", "textarea"].includes(((c = (o = a.target) == null ? void 0 : o.tagName) == null ? void 0 : c.toLowerCase()) || "") && (a.preventDefault(), n()), t && a.key === "Escape" && (a.preventDefault(), e());
|
|
793
793
|
};
|
|
794
|
-
return document.addEventListener("keydown",
|
|
795
|
-
}, [
|
|
796
|
-
},
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
citadel_slideDown: Ve,
|
|
803
|
-
inlineContainer: Ge
|
|
804
|
-
}, Je = (t) => {
|
|
805
|
-
const { isVisible: e, isClosing: n, onAnimationComplete: r } = t, o = M(() => e ? n ? ce.slideDown : ce.slideUp : "", [e, n]);
|
|
806
|
-
return z(() => {
|
|
807
|
-
if (r) {
|
|
808
|
-
const i = setTimeout(() => {
|
|
809
|
-
r();
|
|
794
|
+
return document.addEventListener("keydown", r), () => document.removeEventListener("keydown", r);
|
|
795
|
+
}, [n, e, t, s]);
|
|
796
|
+
}, Be = (n) => {
|
|
797
|
+
const { isVisible: e, isClosing: t, onAnimationComplete: s } = n, r = A(() => e ? t ? "citadel_slideDown" : "citadel_slideUp" : "", [e, t]);
|
|
798
|
+
return P(() => {
|
|
799
|
+
if (s) {
|
|
800
|
+
const o = setTimeout(() => {
|
|
801
|
+
s();
|
|
810
802
|
}, 200);
|
|
811
|
-
return () => clearTimeout(
|
|
803
|
+
return () => clearTimeout(o);
|
|
812
804
|
}
|
|
813
|
-
}, [
|
|
814
|
-
style:
|
|
805
|
+
}, [t, s]), {
|
|
806
|
+
style: A(() => ({
|
|
815
807
|
opacity: e ? 1 : 0,
|
|
816
|
-
transform: e ? "translateY(0)" :
|
|
808
|
+
transform: e ? "translateY(0)" : t ? "translateY(100%)" : "translateY(-100%)",
|
|
817
809
|
transition: "opacity 200ms ease-in-out, transform 200ms ease-in-out"
|
|
818
|
-
}), [e,
|
|
819
|
-
animationClass:
|
|
810
|
+
}), [e, t]),
|
|
811
|
+
animationClass: r
|
|
820
812
|
};
|
|
821
|
-
},
|
|
813
|
+
}, Ve = () => /* @__PURE__ */ m(
|
|
822
814
|
"div",
|
|
823
815
|
{
|
|
824
816
|
"data-testid": "spinner",
|
|
825
|
-
className: "
|
|
817
|
+
className: "citadel-spinner"
|
|
826
818
|
}
|
|
827
|
-
),
|
|
828
|
-
const e =
|
|
819
|
+
), Ee = (n) => {
|
|
820
|
+
const e = n == null ? void 0 : n.trim();
|
|
829
821
|
return e || void 0;
|
|
830
|
-
},
|
|
831
|
-
const e =
|
|
832
|
-
return e ?
|
|
833
|
-
},
|
|
834
|
-
const
|
|
835
|
-
...
|
|
822
|
+
}, Ye = (n) => {
|
|
823
|
+
const e = Ee(n);
|
|
824
|
+
return e ? { style: { fontSize: e } } : {};
|
|
825
|
+
}, ee = (n, e) => {
|
|
826
|
+
const t = Ee(n), r = {
|
|
827
|
+
...Ye(e).style
|
|
836
828
|
};
|
|
837
|
-
return
|
|
838
|
-
|
|
839
|
-
style: Object.keys(o).length > 0 ? o : void 0
|
|
829
|
+
return t && (r.fontFamily = t), {
|
|
830
|
+
style: Object.keys(r).length > 0 ? r : void 0
|
|
840
831
|
};
|
|
841
|
-
},
|
|
842
|
-
command:
|
|
832
|
+
}, Je = ({
|
|
833
|
+
command: n,
|
|
843
834
|
timestamp: e,
|
|
844
|
-
status:
|
|
845
|
-
fontFamily:
|
|
846
|
-
fontSize:
|
|
835
|
+
status: t,
|
|
836
|
+
fontFamily: s,
|
|
837
|
+
fontSize: r
|
|
847
838
|
}) => {
|
|
848
|
-
const
|
|
849
|
-
() =>
|
|
850
|
-
[
|
|
839
|
+
const a = A(
|
|
840
|
+
() => ee(s, r ?? "0.875rem"),
|
|
841
|
+
[s, r]
|
|
851
842
|
);
|
|
852
|
-
return /* @__PURE__ */
|
|
843
|
+
return /* @__PURE__ */ I(
|
|
853
844
|
"div",
|
|
854
845
|
{
|
|
855
|
-
className:
|
|
856
|
-
style:
|
|
846
|
+
className: "citadel-output-line",
|
|
847
|
+
style: a.style,
|
|
857
848
|
children: [
|
|
858
|
-
/* @__PURE__ */
|
|
849
|
+
/* @__PURE__ */ I("span", { className: "citadel-output-command", children: [
|
|
859
850
|
"> ",
|
|
860
|
-
|
|
861
|
-
const
|
|
862
|
-
return /* @__PURE__ */
|
|
851
|
+
n.split(" ").map((o, c) => {
|
|
852
|
+
const i = o.startsWith("<") && o.endsWith(">");
|
|
853
|
+
return /* @__PURE__ */ I(
|
|
863
854
|
"span",
|
|
864
855
|
{
|
|
865
|
-
className:
|
|
856
|
+
className: i ? "citadel-output-command-arg" : "citadel-output-command-word",
|
|
866
857
|
children: [
|
|
867
|
-
|
|
868
|
-
|
|
858
|
+
c > 0 ? " " : "",
|
|
859
|
+
o
|
|
869
860
|
]
|
|
870
861
|
},
|
|
871
|
-
|
|
862
|
+
c
|
|
872
863
|
);
|
|
873
864
|
})
|
|
874
865
|
] }),
|
|
875
|
-
/* @__PURE__ */ m("span", { className: "
|
|
876
|
-
/* @__PURE__ */ m("span", { className: "
|
|
877
|
-
|
|
878
|
-
|
|
866
|
+
/* @__PURE__ */ m("span", { className: "citadel-output-separator", children: "·" }),
|
|
867
|
+
/* @__PURE__ */ m("span", { className: "citadel-output-timestamp", children: e }),
|
|
868
|
+
t === q.Pending && /* @__PURE__ */ m(Ve, {}),
|
|
869
|
+
t === q.Success && /* @__PURE__ */ m(
|
|
879
870
|
"div",
|
|
880
871
|
{
|
|
881
872
|
"data-testid": "success-indicator",
|
|
882
|
-
className: "
|
|
873
|
+
className: "citadel-status-dot citadel-status-dot-success"
|
|
883
874
|
}
|
|
884
875
|
),
|
|
885
|
-
(
|
|
876
|
+
(t === q.Timeout || t === q.Failure) && /* @__PURE__ */ m(
|
|
886
877
|
"div",
|
|
887
878
|
{
|
|
888
879
|
"data-testid": "success-indicator",
|
|
889
|
-
className: "
|
|
880
|
+
className: "citadel-status-dot citadel-status-dot-failure"
|
|
890
881
|
}
|
|
891
882
|
)
|
|
892
883
|
]
|
|
893
884
|
}
|
|
894
885
|
);
|
|
895
|
-
},
|
|
896
|
-
const
|
|
897
|
-
() =>
|
|
898
|
-
[
|
|
899
|
-
),
|
|
886
|
+
}, Ge = ({ output: n, outputRef: e }) => {
|
|
887
|
+
const t = j(), s = A(
|
|
888
|
+
() => ee(t.fontFamily, t.outputFontSize ?? t.fontSize),
|
|
889
|
+
[t.fontFamily, t.fontSize, t.outputFontSize]
|
|
890
|
+
), r = w(() => {
|
|
900
891
|
if (e.current) {
|
|
901
|
-
const
|
|
892
|
+
const a = e.current;
|
|
902
893
|
requestAnimationFrame(() => {
|
|
903
|
-
|
|
894
|
+
a.scrollTop = a.scrollHeight;
|
|
904
895
|
});
|
|
905
896
|
}
|
|
906
897
|
}, [e]);
|
|
907
|
-
return
|
|
908
|
-
if (
|
|
909
|
-
const
|
|
910
|
-
if (
|
|
911
|
-
return
|
|
898
|
+
return P(() => {
|
|
899
|
+
if (r(), e.current) {
|
|
900
|
+
const a = e.current.getElementsByTagName("img"), o = a[a.length - 1];
|
|
901
|
+
if (o && !o.complete)
|
|
902
|
+
return o.addEventListener("load", r), () => o.removeEventListener("load", r);
|
|
912
903
|
}
|
|
913
|
-
}, [
|
|
904
|
+
}, [n, r, e]), /* @__PURE__ */ m(
|
|
914
905
|
"div",
|
|
915
906
|
{
|
|
916
907
|
ref: e,
|
|
917
|
-
className: "
|
|
908
|
+
className: "citadel-output",
|
|
918
909
|
"data-testid": "citadel-command-output",
|
|
919
|
-
children:
|
|
910
|
+
children: n.map((a) => /* @__PURE__ */ I("div", { className: "citadel-output-item", children: [
|
|
920
911
|
/* @__PURE__ */ m(
|
|
921
|
-
|
|
912
|
+
Je,
|
|
922
913
|
{
|
|
923
|
-
command:
|
|
924
|
-
timestamp: new Date(
|
|
925
|
-
status:
|
|
926
|
-
fontFamily:
|
|
927
|
-
fontSize:
|
|
914
|
+
command: a.command.join(" "),
|
|
915
|
+
timestamp: new Date(a.timestamp).toLocaleTimeString(),
|
|
916
|
+
status: a.result.status,
|
|
917
|
+
fontFamily: t.fontFamily,
|
|
918
|
+
fontSize: t.fontSize
|
|
928
919
|
}
|
|
929
920
|
),
|
|
930
921
|
/* @__PURE__ */ m(
|
|
931
|
-
"
|
|
922
|
+
"div",
|
|
932
923
|
{
|
|
933
|
-
className:
|
|
934
|
-
style:
|
|
935
|
-
children:
|
|
924
|
+
className: "citadel-output-content",
|
|
925
|
+
style: s.style,
|
|
926
|
+
children: a.result.render()
|
|
936
927
|
}
|
|
937
928
|
)
|
|
938
|
-
] },
|
|
929
|
+
] }, a.id))
|
|
939
930
|
}
|
|
940
931
|
);
|
|
941
|
-
},
|
|
932
|
+
}, Qe = {
|
|
942
933
|
blink: {
|
|
943
934
|
character: "▋",
|
|
944
935
|
speed: 530,
|
|
@@ -959,487 +950,510 @@ Check the definition of the ${a.join(".")} command and update the return type fo
|
|
|
959
950
|
speed: 120,
|
|
960
951
|
color: "#fff"
|
|
961
952
|
}
|
|
962
|
-
},
|
|
963
|
-
style:
|
|
953
|
+
}, he = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"], ge = ["|", "/", "-", "\\"], Xe = ({
|
|
954
|
+
style: n = { type: "blink" },
|
|
964
955
|
isValid: e = !0,
|
|
965
|
-
errorMessage:
|
|
956
|
+
errorMessage: t
|
|
966
957
|
}) => {
|
|
967
|
-
const
|
|
968
|
-
...
|
|
969
|
-
...
|
|
970
|
-
}), [
|
|
971
|
-
|
|
972
|
-
if (
|
|
958
|
+
const s = A(() => ({
|
|
959
|
+
...Qe[n.type],
|
|
960
|
+
...n
|
|
961
|
+
}), [n]), [r, a] = _(!0), [o, c] = _(0);
|
|
962
|
+
P(() => {
|
|
963
|
+
if (s.speed === 0) return;
|
|
973
964
|
const g = setInterval(() => {
|
|
974
|
-
|
|
975
|
-
},
|
|
965
|
+
s.type === "blink" ? a((u) => !u) : ["spin", "bbs"].includes(s.type) && c((u) => (u + 1) % (s.type === "bbs" ? ge.length : he.length));
|
|
966
|
+
}, s.speed);
|
|
976
967
|
return () => clearInterval(g);
|
|
977
|
-
}, [
|
|
978
|
-
const
|
|
979
|
-
color: e ?
|
|
968
|
+
}, [s.type, s.speed]);
|
|
969
|
+
const i = A(() => ({
|
|
970
|
+
color: e ? s.color : "#ff4444",
|
|
980
971
|
transition: "color 0.15s ease-in-out"
|
|
981
|
-
}), [e,
|
|
982
|
-
return /* @__PURE__ */ m("div", { className: "
|
|
972
|
+
}), [e, s.color]);
|
|
973
|
+
return /* @__PURE__ */ m("div", { className: "citadel-cursor-wrapper", children: /* @__PURE__ */ m(
|
|
983
974
|
"span",
|
|
984
975
|
{
|
|
985
976
|
className: `command-cursor ${e ? "" : "animate-shake"}`,
|
|
986
|
-
style:
|
|
987
|
-
title:
|
|
988
|
-
children: !e &&
|
|
977
|
+
style: i,
|
|
978
|
+
title: t,
|
|
979
|
+
children: !e && t ? "✗" : ["spin", "bbs"].includes(s.type) ? (s.type === "bbs" ? ge : he)[o] : s.type === "solid" || r ? s.character : " "
|
|
989
980
|
}
|
|
990
981
|
) });
|
|
991
982
|
};
|
|
992
|
-
function
|
|
983
|
+
function Ze(n, e) {
|
|
993
984
|
switch (e.type) {
|
|
994
985
|
case "set":
|
|
995
|
-
return k.debug(`[inputStateReducer] InputState changing from ${
|
|
986
|
+
return k.debug(`[inputStateReducer] InputState changing from ${n} to ${e.state}`), e.state;
|
|
996
987
|
default:
|
|
997
|
-
return
|
|
998
|
-
}
|
|
999
|
-
}
|
|
1000
|
-
const
|
|
1001
|
-
const { state:
|
|
1002
|
-
|
|
1003
|
-
},
|
|
1004
|
-
const
|
|
1005
|
-
return k.debug("[getNextExpectedSegment] ",
|
|
1006
|
-
}, [e,
|
|
1007
|
-
if (!
|
|
1008
|
-
const
|
|
1009
|
-
return
|
|
1010
|
-
const
|
|
1011
|
-
return !
|
|
988
|
+
return n;
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
const et = () => {
|
|
992
|
+
const { state: n } = de(), e = Z(), t = ke(), s = V(), [r, a] = _e(Ze, "idle"), o = (l) => {
|
|
993
|
+
a({ type: "set", state: l });
|
|
994
|
+
}, c = w(() => {
|
|
995
|
+
const p = e.getCompletions(s.path())[0] || s.nullSegment;
|
|
996
|
+
return k.debug("[getNextExpectedSegment] ", p), p;
|
|
997
|
+
}, [e, s]), i = w(() => e.getCompletionNames(s.path()).map((p) => e.getCommand([...s.path(), p])).filter((p) => p !== void 0), [e, s]), d = w((l, p) => {
|
|
998
|
+
if (!l) return p;
|
|
999
|
+
const C = s.path().length;
|
|
1000
|
+
return p.filter((M) => {
|
|
1001
|
+
const S = M.segments[C];
|
|
1002
|
+
return !S || S.type !== "word" ? !1 : S.name.toLowerCase().startsWith(l.toLowerCase());
|
|
1012
1003
|
});
|
|
1013
|
-
}, [
|
|
1014
|
-
const
|
|
1015
|
-
return
|
|
1016
|
-
}, [e,
|
|
1017
|
-
const
|
|
1018
|
-
return
|
|
1019
|
-
}, [e,
|
|
1020
|
-
k.debug("[tryAutoComplete] input: ",
|
|
1021
|
-
const
|
|
1022
|
-
return !
|
|
1023
|
-
}, [g]),
|
|
1024
|
-
if (
|
|
1004
|
+
}, [s]), g = w((l) => {
|
|
1005
|
+
const p = e.getUniqueCompletion(s.path(), l);
|
|
1006
|
+
return p && p.type === "word" ? p : s.nullSegment;
|
|
1007
|
+
}, [e, s]), u = w((l) => {
|
|
1008
|
+
const p = s.path(), C = e.getCompletions(p);
|
|
1009
|
+
return C.length === 0 && l ? !1 : C.some((S) => S.type === "argument") ? !0 : e.getMatchingCompletions(p, l).some((S) => S.type === "word");
|
|
1010
|
+
}, [e, s]), h = w((l) => {
|
|
1011
|
+
k.debug("[tryAutoComplete] input: ", l);
|
|
1012
|
+
const p = g(l);
|
|
1013
|
+
return !p || p.type === "null" ? new le() : (k.debug("[tryAutoComplete] result: ", p), p);
|
|
1014
|
+
}, [g]), x = w((l, p) => {
|
|
1015
|
+
if (n.history.position !== null)
|
|
1025
1016
|
return;
|
|
1026
|
-
|
|
1027
|
-
const
|
|
1028
|
-
if (
|
|
1029
|
-
const
|
|
1030
|
-
if (
|
|
1031
|
-
if (
|
|
1032
|
-
if (!(
|
|
1033
|
-
|
|
1017
|
+
p.setCurrentInput(l), k.debug("[useCommandParser][handleInputChange] newValue: ", l);
|
|
1018
|
+
const C = c();
|
|
1019
|
+
if (C.type === "argument" || r === "entering_argument") {
|
|
1020
|
+
const H = fe(l);
|
|
1021
|
+
if (H.isQuoted)
|
|
1022
|
+
if (H.isComplete) {
|
|
1023
|
+
if (!(C instanceof O)) return;
|
|
1024
|
+
C.value = l.trim() || "", k.debug("[useCommandParser][handleInputChange][entering_command] pushing: ", C), s.push(C), p.setCurrentInput(""), o("idle");
|
|
1034
1025
|
return;
|
|
1035
1026
|
} else
|
|
1036
1027
|
return;
|
|
1037
|
-
else if (
|
|
1038
|
-
if (!(
|
|
1039
|
-
|
|
1028
|
+
else if (H.isComplete) {
|
|
1029
|
+
if (!(C instanceof O)) return;
|
|
1030
|
+
C.value = l.trim() || "", k.debug("[useCommandParser][handleInputChange][entering_command] pushing: ", C), s.push(C), p.setCurrentInput(""), o("idle");
|
|
1040
1031
|
return;
|
|
1041
1032
|
} else
|
|
1042
1033
|
return;
|
|
1043
1034
|
}
|
|
1044
|
-
if (
|
|
1045
|
-
const
|
|
1046
|
-
(
|
|
1035
|
+
if (l.endsWith(" ")) {
|
|
1036
|
+
const H = l.trim().toLowerCase(), T = e.getCompletions(s.path()).filter(
|
|
1037
|
+
(b) => b.type === "word" && b.name.toLowerCase() === H
|
|
1047
1038
|
);
|
|
1048
|
-
if (
|
|
1049
|
-
|
|
1039
|
+
if (T.length === 1) {
|
|
1040
|
+
s.push(T[0]), p.setCurrentInput(""), o("idle");
|
|
1050
1041
|
return;
|
|
1051
1042
|
}
|
|
1052
1043
|
}
|
|
1053
|
-
const
|
|
1054
|
-
if (
|
|
1055
|
-
k.debug("[useCommandParser][handleInputChange][entering_command] pushing: ",
|
|
1044
|
+
const S = h(l);
|
|
1045
|
+
if (S.type === "word") {
|
|
1046
|
+
k.debug("[useCommandParser][handleInputChange][entering_command] pushing: ", S), s.push(S), p.setCurrentInput(""), o("idle");
|
|
1056
1047
|
return;
|
|
1057
1048
|
}
|
|
1058
|
-
}, [
|
|
1059
|
-
|
|
1060
|
-
}, [
|
|
1061
|
-
if (!(
|
|
1049
|
+
}, [h, n, c, r, s, e]), y = w((l) => {
|
|
1050
|
+
l.setCurrentInput(""), l.setIsEnteringArg(!1), s.clear(), o("idle");
|
|
1051
|
+
}, [s]), v = w((l, p, C) => {
|
|
1052
|
+
if (!(l.key === "Backspace" || l.key === "Enter" || l.key === "ArrowUp" || l.key === "ArrowDown" || l.key === "ArrowLeft" || l.key === "ArrowRight" || l.key === "Escape" || l.key === "Delete" || l.key === "Home" || l.key === "End" || l.key.length === 1))
|
|
1062
1053
|
return !0;
|
|
1063
|
-
const { currentInput:
|
|
1064
|
-
switch (
|
|
1054
|
+
const { currentInput: S, isEnteringArg: H } = p, T = fe(S);
|
|
1055
|
+
switch (l.key) {
|
|
1065
1056
|
case "Backspace":
|
|
1066
|
-
return
|
|
1057
|
+
return S === "" && (l.preventDefault(), s.size() > 0 && s.pop(), o("idle")), !0;
|
|
1067
1058
|
case "Enter": {
|
|
1068
|
-
if (
|
|
1059
|
+
if (l.preventDefault(), T.isQuoted && !T.isComplete)
|
|
1069
1060
|
return !0;
|
|
1070
|
-
if (
|
|
1071
|
-
const
|
|
1072
|
-
|
|
1061
|
+
if (r === "entering_argument" || H && S.trim()) {
|
|
1062
|
+
const F = c();
|
|
1063
|
+
F instanceof O && (F.value = S, k.debug("[handleKeyDown][Enter]['entering_argument'] pushing: ", F), s.push(F));
|
|
1073
1064
|
}
|
|
1074
|
-
const
|
|
1075
|
-
if (!
|
|
1065
|
+
const b = s.path(), te = e.getCommand(b);
|
|
1066
|
+
if (!te)
|
|
1076
1067
|
return !1;
|
|
1077
|
-
const
|
|
1078
|
-
return
|
|
1068
|
+
const K = te.segments.filter((F) => F.type === "argument"), ne = s.arguments;
|
|
1069
|
+
return K.length > ne.length ? !1 : (k.debug("[handleKeyDown][Enter] calling actions.executeCommand. segmentStack: ", s), C.executeCommand(), t.addStoredCommand(s.toArray()), y(C), !0);
|
|
1079
1070
|
}
|
|
1080
1071
|
case "ArrowUp":
|
|
1081
|
-
return
|
|
1082
|
-
const
|
|
1083
|
-
return
|
|
1072
|
+
return l.preventDefault(), (async () => {
|
|
1073
|
+
const b = await t.navigateHistory("up");
|
|
1074
|
+
return b.segments && (s.clear(), s.pushAll(b.segments), C.setCurrentInput("")), !0;
|
|
1084
1075
|
})();
|
|
1085
1076
|
case "ArrowDown":
|
|
1086
|
-
return
|
|
1087
|
-
const
|
|
1088
|
-
return
|
|
1077
|
+
return l.preventDefault(), (async () => {
|
|
1078
|
+
const b = await t.navigateHistory("down");
|
|
1079
|
+
return b.segments && (s.clear(), s.pushAll(b.segments), C.setCurrentInput("")), !0;
|
|
1089
1080
|
})();
|
|
1090
1081
|
default: {
|
|
1091
|
-
if (!
|
|
1092
|
-
const
|
|
1093
|
-
if (!
|
|
1094
|
-
return
|
|
1082
|
+
if (!H && l.key.length === 1) {
|
|
1083
|
+
const b = S + l.key;
|
|
1084
|
+
if (!u(b))
|
|
1085
|
+
return l.preventDefault(), !1;
|
|
1095
1086
|
}
|
|
1096
1087
|
return !0;
|
|
1097
1088
|
}
|
|
1098
1089
|
}
|
|
1099
1090
|
}, [
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1091
|
+
r,
|
|
1092
|
+
u,
|
|
1093
|
+
c,
|
|
1094
|
+
t,
|
|
1095
|
+
y,
|
|
1105
1096
|
e,
|
|
1106
|
-
|
|
1097
|
+
s
|
|
1107
1098
|
]);
|
|
1108
1099
|
return {
|
|
1109
|
-
handleInputChange:
|
|
1110
|
-
handleKeyDown:
|
|
1111
|
-
inputState:
|
|
1112
|
-
setInputStateWithLogging:
|
|
1100
|
+
handleInputChange: x,
|
|
1101
|
+
handleKeyDown: v,
|
|
1102
|
+
inputState: r,
|
|
1103
|
+
setInputStateWithLogging: o,
|
|
1113
1104
|
// Expose internal functions for testing
|
|
1114
|
-
findMatchingCommands:
|
|
1105
|
+
findMatchingCommands: d,
|
|
1115
1106
|
getAutocompleteSuggestion: g,
|
|
1116
|
-
getAvailableNodes:
|
|
1117
|
-
getNextExpectedSegment:
|
|
1118
|
-
isValidCommandInput:
|
|
1107
|
+
getAvailableNodes: i,
|
|
1108
|
+
getNextExpectedSegment: c,
|
|
1109
|
+
isValidCommandInput: u
|
|
1119
1110
|
};
|
|
1120
1111
|
};
|
|
1121
|
-
function
|
|
1112
|
+
function fe(n) {
|
|
1122
1113
|
const e = [];
|
|
1123
|
-
let
|
|
1124
|
-
for (let
|
|
1125
|
-
const
|
|
1126
|
-
(
|
|
1114
|
+
let t = "", s = !1, r;
|
|
1115
|
+
for (let a = 0; a < n.length; a++) {
|
|
1116
|
+
const o = n[a];
|
|
1117
|
+
(o === '"' || o === "'") && (!s || o === r) ? s ? (e.push(t), t = "", s = !1, r = void 0) : (t && (e.push(t), t = ""), s = !0, r = o) : !s && o === " " ? t && (e.push(t), t = "") : t += o;
|
|
1127
1118
|
}
|
|
1128
1119
|
return {
|
|
1129
1120
|
words: e,
|
|
1130
|
-
currentWord:
|
|
1131
|
-
isQuoted:
|
|
1132
|
-
quoteChar:
|
|
1133
|
-
isComplete: !
|
|
1121
|
+
currentWord: t,
|
|
1122
|
+
isQuoted: s,
|
|
1123
|
+
quoteChar: r,
|
|
1124
|
+
isComplete: !s && !t
|
|
1134
1125
|
};
|
|
1135
1126
|
}
|
|
1136
|
-
const
|
|
1137
|
-
const
|
|
1138
|
-
return
|
|
1139
|
-
const
|
|
1127
|
+
const tt = () => {
|
|
1128
|
+
const n = V(), [e, t] = _(0);
|
|
1129
|
+
return P(() => {
|
|
1130
|
+
const s = {
|
|
1140
1131
|
update: () => {
|
|
1141
|
-
|
|
1132
|
+
t((r) => r + 1);
|
|
1142
1133
|
}
|
|
1143
1134
|
};
|
|
1144
|
-
return
|
|
1145
|
-
|
|
1135
|
+
return n.subscribe(s), () => {
|
|
1136
|
+
n.unsubscribe(s);
|
|
1146
1137
|
};
|
|
1147
|
-
}, [
|
|
1148
|
-
},
|
|
1149
|
-
state:
|
|
1138
|
+
}, [n]), e;
|
|
1139
|
+
}, nt = ({
|
|
1140
|
+
state: n,
|
|
1150
1141
|
actions: e
|
|
1151
1142
|
}) => {
|
|
1152
|
-
const
|
|
1153
|
-
handleKeyDown:
|
|
1154
|
-
handleInputChange:
|
|
1155
|
-
inputState:
|
|
1156
|
-
setInputStateWithLogging:
|
|
1157
|
-
getNextExpectedSegment:
|
|
1158
|
-
} =
|
|
1159
|
-
() =>
|
|
1160
|
-
[
|
|
1161
|
-
),
|
|
1162
|
-
const
|
|
1163
|
-
await Promise.resolve(
|
|
1164
|
-
},
|
|
1165
|
-
|
|
1166
|
-
},
|
|
1167
|
-
|
|
1168
|
-
const
|
|
1169
|
-
|
|
1170
|
-
};
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
}, [
|
|
1174
|
-
if (
|
|
1175
|
-
const
|
|
1176
|
-
let
|
|
1177
|
-
switch (
|
|
1143
|
+
const t = z(null), s = Z(), r = V(), {
|
|
1144
|
+
handleKeyDown: a,
|
|
1145
|
+
handleInputChange: o,
|
|
1146
|
+
inputState: c,
|
|
1147
|
+
setInputStateWithLogging: i,
|
|
1148
|
+
getNextExpectedSegment: d
|
|
1149
|
+
} = et(), [g, u] = _(!1), h = j(), x = tt(), y = z(null), [v, l] = _(0), p = A(
|
|
1150
|
+
() => ee(h.fontFamily, h.fontSize),
|
|
1151
|
+
[h.fontFamily, h.fontSize]
|
|
1152
|
+
), C = w(async (E) => {
|
|
1153
|
+
const R = a(E, n, e);
|
|
1154
|
+
await Promise.resolve(R) === !1 && (u(!0), setTimeout(() => u(!1), 500));
|
|
1155
|
+
}, [e, a, n]), M = w((E) => {
|
|
1156
|
+
o(E.target.value, e);
|
|
1157
|
+
}, [e, o]), S = w((E) => {
|
|
1158
|
+
E.preventDefault();
|
|
1159
|
+
const R = E.clipboardData.getData("text");
|
|
1160
|
+
o(R, e);
|
|
1161
|
+
}, [e, o]);
|
|
1162
|
+
P(() => {
|
|
1163
|
+
t.current && t.current.focus(), c !== "entering_command" && i("entering_command");
|
|
1164
|
+
}, [c, i]), P(() => {
|
|
1165
|
+
if (c !== "idle") return;
|
|
1166
|
+
const E = d();
|
|
1167
|
+
let R = "idle";
|
|
1168
|
+
switch (E.type) {
|
|
1178
1169
|
case "word":
|
|
1179
|
-
|
|
1170
|
+
R = "entering_command", e.setIsEnteringArg(!1);
|
|
1180
1171
|
break;
|
|
1181
1172
|
case "argument":
|
|
1182
|
-
|
|
1173
|
+
R = "entering_argument", e.setIsEnteringArg(!0);
|
|
1183
1174
|
break;
|
|
1184
1175
|
}
|
|
1185
|
-
|
|
1186
|
-
}, [
|
|
1187
|
-
const
|
|
1188
|
-
const
|
|
1189
|
-
|
|
1190
|
-
const
|
|
1191
|
-
if (
|
|
1192
|
-
const
|
|
1193
|
-
return /* @__PURE__ */
|
|
1194
|
-
/* @__PURE__ */ m("span", { className: "
|
|
1195
|
-
|
|
1196
|
-
] }, "arg-" +
|
|
1176
|
+
i(R);
|
|
1177
|
+
}, [x, c, d, i, e]);
|
|
1178
|
+
const H = A(() => {
|
|
1179
|
+
const E = [], R = r.toArray().map((L, se) => {
|
|
1180
|
+
E.push(L.name);
|
|
1181
|
+
const me = s.hasNextSegment(E);
|
|
1182
|
+
if (L.type === "argument") {
|
|
1183
|
+
const re = L;
|
|
1184
|
+
return /* @__PURE__ */ I(U.Fragment, { children: [
|
|
1185
|
+
/* @__PURE__ */ m("span", { className: "citadel-input-segment-arg", children: re.value }),
|
|
1186
|
+
se < r.size() && me && /* @__PURE__ */ m("span", { className: "citadel-input-segment-space", children: " " })
|
|
1187
|
+
] }, "arg-" + re.name + re.value);
|
|
1197
1188
|
}
|
|
1198
|
-
return /* @__PURE__ */
|
|
1199
|
-
/* @__PURE__ */ m("span", { className: "
|
|
1200
|
-
|
|
1201
|
-
] }, "word-" +
|
|
1189
|
+
return /* @__PURE__ */ I(U.Fragment, { children: [
|
|
1190
|
+
/* @__PURE__ */ m("span", { className: "citadel-input-segment-word", children: L.name }),
|
|
1191
|
+
se < r.size() && me && /* @__PURE__ */ m("span", { className: "citadel-input-segment-space citadel-input-segment-space-command", children: " " })
|
|
1192
|
+
] }, "word-" + L.name);
|
|
1202
1193
|
});
|
|
1203
|
-
return [/* @__PURE__ */ m("div", { className: "
|
|
1204
|
-
}, [
|
|
1205
|
-
|
|
1206
|
-
const
|
|
1207
|
-
|
|
1208
|
-
}, [
|
|
1209
|
-
const
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
}
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1194
|
+
return [/* @__PURE__ */ m("div", { className: "citadel-input-segments", "data-testid": "user-input-area", children: R }, x)];
|
|
1195
|
+
}, [x, s, r]), [T, b] = _("");
|
|
1196
|
+
P(() => {
|
|
1197
|
+
const E = d();
|
|
1198
|
+
E.type === "argument" ? b(E.name) : b("");
|
|
1199
|
+
}, [x, d]);
|
|
1200
|
+
const K = !n.isEnteringArg ? "is-command-mode" : "is-argument-mode", ne = A(
|
|
1201
|
+
() => ({
|
|
1202
|
+
left: `${v}px`,
|
|
1203
|
+
transition: "left 0.05s ease-out"
|
|
1204
|
+
}),
|
|
1205
|
+
[v]
|
|
1206
|
+
), F = A(
|
|
1207
|
+
() => ({
|
|
1208
|
+
type: h.cursorType ?? N.cursorType,
|
|
1209
|
+
color: h.cursorColor || N.cursorColor,
|
|
1210
|
+
speed: h.cursorSpeed || N.cursorSpeed
|
|
1211
|
+
}),
|
|
1212
|
+
[h.cursorColor, h.cursorSpeed, h.cursorType]
|
|
1213
|
+
);
|
|
1214
|
+
return Me(() => {
|
|
1215
|
+
const E = y.current, R = t.current;
|
|
1216
|
+
if (!E || !R) {
|
|
1217
|
+
l(0);
|
|
1218
|
+
return;
|
|
1219
|
+
}
|
|
1220
|
+
const L = E.getBoundingClientRect().width;
|
|
1221
|
+
l(Math.max(0, L - R.scrollLeft));
|
|
1222
|
+
}, [n.currentInput, K, p.style]), /* @__PURE__ */ m("div", { className: "citadel-input-shell", children: /* @__PURE__ */ I(
|
|
1223
|
+
"div",
|
|
1224
|
+
{
|
|
1225
|
+
className: "citadel-input-line",
|
|
1226
|
+
style: p.style,
|
|
1227
|
+
children: [
|
|
1228
|
+
/* @__PURE__ */ m("div", { className: "citadel-input-prompt", children: ">" }),
|
|
1229
|
+
/* @__PURE__ */ I("div", { className: "citadel-input-row", children: [
|
|
1230
|
+
H,
|
|
1231
|
+
/* @__PURE__ */ I("div", { className: "citadel-input-control", children: [
|
|
1232
|
+
/* @__PURE__ */ m(
|
|
1233
|
+
"span",
|
|
1234
|
+
{
|
|
1235
|
+
ref: y,
|
|
1236
|
+
className: `citadel-input-measure ${K}`.trim(),
|
|
1237
|
+
"aria-hidden": "true",
|
|
1238
|
+
children: n.currentInput
|
|
1239
|
+
}
|
|
1240
|
+
),
|
|
1241
|
+
/* @__PURE__ */ m(
|
|
1242
|
+
"input",
|
|
1243
|
+
{
|
|
1244
|
+
ref: t,
|
|
1245
|
+
type: "text",
|
|
1246
|
+
role: "textbox",
|
|
1247
|
+
value: n.currentInput,
|
|
1248
|
+
onChange: M,
|
|
1249
|
+
onKeyDown: C,
|
|
1250
|
+
onPaste: S,
|
|
1251
|
+
"data-testid": "citadel-command-input",
|
|
1252
|
+
className: `citadel-input-field ${K} ${g ? "invalid-input-animation" : ""}`.trim(),
|
|
1253
|
+
spellCheck: !1,
|
|
1254
|
+
autoComplete: "off",
|
|
1255
|
+
placeholder: T
|
|
1256
|
+
}
|
|
1257
|
+
),
|
|
1258
|
+
/* @__PURE__ */ m(
|
|
1259
|
+
"div",
|
|
1260
|
+
{
|
|
1261
|
+
className: "citadel-input-cursor",
|
|
1262
|
+
style: ne,
|
|
1263
|
+
children: /* @__PURE__ */ m(Xe, { style: F })
|
|
1264
|
+
}
|
|
1265
|
+
)
|
|
1268
1266
|
] })
|
|
1269
|
-
]
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
},
|
|
1274
|
-
const e =
|
|
1275
|
-
() =>
|
|
1276
|
-
[
|
|
1277
|
-
),
|
|
1278
|
-
|
|
1279
|
-
|
|
1267
|
+
] })
|
|
1268
|
+
]
|
|
1269
|
+
}
|
|
1270
|
+
) });
|
|
1271
|
+
}, st = ({ currentInput: n = "" }) => {
|
|
1272
|
+
const e = Z(), t = j(), s = V(), r = U.useMemo(
|
|
1273
|
+
() => ee(t.fontFamily, t.fontSize),
|
|
1274
|
+
[t.fontFamily, t.fontSize]
|
|
1275
|
+
), a = n.trim().toLowerCase(), o = e.getMatchingCompletions(
|
|
1276
|
+
s.path(),
|
|
1277
|
+
a
|
|
1280
1278
|
);
|
|
1281
|
-
k.debug("[AvailableCommands] nextCommandSegments: ",
|
|
1282
|
-
const c =
|
|
1283
|
-
const
|
|
1284
|
-
return [...
|
|
1285
|
-
(
|
|
1286
|
-
), ...
|
|
1287
|
-
}, [
|
|
1288
|
-
const
|
|
1279
|
+
k.debug("[AvailableCommands] nextCommandSegments: ", o);
|
|
1280
|
+
const c = U.useMemo(() => {
|
|
1281
|
+
const u = [...o], h = (l) => l.name.toLowerCase() === "help", x = u.filter(h);
|
|
1282
|
+
return [...u.filter((l) => !h(l)).sort(
|
|
1283
|
+
(l, p) => l.name.localeCompare(p.name, void 0, { sensitivity: "base" })
|
|
1284
|
+
), ...x];
|
|
1285
|
+
}, [o]), i = U.useMemo(() => {
|
|
1286
|
+
const u = /* @__PURE__ */ new Map();
|
|
1289
1287
|
for (const h of c) {
|
|
1290
|
-
const
|
|
1291
|
-
if (
|
|
1292
|
-
let
|
|
1293
|
-
for (;
|
|
1294
|
-
|
|
1295
|
-
return Math.max(
|
|
1288
|
+
const x = c.reduce((y, v) => {
|
|
1289
|
+
if (v === h) return y;
|
|
1290
|
+
let l = 0;
|
|
1291
|
+
for (; l < h.name.length && l < v.name.length && h.name[l].toLowerCase() === v.name[l].toLowerCase(); )
|
|
1292
|
+
l++;
|
|
1293
|
+
return Math.max(y, l + 1);
|
|
1296
1294
|
}, 1);
|
|
1297
|
-
|
|
1295
|
+
u.set(h.name, x);
|
|
1298
1296
|
}
|
|
1299
|
-
return
|
|
1300
|
-
}, [c]),
|
|
1301
|
-
return /* @__PURE__ */ m("div", { className:
|
|
1302
|
-
/* @__PURE__ */ m("span", { className: "
|
|
1303
|
-
|
|
1297
|
+
return u;
|
|
1298
|
+
}, [c]), d = o.some((u) => u.type === "argument"), g = o[0];
|
|
1299
|
+
return /* @__PURE__ */ m("div", { className: "citadel-available-commands", "data-testid": "available-commands", children: /* @__PURE__ */ m("div", { className: "citadel-available-commands-content", style: r.style, children: d ? o.length > 0 ? /* @__PURE__ */ I(He, { children: [
|
|
1300
|
+
/* @__PURE__ */ m("span", { className: "citadel-available-next-arg", children: g.name }),
|
|
1301
|
+
g.description && /* @__PURE__ */ I("span", { className: "citadel-available-next-desc", children: [
|
|
1304
1302
|
"- ",
|
|
1305
|
-
|
|
1303
|
+
g.description
|
|
1306
1304
|
] })
|
|
1307
|
-
] }) : null : /* @__PURE__ */ m("div", { className: "
|
|
1308
|
-
const h =
|
|
1305
|
+
] }) : null : /* @__PURE__ */ m("div", { className: "citadel-available-chip-list", children: c == null ? void 0 : c.map((u) => {
|
|
1306
|
+
const h = i.get(u.name) ?? 1;
|
|
1309
1307
|
return /* @__PURE__ */ m(
|
|
1310
1308
|
"div",
|
|
1311
1309
|
{
|
|
1312
1310
|
"data-testid": "available-command-chip",
|
|
1313
|
-
className: "
|
|
1314
|
-
children: /* @__PURE__ */
|
|
1315
|
-
/* @__PURE__ */ m("strong", { className: "
|
|
1316
|
-
|
|
1311
|
+
className: "citadel-available-chip",
|
|
1312
|
+
children: /* @__PURE__ */ I("span", { className: "citadel-available-chip-text", children: [
|
|
1313
|
+
/* @__PURE__ */ m("strong", { className: "citadel-available-chip-prefix", children: u.name.slice(0, h) }),
|
|
1314
|
+
u.name.slice(h)
|
|
1317
1315
|
] })
|
|
1318
1316
|
},
|
|
1319
|
-
|
|
1317
|
+
u.name
|
|
1320
1318
|
);
|
|
1321
1319
|
}) }) }) });
|
|
1322
|
-
},
|
|
1323
|
-
state:
|
|
1320
|
+
}, Ne = ({
|
|
1321
|
+
state: n,
|
|
1324
1322
|
actions: e,
|
|
1325
|
-
outputRef:
|
|
1323
|
+
outputRef: t
|
|
1326
1324
|
}) => {
|
|
1327
|
-
const
|
|
1328
|
-
|
|
1325
|
+
const r = j().displayMode === "inline", a = U.useMemo(
|
|
1326
|
+
() => r ? { overflow: "hidden" } : void 0,
|
|
1327
|
+
[r]
|
|
1328
|
+
);
|
|
1329
|
+
return /* @__PURE__ */ I("div", { className: "innerContainer citadel-tty", children: [
|
|
1329
1330
|
/* @__PURE__ */ m(
|
|
1330
1331
|
"div",
|
|
1331
1332
|
{
|
|
1332
|
-
className: "
|
|
1333
|
+
className: "citadel-tty-output-pane",
|
|
1333
1334
|
"data-testid": "citadel-output-pane",
|
|
1334
|
-
style:
|
|
1335
|
-
children: /* @__PURE__ */ m(
|
|
1335
|
+
style: a,
|
|
1336
|
+
children: /* @__PURE__ */ m(Ge, { output: n.output, outputRef: t })
|
|
1336
1337
|
}
|
|
1337
1338
|
),
|
|
1338
|
-
/* @__PURE__ */
|
|
1339
|
-
/* @__PURE__ */ m(
|
|
1340
|
-
/* @__PURE__ */ m(
|
|
1339
|
+
/* @__PURE__ */ I("div", { className: "citadel-tty-input-region", children: [
|
|
1340
|
+
/* @__PURE__ */ m(nt, { state: n, actions: e }),
|
|
1341
|
+
/* @__PURE__ */ m(st, { currentInput: n.isEnteringArg ? "" : n.currentInput })
|
|
1341
1342
|
] })
|
|
1342
1343
|
] });
|
|
1343
|
-
},
|
|
1344
|
-
const [
|
|
1345
|
-
|
|
1344
|
+
}, rt = () => {
|
|
1345
|
+
const [n, e] = _(!1), [t, s] = _(!1), r = j(), [a, o] = _(() => r.initialHeight || null), c = z(null), i = z(null), d = z(!1), g = z(0), u = z(0), { state: h, actions: x } = de();
|
|
1346
|
+
qe({
|
|
1346
1347
|
onOpen: () => e(!0),
|
|
1347
|
-
onClose: () =>
|
|
1348
|
-
isVisible:
|
|
1349
|
-
showCitadelKey:
|
|
1348
|
+
onClose: () => s(!0),
|
|
1349
|
+
isVisible: n,
|
|
1350
|
+
showCitadelKey: r.showCitadelKey || "."
|
|
1350
1351
|
});
|
|
1351
|
-
const
|
|
1352
|
-
var
|
|
1353
|
-
if (!
|
|
1354
|
-
const
|
|
1355
|
-
Math.max(
|
|
1356
|
-
|
|
1352
|
+
const y = w((M) => {
|
|
1353
|
+
var b;
|
|
1354
|
+
if (!d.current) return;
|
|
1355
|
+
const S = M.clientY - g.current, H = (b = r.maxHeight) != null && b.endsWith("vh") ? window.innerHeight * parseInt(r.maxHeight, 10) / 100 : parseInt(r.maxHeight || "80vh", 10), T = Math.min(
|
|
1356
|
+
Math.max(u.current - S, parseInt(r.minHeight || "200", 10)),
|
|
1357
|
+
H
|
|
1357
1358
|
);
|
|
1358
|
-
|
|
1359
|
-
}, [
|
|
1360
|
-
|
|
1361
|
-
}, [
|
|
1362
|
-
|
|
1363
|
-
}, [
|
|
1364
|
-
|
|
1365
|
-
document.removeEventListener("mousemove",
|
|
1366
|
-
}, [
|
|
1367
|
-
const
|
|
1368
|
-
|
|
1369
|
-
}, [
|
|
1370
|
-
|
|
1371
|
-
isVisible:
|
|
1372
|
-
isClosing:
|
|
1373
|
-
onAnimationComplete:
|
|
1374
|
-
})
|
|
1359
|
+
i.current && (i.current.style.height = `${T}px`, i.current.style.bottom = "0", o(`${T}px`));
|
|
1360
|
+
}, [r.maxHeight, r.minHeight]), v = w(() => {
|
|
1361
|
+
d.current = !1, document.documentElement.style.userSelect = "", document.documentElement.style.webkitUserSelect = "", document.documentElement.style.mozUserSelect = "", document.documentElement.style.msUserSelect = "", document.removeEventListener("mousemove", y), document.removeEventListener("mouseup", v);
|
|
1362
|
+
}, [y]), l = w((M) => {
|
|
1363
|
+
i.current && (d.current = !0, g.current = M.clientY, u.current = i.current.offsetHeight, document.documentElement.style.userSelect = "none", document.documentElement.style.webkitUserSelect = "none", document.documentElement.style.mozUserSelect = "none", document.documentElement.style.msUserSelect = "none", document.addEventListener("mousemove", y), document.addEventListener("mouseup", v));
|
|
1364
|
+
}, [y, v]);
|
|
1365
|
+
P(() => () => {
|
|
1366
|
+
document.removeEventListener("mousemove", y), document.removeEventListener("mouseup", v);
|
|
1367
|
+
}, [y, v]);
|
|
1368
|
+
const p = w(() => {
|
|
1369
|
+
t && (e(!1), s(!1));
|
|
1370
|
+
}, [t]);
|
|
1371
|
+
Be({
|
|
1372
|
+
isVisible: n,
|
|
1373
|
+
isClosing: t,
|
|
1374
|
+
onAnimationComplete: p
|
|
1375
|
+
});
|
|
1376
|
+
const C = A(
|
|
1377
|
+
() => ({
|
|
1378
|
+
...a ? { height: a } : {},
|
|
1379
|
+
maxHeight: r.maxHeight
|
|
1380
|
+
}),
|
|
1381
|
+
[r.maxHeight, a]
|
|
1382
|
+
);
|
|
1383
|
+
return n ? /* @__PURE__ */ I(
|
|
1375
1384
|
"div",
|
|
1376
1385
|
{
|
|
1377
|
-
ref:
|
|
1378
|
-
className: `panelContainer ${
|
|
1379
|
-
style:
|
|
1380
|
-
...s ? { height: s } : void 0,
|
|
1381
|
-
maxHeight: o.maxHeight
|
|
1382
|
-
},
|
|
1386
|
+
ref: i,
|
|
1387
|
+
className: `panelContainer ${n ? "citadel_slideUp" : ""} ${t ? "citadel_slideDown" : ""}`,
|
|
1388
|
+
style: C,
|
|
1383
1389
|
children: [
|
|
1384
|
-
/* @__PURE__ */ m("div", { className: "resizeHandle", onMouseDown:
|
|
1390
|
+
/* @__PURE__ */ m("div", { className: "resizeHandle", onMouseDown: l }),
|
|
1385
1391
|
/* @__PURE__ */ m(
|
|
1386
|
-
|
|
1392
|
+
Ne,
|
|
1387
1393
|
{
|
|
1388
|
-
state:
|
|
1389
|
-
actions:
|
|
1390
|
-
outputRef:
|
|
1394
|
+
state: h,
|
|
1395
|
+
actions: x,
|
|
1396
|
+
outputRef: c
|
|
1391
1397
|
}
|
|
1392
1398
|
)
|
|
1393
1399
|
]
|
|
1394
1400
|
}
|
|
1395
1401
|
) : null;
|
|
1396
|
-
},
|
|
1397
|
-
if (!
|
|
1398
|
-
const e =
|
|
1402
|
+
}, ae = (n) => {
|
|
1403
|
+
if (!n) return;
|
|
1404
|
+
const e = n.trim();
|
|
1399
1405
|
if (e)
|
|
1400
1406
|
return /^\d+(\.\d+)?$/.test(e) ? `${e}px` : e;
|
|
1401
|
-
},
|
|
1402
|
-
const { state:
|
|
1407
|
+
}, at = () => {
|
|
1408
|
+
const { state: n, actions: e } = de(), t = j(), s = z(null), r = A(
|
|
1409
|
+
() => ({
|
|
1410
|
+
height: ae(t.initialHeight),
|
|
1411
|
+
maxHeight: ae(t.maxHeight),
|
|
1412
|
+
minHeight: ae(t.minHeight)
|
|
1413
|
+
}),
|
|
1414
|
+
[t.initialHeight, t.maxHeight, t.minHeight]
|
|
1415
|
+
);
|
|
1403
1416
|
return /* @__PURE__ */ m(
|
|
1404
1417
|
"div",
|
|
1405
1418
|
{
|
|
1406
1419
|
className: "inlineContainer",
|
|
1407
1420
|
"data-testid": "citadel-inline-container",
|
|
1408
|
-
style:
|
|
1409
|
-
height: ne(n.initialHeight),
|
|
1410
|
-
maxHeight: ne(n.maxHeight),
|
|
1411
|
-
minHeight: ne(n.minHeight)
|
|
1412
|
-
},
|
|
1421
|
+
style: r,
|
|
1413
1422
|
children: /* @__PURE__ */ m(
|
|
1414
|
-
|
|
1423
|
+
Ne,
|
|
1415
1424
|
{
|
|
1416
|
-
state:
|
|
1425
|
+
state: n,
|
|
1417
1426
|
actions: e,
|
|
1418
|
-
outputRef:
|
|
1427
|
+
outputRef: s
|
|
1419
1428
|
}
|
|
1420
1429
|
)
|
|
1421
1430
|
}
|
|
1422
1431
|
);
|
|
1423
|
-
},
|
|
1424
|
-
--citadel-bg:
|
|
1425
|
-
--citadel-
|
|
1426
|
-
--citadel-border:
|
|
1427
|
-
--citadel-
|
|
1428
|
-
--citadel-
|
|
1432
|
+
}, ye = `:host {
|
|
1433
|
+
--citadel-bg: oklch(20.8% 0.042 265.8);
|
|
1434
|
+
--citadel-surface: oklch(27.9% 0.041 260);
|
|
1435
|
+
--citadel-border: oklch(37.2% 0.044 257.3);
|
|
1436
|
+
--citadel-text: oklch(92.8% 0.006 264.5);
|
|
1437
|
+
--citadel-muted: oklch(70.7% 0.022 261.3);
|
|
1438
|
+
--citadel-subtle: oklch(55.1% 0.023 264.4);
|
|
1439
|
+
--citadel-word: oklch(70.7% 0.165 254.6);
|
|
1440
|
+
--citadel-arg: oklch(72.3% 0.219 149.6);
|
|
1441
|
+
--citadel-error: oklch(70.4% 0.191 22.2);
|
|
1442
|
+
--citadel-success: oklch(72.3% 0.219 149.6);
|
|
1429
1443
|
--citadel-min-height: 200px;
|
|
1430
1444
|
--citadel-max-height: 80vh;
|
|
1431
1445
|
--citadel-default-height: 35vh;
|
|
1432
|
-
--citadel-error: rgb(239, 68, 68);
|
|
1433
1446
|
|
|
1434
1447
|
display: block;
|
|
1435
1448
|
pointer-events: auto;
|
|
1449
|
+
color: var(--citadel-text);
|
|
1436
1450
|
font-synthesis: none;
|
|
1437
1451
|
text-rendering: optimizeLegibility;
|
|
1438
1452
|
-webkit-font-smoothing: antialiased;
|
|
1439
1453
|
-moz-osx-font-smoothing: grayscale;
|
|
1440
1454
|
}
|
|
1441
1455
|
|
|
1442
|
-
:host([data-display-mode=
|
|
1456
|
+
:host([data-display-mode='panel']) {
|
|
1443
1457
|
position: fixed;
|
|
1444
1458
|
bottom: 0;
|
|
1445
1459
|
left: 0;
|
|
@@ -1448,11 +1462,11 @@ const an = () => {
|
|
|
1448
1462
|
height: var(--citadel-default-height);
|
|
1449
1463
|
max-height: var(--citadel-max-height);
|
|
1450
1464
|
min-height: var(--citadel-min-height);
|
|
1451
|
-
z-index: 2147483647;
|
|
1465
|
+
z-index: 2147483647;
|
|
1452
1466
|
overflow: hidden;
|
|
1453
1467
|
}
|
|
1454
1468
|
|
|
1455
|
-
:host([data-display-mode=
|
|
1469
|
+
:host([data-display-mode='inline']) {
|
|
1456
1470
|
position: relative;
|
|
1457
1471
|
bottom: auto;
|
|
1458
1472
|
left: auto;
|
|
@@ -1465,127 +1479,93 @@ const an = () => {
|
|
|
1465
1479
|
overflow: hidden;
|
|
1466
1480
|
}
|
|
1467
1481
|
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
border: 1px solid transparent;
|
|
1471
|
-
padding: 0.6em 1.2em;
|
|
1472
|
-
font-size: 1em;
|
|
1473
|
-
font-weight: 500;
|
|
1474
|
-
font-family: inherit;
|
|
1475
|
-
background-color: #1a1a1a;
|
|
1476
|
-
cursor: pointer;
|
|
1477
|
-
transition: border-color 0.25s;
|
|
1478
|
-
}
|
|
1479
|
-
|
|
1480
|
-
button:hover {
|
|
1481
|
-
border-color: var(--citadel-accent);
|
|
1482
|
-
}
|
|
1483
|
-
|
|
1484
|
-
button:focus,
|
|
1485
|
-
button:focus-visible {
|
|
1486
|
-
outline: 4px auto -webkit-focus-ring-color;
|
|
1487
|
-
}
|
|
1488
|
-
|
|
1489
|
-
a {
|
|
1490
|
-
font-weight: 500;
|
|
1491
|
-
color: var(--citadel-accent);
|
|
1492
|
-
text-decoration: inherit;
|
|
1493
|
-
}
|
|
1494
|
-
|
|
1495
|
-
a:hover {
|
|
1496
|
-
color: var(--citadel-accent-hover);
|
|
1497
|
-
}
|
|
1498
|
-
|
|
1499
|
-
.flex-1 { flex: 1 1 0%; }
|
|
1500
|
-
.flex-shrink-0 { flex-shrink: 0; }
|
|
1501
|
-
.min-h-0 { min-height: 0px; }
|
|
1502
|
-
.pt-3 { padding-top: 0.75rem; }
|
|
1503
|
-
.px-4 { padding-left: 1rem; padding-right: 1rem; }
|
|
1504
|
-
|
|
1505
|
-
.h-full {
|
|
1482
|
+
#citadel-root {
|
|
1483
|
+
width: 100%;
|
|
1506
1484
|
height: 100%;
|
|
1507
1485
|
}
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
border-width: 1px;
|
|
1513
|
-
}
|
|
1514
|
-
.border-gray-700 {
|
|
1515
|
-
--tw-border-opacity: 1;
|
|
1516
|
-
border-color: rgb(55 65 81 / var(--tw-border-opacity, 1));
|
|
1517
|
-
}
|
|
1518
|
-
.rounded-lg {
|
|
1519
|
-
border-radius: 0.5rem;
|
|
1520
|
-
}
|
|
1521
|
-
.p-3 {
|
|
1522
|
-
padding: 0.75rem;
|
|
1523
|
-
}
|
|
1524
|
-
.text-left {
|
|
1525
|
-
text-align: left;
|
|
1486
|
+
|
|
1487
|
+
#citadel-root,
|
|
1488
|
+
#citadel-root * {
|
|
1489
|
+
box-sizing: border-box;
|
|
1526
1490
|
}
|
|
1527
|
-
`, he = `/* Keep only component-specific styles here */
|
|
1528
1491
|
|
|
1529
1492
|
.panelContainer {
|
|
1530
1493
|
position: fixed;
|
|
1494
|
+
bottom: 0;
|
|
1495
|
+
left: 0;
|
|
1496
|
+
right: 0;
|
|
1497
|
+
width: 100%;
|
|
1531
1498
|
height: var(--citadel-default-height);
|
|
1532
1499
|
min-height: var(--citadel-min-height);
|
|
1533
1500
|
max-height: var(--citadel-max-height);
|
|
1534
|
-
background-color: var(--citadel-bg);
|
|
1535
|
-
overflow: hidden;
|
|
1536
|
-
width: 100%;
|
|
1537
|
-
box-sizing: border-box;
|
|
1538
1501
|
margin: 0;
|
|
1539
1502
|
padding: 0;
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
right: 0;
|
|
1503
|
+
background-color: var(--citadel-bg);
|
|
1504
|
+
overflow: hidden;
|
|
1543
1505
|
}
|
|
1544
1506
|
|
|
1545
1507
|
.innerContainer {
|
|
1546
|
-
height: 100%;
|
|
1547
|
-
flex: 1;
|
|
1548
1508
|
width: 100%;
|
|
1549
|
-
|
|
1550
|
-
flex-direction: column;
|
|
1509
|
+
height: 100%;
|
|
1551
1510
|
margin: 0;
|
|
1552
1511
|
padding: 0;
|
|
1512
|
+
display: flex;
|
|
1513
|
+
flex: 1;
|
|
1514
|
+
flex-direction: column;
|
|
1553
1515
|
}
|
|
1554
1516
|
|
|
1555
|
-
.
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1517
|
+
.citadel-tty {
|
|
1518
|
+
background: var(--citadel-bg);
|
|
1519
|
+
}
|
|
1520
|
+
|
|
1521
|
+
.citadel-tty-output-pane {
|
|
1522
|
+
display: flex;
|
|
1523
|
+
flex: 1 1 auto;
|
|
1524
|
+
min-height: 0;
|
|
1525
|
+
padding: 0.75rem 1rem 0;
|
|
1526
|
+
}
|
|
1527
|
+
|
|
1528
|
+
.citadel-tty-input-region {
|
|
1529
|
+
flex-shrink: 0;
|
|
1560
1530
|
}
|
|
1561
1531
|
|
|
1562
1532
|
.resizeHandle {
|
|
1563
|
-
width: 100%;
|
|
1564
|
-
height: 6px;
|
|
1565
|
-
background: transparent;
|
|
1566
|
-
cursor: ns-resize;
|
|
1567
1533
|
position: absolute;
|
|
1568
1534
|
top: -3px;
|
|
1569
1535
|
left: 0;
|
|
1570
1536
|
right: 0;
|
|
1571
1537
|
z-index: 10;
|
|
1538
|
+
width: 100%;
|
|
1539
|
+
height: 6px;
|
|
1540
|
+
background: transparent;
|
|
1541
|
+
cursor: ns-resize;
|
|
1572
1542
|
user-select: none;
|
|
1573
1543
|
-webkit-user-select: none;
|
|
1574
1544
|
pointer-events: all;
|
|
1575
1545
|
}
|
|
1576
1546
|
|
|
1577
1547
|
.resizeHandle:hover {
|
|
1578
|
-
background:
|
|
1548
|
+
background: color-mix(in oklch, var(--citadel-text) 10%, transparent);
|
|
1579
1549
|
}
|
|
1580
1550
|
|
|
1581
1551
|
@keyframes citadel_slideUp {
|
|
1582
|
-
from {
|
|
1583
|
-
|
|
1552
|
+
from {
|
|
1553
|
+
transform: translateY(100%);
|
|
1554
|
+
}
|
|
1555
|
+
|
|
1556
|
+
to {
|
|
1557
|
+
transform: translateY(0);
|
|
1558
|
+
}
|
|
1584
1559
|
}
|
|
1585
1560
|
|
|
1586
1561
|
@keyframes citadel_slideDown {
|
|
1587
|
-
from {
|
|
1588
|
-
|
|
1562
|
+
from {
|
|
1563
|
+
transform: translateY(0);
|
|
1564
|
+
}
|
|
1565
|
+
|
|
1566
|
+
to {
|
|
1567
|
+
transform: translateY(100%);
|
|
1568
|
+
}
|
|
1589
1569
|
}
|
|
1590
1570
|
|
|
1591
1571
|
.citadel_slideUp {
|
|
@@ -1604,900 +1584,382 @@ a:hover {
|
|
|
1604
1584
|
flex-direction: column;
|
|
1605
1585
|
background-color: var(--citadel-bg);
|
|
1606
1586
|
overflow: hidden;
|
|
1607
|
-
box-sizing: border-box;
|
|
1608
|
-
}
|
|
1609
|
-
`, ge = `@tailwind base;
|
|
1610
|
-
@tailwind components;
|
|
1611
|
-
@tailwind utilities;
|
|
1612
|
-
`, un = `*, ::before, ::after {
|
|
1613
|
-
--tw-border-spacing-x: 0;
|
|
1614
|
-
--tw-border-spacing-y: 0;
|
|
1615
|
-
--tw-translate-x: 0;
|
|
1616
|
-
--tw-translate-y: 0;
|
|
1617
|
-
--tw-rotate: 0;
|
|
1618
|
-
--tw-skew-x: 0;
|
|
1619
|
-
--tw-skew-y: 0;
|
|
1620
|
-
--tw-scale-x: 1;
|
|
1621
|
-
--tw-scale-y: 1;
|
|
1622
|
-
--tw-pan-x: ;
|
|
1623
|
-
--tw-pan-y: ;
|
|
1624
|
-
--tw-pinch-zoom: ;
|
|
1625
|
-
--tw-scroll-snap-strictness: proximity;
|
|
1626
|
-
--tw-gradient-from-position: ;
|
|
1627
|
-
--tw-gradient-via-position: ;
|
|
1628
|
-
--tw-gradient-to-position: ;
|
|
1629
|
-
--tw-ordinal: ;
|
|
1630
|
-
--tw-slashed-zero: ;
|
|
1631
|
-
--tw-numeric-figure: ;
|
|
1632
|
-
--tw-numeric-spacing: ;
|
|
1633
|
-
--tw-numeric-fraction: ;
|
|
1634
|
-
--tw-ring-inset: ;
|
|
1635
|
-
--tw-ring-offset-width: 0px;
|
|
1636
|
-
--tw-ring-offset-color: #fff;
|
|
1637
|
-
--tw-ring-color: rgb(59 130 246 / 0.5);
|
|
1638
|
-
--tw-ring-offset-shadow: 0 0 #0000;
|
|
1639
|
-
--tw-ring-shadow: 0 0 #0000;
|
|
1640
|
-
--tw-shadow: 0 0 #0000;
|
|
1641
|
-
--tw-shadow-colored: 0 0 #0000;
|
|
1642
|
-
--tw-blur: ;
|
|
1643
|
-
--tw-brightness: ;
|
|
1644
|
-
--tw-contrast: ;
|
|
1645
|
-
--tw-grayscale: ;
|
|
1646
|
-
--tw-hue-rotate: ;
|
|
1647
|
-
--tw-invert: ;
|
|
1648
|
-
--tw-saturate: ;
|
|
1649
|
-
--tw-sepia: ;
|
|
1650
|
-
--tw-drop-shadow: ;
|
|
1651
|
-
--tw-backdrop-blur: ;
|
|
1652
|
-
--tw-backdrop-brightness: ;
|
|
1653
|
-
--tw-backdrop-contrast: ;
|
|
1654
|
-
--tw-backdrop-grayscale: ;
|
|
1655
|
-
--tw-backdrop-hue-rotate: ;
|
|
1656
|
-
--tw-backdrop-invert: ;
|
|
1657
|
-
--tw-backdrop-opacity: ;
|
|
1658
|
-
--tw-backdrop-saturate: ;
|
|
1659
|
-
--tw-backdrop-sepia: ;
|
|
1660
|
-
--tw-contain-size: ;
|
|
1661
|
-
--tw-contain-layout: ;
|
|
1662
|
-
--tw-contain-paint: ;
|
|
1663
|
-
--tw-contain-style: ;
|
|
1664
|
-
}
|
|
1665
|
-
|
|
1666
|
-
::backdrop {
|
|
1667
|
-
--tw-border-spacing-x: 0;
|
|
1668
|
-
--tw-border-spacing-y: 0;
|
|
1669
|
-
--tw-translate-x: 0;
|
|
1670
|
-
--tw-translate-y: 0;
|
|
1671
|
-
--tw-rotate: 0;
|
|
1672
|
-
--tw-skew-x: 0;
|
|
1673
|
-
--tw-skew-y: 0;
|
|
1674
|
-
--tw-scale-x: 1;
|
|
1675
|
-
--tw-scale-y: 1;
|
|
1676
|
-
--tw-pan-x: ;
|
|
1677
|
-
--tw-pan-y: ;
|
|
1678
|
-
--tw-pinch-zoom: ;
|
|
1679
|
-
--tw-scroll-snap-strictness: proximity;
|
|
1680
|
-
--tw-gradient-from-position: ;
|
|
1681
|
-
--tw-gradient-via-position: ;
|
|
1682
|
-
--tw-gradient-to-position: ;
|
|
1683
|
-
--tw-ordinal: ;
|
|
1684
|
-
--tw-slashed-zero: ;
|
|
1685
|
-
--tw-numeric-figure: ;
|
|
1686
|
-
--tw-numeric-spacing: ;
|
|
1687
|
-
--tw-numeric-fraction: ;
|
|
1688
|
-
--tw-ring-inset: ;
|
|
1689
|
-
--tw-ring-offset-width: 0px;
|
|
1690
|
-
--tw-ring-offset-color: #fff;
|
|
1691
|
-
--tw-ring-color: rgb(59 130 246 / 0.5);
|
|
1692
|
-
--tw-ring-offset-shadow: 0 0 #0000;
|
|
1693
|
-
--tw-ring-shadow: 0 0 #0000;
|
|
1694
|
-
--tw-shadow: 0 0 #0000;
|
|
1695
|
-
--tw-shadow-colored: 0 0 #0000;
|
|
1696
|
-
--tw-blur: ;
|
|
1697
|
-
--tw-brightness: ;
|
|
1698
|
-
--tw-contrast: ;
|
|
1699
|
-
--tw-grayscale: ;
|
|
1700
|
-
--tw-hue-rotate: ;
|
|
1701
|
-
--tw-invert: ;
|
|
1702
|
-
--tw-saturate: ;
|
|
1703
|
-
--tw-sepia: ;
|
|
1704
|
-
--tw-drop-shadow: ;
|
|
1705
|
-
--tw-backdrop-blur: ;
|
|
1706
|
-
--tw-backdrop-brightness: ;
|
|
1707
|
-
--tw-backdrop-contrast: ;
|
|
1708
|
-
--tw-backdrop-grayscale: ;
|
|
1709
|
-
--tw-backdrop-hue-rotate: ;
|
|
1710
|
-
--tw-backdrop-invert: ;
|
|
1711
|
-
--tw-backdrop-opacity: ;
|
|
1712
|
-
--tw-backdrop-saturate: ;
|
|
1713
|
-
--tw-backdrop-sepia: ;
|
|
1714
|
-
--tw-contain-size: ;
|
|
1715
|
-
--tw-contain-layout: ;
|
|
1716
|
-
--tw-contain-paint: ;
|
|
1717
|
-
--tw-contain-style: ;
|
|
1718
|
-
}/*
|
|
1719
|
-
! tailwindcss v3.4.15 | MIT License | https://tailwindcss.com
|
|
1720
|
-
*//*
|
|
1721
|
-
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
|
|
1722
|
-
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
|
|
1723
|
-
*/
|
|
1724
|
-
|
|
1725
|
-
*,
|
|
1726
|
-
::before,
|
|
1727
|
-
::after {
|
|
1728
|
-
box-sizing: border-box; /* 1 */
|
|
1729
|
-
border-width: 0; /* 2 */
|
|
1730
|
-
border-style: solid; /* 2 */
|
|
1731
|
-
border-color: #e5e7eb; /* 2 */
|
|
1732
|
-
}
|
|
1733
|
-
|
|
1734
|
-
::before,
|
|
1735
|
-
::after {
|
|
1736
|
-
--tw-content: '';
|
|
1737
|
-
}
|
|
1738
|
-
|
|
1739
|
-
/*
|
|
1740
|
-
1. Use a consistent sensible line-height in all browsers.
|
|
1741
|
-
2. Prevent adjustments of font size after orientation changes in iOS.
|
|
1742
|
-
3. Use a more readable tab size.
|
|
1743
|
-
4. Use the user's configured \`sans\` font-family by default.
|
|
1744
|
-
5. Use the user's configured \`sans\` font-feature-settings by default.
|
|
1745
|
-
6. Use the user's configured \`sans\` font-variation-settings by default.
|
|
1746
|
-
7. Disable tap highlights on iOS
|
|
1747
|
-
*/
|
|
1748
|
-
|
|
1749
|
-
html,
|
|
1750
|
-
:host {
|
|
1751
|
-
line-height: 1.5; /* 1 */
|
|
1752
|
-
-webkit-text-size-adjust: 100%; /* 2 */
|
|
1753
|
-
-moz-tab-size: 4; /* 3 */
|
|
1754
|
-
-o-tab-size: 4;
|
|
1755
|
-
tab-size: 4; /* 3 */
|
|
1756
|
-
font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* 4 */
|
|
1757
|
-
font-feature-settings: normal; /* 5 */
|
|
1758
|
-
font-variation-settings: normal; /* 6 */
|
|
1759
|
-
-webkit-tap-highlight-color: transparent; /* 7 */
|
|
1760
|
-
}
|
|
1761
|
-
|
|
1762
|
-
/*
|
|
1763
|
-
1. Remove the margin in all browsers.
|
|
1764
|
-
2. Inherit line-height from \`html\` so users can set them as a class directly on the \`html\` element.
|
|
1765
|
-
*/
|
|
1766
|
-
|
|
1767
|
-
body {
|
|
1768
|
-
margin: 0; /* 1 */
|
|
1769
|
-
line-height: inherit; /* 2 */
|
|
1770
|
-
}
|
|
1771
|
-
|
|
1772
|
-
/*
|
|
1773
|
-
1. Add the correct height in Firefox.
|
|
1774
|
-
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
|
|
1775
|
-
3. Ensure horizontal rules are visible by default.
|
|
1776
|
-
*/
|
|
1777
|
-
|
|
1778
|
-
hr {
|
|
1779
|
-
height: 0; /* 1 */
|
|
1780
|
-
color: inherit; /* 2 */
|
|
1781
|
-
border-top-width: 1px; /* 3 */
|
|
1782
|
-
}
|
|
1783
|
-
|
|
1784
|
-
/*
|
|
1785
|
-
Add the correct text decoration in Chrome, Edge, and Safari.
|
|
1786
|
-
*/
|
|
1787
|
-
|
|
1788
|
-
abbr:where([title]) {
|
|
1789
|
-
-webkit-text-decoration: underline dotted;
|
|
1790
|
-
text-decoration: underline dotted;
|
|
1791
|
-
}
|
|
1792
|
-
|
|
1793
|
-
/*
|
|
1794
|
-
Remove the default font size and weight for headings.
|
|
1795
|
-
*/
|
|
1796
|
-
|
|
1797
|
-
h1,
|
|
1798
|
-
h2,
|
|
1799
|
-
h3,
|
|
1800
|
-
h4,
|
|
1801
|
-
h5,
|
|
1802
|
-
h6 {
|
|
1803
|
-
font-size: inherit;
|
|
1804
|
-
font-weight: inherit;
|
|
1805
|
-
}
|
|
1806
|
-
|
|
1807
|
-
/*
|
|
1808
|
-
Reset links to optimize for opt-in styling instead of opt-out.
|
|
1809
|
-
*/
|
|
1810
|
-
|
|
1811
|
-
a {
|
|
1812
|
-
color: inherit;
|
|
1813
|
-
text-decoration: inherit;
|
|
1814
|
-
}
|
|
1815
|
-
|
|
1816
|
-
/*
|
|
1817
|
-
Add the correct font weight in Edge and Safari.
|
|
1818
|
-
*/
|
|
1819
|
-
|
|
1820
|
-
b,
|
|
1821
|
-
strong {
|
|
1822
|
-
font-weight: bolder;
|
|
1823
1587
|
}
|
|
1824
1588
|
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
samp,
|
|
1835
|
-
pre {
|
|
1836
|
-
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* 1 */
|
|
1837
|
-
font-feature-settings: normal; /* 2 */
|
|
1838
|
-
font-variation-settings: normal; /* 3 */
|
|
1839
|
-
font-size: 1em; /* 4 */
|
|
1840
|
-
}
|
|
1841
|
-
|
|
1842
|
-
/*
|
|
1843
|
-
Add the correct font size in all browsers.
|
|
1844
|
-
*/
|
|
1845
|
-
|
|
1846
|
-
small {
|
|
1847
|
-
font-size: 80%;
|
|
1589
|
+
.citadel-output {
|
|
1590
|
+
width: 100%;
|
|
1591
|
+
height: 100%;
|
|
1592
|
+
overflow-y: auto;
|
|
1593
|
+
padding: 0.75rem;
|
|
1594
|
+
border: 1px solid var(--citadel-border);
|
|
1595
|
+
border-radius: 0.5rem;
|
|
1596
|
+
background: color-mix(in oklch, var(--citadel-bg) 75%, black);
|
|
1597
|
+
text-align: left;
|
|
1848
1598
|
}
|
|
1849
1599
|
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
*/
|
|
1853
|
-
|
|
1854
|
-
sub,
|
|
1855
|
-
sup {
|
|
1856
|
-
font-size: 75%;
|
|
1857
|
-
line-height: 0;
|
|
1858
|
-
position: relative;
|
|
1859
|
-
vertical-align: baseline;
|
|
1600
|
+
.citadel-output-item {
|
|
1601
|
+
margin-bottom: 1rem;
|
|
1860
1602
|
}
|
|
1861
1603
|
|
|
1862
|
-
|
|
1863
|
-
bottom:
|
|
1604
|
+
.citadel-output-item:last-child {
|
|
1605
|
+
margin-bottom: 0;
|
|
1864
1606
|
}
|
|
1865
1607
|
|
|
1866
|
-
|
|
1867
|
-
top:
|
|
1608
|
+
.citadel-output-content {
|
|
1609
|
+
margin-top: 0.35rem;
|
|
1610
|
+
color: var(--citadel-text);
|
|
1868
1611
|
}
|
|
1869
1612
|
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
|
|
1873
|
-
3. Remove gaps between table borders by default.
|
|
1874
|
-
*/
|
|
1875
|
-
|
|
1876
|
-
table {
|
|
1877
|
-
text-indent: 0; /* 1 */
|
|
1878
|
-
border-color: inherit; /* 2 */
|
|
1879
|
-
border-collapse: collapse; /* 3 */
|
|
1613
|
+
.citadel-output-content > :first-child {
|
|
1614
|
+
margin-top: 0;
|
|
1880
1615
|
}
|
|
1881
1616
|
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
2. Remove the margin in Firefox and Safari.
|
|
1885
|
-
3. Remove default padding in all browsers.
|
|
1886
|
-
*/
|
|
1887
|
-
|
|
1888
|
-
button,
|
|
1889
|
-
input,
|
|
1890
|
-
optgroup,
|
|
1891
|
-
select,
|
|
1892
|
-
textarea {
|
|
1893
|
-
font-family: inherit; /* 1 */
|
|
1894
|
-
font-feature-settings: inherit; /* 1 */
|
|
1895
|
-
font-variation-settings: inherit; /* 1 */
|
|
1896
|
-
font-size: 100%; /* 1 */
|
|
1897
|
-
font-weight: inherit; /* 1 */
|
|
1898
|
-
line-height: inherit; /* 1 */
|
|
1899
|
-
letter-spacing: inherit; /* 1 */
|
|
1900
|
-
color: inherit; /* 1 */
|
|
1901
|
-
margin: 0; /* 2 */
|
|
1902
|
-
padding: 0; /* 3 */
|
|
1617
|
+
.citadel-output-content > :last-child {
|
|
1618
|
+
margin-bottom: 0;
|
|
1903
1619
|
}
|
|
1904
1620
|
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
select {
|
|
1911
|
-
text-transform: none;
|
|
1621
|
+
.citadel-output-line {
|
|
1622
|
+
display: flex;
|
|
1623
|
+
flex-wrap: wrap;
|
|
1624
|
+
align-items: center;
|
|
1625
|
+
gap: 0.5rem;
|
|
1912
1626
|
}
|
|
1913
1627
|
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
*/
|
|
1918
|
-
|
|
1919
|
-
button,
|
|
1920
|
-
input:where([type='button']),
|
|
1921
|
-
input:where([type='reset']),
|
|
1922
|
-
input:where([type='submit']) {
|
|
1923
|
-
-webkit-appearance: button; /* 1 */
|
|
1924
|
-
background-color: transparent; /* 2 */
|
|
1925
|
-
background-image: none; /* 2 */
|
|
1628
|
+
.citadel-output-command,
|
|
1629
|
+
.citadel-output-command-word {
|
|
1630
|
+
color: var(--citadel-text);
|
|
1926
1631
|
}
|
|
1927
1632
|
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
*/
|
|
1931
|
-
|
|
1932
|
-
:-moz-focusring {
|
|
1933
|
-
outline: auto;
|
|
1633
|
+
.citadel-output-command-arg {
|
|
1634
|
+
color: var(--citadel-arg);
|
|
1934
1635
|
}
|
|
1935
1636
|
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1637
|
+
.citadel-output-separator {
|
|
1638
|
+
color: var(--citadel-muted);
|
|
1639
|
+
}
|
|
1939
1640
|
|
|
1940
|
-
|
|
1941
|
-
|
|
1641
|
+
.citadel-output-timestamp {
|
|
1642
|
+
color: var(--citadel-subtle);
|
|
1942
1643
|
}
|
|
1943
1644
|
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1645
|
+
.citadel-status-dot {
|
|
1646
|
+
width: 1rem;
|
|
1647
|
+
height: 1rem;
|
|
1648
|
+
border-radius: 999px;
|
|
1649
|
+
}
|
|
1947
1650
|
|
|
1948
|
-
|
|
1949
|
-
|
|
1651
|
+
.citadel-status-dot-success {
|
|
1652
|
+
background: var(--citadel-success);
|
|
1950
1653
|
}
|
|
1951
1654
|
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1655
|
+
.citadel-status-dot-failure {
|
|
1656
|
+
background: var(--citadel-error);
|
|
1657
|
+
}
|
|
1955
1658
|
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
height:
|
|
1659
|
+
.citadel-spinner {
|
|
1660
|
+
width: 1rem;
|
|
1661
|
+
height: 1rem;
|
|
1662
|
+
border: 2px solid color-mix(in oklch, var(--citadel-text) 60%, transparent);
|
|
1663
|
+
border-top-color: color-mix(in oklch, var(--citadel-muted) 80%, black);
|
|
1664
|
+
border-radius: 999px;
|
|
1665
|
+
animation: citadel-spin 0.9s linear infinite;
|
|
1959
1666
|
}
|
|
1960
1667
|
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1668
|
+
@keyframes citadel-spin {
|
|
1669
|
+
to {
|
|
1670
|
+
transform: rotate(360deg);
|
|
1671
|
+
}
|
|
1672
|
+
}
|
|
1965
1673
|
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1674
|
+
.citadel-input-shell {
|
|
1675
|
+
width: 100%;
|
|
1676
|
+
padding: 1rem;
|
|
1677
|
+
border-radius: 0.5rem;
|
|
1678
|
+
background-color: var(--citadel-bg);
|
|
1969
1679
|
}
|
|
1970
1680
|
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1681
|
+
.citadel-input-line {
|
|
1682
|
+
display: flex;
|
|
1683
|
+
align-items: center;
|
|
1684
|
+
gap: 0.5rem;
|
|
1685
|
+
}
|
|
1974
1686
|
|
|
1975
|
-
|
|
1976
|
-
|
|
1687
|
+
.citadel-input-prompt {
|
|
1688
|
+
color: var(--citadel-muted);
|
|
1977
1689
|
}
|
|
1978
1690
|
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1691
|
+
.citadel-input-row {
|
|
1692
|
+
display: flex;
|
|
1693
|
+
align-items: center;
|
|
1694
|
+
flex: 1 1 auto;
|
|
1695
|
+
min-width: 0;
|
|
1696
|
+
}
|
|
1983
1697
|
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1698
|
+
.citadel-input-segments {
|
|
1699
|
+
display: flex;
|
|
1700
|
+
align-items: center;
|
|
1701
|
+
gap: 0.25rem;
|
|
1987
1702
|
}
|
|
1988
1703
|
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1704
|
+
.citadel-input-segment-arg {
|
|
1705
|
+
color: var(--citadel-text);
|
|
1706
|
+
white-space: pre;
|
|
1707
|
+
}
|
|
1992
1708
|
|
|
1993
|
-
|
|
1994
|
-
|
|
1709
|
+
.citadel-input-segment-word {
|
|
1710
|
+
color: var(--citadel-word);
|
|
1711
|
+
white-space: pre;
|
|
1995
1712
|
}
|
|
1996
1713
|
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
1714
|
+
.citadel-input-segment-space {
|
|
1715
|
+
color: var(--citadel-text);
|
|
1716
|
+
white-space: pre;
|
|
1717
|
+
}
|
|
2000
1718
|
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
dd,
|
|
2004
|
-
h1,
|
|
2005
|
-
h2,
|
|
2006
|
-
h3,
|
|
2007
|
-
h4,
|
|
2008
|
-
h5,
|
|
2009
|
-
h6,
|
|
2010
|
-
hr,
|
|
2011
|
-
figure,
|
|
2012
|
-
p,
|
|
2013
|
-
pre {
|
|
2014
|
-
margin: 0;
|
|
1719
|
+
.citadel-input-segment-space-command {
|
|
1720
|
+
color: var(--citadel-word);
|
|
2015
1721
|
}
|
|
2016
1722
|
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
1723
|
+
.citadel-input-control {
|
|
1724
|
+
position: relative;
|
|
1725
|
+
flex: 1 1 auto;
|
|
1726
|
+
min-width: 0;
|
|
2020
1727
|
}
|
|
2021
1728
|
|
|
2022
|
-
|
|
2023
|
-
|
|
1729
|
+
.citadel-input-measure {
|
|
1730
|
+
position: absolute;
|
|
1731
|
+
top: 0;
|
|
1732
|
+
left: 0;
|
|
1733
|
+
visibility: hidden;
|
|
1734
|
+
pointer-events: none;
|
|
1735
|
+
white-space: pre;
|
|
1736
|
+
font: inherit;
|
|
1737
|
+
letter-spacing: inherit;
|
|
2024
1738
|
}
|
|
2025
1739
|
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
menu {
|
|
2029
|
-
list-style: none;
|
|
1740
|
+
.citadel-input-field {
|
|
1741
|
+
width: 100%;
|
|
2030
1742
|
margin: 0;
|
|
2031
1743
|
padding: 0;
|
|
1744
|
+
border: 0;
|
|
1745
|
+
border-radius: 0;
|
|
1746
|
+
outline: none;
|
|
1747
|
+
background: transparent;
|
|
1748
|
+
font: inherit;
|
|
1749
|
+
line-height: inherit;
|
|
1750
|
+
letter-spacing: inherit;
|
|
1751
|
+
appearance: none;
|
|
1752
|
+
-webkit-appearance: none;
|
|
1753
|
+
caret-color: transparent;
|
|
2032
1754
|
}
|
|
2033
1755
|
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
dialog {
|
|
2038
|
-
padding: 0;
|
|
1756
|
+
.citadel-input-field::placeholder {
|
|
1757
|
+
color: var(--citadel-subtle);
|
|
1758
|
+
opacity: 1;
|
|
2039
1759
|
}
|
|
2040
1760
|
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
*/
|
|
2044
|
-
|
|
2045
|
-
textarea {
|
|
2046
|
-
resize: vertical;
|
|
1761
|
+
.citadel-input-field.is-command-mode {
|
|
1762
|
+
color: var(--citadel-word);
|
|
2047
1763
|
}
|
|
2048
1764
|
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
2. Set the default placeholder color to the user's configured gray 400 color.
|
|
2052
|
-
*/
|
|
2053
|
-
|
|
2054
|
-
input::-moz-placeholder, textarea::-moz-placeholder {
|
|
2055
|
-
opacity: 1; /* 1 */
|
|
2056
|
-
color: #9ca3af; /* 2 */
|
|
1765
|
+
.citadel-input-field.is-argument-mode {
|
|
1766
|
+
color: var(--citadel-text);
|
|
2057
1767
|
}
|
|
2058
1768
|
|
|
2059
|
-
input
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
1769
|
+
.citadel-input-cursor {
|
|
1770
|
+
position: absolute;
|
|
1771
|
+
top: 0;
|
|
1772
|
+
pointer-events: none;
|
|
2063
1773
|
}
|
|
2064
1774
|
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
1775
|
+
@keyframes citadel-invalid-glow {
|
|
1776
|
+
0%,
|
|
1777
|
+
100% {
|
|
1778
|
+
box-shadow: 0 0 0 color-mix(in oklch, var(--citadel-error) 0%, transparent);
|
|
1779
|
+
}
|
|
2068
1780
|
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
1781
|
+
50% {
|
|
1782
|
+
box-shadow: 0 0 8px color-mix(in oklch, var(--citadel-error) 70%, transparent);
|
|
1783
|
+
}
|
|
2072
1784
|
}
|
|
2073
1785
|
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
*/
|
|
2077
|
-
:disabled {
|
|
2078
|
-
cursor: default;
|
|
1786
|
+
.invalid-input-animation {
|
|
1787
|
+
animation: citadel-invalid-glow 0.4s ease-in-out;
|
|
2079
1788
|
}
|
|
2080
1789
|
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
*/
|
|
1790
|
+
.citadel-cursor-wrapper {
|
|
1791
|
+
position: relative;
|
|
1792
|
+
display: inline-block;
|
|
1793
|
+
}
|
|
2086
1794
|
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
canvas,
|
|
2091
|
-
audio,
|
|
2092
|
-
iframe,
|
|
2093
|
-
embed,
|
|
2094
|
-
object {
|
|
2095
|
-
display: block; /* 1 */
|
|
2096
|
-
vertical-align: middle; /* 2 */
|
|
1795
|
+
.command-cursor {
|
|
1796
|
+
display: inline-block;
|
|
1797
|
+
white-space: pre;
|
|
2097
1798
|
}
|
|
2098
1799
|
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
1800
|
+
@keyframes citadel-shake {
|
|
1801
|
+
0%,
|
|
1802
|
+
100% {
|
|
1803
|
+
transform: translateX(0);
|
|
1804
|
+
}
|
|
2102
1805
|
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
height: auto;
|
|
2107
|
-
}
|
|
1806
|
+
25% {
|
|
1807
|
+
transform: translateX(-4px);
|
|
1808
|
+
}
|
|
2108
1809
|
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
}
|
|
2113
|
-
.container {
|
|
2114
|
-
width: 100%;
|
|
2115
|
-
}
|
|
2116
|
-
.pointer-events-none {
|
|
2117
|
-
pointer-events: none;
|
|
2118
|
-
}
|
|
2119
|
-
.visible {
|
|
2120
|
-
visibility: visible;
|
|
2121
|
-
}
|
|
2122
|
-
.static {
|
|
2123
|
-
position: static;
|
|
2124
|
-
}
|
|
2125
|
-
.fixed {
|
|
2126
|
-
position: fixed;
|
|
2127
|
-
}
|
|
2128
|
-
.absolute {
|
|
2129
|
-
position: absolute;
|
|
2130
|
-
}
|
|
2131
|
-
.relative {
|
|
2132
|
-
position: relative;
|
|
2133
|
-
}
|
|
2134
|
-
.top-0 {
|
|
2135
|
-
top: 0px;
|
|
2136
|
-
}
|
|
2137
|
-
.my-2 {
|
|
2138
|
-
margin-top: 0.5rem;
|
|
2139
|
-
margin-bottom: 0.5rem;
|
|
2140
|
-
}
|
|
2141
|
-
.mb-4 {
|
|
2142
|
-
margin-bottom: 1rem;
|
|
2143
|
-
}
|
|
2144
|
-
.ml-2 {
|
|
2145
|
-
margin-left: 0.5rem;
|
|
2146
|
-
}
|
|
2147
|
-
.mr-2 {
|
|
2148
|
-
margin-right: 0.5rem;
|
|
1810
|
+
75% {
|
|
1811
|
+
transform: translateX(4px);
|
|
1812
|
+
}
|
|
2149
1813
|
}
|
|
2150
|
-
|
|
2151
|
-
|
|
1814
|
+
|
|
1815
|
+
.animate-shake {
|
|
1816
|
+
animation: citadel-shake 0.2s ease-in-out;
|
|
2152
1817
|
}
|
|
2153
|
-
|
|
1818
|
+
|
|
1819
|
+
.citadel-available-commands {
|
|
2154
1820
|
margin-top: 0.5rem;
|
|
1821
|
+
padding: 0.5rem 1rem;
|
|
1822
|
+
border-top: 1px solid var(--citadel-border);
|
|
2155
1823
|
}
|
|
2156
|
-
.block {
|
|
2157
|
-
display: block;
|
|
2158
|
-
}
|
|
2159
|
-
.inline-block {
|
|
2160
|
-
display: inline-block;
|
|
2161
|
-
}
|
|
2162
|
-
.flex {
|
|
2163
|
-
display: flex;
|
|
2164
|
-
}
|
|
2165
|
-
.hidden {
|
|
2166
|
-
display: none;
|
|
2167
|
-
}
|
|
2168
|
-
.h-12 {
|
|
2169
|
-
height: 3rem;
|
|
2170
|
-
}
|
|
2171
|
-
.h-4 {
|
|
2172
|
-
height: 1rem;
|
|
2173
|
-
}
|
|
2174
|
-
.h-auto {
|
|
2175
|
-
height: auto;
|
|
2176
|
-
}
|
|
2177
|
-
.h-full {
|
|
2178
|
-
height: 100%;
|
|
2179
|
-
}
|
|
2180
|
-
.max-h-\\[300px\\] {
|
|
2181
|
-
max-height: 300px;
|
|
2182
|
-
}
|
|
2183
|
-
.min-h-0 {
|
|
2184
|
-
min-height: 0px;
|
|
2185
|
-
}
|
|
2186
|
-
.min-h-screen {
|
|
2187
|
-
min-height: 100vh;
|
|
2188
|
-
}
|
|
2189
|
-
.w-4 {
|
|
2190
|
-
width: 1rem;
|
|
2191
|
-
}
|
|
2192
|
-
.w-full {
|
|
2193
|
-
width: 100%;
|
|
2194
|
-
}
|
|
2195
|
-
.max-w-\\[400px\\] {
|
|
2196
|
-
max-width: 400px;
|
|
2197
|
-
}
|
|
2198
|
-
.flex-1 {
|
|
2199
|
-
flex: 1 1 0%;
|
|
2200
|
-
}
|
|
2201
|
-
.flex-shrink-0 {
|
|
2202
|
-
flex-shrink: 0;
|
|
2203
|
-
}
|
|
2204
|
-
.transform {
|
|
2205
|
-
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
2206
|
-
}
|
|
2207
|
-
@keyframes spin {
|
|
2208
1824
|
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
}
|
|
2212
|
-
}
|
|
2213
|
-
.animate-spin {
|
|
2214
|
-
animation: spin 1s linear infinite;
|
|
2215
|
-
}
|
|
2216
|
-
.flex-col {
|
|
2217
|
-
flex-direction: column;
|
|
1825
|
+
.citadel-available-commands-content {
|
|
1826
|
+
color: var(--citadel-muted);
|
|
2218
1827
|
}
|
|
2219
|
-
|
|
1828
|
+
|
|
1829
|
+
.citadel-available-chip-list {
|
|
1830
|
+
display: flex;
|
|
2220
1831
|
flex-wrap: wrap;
|
|
2221
|
-
}
|
|
2222
|
-
.items-center {
|
|
2223
|
-
align-items: center;
|
|
2224
|
-
}
|
|
2225
|
-
.justify-center {
|
|
2226
|
-
justify-content: center;
|
|
2227
|
-
}
|
|
2228
|
-
.gap-2 {
|
|
2229
1832
|
gap: 0.5rem;
|
|
2230
1833
|
}
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
}
|
|
2237
|
-
.rounded {
|
|
2238
|
-
border-radius: 0.25rem;
|
|
2239
|
-
}
|
|
2240
|
-
.rounded-full {
|
|
2241
|
-
border-radius: 9999px;
|
|
2242
|
-
}
|
|
2243
|
-
.rounded-lg {
|
|
2244
|
-
border-radius: 0.5rem;
|
|
2245
|
-
}
|
|
2246
|
-
.border {
|
|
2247
|
-
border-width: 1px;
|
|
2248
|
-
}
|
|
2249
|
-
.border-2 {
|
|
2250
|
-
border-width: 2px;
|
|
2251
|
-
}
|
|
2252
|
-
.border-t {
|
|
2253
|
-
border-top-width: 1px;
|
|
2254
|
-
}
|
|
2255
|
-
.border-gray-300 {
|
|
2256
|
-
--tw-border-opacity: 1;
|
|
2257
|
-
border-color: rgb(209 213 219 / var(--tw-border-opacity, 1));
|
|
2258
|
-
}
|
|
2259
|
-
.border-gray-700 {
|
|
2260
|
-
--tw-border-opacity: 1;
|
|
2261
|
-
border-color: rgb(55 65 81 / var(--tw-border-opacity, 1));
|
|
2262
|
-
}
|
|
2263
|
-
.border-t-gray-600 {
|
|
2264
|
-
--tw-border-opacity: 1;
|
|
2265
|
-
border-top-color: rgb(75 85 99 / var(--tw-border-opacity, 1));
|
|
2266
|
-
}
|
|
2267
|
-
.bg-gray-100 {
|
|
2268
|
-
--tw-bg-opacity: 1;
|
|
2269
|
-
background-color: rgb(243 244 246 / var(--tw-bg-opacity, 1));
|
|
2270
|
-
}
|
|
2271
|
-
.bg-gray-800 {
|
|
2272
|
-
--tw-bg-opacity: 1;
|
|
2273
|
-
background-color: rgb(31 41 55 / var(--tw-bg-opacity, 1));
|
|
2274
|
-
}
|
|
2275
|
-
.bg-gray-900 {
|
|
2276
|
-
--tw-bg-opacity: 1;
|
|
2277
|
-
background-color: rgb(17 24 39 / var(--tw-bg-opacity, 1));
|
|
2278
|
-
}
|
|
2279
|
-
.bg-green-500 {
|
|
2280
|
-
--tw-bg-opacity: 1;
|
|
2281
|
-
background-color: rgb(34 197 94 / var(--tw-bg-opacity, 1));
|
|
2282
|
-
}
|
|
2283
|
-
.bg-red-500 {
|
|
2284
|
-
--tw-bg-opacity: 1;
|
|
2285
|
-
background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1));
|
|
2286
|
-
}
|
|
2287
|
-
.bg-transparent {
|
|
2288
|
-
background-color: transparent;
|
|
2289
|
-
}
|
|
2290
|
-
.bg-white {
|
|
2291
|
-
--tw-bg-opacity: 1;
|
|
2292
|
-
background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));
|
|
2293
|
-
}
|
|
2294
|
-
.object-contain {
|
|
2295
|
-
-o-object-fit: contain;
|
|
2296
|
-
object-fit: contain;
|
|
2297
|
-
}
|
|
2298
|
-
.p-3 {
|
|
2299
|
-
padding: 0.75rem;
|
|
2300
|
-
}
|
|
2301
|
-
.p-4 {
|
|
2302
|
-
padding: 1rem;
|
|
2303
|
-
}
|
|
2304
|
-
.p-6 {
|
|
2305
|
-
padding: 1.5rem;
|
|
2306
|
-
}
|
|
2307
|
-
.px-2 {
|
|
2308
|
-
padding-left: 0.5rem;
|
|
2309
|
-
padding-right: 0.5rem;
|
|
2310
|
-
}
|
|
2311
|
-
.px-4 {
|
|
2312
|
-
padding-left: 1rem;
|
|
2313
|
-
padding-right: 1rem;
|
|
2314
|
-
}
|
|
2315
|
-
.py-1 {
|
|
2316
|
-
padding-top: 0.25rem;
|
|
2317
|
-
padding-bottom: 0.25rem;
|
|
2318
|
-
}
|
|
2319
|
-
.pt-2 {
|
|
2320
|
-
padding-top: 0.5rem;
|
|
2321
|
-
}
|
|
2322
|
-
.pt-3 {
|
|
2323
|
-
padding-top: 0.75rem;
|
|
2324
|
-
}
|
|
2325
|
-
.text-left {
|
|
2326
|
-
text-align: left;
|
|
2327
|
-
}
|
|
2328
|
-
.font-mono {
|
|
2329
|
-
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
|
2330
|
-
}
|
|
2331
|
-
.text-base {
|
|
2332
|
-
font-size: 1rem;
|
|
2333
|
-
line-height: 1.5rem;
|
|
2334
|
-
}
|
|
2335
|
-
.text-lg {
|
|
2336
|
-
font-size: 1.125rem;
|
|
2337
|
-
line-height: 1.75rem;
|
|
2338
|
-
}
|
|
2339
|
-
.text-sm {
|
|
2340
|
-
font-size: 0.875rem;
|
|
2341
|
-
line-height: 1.25rem;
|
|
2342
|
-
}
|
|
2343
|
-
.text-xs {
|
|
2344
|
-
font-size: 0.75rem;
|
|
2345
|
-
line-height: 1rem;
|
|
2346
|
-
}
|
|
2347
|
-
.text-blue-400 {
|
|
2348
|
-
--tw-text-opacity: 1;
|
|
2349
|
-
color: rgb(96 165 250 / var(--tw-text-opacity, 1));
|
|
2350
|
-
}
|
|
2351
|
-
.text-gray-200 {
|
|
2352
|
-
--tw-text-opacity: 1;
|
|
2353
|
-
color: rgb(229 231 235 / var(--tw-text-opacity, 1));
|
|
2354
|
-
}
|
|
2355
|
-
.text-gray-300 {
|
|
2356
|
-
--tw-text-opacity: 1;
|
|
2357
|
-
color: rgb(209 213 219 / var(--tw-text-opacity, 1));
|
|
2358
|
-
}
|
|
2359
|
-
.text-gray-400 {
|
|
2360
|
-
--tw-text-opacity: 1;
|
|
2361
|
-
color: rgb(156 163 175 / var(--tw-text-opacity, 1));
|
|
2362
|
-
}
|
|
2363
|
-
.text-gray-500 {
|
|
2364
|
-
--tw-text-opacity: 1;
|
|
2365
|
-
color: rgb(107 114 128 / var(--tw-text-opacity, 1));
|
|
2366
|
-
}
|
|
2367
|
-
.text-gray-700 {
|
|
2368
|
-
--tw-text-opacity: 1;
|
|
2369
|
-
color: rgb(55 65 81 / var(--tw-text-opacity, 1));
|
|
2370
|
-
}
|
|
2371
|
-
.text-green-500 {
|
|
2372
|
-
--tw-text-opacity: 1;
|
|
2373
|
-
color: rgb(34 197 94 / var(--tw-text-opacity, 1));
|
|
2374
|
-
}
|
|
2375
|
-
.text-red-400 {
|
|
2376
|
-
--tw-text-opacity: 1;
|
|
2377
|
-
color: rgb(248 113 113 / var(--tw-text-opacity, 1));
|
|
2378
|
-
}
|
|
2379
|
-
.text-red-500 {
|
|
2380
|
-
--tw-text-opacity: 1;
|
|
2381
|
-
color: rgb(239 68 68 / var(--tw-text-opacity, 1));
|
|
2382
|
-
}
|
|
2383
|
-
.text-white {
|
|
2384
|
-
--tw-text-opacity: 1;
|
|
2385
|
-
color: rgb(255 255 255 / var(--tw-text-opacity, 1));
|
|
1834
|
+
|
|
1835
|
+
.citadel-available-chip {
|
|
1836
|
+
padding: 0.25rem 0.5rem;
|
|
1837
|
+
border-radius: 0.375rem;
|
|
1838
|
+
background: var(--citadel-surface);
|
|
2386
1839
|
}
|
|
2387
|
-
|
|
2388
|
-
|
|
1840
|
+
|
|
1841
|
+
.citadel-available-chip-text {
|
|
1842
|
+
color: white;
|
|
2389
1843
|
}
|
|
2390
|
-
|
|
2391
|
-
|
|
1844
|
+
|
|
1845
|
+
.citadel-available-chip-prefix {
|
|
1846
|
+
text-decoration: underline;
|
|
2392
1847
|
}
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
1848
|
+
|
|
1849
|
+
.citadel-available-next-arg {
|
|
1850
|
+
color: var(--citadel-word);
|
|
2397
1851
|
}
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
1852
|
+
|
|
1853
|
+
.citadel-available-next-desc {
|
|
1854
|
+
margin-left: 0.5rem;
|
|
1855
|
+
color: var(--citadel-muted);
|
|
2402
1856
|
}
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
1857
|
+
|
|
1858
|
+
.citadel-result-json,
|
|
1859
|
+
.citadel-result-text {
|
|
1860
|
+
color: var(--citadel-text);
|
|
2406
1861
|
}
|
|
2407
|
-
|
|
2408
|
-
|
|
1862
|
+
|
|
1863
|
+
.citadel-result-json {
|
|
1864
|
+
margin: 0;
|
|
2409
1865
|
}
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;
|
|
2414
|
-
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
2415
|
-
transition-duration: 150ms;
|
|
1866
|
+
|
|
1867
|
+
.citadel-result-text {
|
|
1868
|
+
white-space: pre;
|
|
2416
1869
|
}
|
|
2417
|
-
|
|
2418
|
-
|
|
1870
|
+
|
|
1871
|
+
.citadel-result-error {
|
|
1872
|
+
margin-top: 0.25rem;
|
|
1873
|
+
color: var(--citadel-error);
|
|
2419
1874
|
}
|
|
2420
|
-
|
|
2421
|
-
|
|
1875
|
+
|
|
1876
|
+
.citadel-result-pending {
|
|
1877
|
+
color: var(--citadel-muted);
|
|
2422
1878
|
}
|
|
2423
|
-
|
|
2424
|
-
|
|
1879
|
+
|
|
1880
|
+
.citadel-result-image-wrap {
|
|
1881
|
+
margin-block: 0.5rem;
|
|
2425
1882
|
}
|
|
2426
|
-
|
|
2427
|
-
|
|
1883
|
+
|
|
1884
|
+
.citadel-result-image {
|
|
1885
|
+
max-width: 400px;
|
|
1886
|
+
max-height: 300px;
|
|
1887
|
+
height: auto;
|
|
1888
|
+
object-fit: contain;
|
|
1889
|
+
border-radius: 0.5rem;
|
|
2428
1890
|
}
|
|
2429
|
-
`,
|
|
2430
|
-
config:
|
|
1891
|
+
`, wt = ({
|
|
1892
|
+
config: n = N,
|
|
2431
1893
|
commandRegistry: e,
|
|
2432
|
-
containerId:
|
|
1894
|
+
containerId: t = null
|
|
2433
1895
|
}) => {
|
|
2434
|
-
const
|
|
2435
|
-
return
|
|
1896
|
+
const s = z(new X()), r = e ?? s.current, a = z(null), o = A(() => ({ width: "100%", height: "100%" }), []), c = n.displayMode ?? N.displayMode ?? "panel";
|
|
1897
|
+
return P(() => {
|
|
2436
1898
|
k.configure({
|
|
2437
|
-
level:
|
|
1899
|
+
level: n.logLevel || N.logLevel || ie.ERROR,
|
|
2438
1900
|
prefix: "[Citadel]"
|
|
2439
1901
|
});
|
|
2440
|
-
const
|
|
2441
|
-
if (
|
|
2442
|
-
|
|
1902
|
+
const i = new Ie(r, n), d = c === "inline" && !t, g = d ? a.current : t ? document.getElementById(t) : document.body;
|
|
1903
|
+
if (g)
|
|
1904
|
+
g.appendChild(i);
|
|
2443
1905
|
else {
|
|
2444
|
-
if (
|
|
1906
|
+
if (d) {
|
|
2445
1907
|
console.warn("[Citadel] No host available for inline mode; skipping mount.");
|
|
2446
1908
|
return;
|
|
2447
1909
|
}
|
|
2448
|
-
console.warn(`Container with id "${
|
|
1910
|
+
console.warn(`Container with id "${t}" not found, falling back to body`), document.body.appendChild(i);
|
|
2449
1911
|
}
|
|
2450
1912
|
return () => {
|
|
2451
|
-
var
|
|
2452
|
-
(
|
|
1913
|
+
var u;
|
|
1914
|
+
(u = i.parentElement) == null || u.removeChild(i);
|
|
2453
1915
|
};
|
|
2454
|
-
}, [
|
|
1916
|
+
}, [r, t, n, c]), c === "inline" && !t ? /* @__PURE__ */ m("div", { ref: a, style: o }) : null;
|
|
2455
1917
|
};
|
|
2456
|
-
class
|
|
2457
|
-
constructor(
|
|
2458
|
-
var
|
|
1918
|
+
class Ie extends HTMLElement {
|
|
1919
|
+
constructor(t, s) {
|
|
1920
|
+
var a;
|
|
2459
1921
|
super();
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
this.shadow = this.attachShadow({ mode: "open" }), this.commandRegistry =
|
|
2465
|
-
const
|
|
2466
|
-
this.setAttribute("data-display-mode",
|
|
1922
|
+
f(this, "shadow");
|
|
1923
|
+
f(this, "root", null);
|
|
1924
|
+
f(this, "commandRegistry");
|
|
1925
|
+
f(this, "config");
|
|
1926
|
+
this.shadow = this.attachShadow({ mode: "open" }), this.commandRegistry = t, this.config = s;
|
|
1927
|
+
const r = ((a = this.config) == null ? void 0 : a.displayMode) ?? "panel";
|
|
1928
|
+
this.setAttribute("data-display-mode", r);
|
|
2467
1929
|
}
|
|
2468
1930
|
connectedCallback() {
|
|
2469
1931
|
try {
|
|
2470
|
-
const
|
|
2471
|
-
const
|
|
2472
|
-
return
|
|
1932
|
+
const s = [ye].map((r) => {
|
|
1933
|
+
const a = new CSSStyleSheet();
|
|
1934
|
+
return a.replaceSync(r), a;
|
|
2473
1935
|
});
|
|
2474
|
-
this.shadow.adoptedStyleSheets = [...
|
|
1936
|
+
this.shadow.adoptedStyleSheets = [...s];
|
|
2475
1937
|
} catch {
|
|
2476
|
-
const
|
|
2477
|
-
`),
|
|
2478
|
-
|
|
1938
|
+
const s = [ye].join(`
|
|
1939
|
+
`), r = document.createElement("style");
|
|
1940
|
+
r.textContent = s, this.shadow.appendChild(r);
|
|
2479
1941
|
}
|
|
2480
|
-
const
|
|
2481
|
-
|
|
2482
|
-
/* @__PURE__ */ m(
|
|
1942
|
+
const t = document.createElement("div");
|
|
1943
|
+
t.id = "citadel-root", t.style.width = "100%", t.style.height = "100%", this.shadow.appendChild(t), this.root = Te(t), this.root.render(
|
|
1944
|
+
/* @__PURE__ */ m(We, { config: this.config || N, commandRegistry: this.commandRegistry, children: /* @__PURE__ */ m(ot, {}) })
|
|
2483
1945
|
);
|
|
2484
1946
|
}
|
|
2485
1947
|
disconnectedCallback() {
|
|
2486
|
-
const
|
|
2487
|
-
if (this.root = null, !
|
|
1948
|
+
const t = this.root;
|
|
1949
|
+
if (this.root = null, !t) {
|
|
2488
1950
|
this.shadow.replaceChildren();
|
|
2489
1951
|
return;
|
|
2490
1952
|
}
|
|
2491
1953
|
queueMicrotask(() => {
|
|
2492
|
-
|
|
1954
|
+
t.unmount(), this.shadow.replaceChildren();
|
|
2493
1955
|
});
|
|
2494
1956
|
}
|
|
2495
1957
|
}
|
|
2496
|
-
typeof window < "u" && window.customElements && !window.customElements.get("citadel-element") && window.customElements.define("citadel-element",
|
|
2497
|
-
const
|
|
2498
|
-
class
|
|
1958
|
+
typeof window < "u" && window.customElements && !window.customElements.get("citadel-element") && window.customElements.define("citadel-element", Ie);
|
|
1959
|
+
const ot = () => (j().displayMode ?? "panel") === "inline" ? /* @__PURE__ */ m(at, {}) : /* @__PURE__ */ m(rt, {});
|
|
1960
|
+
class it {
|
|
2499
1961
|
constructor() {
|
|
2500
|
-
|
|
1962
|
+
f(this, "_description");
|
|
2501
1963
|
}
|
|
2502
1964
|
describe(e) {
|
|
2503
1965
|
return this._description = e, this;
|
|
@@ -2506,13 +1968,13 @@ class hn {
|
|
|
2506
1968
|
return this._description;
|
|
2507
1969
|
}
|
|
2508
1970
|
}
|
|
2509
|
-
class
|
|
1971
|
+
class ct {
|
|
2510
1972
|
constructor(e) {
|
|
2511
|
-
|
|
1973
|
+
f(this, "state");
|
|
2512
1974
|
this.state = {
|
|
2513
1975
|
path: e,
|
|
2514
1976
|
description: "",
|
|
2515
|
-
segments:
|
|
1977
|
+
segments: lt(e)
|
|
2516
1978
|
};
|
|
2517
1979
|
}
|
|
2518
1980
|
describe(e) {
|
|
@@ -2521,12 +1983,12 @@ class gn {
|
|
|
2521
1983
|
details(e) {
|
|
2522
1984
|
return this.state.details = e, this;
|
|
2523
1985
|
}
|
|
2524
|
-
arg(e,
|
|
2525
|
-
const
|
|
2526
|
-
return
|
|
1986
|
+
arg(e, t) {
|
|
1987
|
+
const s = new it();
|
|
1988
|
+
return t == null || t(s), this.state.segments.push({
|
|
2527
1989
|
type: "argument",
|
|
2528
1990
|
name: e,
|
|
2529
|
-
description:
|
|
1991
|
+
description: s.description
|
|
2530
1992
|
}), this;
|
|
2531
1993
|
}
|
|
2532
1994
|
handle(e) {
|
|
@@ -2539,85 +2001,85 @@ class gn {
|
|
|
2539
2001
|
};
|
|
2540
2002
|
}
|
|
2541
2003
|
}
|
|
2542
|
-
function
|
|
2543
|
-
const e =
|
|
2004
|
+
function lt(n) {
|
|
2005
|
+
const e = n.trim();
|
|
2544
2006
|
if (!e)
|
|
2545
2007
|
throw new Error("Command path cannot be empty");
|
|
2546
|
-
const
|
|
2547
|
-
if (
|
|
2548
|
-
throw new Error(`Invalid command path "${
|
|
2549
|
-
if (
|
|
2008
|
+
const t = e.split(".");
|
|
2009
|
+
if (t.some((s) => s.trim() === ""))
|
|
2010
|
+
throw new Error(`Invalid command path "${n}". Empty segments are not allowed.`);
|
|
2011
|
+
if (t.some((s) => s.includes(" ")))
|
|
2550
2012
|
throw new Error(
|
|
2551
|
-
`Invalid command path "${
|
|
2013
|
+
`Invalid command path "${n}". Use dot-delimited words (e.g. "user.show").`
|
|
2552
2014
|
);
|
|
2553
|
-
return
|
|
2015
|
+
return t.map((s) => ({
|
|
2554
2016
|
type: "word",
|
|
2555
|
-
name:
|
|
2017
|
+
name: s
|
|
2556
2018
|
}));
|
|
2557
2019
|
}
|
|
2558
|
-
function
|
|
2559
|
-
return
|
|
2020
|
+
function dt(n) {
|
|
2021
|
+
return n.flatMap((e) => e.type === "argument" ? [e.name] : []);
|
|
2560
2022
|
}
|
|
2561
|
-
function
|
|
2562
|
-
const e =
|
|
2563
|
-
return async (
|
|
2564
|
-
const
|
|
2023
|
+
function mt(n) {
|
|
2024
|
+
const e = dt(n.segments);
|
|
2025
|
+
return async (t) => {
|
|
2026
|
+
const s = e.reduce((r, a, o) => (r[a] = t[o], r), {});
|
|
2565
2027
|
return Promise.resolve(
|
|
2566
|
-
|
|
2567
|
-
rawArgs:
|
|
2568
|
-
namedArgs:
|
|
2569
|
-
commandPath:
|
|
2028
|
+
n.handler({
|
|
2029
|
+
rawArgs: t,
|
|
2030
|
+
namedArgs: s,
|
|
2031
|
+
commandPath: n.path
|
|
2570
2032
|
})
|
|
2571
2033
|
);
|
|
2572
2034
|
};
|
|
2573
2035
|
}
|
|
2574
|
-
function
|
|
2575
|
-
return new
|
|
2036
|
+
function Ct(n) {
|
|
2037
|
+
return new ct(n);
|
|
2576
2038
|
}
|
|
2577
|
-
function
|
|
2578
|
-
|
|
2039
|
+
function ut(n, e) {
|
|
2040
|
+
n.addCommand(
|
|
2579
2041
|
e.segments,
|
|
2580
2042
|
e.description,
|
|
2581
|
-
|
|
2043
|
+
mt(e)
|
|
2582
2044
|
);
|
|
2583
2045
|
}
|
|
2584
|
-
function
|
|
2585
|
-
return e.forEach((
|
|
2046
|
+
function pt(n, e) {
|
|
2047
|
+
return e.forEach((t) => ut(n, t)), n;
|
|
2586
2048
|
}
|
|
2587
|
-
function
|
|
2049
|
+
function vt(n) {
|
|
2588
2050
|
const e = new X();
|
|
2589
|
-
return
|
|
2051
|
+
return pt(e, n);
|
|
2590
2052
|
}
|
|
2591
|
-
function
|
|
2592
|
-
return new Y(
|
|
2053
|
+
function St(n) {
|
|
2054
|
+
return new Y(n);
|
|
2593
2055
|
}
|
|
2594
|
-
function
|
|
2595
|
-
return new
|
|
2056
|
+
function xt(n) {
|
|
2057
|
+
return new ze(n);
|
|
2596
2058
|
}
|
|
2597
|
-
function
|
|
2598
|
-
return new
|
|
2059
|
+
function bt(n, e = "") {
|
|
2060
|
+
return new Fe(n, e);
|
|
2599
2061
|
}
|
|
2600
|
-
function
|
|
2601
|
-
return new
|
|
2062
|
+
function kt(n) {
|
|
2063
|
+
return new we(n);
|
|
2602
2064
|
}
|
|
2603
2065
|
export {
|
|
2604
|
-
|
|
2066
|
+
wt as Citadel,
|
|
2605
2067
|
X as CommandRegistry,
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2068
|
+
W as CommandResult,
|
|
2069
|
+
q as CommandStatus,
|
|
2070
|
+
Qe as DEFAULT_CURSOR_CONFIGS,
|
|
2071
|
+
we as ErrorCommandResult,
|
|
2072
|
+
Fe as ImageCommandResult,
|
|
2073
|
+
ze as JsonCommandResult,
|
|
2074
|
+
oe as OutputItem,
|
|
2075
|
+
De as PendingCommandResult,
|
|
2614
2076
|
Y as TextCommandResult,
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2077
|
+
Ct as command,
|
|
2078
|
+
vt as createCommandRegistry,
|
|
2079
|
+
kt as error,
|
|
2080
|
+
bt as image,
|
|
2081
|
+
xt as json,
|
|
2082
|
+
ut as registerCommand,
|
|
2083
|
+
pt as registerCommands,
|
|
2084
|
+
St as text
|
|
2623
2085
|
};
|