From cb1b56f5a0eddbf77446f415f2beda57c8305f85 Mon Sep 17 00:00:00 2001
From: polwex <polwex@sortug.com>
Date: Sun, 23 Nov 2025 01:12:53 +0700
Subject: wut

---
 packages/prosody-ui/src/zoom/FullText.tsx | 60 +++++++++++++++++++++++++++++++
 1 file changed, 60 insertions(+)
 create mode 100644 packages/prosody-ui/src/zoom/FullText.tsx

(limited to 'packages/prosody-ui/src/zoom/FullText.tsx')

diff --git a/packages/prosody-ui/src/zoom/FullText.tsx b/packages/prosody-ui/src/zoom/FullText.tsx
new file mode 100644
index 0000000..ec85f09
--- /dev/null
+++ b/packages/prosody-ui/src/zoom/FullText.tsx
@@ -0,0 +1,60 @@
+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;
+}
+
+const FullText: React.FC<TextFocusMorphProps> = ({ text, doc }) => {
+  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 (
+    <div className="text-focus-morph">
+      {level !== "text" && (
+        <AnimatePresence>
+          <motion.button
+            className="back-button"
+            onClick={navigateBack}
+            variants={buttonVariants}
+            initial="initial"
+            animate="animate"
+            exit="exit"
+          >
+            ← Back
+          </motion.button>
+        </AnimatePresence>
+      )}
+
+      <motion.div
+        className="content-container"
+        variants={containerVariants}
+        initial="text"
+        animate={level}
+      >
+        {paragraphs.map((paragraph, idx) => (
+          <Paragraph
+            doc={doc}
+            key={paragraph + idx}
+            rawText={paragraph}
+            context={{ idx, parentText: text, segmented: paragraphs }}
+            idx={idx}
+          />
+        ))}
+      </motion.div>
+    </div>
+  );
+};
+
+export default FullText;
-- 
cgit v1.2.3

