@adecore/editor 0.0.1 → 0.17.0-beta.1

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.
Files changed (107) hide show
  1. package/LICENSE +110 -0
  2. package/README.md +82 -0
  3. package/dist/attribution.d.ts +28 -0
  4. package/dist/attribution.js +55 -0
  5. package/dist/code-block.d.ts +2 -0
  6. package/dist/code-block.js +89 -0
  7. package/dist/column-selection.d.ts +9 -0
  8. package/dist/column-selection.js +52 -0
  9. package/dist/controller.d.ts +64 -0
  10. package/dist/controller.js +772 -0
  11. package/dist/editor.css +813 -0
  12. package/dist/engine.d.ts +2 -0
  13. package/dist/engine.js +604 -0
  14. package/dist/fake.d.ts +190 -0
  15. package/dist/fake.js +658 -0
  16. package/dist/find.d.ts +30 -0
  17. package/dist/find.js +108 -0
  18. package/dist/index.d.ts +5 -0
  19. package/dist/index.js +4 -0
  20. package/dist/input.d.ts +9 -0
  21. package/dist/input.js +57 -0
  22. package/dist/keymap-table.d.ts +102 -0
  23. package/dist/keymap-table.js +130 -0
  24. package/dist/keymap.d.ts +36 -0
  25. package/dist/keymap.js +163 -0
  26. package/dist/layout.d.ts +167 -0
  27. package/dist/layout.js +583 -0
  28. package/dist/lens.d.ts +3 -0
  29. package/dist/lens.js +29 -0
  30. package/dist/listeners.d.ts +3 -0
  31. package/dist/listeners.js +12 -0
  32. package/dist/metrics.d.ts +8 -0
  33. package/dist/metrics.js +54 -0
  34. package/dist/modifier-gesture.d.ts +24 -0
  35. package/dist/modifier-gesture.js +98 -0
  36. package/dist/native-input.d.ts +26 -0
  37. package/dist/native-input.js +147 -0
  38. package/dist/offsets.d.ts +2 -0
  39. package/dist/offsets.js +14 -0
  40. package/dist/outline.d.ts +55 -0
  41. package/dist/outline.js +181 -0
  42. package/dist/overview.d.ts +17 -0
  43. package/dist/overview.js +55 -0
  44. package/dist/paint.d.ts +86 -0
  45. package/dist/paint.js +481 -0
  46. package/dist/php-html.d.ts +9 -0
  47. package/dist/php-html.js +36 -0
  48. package/dist/pointer.d.ts +49 -0
  49. package/dist/pointer.js +243 -0
  50. package/dist/scroll-animation.d.ts +3 -0
  51. package/dist/scroll-animation.js +45 -0
  52. package/dist/scroll.d.ts +28 -0
  53. package/dist/scroll.js +76 -0
  54. package/dist/semantic.d.ts +8 -0
  55. package/dist/semantic.js +47 -0
  56. package/dist/shiki.d.ts +7 -0
  57. package/dist/shiki.js +106 -0
  58. package/dist/smart-keys.d.ts +3 -0
  59. package/dist/smart-keys.js +14 -0
  60. package/dist/testing.d.ts +34 -0
  61. package/dist/testing.js +117 -0
  62. package/dist/theme-scopes.d.ts +9 -0
  63. package/dist/theme-scopes.js +61 -0
  64. package/dist/tokens.d.ts +28 -0
  65. package/dist/tokens.js +152 -0
  66. package/dist/tracked-range.d.ts +5 -0
  67. package/dist/tracked-range.js +20 -0
  68. package/dist/types.d.ts +342 -0
  69. package/dist/types.js +1 -0
  70. package/dist/view.d.ts +382 -0
  71. package/dist/view.js +2134 -0
  72. package/package.json +63 -3
  73. package/src/attribution.ts +85 -0
  74. package/src/code-block.ts +100 -0
  75. package/src/column-selection.ts +63 -0
  76. package/src/controller.ts +838 -0
  77. package/src/editor.css +813 -0
  78. package/src/engine.ts +757 -0
  79. package/src/fake.ts +831 -0
  80. package/src/find.ts +128 -0
  81. package/src/index.ts +69 -0
  82. package/src/input.ts +63 -0
  83. package/src/keymap-table.ts +163 -0
  84. package/src/keymap.ts +204 -0
  85. package/src/layout.ts +754 -0
  86. package/src/lens.ts +32 -0
  87. package/src/listeners.ts +15 -0
  88. package/src/metrics.ts +65 -0
  89. package/src/modifier-gesture.ts +115 -0
  90. package/src/native-input.ts +179 -0
  91. package/src/offsets.ts +16 -0
  92. package/src/outline.ts +248 -0
  93. package/src/overview.ts +80 -0
  94. package/src/paint.ts +608 -0
  95. package/src/php-html.ts +43 -0
  96. package/src/pointer.ts +326 -0
  97. package/src/scroll-animation.ts +48 -0
  98. package/src/scroll.ts +102 -0
  99. package/src/semantic.ts +54 -0
  100. package/src/shiki.ts +118 -0
  101. package/src/smart-keys.ts +17 -0
  102. package/src/testing.ts +157 -0
  103. package/src/theme-scopes.ts +75 -0
  104. package/src/tokens.ts +175 -0
  105. package/src/tracked-range.ts +22 -0
  106. package/src/types.ts +656 -0
  107. package/src/view.ts +2436 -0
