koneck 2.51.0 → 2.52.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.js +28 -4
- package/dist/browser.js.map +1 -1
- package/dist/highlight-web.d.ts +26 -0
- package/dist/highlight-web.d.ts.map +1 -0
- package/dist/highlight-web.js +96 -0
- package/dist/highlight-web.js.map +1 -0
- package/dist/highlight.d.ts.map +1 -1
- package/dist/highlight.js +37 -0
- package/dist/highlight.js.map +1 -1
- package/dist/web/api.d.ts.map +1 -1
- package/dist/web/api.js +29 -2
- package/dist/web/api.js.map +1 -1
- package/dist/web/sessions.d.ts +4 -0
- package/dist/web/sessions.d.ts.map +1 -1
- package/dist/web/sessions.js +35 -2
- package/dist/web/sessions.js.map +1 -1
- package/dist/web/ui-client.d.ts.map +1 -1
- package/dist/web/ui-client.js +164 -6
- package/dist/web/ui-client.js.map +1 -1
- package/dist/web/ui-css.d.ts.map +1 -1
- package/dist/web/ui-css.js +39 -0
- package/dist/web/ui-css.js.map +1 -1
- package/package.json +1 -1
package/dist/web/ui-client.js
CHANGED
|
@@ -2865,7 +2865,8 @@ function toolWrites(name) {
|
|
|
2865
2865
|
* wrong file.
|
|
2866
2866
|
*/
|
|
2867
2867
|
function targetOf(e) {
|
|
2868
|
-
const out = { path: null, lines: [], needle: null, command: null, url: null
|
|
2868
|
+
const out = { path: null, lines: [], needle: null, command: null, url: null,
|
|
2869
|
+
content: null, before: null };
|
|
2869
2870
|
let parsed = null;
|
|
2870
2871
|
try { parsed = e.args ? JSON.parse(e.args) : null; } catch (err) { parsed = null; }
|
|
2871
2872
|
/*
|
|
@@ -2897,6 +2898,18 @@ function targetOf(e) {
|
|
|
2897
2898
|
if (typeof parsed.pattern === 'string') out.needle = parsed.pattern;
|
|
2898
2899
|
if (typeof parsed.search === 'string') out.needle = parsed.search;
|
|
2899
2900
|
if (typeof parsed.command === 'string') out.command = parsed.command;
|
|
2901
|
+
/*
|
|
2902
|
+
* What a write is about to write, from the call itself.
|
|
2903
|
+
*
|
|
2904
|
+
* The panel used to wait for the tool to finish and then re-read the file from disk, so the
|
|
2905
|
+
* code appeared in the chat as it streamed and in the panel only afterwards. The content is
|
|
2906
|
+
* in the arguments the moment the call starts; showing it then is the difference between
|
|
2907
|
+
* watching work happen and being told about it later.
|
|
2908
|
+
*/
|
|
2909
|
+
for (const key of ['content', 'text', 'new_string', 'replacement', 'body']) {
|
|
2910
|
+
if (typeof parsed[key] === 'string') { out.content = parsed[key]; break; }
|
|
2911
|
+
}
|
|
2912
|
+
if (typeof parsed.old_string === 'string') out.before = parsed.old_string;
|
|
2900
2913
|
}
|
|
2901
2914
|
if (!out.path && !out.command && e.detail && /[./]/.test(e.detail) && !/\s/.test(e.detail.trim())) {
|
|
2902
2915
|
out.path = e.detail.trim();
|
|
@@ -2985,6 +2998,16 @@ function drawTrail(activeLabel) {
|
|
|
2985
2998
|
drawTrail(t.label);
|
|
2986
2999
|
return;
|
|
2987
3000
|
}
|
|
3001
|
+
// A call with nothing to open is still worth walking back to: what was asked, and how it
|
|
3002
|
+
// went. Without this the chip was there and clicking it did nothing.
|
|
3003
|
+
if (t.kind === 'call') {
|
|
3004
|
+
watchHead(t.verb, t.detail || t.name || t.label);
|
|
3005
|
+
stopWatchClock();
|
|
3006
|
+
drawCall({ name: t.name || t.label, args: t.args, detail: t.detail, ok: t.ok },
|
|
3007
|
+
t.ok !== undefined, t.verb);
|
|
3008
|
+
drawTrail(t.label);
|
|
3009
|
+
return;
|
|
3010
|
+
}
|
|
2988
3011
|
follow.path = t.path;
|
|
2989
3012
|
follow.attention = t.lines || [];
|
|
2990
3013
|
follow.needle = t.needle || null;
|
|
@@ -3046,7 +3069,27 @@ function watchTool(e, done) {
|
|
|
3046
3069
|
command: t.command, lines: follow.output, ok: done ? e.ok !== false : undefined });
|
|
3047
3070
|
return;
|
|
3048
3071
|
}
|
|
3049
|
-
|
|
3072
|
+
/*
|
|
3073
|
+
* Everything else still shows, rather than nothing.
|
|
3074
|
+
*
|
|
3075
|
+
* The panel returned here for any call that named no file, no command and no page — a search
|
|
3076
|
+
* across the tree, a tool lookup, a plan update, a sub-agent — so the one place meant to show
|
|
3077
|
+
* what the agent is doing went silent for a whole class of work, and the only evidence was a
|
|
3078
|
+
* line in the chat. A panel that shows some of the work is one you cannot trust to be showing
|
|
3079
|
+
* all of it.
|
|
3080
|
+
*/
|
|
3081
|
+
if (!t.path) {
|
|
3082
|
+
follow.kind = 'call';
|
|
3083
|
+
follow.verb = verb;
|
|
3084
|
+
$('watch').hidden = false;
|
|
3085
|
+
watchHead(verb, e.detail || e.name);
|
|
3086
|
+
drawCall(e, done, verb);
|
|
3087
|
+
trailPush({ label: e.name, verb, kind: 'call', name: e.name,
|
|
3088
|
+
args: e.args || '', detail: e.detail || '',
|
|
3089
|
+
ok: done ? e.ok !== false : undefined });
|
|
3090
|
+
if (done) stopWatchClock();
|
|
3091
|
+
return;
|
|
3092
|
+
}
|
|
3050
3093
|
|
|
3051
3094
|
follow.path = t.path;
|
|
3052
3095
|
follow.attention = t.lines;
|
|
@@ -3058,10 +3101,93 @@ function watchTool(e, done) {
|
|
|
3058
3101
|
trailPush({ label: t.path.split('/').pop() || t.path, verb, kind: follow.kind, path: t.path,
|
|
3059
3102
|
lines: t.lines, needle: t.needle, ok: done ? e.ok !== false : undefined });
|
|
3060
3103
|
|
|
3104
|
+
/*
|
|
3105
|
+
* A write shows what it is writing, now, not after it lands.
|
|
3106
|
+
*
|
|
3107
|
+
* Waiting for the call to finish and re-reading from disk meant the code scrolled past in the
|
|
3108
|
+
* chat while the panel showed the old file — the one place asked to show the work was the last
|
|
3109
|
+
* to know about it. When the call carries its content, that content is painted straight away
|
|
3110
|
+
* and the diff replaces it once the write is done.
|
|
3111
|
+
*/
|
|
3112
|
+
if (!done && t.content !== null && toolWrites(e.name)) {
|
|
3113
|
+
void drawWriting(t.path, t.content, t.before);
|
|
3114
|
+
return;
|
|
3115
|
+
}
|
|
3116
|
+
|
|
3061
3117
|
if (follow.busy) { follow.pending = [t.path, follow.kind === 'diff']; return; }
|
|
3062
3118
|
void showWatched(t.path, follow.kind === 'diff');
|
|
3063
3119
|
}
|
|
3064
3120
|
|
|
3121
|
+
/**
|
|
3122
|
+
* A tool call with nothing to open: shown as what was asked and what came back.
|
|
3123
|
+
*
|
|
3124
|
+
* Arguments pretty-printed when they are JSON, because a single line of dense JSON is not a thing
|
|
3125
|
+
* anybody reads. The point is that no call is invisible — if the agent did it, it is here.
|
|
3126
|
+
*/
|
|
3127
|
+
function drawCall(e, done, verb) {
|
|
3128
|
+
const host = $('wbody');
|
|
3129
|
+
host.innerHTML = '';
|
|
3130
|
+
|
|
3131
|
+
const head = el('div', 'callhead');
|
|
3132
|
+
head.appendChild(el('span', 'callverb', verb));
|
|
3133
|
+
head.appendChild(el('span', 'callname', e.name));
|
|
3134
|
+
if (done) {
|
|
3135
|
+
head.appendChild(el('span', e.ok === false ? 'callbad' : 'callok',
|
|
3136
|
+
e.ok === false ? 'failed' : 'done' + (e.ms ? ' in ' + e.ms + 'ms' : '')));
|
|
3137
|
+
} else {
|
|
3138
|
+
head.appendChild(el('span', 'callrun', 'running'));
|
|
3139
|
+
}
|
|
3140
|
+
host.appendChild(head);
|
|
3141
|
+
|
|
3142
|
+
if (e.detail) host.appendChild(el('div', 'calldetail', e.detail));
|
|
3143
|
+
|
|
3144
|
+
const shown = prettyArgs(e.args);
|
|
3145
|
+
if (shown) {
|
|
3146
|
+
host.appendChild(el('div', 'calllabel', 'arguments'));
|
|
3147
|
+
const pre = el('pre', 'callargs');
|
|
3148
|
+
pre.textContent = shown;
|
|
3149
|
+
host.appendChild(pre);
|
|
3150
|
+
}
|
|
3151
|
+
if (follow.output && follow.output.length) {
|
|
3152
|
+
host.appendChild(el('div', 'calllabel', 'output'));
|
|
3153
|
+
const pre = el('pre', 'callargs');
|
|
3154
|
+
pre.textContent = follow.output.join('\n').slice(-6000);
|
|
3155
|
+
host.appendChild(pre);
|
|
3156
|
+
}
|
|
3157
|
+
}
|
|
3158
|
+
|
|
3159
|
+
/** JSON arguments as something readable, or the raw string when they are not JSON. */
|
|
3160
|
+
function prettyArgs(args) {
|
|
3161
|
+
if (!args) return '';
|
|
3162
|
+
try {
|
|
3163
|
+
const parsed = JSON.parse(args);
|
|
3164
|
+
if (parsed && typeof parsed === 'object') return JSON.stringify(parsed, null, 2).slice(0, 8000);
|
|
3165
|
+
} catch (e) { /* not JSON, show it as it came */ }
|
|
3166
|
+
return String(args).slice(0, 8000);
|
|
3167
|
+
}
|
|
3168
|
+
|
|
3169
|
+
/** Paints the content a write is carrying, coloured for the file it is going into. */
|
|
3170
|
+
async function drawWriting(path, content, before) {
|
|
3171
|
+
const host = $('wbody');
|
|
3172
|
+
host.innerHTML = '';
|
|
3173
|
+
const head = el('div', 'wempty');
|
|
3174
|
+
head.style.padding = '8px 13px';
|
|
3175
|
+
const lines = content.split('\n').length;
|
|
3176
|
+
head.textContent = (before ? 'replacing ' + before.split('\n').length + ' lines with ' : 'writing ')
|
|
3177
|
+
+ lines + (lines === 1 ? ' line' : ' lines');
|
|
3178
|
+
host.appendChild(head);
|
|
3179
|
+
|
|
3180
|
+
let tokens = null;
|
|
3181
|
+
// Coloured by the same highlighter the file view uses, asked for by extension alone.
|
|
3182
|
+
try {
|
|
3183
|
+
const out = await api('/api/highlight', { method: 'POST',
|
|
3184
|
+
body: JSON.stringify({ path: path, text: content }) });
|
|
3185
|
+
tokens = out.tokens;
|
|
3186
|
+
} catch (e) { /* colour is a bonus; the code is the point */ }
|
|
3187
|
+
host.appendChild(drawCode(content, [], null, tokens));
|
|
3188
|
+
host.scrollTop = host.scrollHeight;
|
|
3189
|
+
}
|
|
3190
|
+
|
|
3065
3191
|
/** A line of a running command, as it arrives. */
|
|
3066
3192
|
function watchOutput(line) {
|
|
3067
3193
|
if (!follow.on || follow.kind !== 'term') return;
|
|
@@ -3109,7 +3235,36 @@ function drawTerm(verb, command, lines, finished, ok) {
|
|
|
3109
3235
|
* The gutter and the source are separate columns, so a highlight has to be applied to both or the
|
|
3110
3236
|
* numbers and the tint drift apart the moment a line wraps — which is why neither column wraps.
|
|
3111
3237
|
*/
|
|
3112
|
-
|
|
3238
|
+
/*
|
|
3239
|
+
* Paints one line from the tokens the server sent, or as plain text when it sent none.
|
|
3240
|
+
*
|
|
3241
|
+
* textContent for every piece, so a file that contains markup is shown as a file that contains
|
|
3242
|
+
* markup rather than becoming part of this page.
|
|
3243
|
+
*/
|
|
3244
|
+
function paintTokens(row, tokens, needle) {
|
|
3245
|
+
let painted = false;
|
|
3246
|
+
for (const t of tokens) {
|
|
3247
|
+
if (!t || !t.text) continue;
|
|
3248
|
+
// The exact text a pattern matched still wins, inside whatever colour it fell in.
|
|
3249
|
+
const at = needle ? t.text.indexOf(needle) : -1;
|
|
3250
|
+
if (at !== -1) {
|
|
3251
|
+
if (at > 0) row.appendChild(el('span', t.kind ? 'k-' + t.kind.split(' ').join(' k-') : null,
|
|
3252
|
+
t.text.slice(0, at)));
|
|
3253
|
+
row.appendChild(el('span', 'hit', needle));
|
|
3254
|
+
const rest = t.text.slice(at + needle.length);
|
|
3255
|
+
if (rest) row.appendChild(el('span', t.kind ? 'k-' + t.kind.split(' ').join(' k-') : null,
|
|
3256
|
+
rest));
|
|
3257
|
+
} else if (t.kind) {
|
|
3258
|
+
row.appendChild(el('span', 'k-' + t.kind.split(' ').join(' k-'), t.text));
|
|
3259
|
+
} else {
|
|
3260
|
+
row.appendChild(document.createTextNode(t.text));
|
|
3261
|
+
}
|
|
3262
|
+
painted = true;
|
|
3263
|
+
}
|
|
3264
|
+
return painted;
|
|
3265
|
+
}
|
|
3266
|
+
|
|
3267
|
+
function drawCode(text, attention, needle, tokens) {
|
|
3113
3268
|
const lines = text.split('\n');
|
|
3114
3269
|
const hot = new Set(attention || []);
|
|
3115
3270
|
const code = el('div', 'rows');
|
|
@@ -3133,9 +3288,12 @@ function drawCode(text, attention, needle) {
|
|
|
3133
3288
|
|
|
3134
3289
|
const one = lines[i];
|
|
3135
3290
|
const row = el('div', marked ? 'on' : null);
|
|
3136
|
-
//
|
|
3291
|
+
// Coloured, when the server sent colours for this line.
|
|
3137
3292
|
let did = false;
|
|
3138
|
-
|
|
3293
|
+
const forLine = tokens && tokens[i];
|
|
3294
|
+
if (forLine && forLine.length) did = paintTokens(row, forLine, needle);
|
|
3295
|
+
// The exact text a pattern matched, inside the line — the finest grain the tool gives us.
|
|
3296
|
+
if (!did && needle && one) {
|
|
3139
3297
|
const at = one.indexOf(needle);
|
|
3140
3298
|
if (at !== -1) {
|
|
3141
3299
|
row.appendChild(document.createTextNode(one.slice(0, at)));
|
|
@@ -3187,7 +3345,7 @@ async function showWatched(path, asDiff) {
|
|
|
3187
3345
|
host.appendChild(el('div', 'wempty', 'Binary file — nothing to show as text.'));
|
|
3188
3346
|
return;
|
|
3189
3347
|
}
|
|
3190
|
-
host.appendChild(drawCode(data.text, follow.attention, follow.needle));
|
|
3348
|
+
host.appendChild(drawCode(data.text, follow.attention, follow.needle, data.tokens));
|
|
3191
3349
|
// Put the region being read in the middle of the panel, which is the point of knowing it.
|
|
3192
3350
|
const first = host.querySelector('.src .on');
|
|
3193
3351
|
if (first) first.scrollIntoView({ block: 'center' });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui-client.js","sourceRoot":"","sources":["../../src/web/ui-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,YAAY;IAC1B,OAAO,MAAM,CAAC,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"ui-client.js","sourceRoot":"","sources":["../../src/web/ui-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,YAAY;IAC1B,OAAO,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmqHlB,CAAC;AACF,CAAC"}
|
package/dist/web/ui-css.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui-css.d.ts","sourceRoot":"","sources":["../../src/web/ui-css.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,wBAAgB,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"ui-css.d.ts","sourceRoot":"","sources":["../../src/web/ui-css.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,wBAAgB,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CA45B3C"}
|
package/dist/web/ui-css.js
CHANGED
|
@@ -18,6 +18,8 @@ export function css(markUrl) {
|
|
|
18
18
|
--bg:#f7f9fa; --panel:#ffffff; --panel-2:#eef2f4; --line:#d5dee2; --line-2:#c3d0d6;
|
|
19
19
|
--ink:#0f1c22; --muted:#4a606b; --dim:#6b8390;
|
|
20
20
|
--cyan:#0d7f92; --cyan-ink:#ffffff; --amber:#8a5a00; --green:#0f7a4a; --red:#b4232a;
|
|
21
|
+
/* Code colours, one per terminal colour the highlighter uses. */
|
|
22
|
+
--blue:#1b5fa8; --yellow:#8a5a00; --magenta:#8a3b9e;
|
|
21
23
|
--violet:#6d4bc4;
|
|
22
24
|
--add-bg:#e4f6ea; --add-ink:#0d5c37; --del-bg:#fdeaea; --del-ink:#8f1c22;
|
|
23
25
|
/* The region a tool is reading, and the exact text it matched inside that region. */
|
|
@@ -34,6 +36,7 @@ export function css(markUrl) {
|
|
|
34
36
|
--bg:#0d1418; --panel:#131e24; --panel-2:#1a2932; --line:#24363f; --line-2:#2f454f;
|
|
35
37
|
--ink:#e6f1f5; --muted:#93aab5; --dim:#6f8894;
|
|
36
38
|
--cyan:#4dd6e8; --cyan-ink:#04181c; --amber:#e8b04d; --green:#57d99a; --red:#ef767b;
|
|
39
|
+
--blue:#6fb2ff; --yellow:#e8b04d; --magenta:#d79bec;
|
|
37
40
|
--violet:#b39cfb;
|
|
38
41
|
--add-bg:#0f2a1e; --add-ink:#7ee0a7; --del-bg:#2b1416; --del-ink:#f4a3a6;
|
|
39
42
|
--attn-bg:#10222c; --attn-hit:#1c3f52;
|
|
@@ -49,6 +52,7 @@ export function css(markUrl) {
|
|
|
49
52
|
--bg:#0d1418; --panel:#131e24; --panel-2:#1a2932; --line:#24363f; --line-2:#2f454f;
|
|
50
53
|
--ink:#e6f1f5; --muted:#93aab5; --dim:#6f8894;
|
|
51
54
|
--cyan:#4dd6e8; --cyan-ink:#04181c; --amber:#e8b04d; --green:#57d99a; --red:#ef767b;
|
|
55
|
+
--blue:#6fb2ff; --yellow:#e8b04d; --magenta:#d79bec;
|
|
52
56
|
--violet:#b39cfb;
|
|
53
57
|
--add-bg:#0f2a1e; --add-ink:#7ee0a7; --del-bg:#2b1416; --del-ink:#f4a3a6;
|
|
54
58
|
--shadow:0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.3);
|
|
@@ -643,6 +647,41 @@ dialog:has(.dlg.wide){max-width:560px}
|
|
|
643
647
|
.rows .src{flex:1 1 auto;padding:10px 0 10px 14px;min-width:0;overflow-x:auto;tab-size:4}
|
|
644
648
|
.rows .gut > div,.rows .src > div{white-space:pre;height:1.5em}
|
|
645
649
|
.rows .gut > div.on{color:var(--cyan);background:var(--attn-bg)}
|
|
650
|
+
|
|
651
|
+
/* A tool call with nothing to open — what was asked, and how it went. */
|
|
652
|
+
.callhead{display:flex;align-items:center;gap:8px;padding:9px 13px;border-bottom:1px solid var(--line-2)}
|
|
653
|
+
.callverb{color:var(--cyan);font-size:12px;text-transform:lowercase}
|
|
654
|
+
.callname{font-family:var(--mono);font-size:12px;color:var(--fg)}
|
|
655
|
+
.callok{margin-left:auto;color:var(--green);font-size:11px}
|
|
656
|
+
.callbad{margin-left:auto;color:var(--red);font-size:11px}
|
|
657
|
+
.callrun{margin-left:auto;color:var(--muted);font-size:11px}
|
|
658
|
+
.calldetail{padding:8px 13px 0;color:var(--muted);font-size:12px;word-break:break-word}
|
|
659
|
+
.calllabel{padding:11px 13px 4px;color:var(--dim);font-size:10.5px;text-transform:uppercase;
|
|
660
|
+
letter-spacing:.06em}
|
|
661
|
+
.callargs{margin:0;padding:0 13px 12px;font-family:var(--mono);font-size:11.5px;line-height:1.55;
|
|
662
|
+
color:var(--muted);white-space:pre-wrap;word-break:break-word}
|
|
663
|
+
|
|
664
|
+
/*
|
|
665
|
+
* Code, coloured the way the terminal colours it.
|
|
666
|
+
*
|
|
667
|
+
* The names come from the CLI's own highlighter — the same function, read back through its ANSI
|
|
668
|
+
* output — so there is one set of language rules rather than two that drift. These map the eight
|
|
669
|
+
* terminal colours onto the theme, which is why a comment here reads the same weight as a comment
|
|
670
|
+
* there rather than merely being "some grey".
|
|
671
|
+
*/
|
|
672
|
+
.k-blue{color:var(--blue)}
|
|
673
|
+
.k-green{color:var(--green)}
|
|
674
|
+
.k-cyan{color:var(--cyan)}
|
|
675
|
+
.k-yellow{color:var(--yellow)}
|
|
676
|
+
.k-magenta{color:var(--magenta)}
|
|
677
|
+
.k-red{color:var(--red)}
|
|
678
|
+
.k-gray{color:var(--muted)}
|
|
679
|
+
.k-white{color:var(--fg)}
|
|
680
|
+
.k-black{color:var(--muted)}
|
|
681
|
+
.k-bold{font-weight:600}
|
|
682
|
+
.k-dim{opacity:.72}
|
|
683
|
+
.k-italic{font-style:italic}
|
|
684
|
+
.k-underline{text-decoration:underline}
|
|
646
685
|
.rows .src > div.on{background:var(--attn-bg);box-shadow:inset 2px 0 0 var(--cyan)}
|
|
647
686
|
.rows .src .hit{background:var(--attn-hit);border-radius:2px}
|
|
648
687
|
|
package/dist/web/ui-css.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui-css.js","sourceRoot":"","sources":["../../src/web/ui-css.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,GAAG,CAAC,OAAe;IACjC,OAAO
|
|
1
|
+
{"version":3,"file":"ui-css.js","sourceRoot":"","sources":["../../src/web/ui-css.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,GAAG,CAAC,OAAe;IACjC,OAAO;;;;;;;;;;;;;;;;;gBAiBO,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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