+ {!nativeHighlightsSupported ? (
+
+
+ {highlightRects.map((rect, index) => {
+ const isFocused = rect.threadId === focusedThreadId;
+ const isStale = rect.anchorState === "stale";
+ const isResolved = rect.status === "resolved";
+ return (
+
+ );
+ })}
+
+
+ ) : null}
+
+
{highlightRects.map((rect, index) => {
const isFocused = rect.threadId === focusedThreadId;
- const isStale = rect.anchorState === "stale";
- const isResolved = rect.status === "resolved";
return (
- {
+ event.preventDefault();
+ onThreadFocus(rect.threadId);
+ }}
/>
);
})}
-
-
-
-
- {highlightRects.map((rect, index) => {
- const isFocused = rect.threadId === focusedThreadId;
- return (
-
>
diff --git a/ui/src/index.css b/ui/src/index.css
index efac23dfba3..5fb6eddfd7c 100644
--- a/ui/src/index.css
+++ b/ui/src/index.css
@@ -89,6 +89,10 @@
--chip-match-identifier-bg: var(--muted);
--chip-match-identifier-fg: var(--muted-foreground);
--chip-match-identifier-border: var(--border);
+ --paperclip-doc-annotation-highlight-open: #fef08a;
+ --paperclip-doc-annotation-highlight-focused: #fde047;
+ --paperclip-doc-annotation-highlight-stale: #fef08a;
+ --paperclip-doc-annotation-highlight-resolved: #fef9c3;
}
.dark {
@@ -136,6 +140,30 @@
--chip-match-identifier-bg: var(--muted);
--chip-match-identifier-fg: var(--muted-foreground);
--chip-match-identifier-border: var(--border);
+ --paperclip-doc-annotation-highlight-open: #a16207;
+ --paperclip-doc-annotation-highlight-focused: #ca8a04;
+ --paperclip-doc-annotation-highlight-stale: #854d0e;
+ --paperclip-doc-annotation-highlight-resolved: #713f12;
+}
+
+::highlight(paperclip-doc-annotation-open) {
+ background-color: var(--paperclip-doc-annotation-highlight-open);
+ color: inherit;
+}
+
+::highlight(paperclip-doc-annotation-focused) {
+ background-color: var(--paperclip-doc-annotation-highlight-focused);
+ color: inherit;
+}
+
+::highlight(paperclip-doc-annotation-stale) {
+ background-color: var(--paperclip-doc-annotation-highlight-stale);
+ color: inherit;
+}
+
+::highlight(paperclip-doc-annotation-resolved) {
+ background-color: var(--paperclip-doc-annotation-highlight-resolved);
+ color: inherit;
}
@layer base {