@plannotator/ui 0.28.0 → 0.29.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 (105) hide show
  1. package/README.md +6 -0
  2. package/components/AISettingsTab.tsx +5 -4
  3. package/components/ActionMenu.tsx +5 -1
  4. package/components/AgentsTab.tsx +10 -23
  5. package/components/AnnotationPanel.tsx +9 -5
  6. package/components/AnnotationToolbar.tsx +5 -13
  7. package/components/AnnotationToolstrip.tsx +2 -2
  8. package/components/ApproveDropdown.tsx +1 -1
  9. package/components/BlockRenderer.tsx +1 -1
  10. package/components/CodeFilePopout.tsx +5 -4
  11. package/components/CommentPopover.tsx +391 -65
  12. package/components/DocBadges.tsx +29 -11
  13. package/components/ExportModal.tsx +16 -8
  14. package/components/GraphvizBlock.tsx +1 -1
  15. package/components/InlineMarkdown.tsx +30 -13
  16. package/components/KeyboardShortcuts.tsx +37 -2
  17. package/components/Landing.tsx +7 -7
  18. package/components/MenuVersionSection.tsx +4 -4
  19. package/components/MermaidBlock.tsx +1 -1
  20. package/components/ModeToggle.tsx +7 -6
  21. package/components/OpenInAppButton.tsx +2 -5
  22. package/components/PinpointOverlay.tsx +9 -7
  23. package/components/PlanHeaderMenu.tsx +8 -8
  24. package/components/PopoutDialog.tsx +6 -1
  25. package/components/ResizeHandle.tsx +1 -0
  26. package/components/Settings.tsx +172 -12
  27. package/components/SkillReferenceMenu.tsx +260 -0
  28. package/components/StickyHeaderLane.tsx +7 -0
  29. package/components/ThemeProvider.tsx +131 -32
  30. package/components/ThemeTab.tsx +123 -77
  31. package/components/ToolbarButtons.tsx +29 -8
  32. package/components/Viewer.tsx +396 -130
  33. package/components/VimKeyHud.tsx +695 -0
  34. package/components/VimModeAnnouncementDialog.tsx +557 -0
  35. package/components/VimModeOverlay.tsx +235 -0
  36. package/components/VimTargetReticle.tsx +284 -0
  37. package/components/ai/DocumentAIChatPanel.tsx +1 -1
  38. package/components/blocks/CodeBlock.tsx +18 -18
  39. package/components/blocks/TablePopout.tsx +7 -8
  40. package/components/blocks/TableToolbar.tsx +7 -8
  41. package/components/goal-setup/GoalSetupSurface.tsx +16 -3
  42. package/components/html-viewer/HtmlViewer.tsx +450 -47
  43. package/components/html-viewer/annotationNumbering.ts +37 -0
  44. package/components/html-viewer/bridge-script.ts +4051 -298
  45. package/components/html-viewer/composerYield.ts +51 -0
  46. package/components/html-viewer/srcdoc.ts +18 -3
  47. package/components/html-viewer/useHtmlAnnotation.ts +457 -32
  48. package/components/icons/themeIcons.tsx +1 -1
  49. package/components/plan-diff/PlanCleanDiffView.tsx +9 -9
  50. package/components/plan-diff/PlanDiffBadge.tsx +22 -1
  51. package/components/settings/HooksTab.tsx +12 -8
  52. package/components/sidebar/FileBrowser.tsx +4 -1
  53. package/components/themeModes.tsx +28 -0
  54. package/config/configStore.ts +76 -1
  55. package/config/settings.ts +152 -0
  56. package/configure.ts +9 -0
  57. package/globals.d.ts +7 -1
  58. package/hooks/useAIChat.ts +5 -2
  59. package/hooks/useAIProviderActivation.ts +47 -0
  60. package/hooks/useAIProviderConfig.ts +5 -1
  61. package/hooks/useAgentSettings.ts +64 -23
  62. package/hooks/useAgents.ts +4 -4
  63. package/hooks/useAnnotationHighlighter.ts +100 -3
  64. package/hooks/useArchive.ts +2 -1
  65. package/hooks/useFenceTheme.ts +17 -0
  66. package/hooks/useLinkedDoc.ts +68 -1
  67. package/hooks/usePinpoint.ts +76 -75
  68. package/hooks/usePlanDiff.ts +73 -2
  69. package/hooks/useSkillReferenceAutocomplete.ts +239 -0
  70. package/hooks/useUpdateCheck.ts +1 -2
  71. package/hooks/useVimDocumentFocus.ts +116 -0
  72. package/hooks/useVimSelection.ts +1063 -0
  73. package/package.json +4 -4
  74. package/print.css +14 -13
  75. package/shortcuts/core.ts +38 -13
  76. package/shortcuts/index.ts +10 -0
  77. package/shortcuts/plan-review/commentPopover.shortcuts.ts +7 -0
  78. package/shortcuts/plan-review/vimSelection.shortcuts.ts +251 -0
  79. package/shortcuts/runtime.ts +111 -12
  80. package/styles.css +1 -1
  81. package/theme.css +504 -0
  82. package/themes/colorblind.css +89 -0
  83. package/themes/plannotator.css +2 -2
  84. package/types.ts +93 -10
  85. package/utils/agentSwitch.ts +33 -7
  86. package/utils/blockTargeting.ts +462 -178
  87. package/utils/clipboard.ts +110 -0
  88. package/utils/codeBlockMark.ts +50 -0
  89. package/utils/codeHighlight.ts +293 -0
  90. package/utils/codexModels.ts +79 -0
  91. package/utils/domSelection.ts +84 -0
  92. package/utils/htmlChrome.ts +73 -0
  93. package/utils/inputMethod.ts +79 -6
  94. package/utils/parser.ts +517 -21
  95. package/utils/preferenceTtl.ts +15 -0
  96. package/utils/sharing.ts +0 -1
  97. package/utils/skillCatalog.ts +269 -0
  98. package/utils/skillReferences.ts +475 -0
  99. package/utils/syntaxTheme.ts +83 -0
  100. package/utils/themeRegistry.ts +154 -0
  101. package/utils/vimHud.ts +263 -0
  102. package/utils/vimModeAnnouncement.ts +23 -0
  103. package/utils/vimNavigation.ts +417 -0
  104. package/utils/vimReticle.ts +88 -0
  105. package/utils/vimScroll.ts +162 -0
