archsight 0.1.3 → 0.1.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.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +33 -0
  3. data/chart/archsight/Chart.yaml +6 -0
  4. data/chart/archsight/README.md +160 -0
  5. data/chart/archsight/templates/NOTES.txt +22 -0
  6. data/chart/archsight/templates/_helpers.tpl +62 -0
  7. data/chart/archsight/templates/deployment.yaml +114 -0
  8. data/chart/archsight/templates/ingress.yaml +56 -0
  9. data/chart/archsight/templates/resources-configmap.yaml +10 -0
  10. data/chart/archsight/templates/resources-pvc.yaml +23 -0
  11. data/chart/archsight/templates/service.yaml +15 -0
  12. data/chart/archsight/templates/serviceaccount.yaml +12 -0
  13. data/chart/archsight/values.yaml +162 -0
  14. data/lib/archsight/analysis/executor.rb +0 -10
  15. data/lib/archsight/annotations/annotation.rb +85 -36
  16. data/lib/archsight/annotations/architecture_annotations.rb +1 -34
  17. data/lib/archsight/annotations/computed.rb +1 -1
  18. data/lib/archsight/annotations/generated_annotations.rb +9 -2
  19. data/lib/archsight/annotations/git_annotations.rb +8 -4
  20. data/lib/archsight/annotations/interface_annotations.rb +35 -0
  21. data/lib/archsight/cli.rb +3 -1
  22. data/lib/archsight/editor/content_hasher.rb +37 -0
  23. data/lib/archsight/editor/file_writer.rb +79 -0
  24. data/lib/archsight/editor.rb +237 -0
  25. data/lib/archsight/import/handlers/github.rb +14 -6
  26. data/lib/archsight/import/handlers/gitlab.rb +14 -6
  27. data/lib/archsight/import/handlers/repository.rb +3 -1
  28. data/lib/archsight/import/team_matcher.rb +111 -61
  29. data/lib/archsight/mcp/execute_analysis_tool.rb +100 -0
  30. data/lib/archsight/mcp.rb +1 -0
  31. data/lib/archsight/resources/analysis.rb +1 -17
  32. data/lib/archsight/resources/application_interface.rb +1 -5
  33. data/lib/archsight/resources/base.rb +14 -14
  34. data/lib/archsight/resources/business_actor.rb +1 -1
  35. data/lib/archsight/resources/technology_interface.rb +1 -1
  36. data/lib/archsight/resources/technology_service.rb +5 -0
  37. data/lib/archsight/version.rb +1 -1
  38. data/lib/archsight/web/application.rb +8 -0
  39. data/lib/archsight/web/doc/import.md +10 -2
  40. data/lib/archsight/web/editor/form_builder.rb +100 -0
  41. data/lib/archsight/web/editor/routes.rb +293 -0
  42. data/lib/archsight/web/public/css/editor.css +863 -0
  43. data/lib/archsight/web/public/css/instance.css +6 -0
  44. data/lib/archsight/web/public/js/editor.js +421 -0
  45. data/lib/archsight/web/public/js/lexical-editor.js +308 -0
  46. data/lib/archsight/web/views/partials/editor/_field.haml +80 -0
  47. data/lib/archsight/web/views/partials/editor/_form.haml +131 -0
  48. data/lib/archsight/web/views/partials/editor/_relations.haml +39 -0
  49. data/lib/archsight/web/views/partials/editor/_yaml_output.haml +33 -0
  50. data/lib/archsight/web/views/partials/instance/_analysis_detail.haml +4 -11
  51. data/lib/archsight/web/views/partials/instance/_detail.haml +4 -0
  52. data/lib/archsight/web/views/partials/layout/_content.haml +8 -2
  53. data/lib/archsight/web/views/partials/layout/_head.haml +2 -0
  54. metadata +26 -1
