import React from "react"; import { motion, AnimatePresence } from "motion/react"; import Paragraph from "./Paragraph"; import { useZoom } from "./hooks/useZoom"; import { containerVariants, buttonVariants } from "./animations"; import { NLP } from "sortug-ai"; interface TextFocusMorphProps { text: string; doc: NLP.Spacy.SpacyRes; stanza?: NLP.Stanza.StanzaRes | undefined; } const FullText: React.FC = ({ text, doc, stanza }) => { const { viewState, navigateBack, handleElementClick } = useZoom(); const { level } = viewState; // Split text into paragraphs const paragraphs = text .split("\n\n") .map((p) => p.trim()) .filter(Boolean); return (
{level !== "text" && ( ← Back )} {paragraphs.map((paragraph, idx) => ( ))}
); }; export default FullText;