Spaces:
Runtime error
Runtime error
File size: 2,498 Bytes
5463318 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | import React from 'react';
import { motion, AnimatePresence } from 'framer-motion';
import { GenerateProvider, useGenerate } from './GenerateContext';
import { StepIndicator } from './components/StepIndicator';
import { SelectMaterialStep } from './components/SelectMaterialStep';
import { ConfigurePaperStep } from './components/ConfigurePaperStep';
import { FinalDetailsStep } from './components/FinalDetailsStep';
import { SummaryPanel } from './components/SummaryPanel';
const GenerateWizardFlow = () => {
const { step } = useGenerate();
return (
<div className="max-w-7xl mx-auto px-4 lg:px-8 min-h-screen flex flex-col pt-32 pb-12">
<motion.div
initial={{ opacity: 0, y: -20 }} animate={{ opacity: 1, y: 0 }}
className="mb-8 text-center"
>
<h1 className="text-4xl lg:text-5xl font-extrabold text-slate-900 dark:text-white tracking-tight mb-2">
Generate <span className="text-transparent bg-clip-text bg-gradient-to-r from-[#4F7CFF] to-[#8B5CF6]">Intelligent</span> Papers
</h1>
<p className="text-slate-500 font-medium max-w-2xl mx-auto">
Transform your study materials into structured, pedagogy-aligned assessments in seconds.
</p>
</motion.div>
<StepIndicator />
<div className="flex-1 flex flex-col lg:flex-row gap-6 lg:gap-8 pb-8 relative items-start">
{/* Main Content Area */}
<div className="flex-1 w-full h-full relative overflow-visible rounded-2xl">
<AnimatePresence mode="wait">
{step === 1 && <SelectMaterialStep key="step1" />}
{step === 2 && <ConfigurePaperStep key="step2" />}
{step === 3 && <FinalDetailsStep key="step3" />}
</AnimatePresence>
</div>
{/* Sticky Summary Panel */}
<div className="hidden lg:block h-full">
<SummaryPanel />
</div>
</div>
{/* Mobile Summary Panel (optional toggle logic could be added) */}
<div className="lg:hidden mt-8 w-full p-6">
<SummaryPanel />
</div>
</div>
);
};
export default function Generate() {
return (
<GenerateProvider>
<GenerateWizardFlow />
</GenerateProvider>
);
}
|