e.preventDefault()}
+ onDrop={handleDrop}
+ onClick={() => fileInputRef.current?.click()}
+ style={{
+ border: "2px dashed var(--ps-border)",
+ borderRadius: 10,
+ padding: "20px 16px",
+ textAlign: "center",
+ background: "var(--ps-bg)",
+ cursor: "pointer",
+ }}
+ >
+
void handleFileChange(e.target.files?.[0] ?? null)}
+ />
+
📥
+
+ {selectedFile
+ ? `${selectedFile.name} (${(selectedFile.size / 1024).toFixed(1)} KB)`
+ : "Click to choose a file or drag & drop here"}
+
+
+ Compatible formats: .docx (Word / OnlyOffice), .odt{" "}
+ (OpenOffice / LibreOffice / OnlyOffice), .epub, .md,{" "}
+ .txt, .html, .rtf,{" "}
+ .json
+
+
+
+
+ {parsed.formatLabel}
+
+ {parsed.chapters.length} chapter(s) · {parsed.totalWords.toLocaleString()} words
+
+
+ {parsed.author && (
+
+ Author: {parsed.author}
+
+ )}
+
+
+ {currentProject && (
+
+
+
+
+
+
+
+ )}
+
+ {mode === "new-project" && (
+
+
+ setCustomTitle(e.target.value)}
+ placeholder="Manuscript Title"
+ />
+
+ )}
+
+ {parsed.format !== "epub" && parsed.format !== "json" && (
+
+ )}
+
+
+
+ Converted Chapters Preview ({parsed.chapters.length})
+
+
+ {parsed.chapters.map((ch, idx) => (
+
+
+ {idx + 1}. {ch.title}
+
+
+ {ch.wordCount.toLocaleString()} words
+
+
+ ))}
+
+
+