improve cv2

This commit is contained in:
2025-12-17 19:42:15 +01:00
parent 1aff1703ac
commit a403bf1ac0
9 changed files with 232 additions and 103 deletions

View File

@@ -26,15 +26,16 @@
const showEdits = persistentWritable("chord-editor-show-edits", true);
let originalDoc = $derived(
$chords
.map(
(chord) =>
.map((chord) => {
return (
chord.actions
.filter((it) => it !== 0)
.map((it) => actionToValue(it))
.join("") +
"=>" +
chord.phrase.map((it) => actionToValue(it)).join(""),
)
chord.phrase.map((it) => actionToValue(it)).join("")
);
})
.join("\n"),
);
let editor: HTMLDivElement | undefined = $state(undefined);
@@ -175,6 +176,11 @@
) !important;
}
:global(.cm-activeLine),
:global(.cm-line:hover) {
--auto-space-show: 1;
}
:global(.cm-activeLine) {
border-bottom: 1px solid var(--md-sys-color-surface-variant);
/*background-color: color-mix(