From ae66ddaf4a617f390ac58e3c5999c021083a003e Mon Sep 17 00:00:00 2001 From: Elie Gambache Date: Mon, 2 Feb 2026 23:22:03 +0200 Subject: [PATCH] feat(highlights): implement position-based text highlighting - Add character offset tracking for precise highlight positioning - Preserve highlight position when toggling nikud/taamim visibility - Improve highlight color picker UI in context menu - Use proper menu item colors for icons and text --- .run/SeforimApp [run].run.xml | 1 - .../composeResources/values/strings.xml | 1 + .../seforimapp/core/HighlightStore.kt | 147 +++++++++++++ .../seforimapp/core/LineTextRegistry.kt | 202 ++++++++++++++++++ .../seforimapp/core/TextSelectionStore.kt | 24 +++ .../core/presentation/text/HebrewSearch.kt | 79 ++++++- .../core/presentation/text/Highlighting.kt | 58 +++++ .../features/bookcontent/BookContentScreen.kt | 181 ++++++++++++++++ .../bookcontent/views/BookContentView.kt | 121 ++++++++++- .../resources/icons/lucide_text_search.svg | 12 +- SeforimLibrary | 2 +- gradle/libs.versions.toml | 2 +- 12 files changed, 816 insertions(+), 14 deletions(-) create mode 100644 SeforimApp/src/jvmMain/kotlin/io/github/kdroidfilter/seforimapp/core/HighlightStore.kt create mode 100644 SeforimApp/src/jvmMain/kotlin/io/github/kdroidfilter/seforimapp/core/LineTextRegistry.kt diff --git a/.run/SeforimApp [run].run.xml b/.run/SeforimApp [run].run.xml index 3b8b74cb..058c9f76 100644 --- a/.run/SeforimApp [run].run.xml +++ b/.run/SeforimApp [run].run.xml @@ -3,7 +3,6 @@