@@ -0,0 +1,813 @@
1
+ /* Import after @adecore/ui/theme.css; host overrides follow this file. */
2
+ :root,
3
+ [data-theme='light'] {
4
+ --code-font-size: var(--text-code);
5
+ --code-line-height: var(--text-code--line-height);
6
+ --find-match: color-mix(in srgb, var(--status-needs-you) 35%, transparent);
7
+ --find-current: var(--status-needs-you);
8
+ --find-current-text: var(--text);
9
+ --editor-selection: color-mix(in srgb, var(--accent) 16%, transparent);
10
+ --editor-occurrence: color-mix(in srgb, var(--text) 7%, transparent);
11
+ --editor-guide: color-mix(in srgb, var(--text) 8%, transparent);
12
+ --editor-guide-active: color-mix(in srgb, var(--text) 24%, transparent);
13
+ --editor-margin: color-mix(in srgb, var(--text) 14%, transparent);
14
+ --editor-whitespace: color-mix(in srgb, var(--text) 30%, transparent);
15
+ --editor-hatch: color-mix(in srgb, var(--text) 12%, transparent);
16
+ --editor-added: var(--status-idle);
17
+ --editor-modified: var(--accent);
18
+ --editor-deleted: var(--status-error);
19
+ --editor-sticky-shadow: color-mix(in srgb, black 12%, transparent);
20
+ --agent-1: #c4602f;
21
+ --agent-2: #7c4dd8;
22
+ --agent-3: #0f7f78;
23
+ --agent-4: #c2255c;
24
+ --agent-5: #9a6700;
25
+ --agent-6: #1c6fb0;
26
+ --agent-ink: #fff;
27
+ }
28
+ [data-theme='dark'] {
29
+ --find-match: color-mix(in srgb, var(--status-needs-you) 24%, transparent);
30
+ --editor-selection: color-mix(in srgb, var(--accent) 28%, transparent);
31
+ --editor-occurrence: color-mix(in srgb, var(--text) 9%, transparent);
32
+ --editor-guide: color-mix(in srgb, var(--text) 10%, transparent);
33
+ --editor-guide-active: color-mix(in srgb, var(--text) 28%, transparent);
34
+ --editor-margin: color-mix(in srgb, var(--text) 16%, transparent);
35
+ --editor-whitespace: color-mix(in srgb, var(--text) 32%, transparent);
36
+ --editor-hatch: color-mix(in srgb, var(--text) 10%, transparent);
37
+ --editor-sticky-shadow: color-mix(in srgb, black 60%, transparent);
38
+ }
39
+
40
+ .se-editor {
41
+ --se-gutter-width: 64px;
42
+ position: absolute;
43
+ inset: 0;
44
+ min-width: 0;
45
+ min-height: 0;
46
+ overflow: hidden;
47
+ background: var(--surface);
48
+ color: var(--term-fg, var(--text));
49
+ font-family: var(--font-mono);
50
+ font-size: var(--code-font-size, var(--text-code));
51
+ line-height: var(--code-line-height, var(--text-code--line-height));
52
+ font-kerning: none;
53
+ text-align: left;
54
+ }
55
+ .se-editor *,
56
+ .se-editor *::before,
57
+ .se-editor *::after {
58
+ box-sizing: border-box;
59
+ }
60
+ .se-editor [hidden] {
61
+ display: none !important;
62
+ }
63
+
64
+ .se-viewport {
65
+ position: absolute;
66
+ inset: 0;
67
+ min-width: 0;
68
+ min-height: 0;
69
+ overflow: auto;
70
+ overflow-anchor: none;
71
+ overscroll-behavior: contain;
72
+ scrollbar-width: thin;
73
+ scrollbar-color: color-mix(in srgb, var(--text) 25%, transparent) transparent;
74
+ }
75
+ .se-editor[data-wrap='true'] .se-viewport {
76
+ overflow-x: hidden;
77
+ }
78
+ .se-scroller {
79
+ position: relative;
80
+ display: flex;
81
+ width: max-content;
82
+ min-width: 100%;
83
+ min-height: 100%;
84
+ }
85
+ .se-content {
86
+ position: relative;
87
+ flex: none;
88
+ min-height: 100%;
89
+ cursor: text;
90
+ }
91
+ .se-overlays,
92
+ .se-code,
93
+ .se-over,
94
+ .se-carets,
95
+ .se-remote {
96
+ position: absolute;
97
+ inset: 0;
98
+ }
99
+ .se-overlays,
100
+ .se-over,
101
+ .se-carets,
102
+ .se-remote {
103
+ pointer-events: none;
104
+ }
105
+ .se-code {
106
+ user-select: none;
107
+ }
108
+ .se-signs {
109
+ position: absolute;
110
+ inset: 0;
111
+ pointer-events: none;
112
+ }
113
+ .se-guide,
114
+ .se-margin {
115
+ position: absolute;
116
+ }
117
+ .se-guide {
118
+ background: var(--editor-guide);
119
+ }
120
+ .se-guide-active {
121
+ background: var(--editor-guide-active);
122
+ }
123
+ .se-margin {
124
+ background: var(--editor-margin);
125
+ }
126
+ .se-ws {
127
+ color: var(--editor-whitespace);
128
+ }
129
+ .se-wrap-sign,
130
+ .se-tab-sign {
131
+ position: absolute;
132
+ overflow: visible;
133
+ color: var(--editor-whitespace);
134
+ }
135
+ .se-over {
136
+ z-index: 2;
137
+ }
138
+ .se-carets {
139
+ z-index: 3;
140
+ }
141
+ .se-remote {
142
+ z-index: 3;
143
+ }
144
+ .se-actions {
145
+ position: absolute;
146
+ inset: 0;
147
+ z-index: 3;
148
+ pointer-events: none;
149
+ }
150
+ .se-line-action {
151
+ position: absolute;
152
+ display: flex;
153
+ align-items: center;
154
+ pointer-events: auto;
155
+ font-family: var(--font-sans);
156
+ }
157
+ .se-preview {
158
+ position: absolute;
159
+ z-index: 4;
160
+ max-width: 360px;
161
+ padding: 4px 8px;
162
+ border-radius: var(--radius-md);
163
+ background: var(--surface-raised);
164
+ box-shadow: 0 0 0 1px var(--border);
165
+ color: var(--text);
166
+ font-family: var(--font-mono);
167
+ font-size: var(--text-xs);
168
+ line-height: var(--text-xs--line-height);
169
+ white-space: pre-wrap;
170
+ pointer-events: none;
171
+ transform: translate(-50%, 4px);
172
+ }
173
+
174
+ .se-line {
175
+ position: absolute;
176
+ left: 0;
177
+ white-space: pre;
178
+ letter-spacing: 0;
179
+ direction: ltr;
180
+ }
181
+ .se-run {
182
+ position: absolute;
183
+ white-space: pre;
184
+ }
185
+
186
+ .se-gutter {
187
+ position: sticky;
188
+ left: 0;
189
+ z-index: 3;
190
+ flex: none;
191
+ width: var(--se-gutter-width);
192
+ overflow: hidden;
193
+ background: var(--surface);
194
+ color: var(--text-faint);
195
+ cursor: default;
196
+ user-select: none;
197
+ }
198
+ .se-gutter-lines {
199
+ position: absolute;
200
+ inset: 0;
201
+ }
202
+ .se-line-number {
203
+ position: absolute;
204
+ left: 0;
205
+ right: 0;
206
+ display: flex;
207
+ align-items: center;
208
+ justify-content: flex-end;
209
+ padding-right: 16px;
210
+ }
211
+ /* A step below the code, as the platform draws them, centered on the row rather than on the code's baseline. */
212
+ .se-line-number > span {
213
+ font-size: max(12px, calc(var(--code-font-size, 13px) - 2px));
214
+ line-height: 1;
215
+ }
216
+ .se-active-number {
217
+ color: var(--text-muted);
218
+ }
219
+ .se-fold-toggle {
220
+ position: absolute;
221
+ top: 0;
222
+ right: 0;
223
+ display: grid;
224
+ place-items: center;
225
+ width: 16px;
226
+ height: 100%;
227
+ padding: 0;
228
+ border: 0;
229
+ background: transparent;
230
+ cursor: pointer;
231
+ opacity: 0;
232
+ }
233
+ .se-fold-toggle::before {
234
+ content: '';
235
+ width: 6px;
236
+ height: 6px;
237
+ border: solid var(--text-muted);
238
+ border-width: 0 2px 2px 0;
239
+ transform: translateY(-2px) rotate(45deg);
240
+ }
241
+ .se-folded::before {
242
+ transform: translateX(-2px) rotate(-45deg);
243
+ }
244
+ .se-gutter:hover .se-fold-toggle {
245
+ opacity: 1;
246
+ }
247
+ .se-editor[data-fold-outline='always'] .se-fold-toggle {
248
+ opacity: 1;
249
+ }
250
+ .se-editor[data-fold-outline='off'] .se-fold-toggle {
251
+ display: none;
252
+ }
253
+ .se-gutter-action {
254
+ position: absolute;
255
+ top: 0;
256
+ left: 12px;
257
+ display: grid;
258
+ place-items: center;
259
+ width: 16px;
260
+ height: 100%;
261
+ padding: 0;
262
+ border: 0;
263
+ background: transparent;
264
+ color: var(--status-needs-you);
265
+ cursor: pointer;
266
+ }
267
+ .se-gutter-action::before {
268
+ content: '';
269
+ width: 14px;
270
+ height: 14px;
271
+ background: currentColor;
272
+ /* Lucide's lightbulb. */
273
+ mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5'/%3E%3Cpath d='M9 18h6'/%3E%3Cpath d='M10 22h4'/%3E%3C/svg%3E")
274
+ center / contain no-repeat;
275
+ }
276
+ .se-gutter-marker {
277
+ position: absolute;
278
+ top: 0;
279
+ left: 4px;
280
+ display: grid;
281
+ place-items: center;
282
+ width: 16px;
283
+ height: 100%;
284
+ padding: 0;
285
+ border: 0;
286
+ background: transparent;
287
+ color: var(--text-faint);
288
+ cursor: pointer;
289
+ }
290
+ .se-gutter-marker:hover {
291
+ color: var(--accent);
292
+ }
293
+ .se-gutter-marker::before {
294
+ content: '';
295
+ width: 12px;
296
+ height: 12px;
297
+ background: currentColor;
298
+ /* Lucide's sparkles. */
299
+ mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z'/%3E%3C/svg%3E")
300
+ center / contain no-repeat;
301
+ }
302
+ .se-change {
303
+ position: absolute;
304
+ top: 0;
305
+ right: 0;
306
+ width: 3px;
307
+ }
308
+ .se-change-added {
309
+ background: var(--editor-added);
310
+ }
311
+ .se-change-modified {
312
+ background: var(--editor-modified);
313
+ }
314
+ .se-attribution {
315
+ position: absolute;
316
+ top: 0;
317
+ right: 0;
318
+ width: 3px;
319
+ }
320
+ .se-change-deleted {
321
+ top: -4px;
322
+ width: 0;
323
+ height: 0;
324
+ border: solid transparent;
325
+ border-width: 4px 0 4px 5px;
326
+ border-left-color: var(--editor-deleted);
327
+ }
328
+ /* The sign of a line a host marked, between the number and the bar. */
329
+ .se-line-sign {
330
+ position: absolute;
331
+ top: 0;
332
+ right: 4px;
333
+ display: grid;
334
+ place-items: center;
335
+ width: 12px;
336
+ height: 100%;
337
+ font-size: max(12px, calc(var(--code-font-size, 13px) - 2px));
338
+ line-height: 1;
339
+ }
340
+ .se-line-highlight {
341
+ position: absolute;
342
+ }
343
+
344
+ /* Code a host draws in a widget row: the editor's face, with the gutter column the document has. */
345
+ .se-code-block {
346
+ font-family: var(--font-mono);
347
+ font-size: var(--code-font-size, var(--text-code));
348
+ line-height: var(--code-line-height, var(--text-code--line-height));
349
+ font-kerning: none;
350
+ color: var(--term-fg, var(--text));
351
+ white-space: pre;
352
+ }
353
+ .se-code-row {
354
+ display: flex;
355
+ width: 100%;
356
+ overflow: hidden;
357
+ }
358
+ .se-code-gutter {
359
+ position: relative;
360
+ display: flex;
361
+ flex: none;
362
+ justify-content: flex-end;
363
+ width: var(--se-gutter-width);
364
+ padding-right: 16px;
365
+ color: var(--text-faint);
366
+ user-select: none;
367
+ }
368
+ .se-code-gutter > span:first-child:not(.se-line-sign, .se-attribution) {
369
+ font-size: max(12px, calc(var(--code-font-size, 13px) - 2px));
370
+ }
371
+ .se-code-gutter .se-attribution {
372
+ height: 100%;
373
+ }
374
+ .se-code-text {
375
+ flex: 1;
376
+ padding-right: 16px;
377
+ }
378
+ .se-code-text[data-faded] {
379
+ opacity: 0.85;
380
+ }
381
+ .se-code-emphasis {
382
+ border-radius: 2px;
383
+ background: color-mix(in srgb, var(--se-emphasis) 22%, transparent);
384
+ }
385
+ .se-overview {
386
+ position: absolute;
387
+ top: 0;
388
+ right: 0;
389
+ bottom: 0;
390
+ z-index: 5;
391
+ width: 16px;
392
+ pointer-events: none;
393
+ }
394
+ .se-tick {
395
+ position: absolute;
396
+ width: 4px;
397
+ border-radius: 1px;
398
+ }
399
+ .se-tick-added,
400
+ .se-tick-modified,
401
+ .se-tick-deleted {
402
+ left: 2px;
403
+ }
404
+ .se-tick-added {
405
+ background: var(--editor-added);
406
+ }
407
+ .se-tick-modified {
408
+ background: var(--editor-modified);
409
+ }
410
+ .se-tick-deleted {
411
+ background: var(--editor-deleted);
412
+ }
413
+ .se-tick-find,
414
+ .se-tick-find-current {
415
+ left: 6px;
416
+ background: var(--find-current);
417
+ }
418
+ .se-tick-find {
419
+ opacity: 0.6;
420
+ }
421
+ .se-tick-occurrence {
422
+ left: 6px;
423
+ background: var(--editor-occurrence);
424
+ }
425
+ .se-tick-error,
426
+ .se-tick-warning,
427
+ .se-tick-info {
428
+ left: 10px;
429
+ }
430
+ /* The only part of the track that takes the pointer, with a wider reach than the 4px it draws. */
431
+ .se-tick[data-offset] {
432
+ pointer-events: auto;
433
+ cursor: pointer;
434
+ }
435
+ .se-tick[data-offset]::before {
436
+ content: '';
437
+ position: absolute;
438
+ inset: -2px -3px;
439
+ }
440
+ .se-tick-tip {
441
+ position: absolute;
442
+ right: 20px;
443
+ z-index: 7;
444
+ max-width: 360px;
445
+ padding: 4px 8px;
446
+ border-radius: var(--radius-md);
447
+ background: var(--surface-raised);
448
+ box-shadow: 0 0 0 1px var(--border);
449
+ color: var(--text);
450
+ font-family: var(--font-sans);
451
+ font-size: var(--text-xs);
452
+ line-height: var(--text-xs--line-height);
453
+ white-space: pre-wrap;
454
+ pointer-events: none;
455
+ transform: translateY(-25%);
456
+ }
457
+ .se-tick-tip[hidden] {
458
+ display: none;
459
+ }
460
+ .se-tick-error {
461
+ background: var(--status-error);
462
+ }
463
+ .se-tick-warning {
464
+ background: var(--status-needs-you);
465
+ }
466
+ .se-tick-info {
467
+ background: var(--status-running);
468
+ }
469
+ .se-fold-chip {
470
+ position: absolute;
471
+ height: calc(var(--code-line-height, 20px) - 4px);
472
+ margin-top: 2px;
473
+ padding: 0 6px;
474
+ border: 0;
475
+ border-radius: var(--radius-sm);
476
+ background: var(--surface-hover);
477
+ color: var(--text-muted);
478
+ font: inherit;
479
+ line-height: calc(var(--code-line-height, 20px) - 4px);
480
+ cursor: pointer;
481
+ }
482
+
483
+ .se-sticky-anchor {
484
+ position: sticky;
485
+ top: 0;
486
+ left: 0;
487
+ z-index: 5;
488
+ flex: none;
489
+ align-self: flex-start;
490
+ width: 0;
491
+ height: 0;
492
+ }
493
+ .se-sticky {
494
+ position: absolute;
495
+ top: 0;
496
+ left: 0;
497
+ z-index: 4;
498
+ background: var(--surface);
499
+ box-shadow:
500
+ 0 1px 0 var(--border),
501
+ 0 8px 12px -8px var(--editor-sticky-shadow);
502
+ cursor: pointer;
503
+ overflow: hidden;
504
+ }
505
+ .se-sticky-row {
506
+ position: relative;
507
+ background: var(--surface);
508
+ display: grid;
509
+ grid-template-columns: var(--se-gutter-width) minmax(0, 1fr);
510
+ height: var(--code-line-height, 20px);
511
+ }
512
+ .se-sticky-row:hover {
513
+ background: var(--surface-hover);
514
+ }
515
+ .se-sticky-number {
516
+ display: flex;
517
+ align-items: center;
518
+ justify-content: flex-end;
519
+ padding-right: 16px;
520
+ color: var(--text-faint);
521
+ user-select: none;
522
+ }
523
+ .se-sticky-code {
524
+ position: relative;
525
+ overflow: hidden;
526
+ }
527
+ .se-sticky-code .se-line {
528
+ transform: translateX(calc(var(--se-scroll-left, 0px) * -1));
529
+ }
530
+
531
+ .se-current-line {
532
+ position: absolute;
533
+ background: var(--surface-hover);
534
+ }
535
+ .se-selection {
536
+ position: absolute;
537
+ background: var(--editor-selection);
538
+ }
539
+ .se-selection-inactive {
540
+ opacity: 0.6;
541
+ }
542
+ .se-caret {
543
+ position: absolute;
544
+ background: var(--term-cursor, var(--accent));
545
+ animation: se-blink 1.1s steps(1) infinite;
546
+ }
547
+ /* An agent's caret and its name, which sits over the line above the caret, or under it when the view has no room there. */
548
+ .se-remote-caret {
549
+ position: absolute;
550
+ }
551
+ .se-remote-label {
552
+ position: absolute;
553
+ left: 0;
554
+ bottom: 100%;
555
+ max-width: 200px;
556
+ height: 18px;
557
+ padding: 0 6px;
558
+ overflow: hidden;
559
+ border-radius: 4px 4px 4px 0;
560
+ color: var(--agent-ink);
561
+ font-family: var(--font-sans);
562
+ font-size: var(--text-xs);
563
+ font-weight: 600;
564
+ line-height: 18px;
565
+ text-overflow: ellipsis;
566
+ white-space: nowrap;
567
+ }
568
+ .se-remote-label[data-below] {
569
+ top: 100%;
570
+ bottom: auto;
571
+ border-radius: 0 4px 4px 4px;
572
+ }
573
+ .se-drop-caret {
574
+ position: absolute;
575
+ background: var(--term-cursor, var(--accent));
576
+ }
577
+ .se-carets[data-moving] .se-caret {
578
+ animation: none;
579
+ }
580
+ @keyframes se-blink {
581
+ 50% {
582
+ opacity: 0;
583
+ }
584
+ }
585
+ @media (prefers-reduced-motion: reduce) {
586
+ .se-caret {
587
+ animation: none;
588
+ }
589
+ }
590
+ .se-find-match,
591
+ .se-find-current,
592
+ .se-occurrence,
593
+ .se-bracket-match,
594
+ .se-bracket-unmatched {
595
+ position: absolute;
596
+ border-radius: var(--radius-xs);
597
+ }
598
+ .se-find-match {
599
+ background: var(--find-match);
600
+ }
601
+ .se-find-current {
602
+ background: color-mix(in srgb, var(--find-current) 55%, transparent);
603
+ box-shadow: 0 0 0 1px var(--find-current);
604
+ }
605
+ .se-occurrence {
606
+ background: var(--editor-occurrence);
607
+ border-radius: var(--radius-sm);
608
+ }
609
+ .se-occurrence-write {
610
+ background: color-mix(in srgb, var(--accent) 22%, transparent);
611
+ }
612
+ /* The wave is a mask, so it takes the color of the problem from the tokens instead of one baked into an image. */
613
+ .se-squiggle {
614
+ position: absolute;
615
+ background: var(--status-error);
616
+ -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='3'%3E%3Cpath d='M0 2.5 1.5 .5 3 2.5 4.5 .5 6 2.5' fill='none' stroke='black' stroke-width='1'/%3E%3C/svg%3E")
617
+ repeat-x left bottom / 6px 3px;
618
+ mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='3'%3E%3Cpath d='M0 2.5 1.5 .5 3 2.5 4.5 .5 6 2.5' fill='none' stroke='black' stroke-width='1'/%3E%3C/svg%3E")
619
+ repeat-x left bottom / 6px 3px;
620
+ }
621
+ .se-squiggle-warning {
622
+ background: var(--status-needs-you);
623
+ }
624
+ .se-squiggle-info {
625
+ background: var(--status-running);
626
+ }
627
+ .se-faded {
628
+ position: absolute;
629
+ background: color-mix(in srgb, var(--surface) 55%, transparent);
630
+ }
631
+ .se-link {
632
+ position: absolute;
633
+ }
634
+ .se-link::after {
635
+ content: '';
636
+ position: absolute;
637
+ right: 0;
638
+ bottom: 2px;
639
+ left: 0;
640
+ height: 1px;
641
+ background: var(--accent);
642
+ }
643
+ .se-content-link {
644
+ cursor: pointer;
645
+ }
646
+ .se-editor[data-column='true'] .se-content {
647
+ cursor: crosshair;
648
+ }
649
+ .se-over-selection {
650
+ cursor: default;
651
+ }
652
+ .se-struck {
653
+ position: absolute;
654
+ }
655
+ .se-struck::after {
656
+ content: '';
657
+ position: absolute;
658
+ top: 50%;
659
+ right: 0;
660
+ left: 0;
661
+ height: 1px;
662
+ background: var(--text-muted);
663
+ }
664
+ .se-bracket-match {
665
+ background: var(--accent-soft);
666
+ box-shadow: 0 0 0 1px var(--accent);
667
+ }
668
+ .se-bracket-unmatched {
669
+ background: color-mix(in srgb, var(--status-error) 16%, transparent);
670
+ box-shadow: inset 0 -2px var(--status-error);
671
+ }
672
+
673
+ .se-inlay {
674
+ position: absolute;
675
+ height: calc(var(--code-line-height, 20px) - 4px);
676
+ margin-top: 2px;
677
+ padding: 0 6px;
678
+ border-radius: var(--radius-sm);
679
+ background: var(--surface-hover);
680
+ color: var(--text-muted);
681
+ font-family: var(--font-sans);
682
+ font-size: max(12px, calc(var(--code-font-size, 13px) - 1px));
683
+ line-height: calc(var(--code-line-height, 20px) - 4px);
684
+ white-space: pre;
685
+ cursor: default;
686
+ }
687
+ .se-composition {
688
+ position: absolute;
689
+ white-space: pre;
690
+ text-decoration: underline;
691
+ text-underline-offset: 2px;
692
+ }
693
+ .se-ghost {
694
+ position: absolute;
695
+ white-space: pre;
696
+ font-style: italic;
697
+ color: var(--text-faint);
698
+ pointer-events: none;
699
+ }
700
+ /* A line action stands 28px after the line, which reads as detached from the suggestion it belongs to. */
701
+ .se-ghost-accessory {
702
+ margin-left: -12px;
703
+ }
704
+ .se-ghost-rows .se-code-block {
705
+ font-style: italic;
706
+ color: var(--text-faint);
707
+ }
708
+ .se-block {
709
+ position: absolute;
710
+ left: 0;
711
+ padding: 4px 16px;
712
+ color: var(--text-muted);
713
+ font-family: var(--font-sans);
714
+ font-size: var(--text-xs);
715
+ line-height: var(--text-xs--line-height);
716
+ white-space: pre-wrap;
717
+ overflow-wrap: anywhere;
718
+ }
719
+ /* The host's own row runs the width of the editor over the gutter and under the pinned headers, so the code layer has no stacking of its own. */
720
+ .se-block.se-widget {
721
+ z-index: 4;
722
+ /* The row follows the scroll, so what it draws past its width would push the scroll extent along with every scroll. */
723
+ overflow-x: clip;
724
+ padding: 0;
725
+ color: var(--text);
726
+ white-space: normal;
727
+ }
728
+
729
+ /*
730
+ * A code vision row is quiet text one code line high above a declaration, in the declaration's
731
+ * indentation. Its entries stand a text size apart and light up as a link under the pointer.
732
+ */
733
+ .se-block.se-lens {
734
+ display: flex;
735
+ align-items: center;
736
+ gap: var(--text-xs);
737
+ padding: 0;
738
+ white-space: nowrap;
739
+ }
740
+ .se-lens-entry {
741
+ display: inline-flex;
742
+ align-items: center;
743
+ gap: 2px;
744
+ padding: 0;
745
+ border: 0;
746
+ background: transparent;
747
+ color: inherit;
748
+ font: inherit;
749
+ cursor: pointer;
750
+ }
751
+ .se-lens-entry:hover {
752
+ color: var(--accent);
753
+ text-decoration: underline;
754
+ }
755
+ .se-lens-icon {
756
+ width: 1em;
757
+ height: 1em;
758
+ background: var(--text-muted);
759
+ }
760
+ /* Lucide's user and users. */
761
+ .se-lens-icon-user {
762
+ mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E")
763
+ center / contain no-repeat;
764
+ }
765
+ .se-lens-icon-users {
766
+ mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Cpath d='M16 3.128a4 4 0 0 1 0 7.744'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.87'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3C/svg%3E")
767
+ center / contain no-repeat;
768
+ }
769
+
770
+ .se-input {
771
+ position: absolute;
772
+ z-index: 5;
773
+ width: 2px;
774
+ min-width: 0;
775
+ margin: 0;
776
+ padding: 0;
777
+ border: 0;
778
+ border-radius: 0;
779
+ background: transparent;
780
+ color: transparent;
781
+ caret-color: transparent;
782
+ font: inherit;
783
+ resize: none;
784
+ outline: none;
785
+ opacity: 0;
786
+ overflow: hidden;
787
+ white-space: pre;
788
+ pointer-events: none;
789
+ }
790
+ .se-notice {
791
+ position: absolute;
792
+ right: 16px;
793
+ bottom: 8px;
794
+ z-index: 6;
795
+ padding: 4px 12px;
796
+ border-radius: var(--radius-md);
797
+ background: var(--surface-raised);
798
+ box-shadow: 0 0 0 1px var(--border);
799
+ color: var(--text);
800
+ font-family: var(--font-sans);
801
+ font-size: var(--text-xs);
802
+ line-height: var(--text-xs--line-height);
803
+ pointer-events: none;
804
+ }
805
+
806
+ @media (forced-colors: active) {
807
+ .se-selection,
808
+ .se-find-current,
809
+ .se-bracket-match {
810
+ forced-color-adjust: none;
811
+ background: Highlight;
812
+ }
813
+ }