package/theme.css CHANGED
@@ -27,6 +27,7 @@
27
27
  @import "./themes/cursor.css";
28
28
  @import "./themes/cursor-hc.css";
29
29
  @import "./themes/cursor-midnight.css";
30
+ @import "./themes/colorblind.css";
30
31
  @import "./themes/everforest.css";
31
32
  @import "./themes/everforest-hard.css";
32
33
  @import "./themes/everforest-soft.css";
@@ -56,6 +57,509 @@
56
57
  @import "./themes/neutral.css";
57
58
  @import "./print.css";
58
59
 
60
+ /* Skill-reference composer input (CommentPopover). The textarea's own glyphs
61
+ * are transparent — a mirrored aria-hidden overlay behind it paints the text,
62
+ * with reference tokens in the theme's primary color. The caret and the
63
+ * selection stay on the textarea: the caret takes the foreground token, and
64
+ * the selection uses a translucent primary wash so the overlay text stays
65
+ * readable through it. During IME composition `.pn-ref-composing` restores
66
+ * the native text so composition underlines render normally. */
67
+ .pn-ref-input {
68
+ color: transparent;
69
+ caret-color: var(--foreground);
70
+ }
71
+ .pn-ref-input::selection {
72
+ background: color-mix(in oklab, var(--primary) 30%, transparent);
73
+ color: transparent;
74
+ }
75
+ .pn-ref-input.pn-ref-composing {
76
+ color: inherit;
77
+ }
78
+ .pn-ref-input.pn-ref-composing::selection {
79
+ color: inherit;
80
+ }
81
+
82
+ /* Live Vim HUD target — mirrors the four-corner treatment used in the
83
+ * product demo while measuring the real semantic target/caret/range. */
84
+ .vim-target-reticle {
85
+ position: absolute;
86
+ inset: 0;
87
+ z-index: 23;
88
+ overflow: visible;
89
+ pointer-events: none;
90
+ }
91
+
92
+ .vim-target-reticle__fill,
93
+ .vim-target-reticle__corner,
94
+ .vim-target-reticle__label {
95
+ position: absolute;
96
+ top: 0;
97
+ left: 0;
98
+ will-change: transform;
99
+ transition: transform 90ms cubic-bezier(0.22, 1, 0.36, 1);
100
+ }
101
+
102
+ .vim-target-reticle__fill {
103
+ width: 100px;
104
+ height: 100px;
105
+ transform-origin: 0 0;
106
+ border-radius: 8px;
107
+ background: rgba(167, 139, 250, 0.045);
108
+ box-shadow:
109
+ inset 0 0 0 1px rgba(196, 181, 253, 0.16),
110
+ 0 0 42px rgba(139, 92, 246, 0.12);
111
+ }
112
+
113
+ .vim-target-reticle__corner {
114
+ width: 28px;
115
+ height: 28px;
116
+ border-color: #c4b5fd;
117
+ filter:
118
+ drop-shadow(0 0 6px rgba(167, 139, 250, 0.92))
119
+ drop-shadow(0 0 18px rgba(124, 58, 237, 0.42));
120
+ }
121
+
122
+ .vim-target-reticle__corner--top-left {
123
+ border-top: 3px solid;
124
+ border-left: 3px solid;
125
+ border-top-left-radius: 8px;
126
+ }
127
+
128
+ .vim-target-reticle__corner--top-right {
129
+ border-top: 3px solid;
130
+ border-right: 3px solid;
131
+ border-top-right-radius: 8px;
132
+ }
133
+
134
+ .vim-target-reticle__corner--bottom-left {
135
+ border-bottom: 3px solid;
136
+ border-left: 3px solid;
137
+ border-bottom-left-radius: 8px;
138
+ }
139
+
140
+ .vim-target-reticle__corner--bottom-right {
141
+ border-right: 3px solid;
142
+ border-bottom: 3px solid;
143
+ border-bottom-right-radius: 8px;
144
+ }
145
+
146
+ .vim-target-reticle__label {
147
+ z-index: 1;
148
+ display: flex;
149
+ align-items: center;
150
+ gap: 8px;
151
+ min-width: 118px;
152
+ height: 30px;
153
+ max-width: min(280px, calc(100vw - 24px));
154
+ padding: 0 11px;
155
+ overflow: hidden;
156
+ border: 1px solid rgba(216, 206, 255, 0.42);
157
+ border-radius: 9px;
158
+ color: #f6f2ff;
159
+ background: rgba(18, 14, 28, 0.84);
160
+ box-shadow:
161
+ 0 10px 28px rgba(0, 0, 0, 0.42),
162
+ 0 0 20px rgba(139, 92, 246, 0.18);
163
+ backdrop-filter: blur(10px);
164
+ font: 700 10px/1 var(--font-mono), ui-monospace, SFMono-Regular, Menlo, monospace;
165
+ letter-spacing: 0.13em;
166
+ text-overflow: ellipsis;
167
+ white-space: nowrap;
168
+ }
169
+
170
+ .vim-target-reticle__label-dot {
171
+ width: 7px;
172
+ height: 7px;
173
+ flex: 0 0 auto;
174
+ border-radius: 999px;
175
+ background: #c4b5fd;
176
+ box-shadow: 0 0 12px rgba(167, 139, 250, 0.94);
177
+ }
178
+
179
+ @media (prefers-reduced-motion: reduce) {
180
+ .vim-target-reticle__fill,
181
+ .vim-target-reticle__corner,
182
+ .vim-target-reticle__label {
183
+ transition: none;
184
+ }
185
+ }
186
+
187
+ .vim-key-hud__map-toggle {
188
+ transition:
189
+ color 120ms ease,
190
+ background-color 120ms ease,
191
+ border-color 120ms ease,
192
+ transform 120ms ease-out;
193
+ touch-action: manipulation;
194
+ }
195
+
196
+ .vim-key-hud__map-toggle:focus-visible {
197
+ outline: 2px solid rgba(255, 255, 255, 0.82);
198
+ outline-offset: 2px;
199
+ }
200
+
201
+ .vim-key-hud__map-toggle:active {
202
+ transform: scale(0.97);
203
+ }
204
+
205
+ .vim-key-hud__map-columns {
206
+ display: grid;
207
+ grid-template-columns: repeat(3, minmax(0, 1fr));
208
+ gap: 9px;
209
+ }
210
+
211
+ .vim-key-hud__map-scroll {
212
+ scrollbar-color: rgba(196, 181, 253, 0.24) transparent;
213
+ scrollbar-width: thin;
214
+ }
215
+
216
+ @media (hover: hover) and (pointer: fine) {
217
+ .vim-key-hud__map-toggle:hover {
218
+ border-color: rgba(196, 181, 253, 0.34) !important;
219
+ color: #e1d8ef !important;
220
+ background: rgba(167, 139, 250, 0.16) !important;
221
+ }
222
+ }
223
+
224
+ @media (max-width: 760px) {
225
+ .vim-key-hud__map-columns {
226
+ grid-template-columns: 1fr;
227
+ }
228
+ }
229
+
230
+ @media (prefers-reduced-motion: reduce) {
231
+ .vim-key-hud__map-toggle {
232
+ transition: none;
233
+ }
234
+ }
235
+
236
+ /* First-run Vim announcement. The preview reuses the live HUD's violet
237
+ * glass, illuminated keycap, and four-corner targeting vocabulary. */
238
+ .vim-announcement-backdrop {
239
+ animation: vim-announcement-backdrop-in 160ms ease-out both;
240
+ }
241
+
242
+ .vim-announcement-dialog {
243
+ animation: vim-announcement-dialog-in 200ms cubic-bezier(0.22, 1, 0.36, 1) both;
244
+ }
245
+
246
+ .vim-announcement-switch {
247
+ transition:
248
+ border-color 140ms ease,
249
+ background-color 140ms ease;
250
+ touch-action: manipulation;
251
+ }
252
+
253
+ .vim-announcement-secondary-action {
254
+ transition:
255
+ color 140ms ease,
256
+ background-color 140ms ease;
257
+ }
258
+
259
+ .vim-announcement-primary-action {
260
+ transition: opacity 140ms ease;
261
+ }
262
+
263
+ .vim-announcement-switch__track {
264
+ position: relative;
265
+ width: 42px;
266
+ height: 24px;
267
+ flex: 0 0 auto;
268
+ border: 1px solid color-mix(in srgb, var(--border) 88%, transparent);
269
+ border-radius: 999px;
270
+ background: color-mix(in srgb, var(--muted) 75%, transparent);
271
+ transition:
272
+ border-color 160ms ease,
273
+ background-color 160ms ease;
274
+ }
275
+
276
+ .vim-announcement-switch__thumb {
277
+ position: absolute;
278
+ top: 3px;
279
+ left: 3px;
280
+ width: 16px;
281
+ height: 16px;
282
+ border-radius: 999px;
283
+ background: var(--muted-foreground);
284
+ box-shadow: 0 1px 4px rgba(0, 0, 0, 0.28);
285
+ transform: translate3d(0, 0, 0);
286
+ transition:
287
+ background-color 160ms ease,
288
+ transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
289
+ }
290
+
291
+ .vim-announcement-switch__track--checked {
292
+ border-color: color-mix(in srgb, var(--primary) 72%, transparent);
293
+ background: color-mix(in srgb, var(--primary) 58%, transparent);
294
+ }
295
+
296
+ .vim-announcement-switch__track--checked .vim-announcement-switch__thumb {
297
+ background: var(--primary-foreground);
298
+ transform: translate3d(18px, 0, 0);
299
+ }
300
+
301
+ .vim-announcement-step {
302
+ animation: vim-announcement-step 14s linear infinite both;
303
+ }
304
+
305
+ .vim-announcement-step--1 { animation-delay: 0s; }
306
+ .vim-announcement-step--2 { animation-delay: -12s; }
307
+ .vim-announcement-step--3 { animation-delay: -10s; }
308
+ .vim-announcement-step--4 { animation-delay: -8s; }
309
+ .vim-announcement-step--5 { animation-delay: -6s; }
310
+ .vim-announcement-step--6 { animation-delay: -4s; }
311
+ .vim-announcement-step--7 { animation-delay: -2s; }
312
+
313
+ .vim-announcement-showcase[data-playing="false"] .vim-announcement-step,
314
+ .vim-announcement-showcase[data-playing="false"] .vim-announcement-code-selection {
315
+ animation-play-state: paused;
316
+ }
317
+
318
+ .vim-announcement-showcase__canvas {
319
+ transform-origin: top left;
320
+ }
321
+
322
+ .vim-announcement-reticle {
323
+ position: absolute;
324
+ z-index: 12;
325
+ border-radius: 8px;
326
+ background: rgba(167, 139, 250, 0.045);
327
+ box-shadow:
328
+ inset 0 0 0 1px rgba(196, 181, 253, 0.16),
329
+ 0 0 42px rgba(139, 92, 246, 0.14);
330
+ pointer-events: none;
331
+ }
332
+
333
+ .vim-announcement-reticle--block {
334
+ inset: -5px;
335
+ }
336
+
337
+ .vim-announcement-reticle--inline {
338
+ inset: -3px -8px;
339
+ }
340
+
341
+ .vim-announcement-reticle--cursor-start {
342
+ top: 50%;
343
+ left: -22px;
344
+ width: 44px;
345
+ height: 32px;
346
+ margin-top: -16px;
347
+ }
348
+
349
+ .vim-announcement-reticle--selection {
350
+ top: 50%;
351
+ left: 50%;
352
+ width: 44px;
353
+ height: 32px;
354
+ margin-top: -16px;
355
+ margin-left: -22px;
356
+ }
357
+
358
+ .vim-announcement-reticle__corner {
359
+ position: absolute;
360
+ width: 24px;
361
+ height: 24px;
362
+ border-color: #c4b5fd;
363
+ filter:
364
+ drop-shadow(0 0 6px rgba(167, 139, 250, 0.92))
365
+ drop-shadow(0 0 18px rgba(124, 58, 237, 0.42));
366
+ }
367
+
368
+ .vim-announcement-reticle__corner--top-left {
369
+ top: 0;
370
+ left: 0;
371
+ border-top: 3px solid;
372
+ border-left: 3px solid;
373
+ border-top-left-radius: 8px;
374
+ }
375
+
376
+ .vim-announcement-reticle__corner--top-right {
377
+ top: 0;
378
+ right: 0;
379
+ border-top: 3px solid;
380
+ border-right: 3px solid;
381
+ border-top-right-radius: 8px;
382
+ }
383
+
384
+ .vim-announcement-reticle__corner--bottom-left {
385
+ bottom: 0;
386
+ left: 0;
387
+ border-bottom: 3px solid;
388
+ border-left: 3px solid;
389
+ border-bottom-left-radius: 8px;
390
+ }
391
+
392
+ .vim-announcement-reticle__corner--bottom-right {
393
+ right: 0;
394
+ bottom: 0;
395
+ border-right: 3px solid;
396
+ border-bottom: 3px solid;
397
+ border-bottom-right-radius: 8px;
398
+ }
399
+
400
+ .vim-announcement-reticle__label {
401
+ position: absolute;
402
+ bottom: calc(100% + 6px);
403
+ left: 0;
404
+ display: flex;
405
+ align-items: center;
406
+ gap: 7px;
407
+ height: 27px;
408
+ max-width: 250px;
409
+ padding: 0 9px;
410
+ overflow: hidden;
411
+ border: 1px solid rgba(216, 206, 255, 0.38);
412
+ border-radius: 8px;
413
+ color: #f6f2ff;
414
+ background: rgba(18, 14, 28, 0.82);
415
+ box-shadow:
416
+ 0 8px 24px rgba(0, 0, 0, 0.38),
417
+ 0 0 18px rgba(139, 92, 246, 0.18);
418
+ backdrop-filter: blur(9px);
419
+ font: 800 8px/1 var(--font-mono), ui-monospace, SFMono-Regular, Menlo, monospace;
420
+ letter-spacing: 0.12em;
421
+ white-space: nowrap;
422
+ }
423
+
424
+ .vim-announcement-reticle--cursor-start .vim-announcement-reticle__label {
425
+ top: calc(100% + 6px);
426
+ bottom: auto;
427
+ }
428
+
429
+ .vim-announcement-reticle__dot {
430
+ width: 6px;
431
+ height: 6px;
432
+ flex: 0 0 auto;
433
+ border-radius: 999px;
434
+ background: #c4b5fd;
435
+ box-shadow: 0 0 10px rgba(167, 139, 250, 0.94);
436
+ }
437
+
438
+ .vim-announcement-code-selection {
439
+ animation: vim-announcement-selection 14s linear infinite both;
440
+ }
441
+
442
+ .vim-announcement-comment {
443
+ position: absolute;
444
+ top: calc(100% + 24px);
445
+ left: -18px;
446
+ z-index: 14;
447
+ width: 194px;
448
+ padding: 9px 11px;
449
+ border: 1px solid rgba(196, 181, 253, 0.28);
450
+ border-radius: 9px;
451
+ color: #f5f0ff;
452
+ background: rgba(27, 23, 38, 0.9);
453
+ box-shadow:
454
+ 0 12px 30px rgba(0, 0, 0, 0.42),
455
+ 0 0 24px rgba(139, 92, 246, 0.14);
456
+ backdrop-filter: blur(10px);
457
+ }
458
+
459
+ @keyframes vim-announcement-backdrop-in {
460
+ from { opacity: 0; }
461
+ to { opacity: 1; }
462
+ }
463
+
464
+ @keyframes vim-announcement-dialog-in {
465
+ from {
466
+ opacity: 0;
467
+ transform: translate3d(0, 8px, 0) scale(0.985);
468
+ }
469
+ to {
470
+ opacity: 1;
471
+ transform: translate3d(0, 0, 0) scale(1);
472
+ }
473
+ }
474
+
475
+ @keyframes vim-announcement-step {
476
+ 0%,
477
+ 11% {
478
+ opacity: 1;
479
+ transform: scale(1);
480
+ }
481
+ 14%,
482
+ 96% {
483
+ opacity: 0;
484
+ transform: scale(0.985);
485
+ }
486
+ 100% {
487
+ opacity: 1;
488
+ transform: scale(1);
489
+ }
490
+ }
491
+
492
+ @keyframes vim-announcement-selection {
493
+ 0%,
494
+ 70% {
495
+ color: #d2a8ff;
496
+ background: transparent;
497
+ box-shadow: none;
498
+ }
499
+ 72%,
500
+ 100% {
501
+ color: #f5f0ff;
502
+ background: rgba(139, 92, 246, 0.48);
503
+ box-shadow: 0 0 12px rgba(139, 92, 246, 0.24);
504
+ }
505
+ }
506
+
507
+ @media (hover: hover) and (pointer: fine) {
508
+ .vim-announcement-switch:hover {
509
+ border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
510
+ background: color-mix(in srgb, var(--muted) 48%, transparent);
511
+ }
512
+
513
+ .vim-announcement-secondary-action:hover {
514
+ color: var(--foreground);
515
+ background: var(--muted);
516
+ }
517
+
518
+ .vim-announcement-primary-action:hover {
519
+ opacity: 0.9;
520
+ }
521
+ }
522
+
523
+ @media (max-width: 820px) {
524
+ .vim-announcement-showcase__canvas {
525
+ width: calc(100% / 0.81);
526
+ height: calc(100% / 0.81);
527
+ transform: scale(0.81);
528
+ }
529
+ }
530
+
531
+ @media (prefers-reduced-motion: reduce) {
532
+ .vim-announcement-backdrop,
533
+ .vim-announcement-dialog,
534
+ .vim-announcement-step,
535
+ .vim-announcement-code-selection {
536
+ animation: none;
537
+ }
538
+
539
+ .vim-announcement-switch,
540
+ .vim-announcement-switch__track,
541
+ .vim-announcement-switch__thumb,
542
+ .vim-announcement-secondary-action,
543
+ .vim-announcement-primary-action {
544
+ transition: none;
545
+ }
546
+
547
+ .vim-announcement-step {
548
+ opacity: 0;
549
+ }
550
+
551
+ .vim-announcement-step--6 {
552
+ opacity: 1;
553
+ transform: none;
554
+ }
555
+
556
+ .vim-announcement-code-selection {
557
+ color: #f5f0ff;
558
+ background: rgba(139, 92, 246, 0.48);
559
+ box-shadow: 0 0 12px rgba(139, 92, 246, 0.24);
560
+ }
561
+ }
562
+
59
563
  /* Tailwind bridge — maps CSS vars to utility classes */