@@ -0,0 +1,863 @@
1
+ /* Editor Styles - Layout only, form styling from Pico CSS */
2
+
3
+ /* Editor container */
4
+ .editor-container {
5
+ width: 100%;
6
+ }
7
+
8
+ .editor-header {
9
+ display: flex;
10
+ justify-content: space-between;
11
+ align-items: center;
12
+ margin-bottom: 1.5rem;
13
+ padding-bottom: 1rem;
14
+ border-bottom: 1px solid var(--muted-border-color);
15
+ }
16
+
17
+ .editor-header h2 {
18
+ display: flex;
19
+ align-items: center;
20
+ gap: 0.75rem;
21
+ margin: 0;
22
+ }
23
+
24
+ /* Editor form layout */
25
+ .editor-form {
26
+ display: flex;
27
+ flex-direction: column;
28
+ gap: 1rem;
29
+ }
30
+
31
+ /* Article header with back button */
32
+ .editor-form article:first-child > header {
33
+ display: flex;
34
+ align-items: center;
35
+ justify-content: space-between;
36
+ }
37
+
38
+ .editor-form article:first-child > header h3 {
39
+ display: flex;
40
+ align-items: center;
41
+ gap: 0.5rem;
42
+ margin: 0;
43
+ }
44
+
45
+ /* Back button in article header - matches .btn-header style */
46
+ .btn-back {
47
+ display: inline-flex;
48
+ align-items: center;
49
+ gap: 0.35rem;
50
+ padding: 0.4rem 0.75rem;
51
+ font-size: 0.9rem;
52
+ color: var(--muted-color);
53
+ background: transparent;
54
+ border: 1px solid transparent;
55
+ border-radius: var(--border-radius);
56
+ text-decoration: none;
57
+ cursor: pointer;
58
+ transition: all 0.15s ease;
59
+ }
60
+
61
+ .btn-back:hover {
62
+ color: var(--primary);
63
+ border-color: var(--primary);
64
+ }
65
+
66
+ /* Two-column grid for annotations */
67
+ .annotations-grid {
68
+ display: grid;
69
+ grid-template-columns: repeat(2, 1fr);
70
+ gap: 1rem;
71
+ }
72
+
73
+ /* Field groups - remove Pico's default margin */
74
+ .field-group {
75
+ margin-bottom: 0;
76
+ }
77
+
78
+ .field-group label {
79
+ margin-bottom: 0.25rem;
80
+ }
81
+
82
+ .field-group label .required {
83
+ color: var(--del-color);
84
+ margin-left: 0.15rem;
85
+ }
86
+
87
+ .field-group input,
88
+ .field-group select,
89
+ .field-group textarea {
90
+ margin-bottom: 0;
91
+ }
92
+
93
+ .field-description {
94
+ font-size: 0.8rem;
95
+ color: var(--muted-color);
96
+ margin-top: 0.25rem;
97
+ }
98
+
99
+ .field-error {
100
+ color: var(--del-color);
101
+ font-size: 0.8rem;
102
+ margin-top: 0.25rem;
103
+ }
104
+
105
+ /* Full-width fields span both columns */
106
+ .field-full-width {
107
+ grid-column: 1 / -1;
108
+ }
109
+
110
+ /* Markdown textarea - monospace font */
111
+ .markdown-field textarea {
112
+ font-family: var(--font-family-monospace);
113
+ min-height: 200px;
114
+ resize: vertical;
115
+ }
116
+
117
+ /* Code field - monospace font, larger height */
118
+ .code-field textarea {
119
+ font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
120
+ font-size: 0.9em;
121
+ line-height: 1.5;
122
+ min-height: 600px;
123
+ resize: vertical;
124
+ tab-size: 2;
125
+ white-space: pre;
126
+ overflow-wrap: normal;
127
+ overflow-x: auto;
128
+ }
129
+
130
+ .future-hint {
131
+ display: flex;
132
+ align-items: center;
133
+ gap: 0.35rem;
134
+ color: var(--muted-color);
135
+ font-size: 0.8rem;
136
+ margin-top: 0.5rem;
137
+ }
138
+
139
+ /* Relations editor */
140
+ .relations-editor {
141
+ display: flex;
142
+ flex-direction: column;
143
+ gap: 0.75rem;
144
+ }
145
+
146
+ #relations-list {
147
+ display: flex;
148
+ flex-direction: column;
149
+ background-color: var(--background-color);
150
+ border: 1px solid var(--muted-border-color);
151
+ border-radius: 4px;
152
+ }
153
+
154
+ #relations-list:empty {
155
+ display: none;
156
+ }
157
+
158
+ /* Individual relation item - compact display */
159
+ .relation-item {
160
+ display: flex;
161
+ align-items: center;
162
+ justify-content: space-between;
163
+ gap: 0.5rem;
164
+ padding: 0.35rem 0.5rem;
165
+ font-size: 0.9rem;
166
+ border-bottom: 1px solid var(--muted-border-color);
167
+ }
168
+
169
+ .relation-item:last-child {
170
+ border-bottom: none;
171
+ }
172
+
173
+ .relation-text {
174
+ flex: 1;
175
+ white-space: nowrap;
176
+ overflow: hidden;
177
+ text-overflow: ellipsis;
178
+ }
179
+
180
+ .relation-text strong {
181
+ font-weight: 600;
182
+ }
183
+
184
+ .relation-text em {
185
+ font-style: normal;
186
+ color: var(--muted-color);
187
+ }
188
+
189
+ /* Compact remove button */
190
+ .btn-remove {
191
+ display: inline-flex;
192
+ align-items: center;
193
+ justify-content: center;
194
+ width: 1.5rem;
195
+ height: 1.5rem;
196
+ padding: 0;
197
+ margin: 0;
198
+ background: transparent;
199
+ border: none;
200
+ border-radius: 3px;
201
+ color: var(--muted-color);
202
+ cursor: pointer;
203
+ flex-shrink: 0;
204
+ }
205
+
206
+ .btn-remove:hover {
207
+ background-color: var(--del-color);
208
+ color: white;
209
+ }
210
+
211
+ .btn-remove i {
212
+ font-size: 0.85rem;
213
+ }
214
+
215
+ /* Add relation row - inline form */
216
+ .add-relation-row {
217
+ display: flex;
218
+ gap: 0.5rem;
219
+ align-items: center;
220
+ }
221
+
222
+ .add-relation-row select {
223
+ margin: 0;
224
+ flex: 1;
225
+ }
226
+
227
+ .add-relation-row select:first-child {
228
+ flex: 1.2;
229
+ }
230
+
231
+ .btn-add {
232
+ margin: 0;
233
+ white-space: nowrap;
234
+ flex-shrink: 0;
235
+ }
236
+
237
+ .no-relations {
238
+ color: var(--muted-color);
239
+ font-style: italic;
240
+ margin: 0;
241
+ }
242
+
243
+ /* Form actions */
244
+ .form-actions {
245
+ display: flex;
246
+ gap: 0.75rem;
247
+ padding-top: 1.25rem;
248
+ border-top: 1px solid var(--muted-border-color);
249
+ }
250
+
251
+ .form-actions button,
252
+ .form-actions [role="button"] {
253
+ width: auto;
254
+ margin: 0;
255
+ }
256
+
257
+ /* ==================== */
258
+ /* YAML Output Section */
259
+ /* ==================== */
260
+
261
+ .yaml-output > header {
262
+ display: flex;
263
+ align-items: center;
264
+ justify-content: space-between;
265
+ }
266
+
267
+ .yaml-output > header h3 {
268
+ display: flex;
269
+ align-items: center;
270
+ gap: 0.5rem;
271
+ margin: 0;
272
+ }
273
+
274
+ .yaml-success {
275
+ display: flex;
276
+ align-items: center;
277
+ gap: 0.5rem;
278
+ margin: 0 0 1rem 0;
279
+ color: var(--ins-color);
280
+ font-weight: 500;
281
+ }
282
+
283
+ #yaml-content {
284
+ margin: 0 calc(var(--block-spacing-horizontal) * -1);
285
+ padding: var(--block-spacing-horizontal);
286
+ background-color: var(--code-background-color);
287
+ border-radius: 0;
288
+ overflow-x: auto;
289
+ }
290
+
291
+ #yaml-content code {
292
+ font-size: 0.9em;
293
+ white-space: pre;
294
+ line-height: 1.5;
295
+ padding: 0;
296
+ }
297
+
298
+ .yaml-output > footer {
299
+ display: flex;
300
+ justify-content: space-between;
301
+ align-items: center;
302
+ gap: 1rem;
303
+ }
304
+
305
+ .yaml-file-info,
306
+ .yaml-instructions {
307
+ display: flex;
308
+ gap: 0.5rem;
309
+ margin: 0;
310
+ font-size: 0.9em;
311
+ color: var(--muted-color);
312
+ flex: 1;
313
+ min-width: 0;
314
+ line-height: 1.5;
315
+ }
316
+
317
+ .yaml-file-info {
318
+ align-items: center;
319
+ }
320
+
321
+ .yaml-instructions {
322
+ align-items: flex-start;
323
+ }
324
+
325
+ .yaml-file-info > span,
326
+ .yaml-instructions > span {
327
+ overflow: hidden;
328
+ text-overflow: ellipsis;
329
+ white-space: nowrap;
330
+ }
331
+
332
+ .yaml-file-info > i,
333
+ .yaml-instructions > i {
334
+ flex-shrink: 0;
335
+ }
336
+
337
+ .yaml-actions {
338
+ display: flex;
339
+ gap: 0.5rem;
340
+ flex-shrink: 0;
341
+ }
342
+
343
+ .yaml-actions button,
344
+ .yaml-actions [role="button"] {
345
+ width: auto;
346
+ margin: 0;
347
+ }
348
+
349
+ /* Conflict error banner */
350
+ .conflict-error {
351
+ display: flex;
352
+ align-items: center;
353
+ gap: 0.5rem;
354
+ padding: 1rem;
355
+ margin-bottom: 1rem;
356
+ background-color: var(--pico-mark-background-color);
357
+ color: var(--pico-del-color);
358
+ border-radius: var(--pico-border-radius);
359
+ }
360
+
361
+ .conflict-error i {
362
+ flex-shrink: 0;
363
+ }
364
+
365
+ /* Header action buttons - ghost style */
366
+ .btn-header {
367
+ display: inline-flex;
368
+ align-items: center;
369
+ gap: 0.35rem;
370
+ padding: 0.4rem 0.75rem;
371
+ font-size: 0.9rem;
372
+ color: var(--muted-color);
373
+ background: transparent;
374
+ border: 1px solid transparent;
375
+ border-radius: var(--border-radius);
376
+ text-decoration: none;
377
+ cursor: pointer;
378
+ transition: all 0.15s ease;
379
+ }
380
+
381
+ .btn-header:hover {
382
+ color: var(--primary);
383
+ border-color: var(--primary);
384
+ }
385
+
386
+ /* Header actions container */
387
+ .header-actions {
388
+ display: flex;
389
+ align-items: center;
390
+ gap: 0.5rem;
391
+ }
392
+
393
+ /* ==================== */
394
+ /* Markdown Editor Dialog */
395
+ /* ==================== */
396
+
397
+ /* Markdown Editor Overlay */
398
+ #markdown-editor-overlay {
399
+ position: fixed;
400
+ top: 0;
401
+ right: 0;
402
+ bottom: 0;
403
+ left: 0;
404
+ z-index: 1000;
405
+ }
406
+
407
+ #markdown-editor-overlay.hidden {
408
+ display: none;
409
+ }
410
+
411
+ .markdown-editor-backdrop {
412
+ position: absolute;
413
+ top: 0;
414
+ right: 0;
415
+ bottom: 0;
416
+ left: 0;
417
+ background-color: rgba(0, 0, 0, 0.5);
418
+ }
419
+
420
+ .markdown-editor-panel {
421
+ position: absolute;
422
+ top: 20px;
423
+ right: 20px;
424
+ bottom: 20px;
425
+ left: 20px;
426
+ display: flex;
427
+ flex-direction: column;
428
+ border-radius: 12px;
429
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.2);
430
+ background-color: var(--card-background-color, #fff);
431
+ overflow: hidden;
432
+ }
433
+
434
+
435
+ /* Lexical toolbar */
436
+ .lexical-toolbar {
437
+ display: flex;
438
+ align-items: center;
439
+ gap: 0.25rem;
440
+ padding: 0.5rem 1rem;
441
+ background-color: var(--card-background-color, #fff);
442
+ flex-wrap: wrap;
443
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
444
+ z-index: 1;
445
+ }
446
+
447
+ .toolbar-btn {
448
+ display: inline-flex;
449
+ align-items: center;
450
+ justify-content: center;
451
+ min-width: 2rem;
452
+ height: 2rem;
453
+ padding: 0 0.5rem;
454
+ margin: 0;
455
+ background: transparent;
456
+ border: 1px solid transparent;
457
+ border-radius: var(--border-radius);
458
+ color: var(--color);
459
+ font-size: 0.85rem;
460
+ font-weight: 600;
461
+ cursor: pointer;
462
+ transition: all 0.15s ease;
463
+ }
464
+
465
+ .toolbar-btn:hover {
466
+ background-color: var(--muted-border-color);
467
+ border-color: var(--muted-border-color);
468
+ }
469
+
470
+ .toolbar-btn:active {
471
+ background-color: var(--primary);
472
+ border-color: var(--primary);
473
+ color: var(--primary-inverse);
474
+ }
475
+
476
+ .toolbar-btn i {
477
+ font-size: 1.1rem;
478
+ }
479
+
480
+ .toolbar-divider {
481
+ width: 1px;
482
+ height: 1.5rem;
483
+ margin: 0 0.5rem;
484
+ background-color: var(--muted-border-color);
485
+ }
486
+
487
+ .toolbar-spacer {
488
+ flex: 1;
489
+ }
490
+
491
+ .toolbar-action {
492
+ padding: 0.4rem 0.75rem;
493
+ margin: 0;
494
+ font-size: 0.85rem;
495
+ }
496
+
497
+
498
+ /* Lexical editor container */
499
+ .lexical-editor-container {
500
+ flex: 1;
501
+ display: flex;
502
+ flex-direction: column;
503
+ min-height: 0;
504
+ position: relative;
505
+ }
506
+
507
+ #lexical-editor-root {
508
+ flex: 1;
509
+ min-height: 0;
510
+ padding: 1rem 1.5rem;
511
+ font-family: var(--font-family);
512
+ line-height: 1.6;
513
+ overflow-y: auto;
514
+ position: relative;
515
+ }
516
+
517
+ #lexical-editor-root:focus {
518
+ outline: none;
519
+ }
520
+
521
+ /* Lexical editor content styles */
522
+ #lexical-editor-root p {
523
+ margin: 0 0 0.75rem 0;
524
+ }
525
+
526
+ #lexical-editor-root p:last-child {
527
+ margin-bottom: 0;
528
+ }
529
+
530
+ #lexical-editor-root h1,
531
+ #lexical-editor-root h2,
532
+ #lexical-editor-root h3,
533
+ #lexical-editor-root h4 {
534
+ margin: 1rem 0 0.5rem 0;
535
+ font-weight: 600;
536
+ }
537
+
538
+ #lexical-editor-root h1:first-child,
539
+ #lexical-editor-root h2:first-child,
540
+ #lexical-editor-root h3:first-child {
541
+ margin-top: 0;
542
+ }
543
+
544
+ #lexical-editor-root ul,
545
+ #lexical-editor-root ol {
546
+ margin: 0.5rem 0;
547
+ padding-left: 1.5rem;
548
+ }
549
+
550
+ #lexical-editor-root li {
551
+ margin: 0.25rem 0;
552
+ }
553
+
554
+ #lexical-editor-root blockquote {
555
+ margin: 0.75rem 0;
556
+ padding: 0.5rem 1rem;
557
+ border-left: 3px solid var(--pico-muted-border-color, #e4e4e7);
558
+ color: var(--pico-muted-color, #71717a);
559
+ font-style: italic;
560
+ }
561
+
562
+ #lexical-editor-root code {
563
+ padding: 0.15rem 0.35rem;
564
+ background-color: var(--code-background-color, #f4f4f5);
565
+ border: 1px solid var(--pico-muted-border-color, #e4e4e7);
566
+ border-radius: 3px;
567
+ font-family: var(--pico-font-family-monospace, monospace);
568
+ font-size: 0.9em;
569
+ }
570
+
571
+ #lexical-editor-root pre {
572
+ margin: 0.75rem 0;
573
+ padding: 1rem;
574
+ background-color: var(--code-background-color);
575
+ border-radius: var(--border-radius);
576
+ overflow-x: auto;
577
+ position: relative;
578
+ }
579
+
580
+ #lexical-editor-root pre code {
581
+ padding: 0;
582
+ background: none;
583
+ }
584
+
585
+ /* Code block with border */
586
+ #lexical-editor-root .lexical-code {
587
+ position: relative;
588
+ display: block;
589
+ width: 100%;
590
+ margin: 0.75rem 0;
591
+ padding: 1rem;
592
+ background-color: var(--code-background-color, #f4f4f5);
593
+ border: 1px solid var(--pico-muted-border-color, #e4e4e7);
594
+ border-radius: var(--pico-border-radius, 0.375rem);
595
+ font-family: var(--pico-font-family-monospace, monospace);
596
+ font-size: 0.9em;
597
+ line-height: 1.5;
598
+ overflow-x: auto;
599
+ white-space: pre;
600
+ tab-size: 2;
601
+ box-sizing: border-box;
602
+ }
603
+
604
+ /* Toolbar language selector for code blocks */
605
+ .toolbar-select {
606
+ height: 2rem;
607
+ width: auto;
608
+ min-width: 130px;
609
+ max-width: 180px;
610
+ padding: 0 0.75rem;
611
+ margin: 0;
612
+ font-size: 0.85rem;
613
+ border: 1px solid var(--pico-muted-border-color, #e4e4e7);
614
+ border-radius: var(--pico-border-radius, 0.375rem);
615
+ background-color: transparent;
616
+ color: var(--pico-color, inherit);
617
+ cursor: pointer;
618
+ flex-shrink: 0;
619
+ }
620
+
621
+ .toolbar-select:hover {
622
+ border-color: var(--pico-primary, #1e88e5);
623
+ }
624
+
625
+ .toolbar-select:focus {
626
+ outline: none;
627
+ border-color: var(--pico-primary, #1e88e5);
628
+ }
629
+
630
+ .toolbar-select.hidden {
631
+ display: none;
632
+ }
633
+
634
+ /* Link styles */
635
+ #lexical-editor-root .lexical-link {
636
+ color: var(--pico-primary, #1e88e5);
637
+ text-decoration: underline;
638
+ cursor: pointer;
639
+ }
640
+
641
+ #lexical-editor-root .lexical-link:hover {
642
+ text-decoration: none;
643
+ }
644
+
645
+ /* Code highlight token colors - GitHub Light Theme (matches highlight.min.css) */
646
+ #lexical-editor-root .lexical-code .tokenComment { color: #6a737d; }
647
+ #lexical-editor-root .lexical-code .tokenPunctuation { color: #24292e; }
648
+ #lexical-editor-root .lexical-code .tokenProperty { color: #005cc5; }
649
+ #lexical-editor-root .lexical-code .tokenSelector { color: #032f62; }
650
+ #lexical-editor-root .lexical-code .tokenOperator { color: #005cc5; }
651
+ #lexical-editor-root .lexical-code .tokenAttr { color: #d73a49; }
652
+ #lexical-editor-root .lexical-code .tokenVariable { color: #e36209; }
653
+ #lexical-editor-root .lexical-code .tokenFunction { color: #6f42c1; }
654
+
655
+ #lexical-editor-root a {
656
+ color: var(--primary);
657
+ text-decoration: underline;
658
+ }
659
+
660
+ #lexical-editor-root strong,
661
+ #lexical-editor-root .lexical-bold {
662
+ font-weight: 700;
663
+ }
664
+
665
+ #lexical-editor-root em,
666
+ #lexical-editor-root .lexical-italic {
667
+ font-style: italic;
668
+ }
669
+
670
+ #lexical-editor-root u,
671
+ #lexical-editor-root .lexical-underline {
672
+ text-decoration: underline;
673
+ }
674
+
675
+ #lexical-editor-root s,
676
+ #lexical-editor-root .lexical-strikethrough {
677
+ text-decoration: line-through;
678
+ }
679
+
680
+ /* Label row with edit button */
681
+ .label-row {
682
+ display: flex;
683
+ align-items: center;
684
+ justify-content: space-between;
685
+ margin-bottom: 0.25rem;
686
+ }
687
+
688
+ .label-row label {
689
+ margin-bottom: 0;
690
+ }
691
+
692
+ .btn-edit-markdown {
693
+ display: inline-flex;
694
+ align-items: center;
695
+ gap: 0.35rem;
696
+ padding: 0.25rem 0.5rem;
697
+ font-size: 0.85rem;
698
+ color: var(--muted-color);
699
+ background: transparent;
700
+ border: 1px solid var(--muted-border-color);
701
+ border-radius: var(--border-radius);
702
+ cursor: pointer;
703
+ transition: all 0.15s ease;
704
+ }
705
+
706
+ .btn-edit-markdown:hover {
707
+ color: var(--primary);
708
+ border-color: var(--primary);
709
+ background-color: transparent;
710
+ }
711
+
712
+ .btn-edit-markdown i {
713
+ font-size: 0.9rem;
714
+ }
715
+
716
+ /* ==================== */
717
+ /* Dark Mode Support */
718
+ /* ==================== */
719
+
720
+ @media (prefers-color-scheme: dark) {
721
+ /* Editor panel dark mode */
722
+ .markdown-editor-panel {
723
+ background-color: var(--card-background-color, #1e1e1e);
724
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
725
+ }
726
+
727
+ .markdown-editor-backdrop {
728
+ background-color: rgba(0, 0, 0, 0.7);
729
+ }
730
+
731
+ /* Toolbar dark mode */
732
+ .lexical-toolbar {
733
+ background-color: var(--card-background-color, #1e1e1e);
734
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
735
+ }
736
+
737
+ .toolbar-btn {
738
+ color: var(--color, #c9d1d9);
739
+ }
740
+
741
+ .toolbar-btn:hover {
742
+ background-color: rgba(255, 255, 255, 0.1);
743
+ border-color: rgba(255, 255, 255, 0.1);
744
+ }
745
+
746
+ .toolbar-btn:active {
747
+ background-color: var(--primary);
748
+ border-color: var(--primary);
749
+ }
750
+
751
+ .toolbar-divider {
752
+ background-color: rgba(255, 255, 255, 0.15);
753
+ }
754
+
755
+ .toolbar-select {
756
+ background-color: transparent;
757
+ border-color: rgba(255, 255, 255, 0.2);
758
+ color: var(--color, #c9d1d9);
759
+ }
760
+
761
+ .toolbar-select:hover,
762
+ .toolbar-select:focus {
763
+ border-color: var(--primary, #58a6ff);
764
+ }
765
+
766
+ /* Editor root dark mode */
767
+ #lexical-editor-root {
768
+ color: var(--color, #c9d1d9);
769
+ background-color: var(--card-background-color, #1e1e1e);
770
+ }
771
+
772
+ /* Blockquote dark mode */
773
+ #lexical-editor-root blockquote {
774
+ border-left-color: rgba(255, 255, 255, 0.2);
775
+ color: #8b949e;
776
+ }
777
+
778
+ /* Inline code dark mode */
779
+ #lexical-editor-root code {
780
+ background-color: rgba(110, 118, 129, 0.4);
781
+ border-color: rgba(255, 255, 255, 0.1);
782
+ color: #c9d1d9;
783
+ }
784
+
785
+ /* Code block dark mode */
786
+ #lexical-editor-root .lexical-code {
787
+ background-color: #0d1117;
788
+ border-color: rgba(255, 255, 255, 0.1);
789
+ color: #c9d1d9;
790
+ }
791
+
792
+ /* Code highlight token colors - GitHub Dark Theme (matches highlight.min.css) */
793
+ #lexical-editor-root .lexical-code .tokenComment { color: #8b949e; }
794
+ #lexical-editor-root .lexical-code .tokenPunctuation { color: #c9d1d9; }
795
+ #lexical-editor-root .lexical-code .tokenProperty { color: #79c0ff; }
796
+ #lexical-editor-root .lexical-code .tokenSelector { color: #a5d6ff; }
797
+ #lexical-editor-root .lexical-code .tokenOperator { color: #79c0ff; }
798
+ #lexical-editor-root .lexical-code .tokenAttr { color: #ff7b72; }
799
+ #lexical-editor-root .lexical-code .tokenVariable { color: #ffa657; }
800
+ #lexical-editor-root .lexical-code .tokenFunction { color: #d2a8ff; }
801
+
802
+ /* Link dark mode */
803
+ #lexical-editor-root .lexical-link,
804
+ #lexical-editor-root a {
805
+ color: #58a6ff;
806
+ }
807
+
808
+ /* Edit button dark mode */
809
+ .btn-edit-markdown {
810
+ color: #8b949e;
811
+ border-color: rgba(255, 255, 255, 0.15);
812
+ }
813
+
814
+ .btn-edit-markdown:hover {
815
+ color: #58a6ff;
816
+ border-color: #58a6ff;
817
+ }
818
+ }
819
+
820
+ /* Responsive */
821
+ @media (max-width: 768px) {
822
+ .editor-header {
823
+ flex-direction: column;
824
+ align-items: flex-start;
825
+ gap: 1rem;
826
+ }
827
+
828
+ .annotations-grid {
829
+ grid-template-columns: 1fr;
830
+ }
831
+
832
+ .add-relation-row {
833
+ flex-direction: column;
834
+ }
835
+
836
+ .add-relation-row select,
837
+ .add-relation-row button {
838
+ width: 100%;
839
+ }
840
+
841
+ .form-actions {
842
+ flex-direction: column;
843
+ }
844
+
845
+ .form-actions button,
846
+ .form-actions [role="button"] {
847
+ width: 100%;
848
+ }
849
+
850
+ .yaml-output > footer {
851
+ flex-direction: column;
852
+ align-items: stretch;
853
+ }
854
+
855
+ .yaml-actions {
856
+ flex-direction: column;
857
+ }
858
+
859
+ .yaml-actions button,
860
+ .yaml-actions [role="button"] {
861
+ width: 100%;
862
+ }
863
+ }