- {bookError && (
-
-
Error loading book
-
- {bookError}
-
-
- )}
-
- {tokenizeError && (
-
-
Error processing book
-
- {tokenizeError.message}
-
-
- )}
-
- {!bookError && !tokenizeError && isLoading && (
-
Loading…
- )}
-
- {!bookError && !tokenizeError && !isLoading && chapterSegments.length === 0 && (
-
- No verse data for {scrRef.book} {scrRef.chapterNum}.
-
- )}
-
- {!bookError && !tokenizeError && !isLoading && chapterSegments.length > 0 && (
-
- {chapterSegments.map((seg) => (
-
- setScrRef({
- book: seg.startRef.book,
- chapterNum: seg.startRef.chapter,
- verseNum: seg.startRef.verse,
- })
- }
- />
- ))}
-
- )}
-
- );
-}
+import InterlinearizerLoader from './components/InterlinearizerLoader';
/**
- * Root WebView component for the Interlinearizer. Renders a sticky reference picker at the top and
- * delegates book fetching to {@link ProjectBookFetcher} in the scrollable content area below.
+ * Root WebView component for the Interlinearizer.
*
* @param props - WebView props injected by the PAPI host
* @param props.projectId - PAPI project ID passed from the host; undefined when the WebView is
@@ -213,47 +15,18 @@ globalThis.webViewComponent = function InterlinearizerWebView({
projectId,
useWebViewScrollGroupScrRef,
}: WebViewProps) {
- const [scrRef, setScrRef, scrollGroupId, setScrollGroupId] = useWebViewScrollGroupScrRef();
-
- const [localizedStrings] = useLocalizedStrings(
- useMemo(() => [...BOOK_CHAPTER_CONTROL_STRING_KEYS], []),
- );
- const { recentScriptureRefs: recentRefs, addRecentScriptureRef: onAddRecentRef } =
- useRecentScriptureRefs();
-
return (
-
- }
- endAreaChildren={
-
- }
- onSelectProjectMenuItem={() => {}}
- onSelectViewInfoMenuItem={() => {}}
- />
-
-
- {projectId ? (
-
- ) : (
-
- Open this WebView from a Paratext project to load its source book.
-
- )}
-
+ {projectId ? (
+
+ ) : (
+
+ Open this WebView from a Paratext project to load its source book.
+
+ )}
);
};
diff --git a/src/tailwind.css b/src/tailwind.css
index 9ada30f..dccbf8c 100644
--- a/src/tailwind.css
+++ b/src/tailwind.css
@@ -2,6 +2,17 @@
@tailwind components;
@tailwind utilities;
+@layer utilities {
+ .no-scrollbar {
+ scrollbar-width: none;
+ -ms-overflow-style: none;
+ }
+
+ .no-scrollbar::-webkit-scrollbar {
+ display: none;
+ }
+}
+
/* #region shared with https://github.com/paranext/paranext-core/blob/main/lib/platform-bible-react/src/index.css */
@layer base {
diff --git a/src/types/interlinearizer.d.ts b/src/types/interlinearizer.d.ts
index 009c166..8a5c39b 100644
--- a/src/types/interlinearizer.d.ts
+++ b/src/types/interlinearizer.d.ts
@@ -4,6 +4,14 @@
*/
declare module 'papi-shared-types' {
+ export interface ProjectSettingTypes {
+ /**
+ * When true, the Interlinearizer displays a continuous horizontal token scroll strip above the
+ * chapter segments. When false, only chapter segments are shown in token-chip mode.
+ */
+ 'interlinearizer.continuousScroll': boolean;
+ }
+
export interface CommandHandlers {
/**
* Opens the Interlinearizer for the project associated with the given WebView ID. Called from