60
564
  @theme inline {
61
565
  --color-background: var(--background);
@@ -0,0 +1,89 @@
1
+ /* Colorblind — tuned for red-green color vision deficiency (protanopia /
2
+ * deuteranopia, the common ~95% of CVD). Additions are blue, deletions are
3
+ * orange: the pair differs along the blue-yellow axis that survives red-green
4
+ * dichromacy. Diff pair verified with Machado et al. (2009) severity-1.0
5
+ * simulation: simulated add/del line backgrounds stay at CIEDE2000 >= 8.9
6
+ * across every diffLineBgIntensity (subtle/normal/strong) in both modes, and
7
+ * the theme foreground keeps >= 4.7:1 WCAG contrast over the strongest tint.
8
+ *
9
+ * --diffs-addition-color-override / --diffs-deletion-color-override are
10
+ * @pierre/diffs' theme-override entry points; custom properties inherit into
11
+ * the diff shadow DOM, so defining them here recolors the review editor's
12
+ * line backgrounds, gutter +/- signs, indicator bars, and per-file counts
13
+ * without any app-code changes. Plan-diff views and file-tree +/- follow
14
+ * --success / --destructive, which map to the same pair. */
15
+ .theme-colorblind {
16
+ --background: #16181d;
17
+ --foreground: #eaedf2;
18
+ --card: #1c1f26;
19
+ --card-foreground: #eaedf2;
20
+ --popover: #22262e;
21
+ --popover-foreground: #eaedf2;
22
+ --primary: #7fb0f2;
23
+ --primary-foreground: #10131a;
24
+ --secondary: #2a2e37;
25
+ --secondary-foreground: #dfe3ea;
26
+ --muted: #232730;
27
+ --muted-foreground: #a7aeba;
28
+ --accent: #e5b84a;
29
+ --accent-foreground: #16181d;
30
+ --destructive: #c96e12;
31
+ --destructive-foreground: #16181d;
32
+ --border: #343945;
33
+ --input: #232730;
34
+ --ring: #7fb0f2;
35
+ --success: #4f83d1;
36
+ --success-foreground: #10131a;
37
+ --warning: #d9a839;
38
+ --warning-foreground: #16181d;
39
+
40
+ --font-sans: 'Inter Variable', 'Inter', system-ui, sans-serif;
41
+ --font-mono: 'Geist Mono Variable', 'Geist Mono', 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
42
+ --radius: 0.625rem;
43
+
44
+ --code-bg: #1d212a;
45
+ --focus-highlight: #35b6d9;
46
+
47
+ /* Review-editor diff pair (Pierre pipeline). */
48
+ --diffs-addition-color-override: #4f83d1;
49
+ --diffs-deletion-color-override: #c96e12;
50
+ }
51
+
52
+ .theme-colorblind.light {
53
+ --background: #f8f9fb;
54
+ --foreground: #22262e;
55
+ --card: #ffffff;
56
+ --card-foreground: #22262e;
57
+ --popover: #ffffff;
58
+ --popover-foreground: #22262e;
59
+ --primary: #1a63b8;
60
+ --primary-foreground: #ffffff;
61
+ --secondary: #e7eaef;
62
+ --secondary-foreground: #333a45;
63
+ --muted: #eceef3;
64
+ --muted-foreground: #565e6b;
65
+ --accent: #946300;
66
+ --accent-foreground: #ffffff;
67
+ --destructive: #a55c1e;
68
+ --destructive-foreground: #ffffff;
69
+ --border: #d8dce3;
70
+ --input: #eceef3;
71
+ --ring: #1a63b8;
72
+ --success: #216cab;
73
+ --success-foreground: #ffffff;
74
+ --warning: #8f6400;
75
+ --warning-foreground: #ffffff;
76
+
77
+ --code-bg: #eef0f4;
78
+ --focus-highlight: #0e7d9e;
79
+
80
+ --diffs-addition-color-override: #216cab;
81
+ --diffs-deletion-color-override: #a55c1e;
82
+ }
83
+
84
+ /* Code-block token colours are no longer hand-written here. Plan-editor fences
85
+ * are highlighted by the same Shiki instance, in the same resolved theme, as
86
+ * the code-review diff pane — for this palette that is @pierre/theme's
87
+ * `pierre-{dark,light}-protanopia-deuteranopia`, which is exactly what the
88
+ * removed highlight.js `.hljs-*` overrides were approximating by hand. */
89
+
@@ -23,8 +23,8 @@
23
23
  --warning: oklch(0.75 0.15 85);
24
24
  --warning-foreground: oklch(0.20 0.02 260);
25
25
 
26
- --font-sans: 'Inter', system-ui, sans-serif;
27
- --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
26
+ --font-sans: 'Inter Variable', 'Inter', system-ui, sans-serif;
27
+ --font-mono: 'Geist Mono Variable', 'Geist Mono', 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
28
28
  --radius: 0.625rem;
29
29
 
30
30
  --code-bg: oklch(0.26 0.02 260);