@nocturnium/svelte-ide 1.0.3 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ai/AIPanel.svelte +6 -1
- package/dist/components/ai/AIToolCallDisplay.svelte +1 -1
- package/dist/components/core/Avatar.svelte +14 -14
- package/dist/components/core/Badge.svelte +2 -2
- package/dist/components/core/Button.svelte +2 -2
- package/dist/components/editor/AIFocusLayer.svelte +3 -3
- package/dist/components/editor/CognitiveLoadMeter.svelte +15 -15
- package/dist/components/editor/CommandPalette.svelte +17 -17
- package/dist/components/editor/ComplexityLayer.svelte +6 -6
- package/dist/components/editor/ConflictZoneLayer.svelte +8 -8
- package/dist/components/editor/ContextLens.svelte +16 -10
- package/dist/components/editor/EchoCursorLayer.svelte +43 -11
- package/dist/components/editor/FileIcon.svelte +2 -1
- package/dist/components/editor/GhostBracketLayer.svelte +38 -25
- package/dist/components/editor/GitBlameLayer.svelte +8 -8
- package/dist/components/editor/InlineDiffLayer.svelte +12 -12
- package/dist/components/editor/PluginPreviewSandbox.svelte +21 -21
- package/dist/components/editor/SnippetPalette.svelte +21 -21
- package/dist/components/editor/StructureMap.svelte +47 -30
- package/dist/components/editor/TimelineScrubber.svelte +11 -11
- package/dist/components/editor/core/complexity-analyzer.d.ts +4 -0
- package/dist/components/editor/core/complexity-analyzer.js +45 -8
- package/dist/components/editor/core/diagnostics.js +4 -4
- package/dist/components/editor/core/semantic-analyzer.js +13 -1
- package/dist/components/editor/core/structure-layout.d.ts +31 -0
- package/dist/components/editor/core/structure-layout.js +64 -0
- package/dist/services/mock-ai.js +1 -1
- package/dist/stores/ai.svelte.js +1 -1
- package/dist/styles/theme.css +24 -0
- package/package.json +1 -1
|
@@ -208,7 +208,9 @@
|
|
|
208
208
|
<Icon name="sparkles" size={16} />
|
|
209
209
|
<span>AI Assistant</span>
|
|
210
210
|
</div>
|
|
211
|
-
<span class="ai-panel__mock-badge"
|
|
211
|
+
<span class="ai-panel__mock-badge" title="Demo mock - no real model"
|
|
212
|
+
>Demo mock - no real model</span
|
|
213
|
+
>
|
|
212
214
|
</div>
|
|
213
215
|
<div class="ai-panel__actions">
|
|
214
216
|
<Button variant="ghost" size="xs" onclick={handleNewConversation} title="New conversation">
|
|
@@ -355,6 +357,8 @@
|
|
|
355
357
|
display: inline-flex;
|
|
356
358
|
align-items: center;
|
|
357
359
|
min-width: 0;
|
|
360
|
+
max-width: 100%;
|
|
361
|
+
overflow: hidden;
|
|
358
362
|
padding: 0.125rem var(--ide-spacing-sm);
|
|
359
363
|
border: 1px solid color-mix(in srgb, var(--ide-accent) 40%, var(--ide-border));
|
|
360
364
|
border-radius: var(--ide-radius-full);
|
|
@@ -363,6 +367,7 @@
|
|
|
363
367
|
font-size: var(--ide-font-size-xs);
|
|
364
368
|
font-weight: 500;
|
|
365
369
|
line-height: var(--ide-line-height-normal);
|
|
370
|
+
text-overflow: ellipsis;
|
|
366
371
|
white-space: nowrap;
|
|
367
372
|
}
|
|
368
373
|
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
startedAt?: Date;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
let { toolCall, status = '
|
|
14
|
+
let { toolCall, status = 'pending', result, error, duration, startedAt }: Props = $props();
|
|
15
15
|
|
|
16
16
|
let expanded = $state(false);
|
|
17
17
|
let showResult = $state(false);
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import Icon from './Icon.svelte';
|
|
3
|
+
|
|
2
4
|
interface Props {
|
|
3
5
|
name: string;
|
|
4
6
|
src?: string;
|
|
@@ -45,7 +47,10 @@
|
|
|
45
47
|
}
|
|
46
48
|
|
|
47
49
|
const initials = $derived(getInitials(name));
|
|
48
|
-
|
|
50
|
+
// Default AI tint is the conversational "assistant" hue. Collaboration/presence
|
|
51
|
+
// call sites (cursors, locks) pass an explicit `--ide-collab-ai` color instead.
|
|
52
|
+
const bgColor = $derived(color ?? (isAI ? 'var(--ide-ai-assistant)' : 'var(--ide-interactive)'));
|
|
53
|
+
const aiGlyphSize = $derived(Math.round(parseInt(sizeMap[size], 10) * 0.58));
|
|
49
54
|
</script>
|
|
50
55
|
|
|
51
56
|
<div
|
|
@@ -60,12 +65,11 @@
|
|
|
60
65
|
>
|
|
61
66
|
{#if src}
|
|
62
67
|
<img class="ide-avatar__img" {src} alt={name} />
|
|
68
|
+
{:else if isAI}
|
|
69
|
+
<span class="ide-avatar__ai-glyph"><Icon name="sparkles" size={aiGlyphSize} /></span>
|
|
63
70
|
{:else}
|
|
64
71
|
<span class="ide-avatar__initials">{initials}</span>
|
|
65
72
|
{/if}
|
|
66
|
-
{#if isAI}
|
|
67
|
-
<span class="ide-avatar__ai-badge">AI</span>
|
|
68
|
-
{/if}
|
|
69
73
|
</div>
|
|
70
74
|
|
|
71
75
|
<style>
|
|
@@ -96,15 +100,11 @@
|
|
|
96
100
|
line-height: 1;
|
|
97
101
|
}
|
|
98
102
|
|
|
99
|
-
.ide-avatar__ai-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
font-weight: 700;
|
|
106
|
-
background: var(--ide-collab-ai);
|
|
107
|
-
border-radius: var(--ide-radius-sm);
|
|
108
|
-
border: 1px solid var(--ide-bg-primary);
|
|
103
|
+
.ide-avatar__ai-glyph {
|
|
104
|
+
display: inline-flex;
|
|
105
|
+
align-items: center;
|
|
106
|
+
justify-content: center;
|
|
107
|
+
line-height: 0;
|
|
108
|
+
color: white;
|
|
109
109
|
}
|
|
110
110
|
</style>
|
|
@@ -62,8 +62,8 @@
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
.ide-badge--primary {
|
|
65
|
-
background: color-mix(in srgb, var(--ide-
|
|
66
|
-
color: var(--ide-
|
|
65
|
+
background: color-mix(in srgb, var(--ide-primary) 20%, transparent);
|
|
66
|
+
color: var(--ide-primary);
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
.ide-badge--success {
|
|
@@ -85,12 +85,12 @@
|
|
|
85
85
|
|
|
86
86
|
/* Variants */
|
|
87
87
|
.ide-button--primary {
|
|
88
|
-
background: var(--ide-
|
|
88
|
+
background: var(--ide-primary);
|
|
89
89
|
color: var(--ide-text-primary);
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
.ide-button--primary:hover:not(:disabled) {
|
|
93
|
-
background: var(--ide-
|
|
93
|
+
background: var(--ide-primary-hover);
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
.ide-button--secondary {
|
|
@@ -281,7 +281,7 @@
|
|
|
281
281
|
right: 8px;
|
|
282
282
|
top: 2px;
|
|
283
283
|
font-size: 10px;
|
|
284
|
-
color: var(--
|
|
284
|
+
color: var(--ide-text-muted, #a8c5d9);
|
|
285
285
|
opacity: 0.7;
|
|
286
286
|
}
|
|
287
287
|
|
|
@@ -401,7 +401,7 @@
|
|
|
401
401
|
gap: 4px;
|
|
402
402
|
padding: 2px 8px;
|
|
403
403
|
background: rgba(30, 30, 30, 0.95);
|
|
404
|
-
border: 1px solid var(--
|
|
404
|
+
border: 1px solid var(--ide-border, #a8c5d9);
|
|
405
405
|
border-radius: 4px;
|
|
406
406
|
font-size: 11px;
|
|
407
407
|
white-space: nowrap;
|
|
@@ -420,7 +420,7 @@
|
|
|
420
420
|
}
|
|
421
421
|
|
|
422
422
|
.ai-focus-layer__label-activity {
|
|
423
|
-
color: var(--
|
|
423
|
+
color: var(--ide-text-muted, #a8c5d9);
|
|
424
424
|
font-size: 10px;
|
|
425
425
|
max-width: 150px;
|
|
426
426
|
overflow: hidden;
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
|
|
28
28
|
let levelColor = $derived(
|
|
29
29
|
level === 'critical'
|
|
30
|
-
? 'var(--
|
|
30
|
+
? 'var(--ide-error, #ef4444)'
|
|
31
31
|
: level === 'high'
|
|
32
|
-
? 'var(--
|
|
32
|
+
? 'var(--ide-warning, #facc15)'
|
|
33
33
|
: level === 'medium'
|
|
34
|
-
? 'var(--
|
|
35
|
-
: 'var(--
|
|
34
|
+
? 'var(--ide-info, #60a5fa)'
|
|
35
|
+
: 'var(--ide-success, #4ade80)'
|
|
36
36
|
);
|
|
37
37
|
|
|
38
38
|
let levelLabel = $derived(
|
|
@@ -174,7 +174,7 @@
|
|
|
174
174
|
}
|
|
175
175
|
|
|
176
176
|
.cognitive-meter:focus-visible {
|
|
177
|
-
outline: 2px solid var(--
|
|
177
|
+
outline: 2px solid var(--ide-interactive-focus, #60a5fa);
|
|
178
178
|
outline-offset: 2px;
|
|
179
179
|
}
|
|
180
180
|
|
|
@@ -230,8 +230,8 @@
|
|
|
230
230
|
transform: translateX(-50%);
|
|
231
231
|
margin-bottom: 8px;
|
|
232
232
|
padding: 12px;
|
|
233
|
-
background-color: var(--
|
|
234
|
-
border: 1px solid var(--
|
|
233
|
+
background-color: var(--ide-bg-secondary, #1a2744);
|
|
234
|
+
border: 1px solid var(--ide-border, #a8c5d9);
|
|
235
235
|
border-radius: 8px;
|
|
236
236
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
|
237
237
|
min-width: 280px;
|
|
@@ -247,7 +247,7 @@
|
|
|
247
247
|
left: 50%;
|
|
248
248
|
transform: translateX(-50%);
|
|
249
249
|
border: 6px solid transparent;
|
|
250
|
-
border-top-color: var(--
|
|
250
|
+
border-top-color: var(--ide-border, #a8c5d9);
|
|
251
251
|
}
|
|
252
252
|
|
|
253
253
|
.cognitive-meter__tooltip-header {
|
|
@@ -256,12 +256,12 @@
|
|
|
256
256
|
align-items: center;
|
|
257
257
|
margin-bottom: 8px;
|
|
258
258
|
padding-bottom: 8px;
|
|
259
|
-
border-bottom: 1px solid var(--
|
|
259
|
+
border-bottom: 1px solid var(--ide-border, #a8c5d9);
|
|
260
260
|
}
|
|
261
261
|
|
|
262
262
|
.cognitive-meter__tooltip-title {
|
|
263
263
|
font-weight: 600;
|
|
264
|
-
color: var(--
|
|
264
|
+
color: var(--ide-text-primary, #f4f1e0);
|
|
265
265
|
}
|
|
266
266
|
|
|
267
267
|
.cognitive-meter__tooltip-score {
|
|
@@ -275,7 +275,7 @@
|
|
|
275
275
|
.cognitive-meter__tooltip-label {
|
|
276
276
|
display: block;
|
|
277
277
|
font-size: 11px;
|
|
278
|
-
color: var(--
|
|
278
|
+
color: var(--ide-text-muted, #a8c5d9);
|
|
279
279
|
margin-bottom: 4px;
|
|
280
280
|
text-transform: uppercase;
|
|
281
281
|
letter-spacing: 0.05em;
|
|
@@ -296,7 +296,7 @@
|
|
|
296
296
|
}
|
|
297
297
|
|
|
298
298
|
.cognitive-meter__tooltip-region-name {
|
|
299
|
-
color: var(--
|
|
299
|
+
color: var(--ide-text-primary, #f4f1e0);
|
|
300
300
|
overflow: hidden;
|
|
301
301
|
text-overflow: ellipsis;
|
|
302
302
|
white-space: nowrap;
|
|
@@ -304,13 +304,13 @@
|
|
|
304
304
|
}
|
|
305
305
|
|
|
306
306
|
.cognitive-meter__tooltip-region-score {
|
|
307
|
-
color: var(--
|
|
307
|
+
color: var(--ide-warning, #facc15);
|
|
308
308
|
font-weight: 600;
|
|
309
309
|
font-variant-numeric: tabular-nums;
|
|
310
310
|
}
|
|
311
311
|
|
|
312
312
|
.cognitive-meter__tooltip-more {
|
|
313
|
-
color: var(--
|
|
313
|
+
color: var(--ide-text-muted, #a8c5d9);
|
|
314
314
|
font-style: italic;
|
|
315
315
|
}
|
|
316
316
|
|
|
@@ -320,7 +320,7 @@
|
|
|
320
320
|
background-color: rgba(255, 255, 255, 0.05);
|
|
321
321
|
border-radius: 4px;
|
|
322
322
|
font-size: 11px;
|
|
323
|
-
color: var(--
|
|
323
|
+
color: var(--ide-text-muted, #a8c5d9);
|
|
324
324
|
line-height: 1.4;
|
|
325
325
|
}
|
|
326
326
|
</style>
|
|
@@ -257,8 +257,8 @@
|
|
|
257
257
|
width: 100%;
|
|
258
258
|
max-width: 600px;
|
|
259
259
|
max-height: 70vh;
|
|
260
|
-
background: var(--
|
|
261
|
-
border: 1px solid var(--
|
|
260
|
+
background: var(--ide-bg-secondary, #1a2744);
|
|
261
|
+
border: 1px solid var(--ide-border, #a8c5d9);
|
|
262
262
|
border-radius: 12px;
|
|
263
263
|
box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
|
|
264
264
|
display: flex;
|
|
@@ -271,13 +271,13 @@
|
|
|
271
271
|
align-items: center;
|
|
272
272
|
gap: 12px;
|
|
273
273
|
padding: 12px 16px;
|
|
274
|
-
border-bottom: 1px solid var(--
|
|
275
|
-
background: var(--
|
|
274
|
+
border-bottom: 1px solid var(--ide-border, #a8c5d9);
|
|
275
|
+
background: var(--ide-bg-elevated, #1a2744);
|
|
276
276
|
}
|
|
277
277
|
|
|
278
278
|
.command-palette__icon {
|
|
279
279
|
font-size: 18px;
|
|
280
|
-
color: var(--
|
|
280
|
+
color: var(--ide-text-muted, #a8c5d9);
|
|
281
281
|
}
|
|
282
282
|
|
|
283
283
|
.command-palette__input {
|
|
@@ -286,18 +286,18 @@
|
|
|
286
286
|
border: none;
|
|
287
287
|
outline: none;
|
|
288
288
|
font-size: 16px;
|
|
289
|
-
color: var(--
|
|
289
|
+
color: var(--ide-text-primary, #f4f1e0);
|
|
290
290
|
font-family: inherit;
|
|
291
291
|
}
|
|
292
292
|
|
|
293
293
|
.command-palette__input::placeholder {
|
|
294
|
-
color: var(--
|
|
294
|
+
color: var(--ide-text-muted, #a8c5d9);
|
|
295
295
|
}
|
|
296
296
|
|
|
297
297
|
.command-palette__close {
|
|
298
298
|
background: none;
|
|
299
299
|
border: none;
|
|
300
|
-
color: var(--
|
|
300
|
+
color: var(--ide-text-muted, #a8c5d9);
|
|
301
301
|
cursor: pointer;
|
|
302
302
|
font-size: 16px;
|
|
303
303
|
padding: 4px 8px;
|
|
@@ -307,7 +307,7 @@
|
|
|
307
307
|
|
|
308
308
|
.command-palette__close:hover {
|
|
309
309
|
background: rgba(255, 255, 255, 0.1);
|
|
310
|
-
color: var(--
|
|
310
|
+
color: var(--ide-text-primary, #f4f1e0);
|
|
311
311
|
}
|
|
312
312
|
|
|
313
313
|
.command-palette__content {
|
|
@@ -319,7 +319,7 @@
|
|
|
319
319
|
.command-palette__empty {
|
|
320
320
|
padding: 24px;
|
|
321
321
|
text-align: center;
|
|
322
|
-
color: var(--
|
|
322
|
+
color: var(--ide-text-muted, #a8c5d9);
|
|
323
323
|
}
|
|
324
324
|
|
|
325
325
|
.command-palette__group {
|
|
@@ -335,7 +335,7 @@
|
|
|
335
335
|
font-weight: 600;
|
|
336
336
|
text-transform: uppercase;
|
|
337
337
|
letter-spacing: 0.05em;
|
|
338
|
-
color: var(--
|
|
338
|
+
color: var(--ide-text-muted, #a8c5d9);
|
|
339
339
|
}
|
|
340
340
|
|
|
341
341
|
.command-palette__group-icon {
|
|
@@ -351,7 +351,7 @@
|
|
|
351
351
|
background: transparent;
|
|
352
352
|
border: none;
|
|
353
353
|
text-align: left;
|
|
354
|
-
color: var(--
|
|
354
|
+
color: var(--ide-text-primary, #f4f1e0);
|
|
355
355
|
cursor: pointer;
|
|
356
356
|
font-size: 14px;
|
|
357
357
|
transition: background 0.1s ease;
|
|
@@ -363,7 +363,7 @@
|
|
|
363
363
|
}
|
|
364
364
|
|
|
365
365
|
.command-palette__item--selected {
|
|
366
|
-
background: var(--
|
|
366
|
+
background: var(--ide-interactive, #4a8db7) !important;
|
|
367
367
|
color: #fff;
|
|
368
368
|
}
|
|
369
369
|
|
|
@@ -392,7 +392,7 @@
|
|
|
392
392
|
padding: 2px 6px;
|
|
393
393
|
background: rgba(255, 255, 255, 0.1);
|
|
394
394
|
border-radius: 4px;
|
|
395
|
-
color: var(--
|
|
395
|
+
color: var(--ide-text-muted, #a8c5d9);
|
|
396
396
|
}
|
|
397
397
|
|
|
398
398
|
.command-palette__item--selected .command-palette__item-shortcut {
|
|
@@ -405,8 +405,8 @@
|
|
|
405
405
|
justify-content: center;
|
|
406
406
|
gap: 24px;
|
|
407
407
|
padding: 10px 16px;
|
|
408
|
-
border-top: 1px solid var(--
|
|
409
|
-
background: var(--
|
|
408
|
+
border-top: 1px solid var(--ide-border, #a8c5d9);
|
|
409
|
+
background: var(--ide-bg-elevated, #1a2744);
|
|
410
410
|
}
|
|
411
411
|
|
|
412
412
|
.command-palette__hint {
|
|
@@ -414,7 +414,7 @@
|
|
|
414
414
|
align-items: center;
|
|
415
415
|
gap: 6px;
|
|
416
416
|
font-size: 11px;
|
|
417
|
-
color: var(--
|
|
417
|
+
color: var(--ide-text-muted, #a8c5d9);
|
|
418
418
|
}
|
|
419
419
|
|
|
420
420
|
.command-palette__hint kbd {
|
|
@@ -234,8 +234,8 @@
|
|
|
234
234
|
min-width: 200px;
|
|
235
235
|
max-width: 300px;
|
|
236
236
|
padding: 12px;
|
|
237
|
-
background: var(--
|
|
238
|
-
border: 1px solid var(--
|
|
237
|
+
background: var(--ide-bg-secondary, #1a2744);
|
|
238
|
+
border: 1px solid var(--ide-border, #a8c5d9);
|
|
239
239
|
border-radius: 8px;
|
|
240
240
|
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
|
|
241
241
|
font-size: 12px;
|
|
@@ -263,11 +263,11 @@
|
|
|
263
263
|
|
|
264
264
|
.complexity-tooltip__title {
|
|
265
265
|
font-weight: 600;
|
|
266
|
-
color: var(--
|
|
266
|
+
color: var(--ide-text-primary, #f4f1e0);
|
|
267
267
|
}
|
|
268
268
|
|
|
269
269
|
.complexity-tooltip__lines {
|
|
270
|
-
color: var(--
|
|
270
|
+
color: var(--ide-text-muted, #a8c5d9);
|
|
271
271
|
font-size: 11px;
|
|
272
272
|
margin-bottom: 8px;
|
|
273
273
|
}
|
|
@@ -276,7 +276,7 @@
|
|
|
276
276
|
padding: 8px;
|
|
277
277
|
background: rgba(255, 255, 255, 0.05);
|
|
278
278
|
border-radius: 4px;
|
|
279
|
-
color: var(--
|
|
279
|
+
color: var(--ide-text-secondary, #a8c5d9);
|
|
280
280
|
line-height: 1.4;
|
|
281
281
|
margin-bottom: 8px;
|
|
282
282
|
}
|
|
@@ -285,7 +285,7 @@
|
|
|
285
285
|
display: flex;
|
|
286
286
|
gap: 12px;
|
|
287
287
|
font-size: 10px;
|
|
288
|
-
color: var(--
|
|
288
|
+
color: var(--ide-text-muted, #a8c5d9);
|
|
289
289
|
}
|
|
290
290
|
|
|
291
291
|
.complexity-tooltip__factors span {
|
|
@@ -308,7 +308,7 @@
|
|
|
308
308
|
font-size: 10px;
|
|
309
309
|
font-weight: 600;
|
|
310
310
|
color: #fff;
|
|
311
|
-
border: 2px solid var(--
|
|
311
|
+
border: 2px solid var(--ide-bg-secondary, #1a2744);
|
|
312
312
|
margin-left: -8px;
|
|
313
313
|
}
|
|
314
314
|
|
|
@@ -344,8 +344,8 @@
|
|
|
344
344
|
min-width: 220px;
|
|
345
345
|
max-width: 300px;
|
|
346
346
|
padding: 12px;
|
|
347
|
-
background: var(--
|
|
348
|
-
border: 1px solid var(--
|
|
347
|
+
background: var(--ide-bg-secondary, #1a2744);
|
|
348
|
+
border: 1px solid var(--ide-border, #a8c5d9);
|
|
349
349
|
border-radius: 8px;
|
|
350
350
|
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
|
|
351
351
|
font-size: 12px;
|
|
@@ -372,14 +372,14 @@
|
|
|
372
372
|
|
|
373
373
|
.conflict-tooltip__title {
|
|
374
374
|
font-weight: 600;
|
|
375
|
-
color: var(--
|
|
375
|
+
color: var(--ide-text-primary, #f4f1e0);
|
|
376
376
|
}
|
|
377
377
|
|
|
378
378
|
.conflict-tooltip__region {
|
|
379
379
|
padding: 6px 8px;
|
|
380
380
|
background: rgba(255, 255, 255, 0.05);
|
|
381
381
|
border-radius: 4px;
|
|
382
|
-
color: var(--
|
|
382
|
+
color: var(--ide-text-secondary, #a8c5d9);
|
|
383
383
|
margin-bottom: 8px;
|
|
384
384
|
}
|
|
385
385
|
|
|
@@ -405,12 +405,12 @@
|
|
|
405
405
|
|
|
406
406
|
.conflict-tooltip__name {
|
|
407
407
|
flex: 1;
|
|
408
|
-
color: var(--
|
|
408
|
+
color: var(--ide-text-primary, #f4f1e0);
|
|
409
409
|
}
|
|
410
410
|
|
|
411
411
|
.conflict-tooltip__line {
|
|
412
412
|
font-size: 10px;
|
|
413
|
-
color: var(--
|
|
413
|
+
color: var(--ide-text-muted, #a8c5d9);
|
|
414
414
|
}
|
|
415
415
|
|
|
416
416
|
.ai-badge {
|
|
@@ -428,7 +428,7 @@
|
|
|
428
428
|
background: rgba(255, 200, 0, 0.1);
|
|
429
429
|
border-radius: 4px;
|
|
430
430
|
border-left: 2px solid #eab308;
|
|
431
|
-
color: var(--
|
|
431
|
+
color: var(--ide-text-secondary, #a8c5d9);
|
|
432
432
|
font-size: 11px;
|
|
433
433
|
line-height: 1.4;
|
|
434
434
|
}
|
|
@@ -205,13 +205,13 @@
|
|
|
205
205
|
align-items: center;
|
|
206
206
|
gap: 6px;
|
|
207
207
|
padding: 2px 8px;
|
|
208
|
-
background:
|
|
209
|
-
border: 1px solid var(--
|
|
208
|
+
background: color-mix(in srgb, var(--ide-bg-elevated) 95%, transparent);
|
|
209
|
+
border: 1px solid var(--ide-border);
|
|
210
210
|
border-radius: 4px;
|
|
211
211
|
font-size: 11px;
|
|
212
|
-
font-family: var(--font-mono
|
|
212
|
+
font-family: var(--ide-font-mono);
|
|
213
213
|
white-space: nowrap;
|
|
214
|
-
box-shadow:
|
|
214
|
+
box-shadow: var(--ide-shadow-md);
|
|
215
215
|
animation: lens-fade-in 0.15s ease-out;
|
|
216
216
|
}
|
|
217
217
|
|
|
@@ -227,19 +227,19 @@
|
|
|
227
227
|
}
|
|
228
228
|
|
|
229
229
|
.context-lens__item--function-header {
|
|
230
|
-
border-left: 3px solid
|
|
230
|
+
border-left: 3px solid var(--ide-syntax-function);
|
|
231
231
|
}
|
|
232
232
|
|
|
233
233
|
.context-lens__item--variable-type {
|
|
234
|
-
border-left: 3px solid
|
|
234
|
+
border-left: 3px solid var(--ide-syntax-keyword);
|
|
235
235
|
}
|
|
236
236
|
|
|
237
237
|
.context-lens__item--parameter-info {
|
|
238
|
-
border-left: 3px solid
|
|
238
|
+
border-left: 3px solid var(--ide-syntax-string);
|
|
239
239
|
}
|
|
240
240
|
|
|
241
241
|
.context-lens__item--return-type {
|
|
242
|
-
border-left: 3px solid
|
|
242
|
+
border-left: 3px solid var(--ide-syntax-number);
|
|
243
243
|
}
|
|
244
244
|
|
|
245
245
|
.context-lens__icon {
|
|
@@ -248,12 +248,18 @@
|
|
|
248
248
|
}
|
|
249
249
|
|
|
250
250
|
.context-lens__label {
|
|
251
|
-
color:
|
|
251
|
+
color: var(--ide-text-primary);
|
|
252
252
|
font-weight: 600;
|
|
253
253
|
}
|
|
254
254
|
|
|
255
255
|
.context-lens__detail {
|
|
256
|
-
color:
|
|
256
|
+
color: var(--ide-text-muted);
|
|
257
257
|
font-weight: 400;
|
|
258
258
|
}
|
|
259
|
+
|
|
260
|
+
@media (prefers-reduced-motion: reduce) {
|
|
261
|
+
.context-lens__item {
|
|
262
|
+
animation: none;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
259
265
|
</style>
|
|
@@ -96,6 +96,23 @@
|
|
|
96
96
|
return `top: ${top}px; left: ${left}px;`;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
+
function getEchoColorToken(cursor: EchoCursor): string {
|
|
100
|
+
const tokens = [
|
|
101
|
+
'--ide-success',
|
|
102
|
+
'--ide-warning',
|
|
103
|
+
'--ide-syntax-tag',
|
|
104
|
+
'--ide-syntax-type',
|
|
105
|
+
'--ide-ai-assistant',
|
|
106
|
+
'--ide-error',
|
|
107
|
+
'--ide-accent',
|
|
108
|
+
'--ide-accent-strong',
|
|
109
|
+
'--ide-syntax-function',
|
|
110
|
+
'--ide-syntax-string'
|
|
111
|
+
];
|
|
112
|
+
const index = echoCursors.findIndex((echo) => echo.id === cursor.id);
|
|
113
|
+
return tokens[Math.max(index, 0) % tokens.length];
|
|
114
|
+
}
|
|
115
|
+
|
|
99
116
|
/**
|
|
100
117
|
* Handle remove echo click
|
|
101
118
|
*/
|
|
@@ -116,7 +133,7 @@
|
|
|
116
133
|
class="echo-cursor"
|
|
117
134
|
class:echo-cursor--replaying={isReplaying}
|
|
118
135
|
class:echo-cursor--active={cursor.active}
|
|
119
|
-
style="{getCursorStyle(cursor)} --echo-color: {cursor
|
|
136
|
+
style="{getCursorStyle(cursor)} --echo-color: var({getEchoColorToken(cursor)});"
|
|
120
137
|
>
|
|
121
138
|
<!-- Cursor line -->
|
|
122
139
|
<div class="echo-cursor__caret" style="height: {lineHeight}px;"></div>
|
|
@@ -228,7 +245,7 @@
|
|
|
228
245
|
left: 0;
|
|
229
246
|
padding: 2px 6px;
|
|
230
247
|
background: var(--echo-color);
|
|
231
|
-
color:
|
|
248
|
+
color: var(--ide-text-inverse);
|
|
232
249
|
font-size: 10px;
|
|
233
250
|
font-weight: 600;
|
|
234
251
|
border-radius: 4px;
|
|
@@ -241,7 +258,7 @@
|
|
|
241
258
|
left: 0;
|
|
242
259
|
margin-top: 2px;
|
|
243
260
|
padding: 1px 4px;
|
|
244
|
-
background:
|
|
261
|
+
background: var(--ide-bg-overlay);
|
|
245
262
|
color: var(--echo-color);
|
|
246
263
|
font-size: 9px;
|
|
247
264
|
font-family: monospace;
|
|
@@ -262,10 +279,10 @@
|
|
|
262
279
|
width: 14px;
|
|
263
280
|
height: 14px;
|
|
264
281
|
padding: 0;
|
|
265
|
-
background:
|
|
282
|
+
background: color-mix(in srgb, var(--ide-error) 90%, transparent);
|
|
266
283
|
border: none;
|
|
267
284
|
border-radius: 50%;
|
|
268
|
-
color:
|
|
285
|
+
color: var(--ide-text-inverse);
|
|
269
286
|
font-size: 10px;
|
|
270
287
|
line-height: 14px;
|
|
271
288
|
text-align: center;
|
|
@@ -279,7 +296,7 @@
|
|
|
279
296
|
}
|
|
280
297
|
|
|
281
298
|
.echo-cursor__remove:hover {
|
|
282
|
-
background:
|
|
299
|
+
background: var(--ide-error);
|
|
283
300
|
}
|
|
284
301
|
|
|
285
302
|
.echo-cursor__replay {
|
|
@@ -288,13 +305,13 @@
|
|
|
288
305
|
left: 4px;
|
|
289
306
|
padding: 2px 6px;
|
|
290
307
|
background: var(--echo-color);
|
|
291
|
-
color:
|
|
308
|
+
color: var(--ide-text-inverse);
|
|
292
309
|
font-size: 12px;
|
|
293
310
|
font-family: monospace;
|
|
294
311
|
border-radius: 4px;
|
|
295
312
|
white-space: pre;
|
|
296
313
|
transition: opacity 0.2s ease;
|
|
297
|
-
box-shadow:
|
|
314
|
+
box-shadow: var(--ide-shadow-md);
|
|
298
315
|
}
|
|
299
316
|
|
|
300
317
|
.echo-cursor__ripple {
|
|
@@ -330,11 +347,11 @@
|
|
|
330
347
|
align-items: center;
|
|
331
348
|
gap: 6px;
|
|
332
349
|
padding: 6px 12px;
|
|
333
|
-
background:
|
|
334
|
-
border: 1px solid
|
|
350
|
+
background: color-mix(in srgb, var(--ide-success) 15%, transparent);
|
|
351
|
+
border: 1px solid color-mix(in srgb, var(--ide-success) 30%, transparent);
|
|
335
352
|
border-radius: 6px;
|
|
336
353
|
font-size: 12px;
|
|
337
|
-
color:
|
|
354
|
+
color: var(--ide-success);
|
|
338
355
|
pointer-events: auto;
|
|
339
356
|
}
|
|
340
357
|
|
|
@@ -360,4 +377,19 @@
|
|
|
360
377
|
.echo-mode-indicator__count {
|
|
361
378
|
font-weight: 500;
|
|
362
379
|
}
|
|
380
|
+
|
|
381
|
+
@media (prefers-reduced-motion: reduce) {
|
|
382
|
+
.echo-cursor__caret,
|
|
383
|
+
.echo-cursor--replaying .echo-cursor__caret,
|
|
384
|
+
.echo-cursor__ripple,
|
|
385
|
+
.echo-mode-indicator__icon {
|
|
386
|
+
animation: none;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
.echo-cursor__delay,
|
|
390
|
+
.echo-cursor__remove,
|
|
391
|
+
.echo-cursor__replay {
|
|
392
|
+
transition: none;
|
|
393
|
+
}
|
|
394
|
+
}
|
|
363
395
|
</style>
|
|
@@ -73,7 +73,8 @@
|
|
|
73
73
|
};
|
|
74
74
|
|
|
75
75
|
const ext = $derived(getExtension(filename));
|
|
76
|
-
const
|
|
76
|
+
const colorKey = $derived(ext || filename.toLowerCase().replace(/^\./, ''));
|
|
77
|
+
const color = $derived(extensionColors[colorKey] ?? 'var(--ide-text-muted)');
|
|
77
78
|
|
|
78
79
|
// Simple file type icon paths
|
|
79
80
|
const icons = {
|