( kind: SplitLineCell["kind"], theme: AppTheme, moveKind?: SplitLineCell["moveKind"], )
| 68 | |
| 69 | /** Pick split-view colors from the semantic diff cell kind. */ |
| 70 | export function splitCellPalette( |
| 71 | kind: SplitLineCell["kind"], |
| 72 | theme: AppTheme, |
| 73 | moveKind?: SplitLineCell["moveKind"], |
| 74 | ) { |
| 75 | if (kind === "addition") { |
| 76 | return { |
| 77 | gutterBg: moveKind ? theme.movedAddedBg : theme.addedBg, |
| 78 | contentBg: moveKind ? theme.movedAddedBg : theme.addedBg, |
| 79 | signColor: theme.addedSignColor, |
| 80 | numberColor: theme.addedSignColor, |
| 81 | }; |
| 82 | } |
| 83 | |
| 84 | if (kind === "deletion") { |
| 85 | return { |
| 86 | gutterBg: moveKind ? theme.movedRemovedBg : theme.removedBg, |
| 87 | contentBg: moveKind ? theme.movedRemovedBg : theme.removedBg, |
| 88 | signColor: theme.removedSignColor, |
| 89 | numberColor: theme.removedSignColor, |
| 90 | }; |
| 91 | } |
| 92 | |
| 93 | if (kind === "empty") { |
| 94 | return { |
| 95 | gutterBg: theme.lineNumberBg, |
| 96 | contentBg: theme.panelAlt, |
| 97 | signColor: theme.muted, |
| 98 | numberColor: theme.lineNumberFg, |
| 99 | }; |
| 100 | } |
| 101 | |
| 102 | return { |
| 103 | gutterBg: theme.lineNumberBg, |
| 104 | contentBg: theme.contextBg, |
| 105 | signColor: theme.muted, |
| 106 | numberColor: theme.lineNumberFg, |
| 107 | }; |
| 108 | } |
| 109 | |
| 110 | /** Pick stack-view colors from the semantic diff cell kind. */ |
| 111 | export function stackCellPalette( |
no outgoing calls
no test coverage detected