openlearn-next 0.3.5 → 0.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{BatchPickerModal-Dtoea1V3.js → BatchPickerModal-C98sjlMF.js} +1 -1
- package/dist/assets/{ClassesView-B-jRQxdS.js → ClassesView-BPR46qdP.js} +1 -1
- package/dist/assets/{CloudDriveModal-BWTV8a8T.js → CloudDriveModal-muU449iB.js} +1 -1
- package/dist/assets/{CourseManagement-CCfPc_CY.js → CourseManagement-BRucWTbo.js} +1 -1
- package/dist/assets/{CourseWizardModal-D4cBfjGs.js → CourseWizardModal-DTSK7VGp.js} +1 -1
- package/dist/assets/{Dashboard-gsxGW7q1.js → Dashboard-COtcZSPW.js} +1 -1
- package/dist/assets/{ExportWeightModal-BbjHHoCT.js → ExportWeightModal-Dd7qjZuJ.js} +1 -1
- package/dist/assets/{HelpView--MQfJiFF.js → HelpView-CCmQYk87.js} +1 -1
- package/dist/assets/{ImportLessonsModal-AAOtANpB.js → ImportLessonsModal-cNlJ5wwh.js} +1 -1
- package/dist/assets/{InteractiveCoursewareViewer-Tes2QD6f.js → InteractiveCoursewareViewer-Cok6OVNk.js} +1 -1
- package/dist/assets/{InteractiveWhiteboard-B6ErhtNE.js → InteractiveWhiteboard-6y5vg8O_.js} +1 -1
- package/dist/assets/{LazyCourseware-BsZu3p5U.js → LazyCourseware-wkNa0dIq.js} +1 -1
- package/dist/assets/{LazyWhiteboard-CKnCRtFY.js → LazyWhiteboard-Bjh_fdbw.js} +1 -1
- package/dist/assets/{LessonEditorView-VzUJZUSD.js → LessonEditorView-B_b0F9Cw.js} +1 -1
- package/dist/assets/{LiveClassroomView-CTeUIrDr.js → LiveClassroomView-vm0rs4p7.js} +1 -1
- package/dist/assets/{NotificationDetailModal-CSTLco-A.js → NotificationDetailModal-B3_95dku.js} +1 -1
- package/dist/assets/{PluginView-NuFAl1cx.js → PluginView-CZhQ0Ciy.js} +1 -1
- package/dist/assets/{QuizGeneratorModal-CfRWi15M.js → QuizGeneratorModal-__riUCfV.js} +1 -1
- package/dist/assets/{StudentAssignmentView-DvWlg_x-.js → StudentAssignmentView-BAL4_PJC.js} +1 -1
- package/dist/assets/{StudentLessonView-BSlGMvNX.js → StudentLessonView-fXKI0uN9.js} +1 -1
- package/dist/assets/{StudentPreviewModal-CspHoFJZ.js → StudentPreviewModal-DHgqiEHm.js} +1 -1
- package/dist/assets/{StudentView-PgJn1UEY.js → StudentView-e7zUBtTA.js} +1 -1
- package/dist/assets/{SystemResourceLibraryModal-BIijjMl0.js → SystemResourceLibraryModal-0MIIi5fd.js} +1 -1
- package/dist/assets/{TeacherView-BAx0ID4U.js → TeacherView-HxGS1psV.js} +1 -1
- package/dist/assets/{index-afBTqYFz.js → index-CCKb8B5h.js} +3 -3
- package/dist/assets/{index-BAmfY-YR.js → index-CWqYoxFP.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/server.cjs +2 -2
- package/package.json +2 -2
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{j as e,r as f}from"./vendor-react-0Lg0vA-4.js";import{m as D,M as P}from"./index-afBTqYFz.js";import{B as y,f as j,t as W,ag as L,o as I,q as v,a9 as E,w as M}from"./vendor-icons-Dq6MhgH9.js";import"./vendor-pdf-Cp-cYteE.js";import"./vendor-utils-BEhuP0Zq.js";import"./vendor-motion-DjY2czvL.js";import"./vendor-pptx-B_NheIKl.js";import"./vendor-charts-CRXa4AlU.js";function Q(z){const{isCourseWizardOpen:w,setIsCourseWizardOpen:N,lang:t,wizardStep:o,setWizardStep:g,wizardIsSubmitting:x,wizardCourseTitle:p,setWizardCourseTitle:C,wizardCourseDescription:u,setWizardCourseDescription:k,wizardCourseCategory:n,setWizardCourseCategory:S,wizardCourseTimeline:i,setWizardCourseTimeline:c,wizardCourseContent:m,setWizardCourseContent:h,addToast:b,generateTemplateContent:T,handleDeployWizardCourse:A}=z;return e.jsx(e.Fragment,{children:w&&e.jsx("div",{className:"fixed inset-0 bg-gray-900/50 backdrop-blur-sm flex items-center justify-center p-4 md:p-6 z-50 overflow-y-auto text-gray-850",children:e.jsxs(D.div,{initial:{opacity:0,y:15,scale:.98},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:10,scale:.98},className:"bg-white border text-gray-900 border-gray-250 rounded-2xl shadow-2xl w-full max-w-4xl flex flex-col overflow-hidden max-h-[92vh] font-sans text-left",children:[e.jsxs("div",{className:"p-4 md:p-5 border-b border-gray-100 flex items-center justify-between bg-slate-50 shrink-0",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2 bg-indigo-50 border border-indigo-100 rounded-lg text-indigo-650",children:e.jsx(y,{size:20,className:"animate-pulse"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"font-bold text-gray-850 text-base md:text-lg",children:t==="zh"?"⭐ 互动课程发布与时间轴向导":"⭐ Course Design Guide & Wizard"}),e.jsx("p",{className:"text-xs text-gray-500 mt-0.5",children:t==="zh"?"遵循系统设计法,逐步构建您的学科专属教案与课堂时间轴流程。":"Follow best practices to define curriculum content, timeline segments, and deploy."})]})]}),e.jsx("button",{onClick:()=>N(!1),className:"text-gray-400 hover:text-gray-650 font-bold p-1 rounded-lg hover:bg-gray-150 transition-all text-xl leading-none",children:"×"})]}),e.jsx("div",{className:"px-6 py-4.5 border-b border-gray-50 bg-slate-50/50 flex items-center justify-between gap-2 shrink-0 select-none",children:[{step:1,zh:"1内容选题",en:"1 Background"},{step:2,zh:"2课堂脉络",en:"2 Timeslots"},{step:3,zh:"3编写大纲",en:"3 Syllabus"},{step:4,zh:"4总览部署",en:"4 Deploy"}].map((r,a)=>{const l=o===r.step,s=o>r.step;return e.jsxs(f.Fragment,{children:[e.jsxs("div",{onClick:()=>!x&&g(r.step),className:`flex items-center gap-2 cursor-pointer transition-all ${l?"text-indigo-650 font-boldScale":s?"text-emerald-600 font-medium":"text-gray-400 hover:text-gray-600"}`,children:[e.jsx("div",{className:`w-5 h-5 rounded-full flex items-center justify-center text-[10px] border ${l?"bg-indigo-600 border-indigo-600 text-white shadow-xs font-bold":s?"bg-emerald-50 border-emerald-500 text-emerald-600 font-bold":"bg-white border-gray-250 text-gray-500"}`,children:s?"✓":r.step}),e.jsx("span",{className:"text-xs font-semibold hidden sm:inline",children:t==="zh"?r.zh:r.en})]}),a<3&&e.jsx("div",{className:`flex-1 h-0.5 max-w-[40px] md:max-w-none transition-all ${o>r.step?"bg-emerald-500":"bg-gray-200"}`})]},r.step)})}),e.jsxs("div",{className:"flex-grow overflow-y-auto p-5 md:p-6 space-y-5",children:[o===1&&e.jsxs("div",{className:"space-y-4 animate-in fade-in duration-200 text-left",children:[e.jsxs("div",{className:"bg-indigo-50/70 py-3.5 px-4.5 rounded-xl border border-indigo-100 text-xs text-indigo-750 font-sans leading-relaxed flex items-start gap-2",children:[e.jsx(j,{size:16,className:"text-indigo-500 shrink-0 mt-0.5 animate-bounce"}),e.jsxs("div",{children:[e.jsx("strong",{children:t==="zh"?"设计理念:":"Instructional ConceptTip:"}),e.jsx("p",{className:"mt-0.5",children:t==="zh"?"一个高品质的课程往往始于明确的选题背景。选择适当的学科科目分类,系统不仅会按您的选择在后续步骤推荐量身定做的教案摸板,还可以一键预装适合该学科的课堂互动时间轴模板。":"Selecting a clear title and specific subject category helps pre-populate customized Markdown content outlines and specialized scheduling presets."})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 font-sans",children:[e.jsxs("div",{className:"md:col-span-2 space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-bold text-gray-500 uppercase tracking-wider mb-2",children:t==="zh"?"📍 课程/课件名称 *":"📍 Course Title *"}),e.jsx("input",{type:"text",required:!0,value:p,onChange:r=>C(r.target.value),placeholder:t==="zh"?"例:西方哲学:康德的三大批判、Python编程入门、高中物理电路并联原理":"e.g. Introduction to regressions, Western Philosophies, Lever Principles",className:"w-full px-4 py-3 border border-gray-250 rounded-xl focus:outline-none focus:ring-2 focus:ring-indigo-500 text-gray-800 text-sm shadow-xs"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-bold text-gray-500 uppercase tracking-wider mb-2",children:t==="zh"?"🎯 课程设计简介与要点说明 (Objectives)":"🎯 Description & Lesson Objectives"}),e.jsx("textarea",{rows:4,value:u,onChange:r=>k(r.target.value),placeholder:t==="zh"?"在此处编写您的授课背景、面向学段及最关键的 2-3 个核心教学总目标。":"Write a short description stating learning outcomes and student prerequisite goals.",className:"w-full p-4 border border-gray-255 rounded-xl focus:outline-none focus:ring-2 focus:ring-indigo-500 text-gray-800 text-sm shadow-xs resize-none"})]})]}),e.jsxs("div",{className:"col-span-1 border-l border-gray-100 md:pl-6 space-y-4 text-left",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-bold text-gray-500 uppercase tracking-wider mb-2",children:t==="zh"?"🎨 学部科目分类":"🎨 Subject Category"}),e.jsxs("select",{value:n,onChange:r=>{S(r.target.value)},className:"w-full bg-white border border-gray-250 text-gray-755 font-bold px-3 py-2.5 rounded-xl focus:outline-none focus:ring-2 focus:ring-indigo-500 shadow-xs text-sm cursor-pointer",children:[e.jsx("option",{value:"Mathematics",children:t==="zh"?"📐 基础数学与几何":"📐 Mathematics"}),e.jsx("option",{value:"ComputerScience",children:t==="zh"?"💻 计算机软件与人工智能":"💻 Computer Science"}),e.jsx("option",{value:"Literature",children:t==="zh"?"✍️ 语言文字与阅读理解":"✍️ Literature & Writing"}),e.jsx("option",{value:"Physics",children:t==="zh"?"⚡ 物理实验与自然探索":"⚡ Physics & Science"}),e.jsx("option",{value:"History",children:t==="zh"?"🏛️ 历史脉络与人地分析":"🏛️ History & Humanities"}),e.jsx("option",{value:"Art",children:t==="zh"?"🎨 交互设计与先锋创意艺术":"🎨 Visual Arts & Design"}),e.jsx("option",{value:"Other",children:t==="zh"?"🔮 交叉素养与综合学习":"🔮 General & Other"})]})]}),e.jsxs("div",{className:"bg-slate-50 p-4 rounded-xl border border-gray-100 space-y-2 select-none text-left",children:[e.jsx("span",{className:"text-[10px] font-bold text-gray-400 uppercase tracking-wider block",children:t==="zh"?"科目时间轴专家建议":"SUBJECT HEURISTICS"}),e.jsxs("div",{className:"text-xs text-gray-600 leading-relaxed font-sans mt-1",children:[n==="Mathematics"&&(t==="zh"?"💡 数学:偏向理论推演。推荐 20分公式精讲 + 15分黑板实践互动,强化基础。":"💡 Math recommends: 20m Core Lecture + 15m Practice for theorem grounding."),n==="ComputerScience"&&(t==="zh"?"💡 计算机:偏重编码体验。推荐 15分白板代码推演 + 20分终端实验与分享。":"💡 CS recommends: 15m Algorithms + 20m Interactive workshops on virtual boards."),n==="Literature"&&(t==="zh"?"💡 语文文学:注重文本深度。推荐 10分范文研习 + 20分分组思辨,提升理解。":"💡 Lit recommends: 10m Reading Analysis + 20m Collaborative Discussions."),n==="Physics"&&(t==="zh"?"💡 科学类:逻辑导向。推荐 10分虚拟视频实验 + 20分机理讲解 + 10分钟随堂答卷。":"💡 Science recommends: 10m virtual showcase + 20m principles + 10m evaluation."),n==="History"&&(t==="zh"?"💡 历史人文:情景引入。推荐 15分人文画卷重塑 + 15分史实论驳辩论。":"💡 History recommends: 15m Context Mapping + 15m Interactive Debate panels."),n==="Art"&&(t==="zh"?"💡 视觉创意:自由度高。推荐 10分美术鉴赏 + 25分白板手绘画布互动体验。":"💡 Art recommends: 10m Aesthetics inspiration + 25m real-time board drawing."),n==="Other"&&(t==="zh"?"💡 其他科目:均分各小节时间,循序渐进,打造完整的教学循环闭环。":"💡 Generic: Divide evenly into sequential warm-up, core presentation and quiz.")]})]})]})]})]}),o===2&&e.jsxs("div",{className:"space-y-5 animate-in fade-in duration-200 text-left font-sans",children:[e.jsxs("div",{className:"bg-emerald-50/40 py-3.5 px-4.5 rounded-xl border border-emerald-100 text-xs text-emerald-850 leading-relaxed flex items-start gap-2 text-left",children:[e.jsx(W,{size:16,className:"text-emerald-555 shrink-0 mt-0.5 animate-pulse"}),e.jsxs("div",{children:[e.jsx("strong",{children:t==="zh"?"专家课堂时间轴预设:":"Dynamic Class Presets:"}),e.jsx("p",{className:"mt-0.5",children:t==="zh"?"好的教授节奏必须动静相宜。以下提供三种国际领先的精品课件时间节点设计,点击即可一键刷装配置。您也可以在下方自由增删和重新指定每个环节的长短!":"Curating temporal context maximizes classroom retention. Load from predefined templates or tweak the active steps on the dynamic table."})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-bold text-gray-500 uppercase tracking-wider mb-2",children:t==="zh"?"💡 点击应用典型课堂框架模板 (Quick Apply)":"💡 Click to Auto-Apply Structure Presets"}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:[{id:"preset_standard",title:t==="zh"?"经典 5-20-15-5 讲授模式":"Traditional Dual-Lecture Paradigm",desc:t==="zh"?"由浅入深:先通过场景导入,后精讲,接着在白板配合大屏进行演练。":"Perfect dynamic for most standard classes.",segments:[{id:"seg-preset-1",title:"Course Orientation / 课堂导入",type:"intro",duration:"5m",color:"bg-blue-50 text-blue-700 border-blue-200 hover:bg-blue-100",notes:"Warm up topic"},{id:"seg-preset-2",title:"Subject Core Lecture / 核心理论精讲",type:"lecture",duration:"20m",color:"bg-indigo-50 text-indigo-700 border-indigo-200 hover:bg-indigo-100",notes:"Main content slide"},{id:"seg-preset-3",title:"Interactive Lab Work / 随堂协同演练",type:"practice",duration:"15m",color:"bg-green-50 text-green-700 border-green-200 hover:bg-green-100",notes:"Exercises & questions"},{id:"seg-preset-4",title:"Wrap up / 课堂成果总结与答疑",type:"summary",duration:"5m",color:"bg-purple-50 text-purple-700 border-purple-200 hover:bg-purple-100",notes:"Check answer notes"}]},{id:"preset_seminar",title:t==="zh"?"主题讨论工作坊模式":"Active Discussion Workshop",desc:t==="zh"?"协同探究:教师5分钟破冰,学生15分钟小组演练,15分钟对决汇报,10分钟定级。":"Discussion and presentation heavy layout.",segments:[{id:"seg-preset-5",title:"Debate Scenario Brief / 讨论情境简述",type:"intro",duration:"5m",color:"bg-amber-50 text-amber-700 border-amber-200 hover:bg-amber-100",notes:"Define debate metrics"},{id:"seg-preset-6",title:"Cooperative Ideation / 精英白板协作设计",type:"practice",duration:"15m",color:"bg-green-50 text-green-700 border-green-200 hover:bg-green-100",notes:"Joint workspace analysis"},{id:"seg-preset-7",title:"Student Team Presentation / 各小组交互汇报",type:"lecture",duration:"15m",color:"bg-indigo-50 text-indigo-700 border-indigo-200 hover:bg-indigo-100",notes:"Group screen sharing"},{id:"seg-preset-8",title:"Review & Grade Feedback / 教师深度对标点评",type:"summary",duration:"10m",color:"bg-purple-50 text-purple-700 border-purple-200 hover:bg-purple-100",notes:"Score reviews"}]},{id:"preset_flipped",title:t==="zh"?"翻转课堂高强度训练":"Targeted Problem-Solving Sprint",desc:t==="zh"?"应试/解惑突破:10分钟温习,15分钟重难盲点攻坚,15分钟专项题演习。":"Perfect for exams and targeted training courses.",segments:[{id:"seg-preset-9",title:"Blind Spot Evaluation / 温史自学效果自测",type:"intro",duration:"10m",color:"bg-blue-50 text-blue-700 border-blue-200 hover:bg-blue-100",notes:"Scan quiz"},{id:"seg-preset-10",title:"Advanced Principle Explores / 重难考点极限拆解",type:"lecture",duration:"15m",color:"bg-rose-50 text-rose-700 border-rose-200 hover:bg-rose-100",notes:"Analyse weak metrics"},{id:"seg-preset-11",title:"Mock Solving Battle / 核心精选题实操对抗",type:"practice",duration:"15m",color:"bg-emerald-50 text-emerald-700 border-emerald-200 hover:bg-emerald-100",notes:"Sprint workout"},{id:"seg-preset-12",title:"Anchor Recap / 知识网架构网节点固化",type:"summary",duration:"5m",color:"bg-purple-50 text-purple-700 border-purple-200 hover:bg-purple-100",notes:"Highlight checklist"}]}].map(r=>e.jsxs("button",{type:"button",onClick:()=>{c(r.segments),b(t==="zh"?"预设已刷装":"Preset Configured",t==="zh"?`已将《${r.title}》应用到您当前设计的课程中。`:`Assigned "${r.title}" timeslots.`,"success")},className:"bg-white border rounded-xl p-3 text-left transition-all hover:bg-indigo-50/20 hover:border-indigo-400 cursor-pointer active:scale-98",children:[e.jsx("div",{className:"font-bold text-gray-800 text-xs sm:text-sm",children:r.title}),e.jsx("div",{className:"text-[10px] text-gray-400 mt-1.5 leading-relaxed",children:r.desc})]},r.id))})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-2 select-none",children:[e.jsx("label",{className:"block text-xs font-bold text-gray-500 uppercase tracking-wider",children:t==="zh"?"📌 流程时间卡编辑 (拖拽或直接对表格字段赋值)":"📌 Custom Timeslot Table (Edit fields directly)"}),e.jsxs("button",{type:"button",onClick:()=>{const r={id:`seg-w-custom-${Date.now()}`,title:t==="zh"?`自理授课阶段 ${i.length+1}`:`Interactive Step ${i.length+1}`,type:"practice",duration:"10m",color:"bg-slate-50 text-slate-700 border-slate-200 hover:bg-slate-100",notes:""};c([...i,r])},className:"flex items-center gap-1 text-[11px] font-bold text-indigo-600 hover:text-indigo-800 cursor-pointer",children:[e.jsx(L,{size:12})," ",t==="zh"?"增设阶段":"Append Phase"]})]}),e.jsx("div",{className:"space-y-2 border border-gray-150 rounded-xl p-3.5 bg-gray-50/50",children:i.map((r,a)=>e.jsxs("div",{className:"flex flex-col sm:flex-row items-center gap-3 bg-white border border-gray-200 rounded-lg p-2.5 shadow-xs",children:[e.jsxs("div",{className:"flex items-center gap-2 w-full sm:w-auto",children:[e.jsx("span",{className:"w-5 h-5 rounded-full bg-slate-100 flex items-center justify-center text-[10px] text-gray-500 font-bold shrink-0",children:a+1}),e.jsx("input",{type:"text",value:r.title,onChange:l=>{const s=[...i];s[a].title=l.target.value,c(s)},className:"font-bold text-xs text-gray-800 bg-transparent border-b border-transparent hover:border-gray-200 focus:border-indigo-500 py-0.5 px-1 focus:outline-none focus:bg-gray-50/50 rounded flex-1 sm:w-56",placeholder:"Phase Title"})]}),e.jsxs("div",{className:"flex items-center gap-2.5 w-full sm:w-auto justify-end sm:ml-auto",children:[e.jsxs("div",{className:"flex items-center gap-1 bg-slate-50 border border-gray-200 rounded px-2 py-0.5 shrink-0",children:[e.jsx("span",{className:"text-[10px] font-bold text-gray-400",children:"时长:"}),e.jsx("input",{type:"text",value:r.duration,onChange:l=>{const s=[...i];s[a].duration=l.target.value,c(s)},className:"w-8 text-[11px] text-gray-800 font-extrabold bg-transparent text-center focus:outline-none"})]}),e.jsxs("select",{value:r.type,onChange:l=>{const s=l.target.value,d=[...i];d[a].type=s,s==="intro"?d[a].color="bg-blue-50 text-blue-700 border-blue-200 hover:bg-blue-100":s==="lecture"?d[a].color="bg-indigo-50 text-indigo-700 border-indigo-200 hover:bg-indigo-100":s==="practice"?d[a].color="bg-green-50 text-green-700 border-green-200 hover:bg-green-100":s==="summary"?d[a].color="bg-purple-50 text-purple-700 border-purple-200 hover:bg-purple-100":d[a].color="bg-gray-50 text-gray-700 border-gray-205 hover:bg-gray-100",c(d)},className:"bg-slate-50 border border-gray-200 text-[10px] font-bold text-gray-600 rounded p-1 focus:outline-none cursor-pointer",children:[e.jsx("option",{value:"intro",children:t==="zh"?"温习 / 导入":"Warm-up / Intro"}),e.jsx("option",{value:"lecture",children:t==="zh"?"主体 / 精讲":"Core Lecture"}),e.jsx("option",{value:"practice",children:t==="zh"?"交互白板练习":"Practice Workshop"}),e.jsx("option",{value:"summary",children:t==="zh"?"总结 / 定级":"Wrap-up / Recap"})]}),e.jsx("button",{type:"button",onClick:()=>{if(i.length<=1){alert(t==="zh"?"请保留至少一个核心环节!":"At least one segment must exist.");return}const l=i.filter((s,d)=>d!==a);c(l)},className:"text-gray-400 hover:text-rose-600 font-bold p-1 cursor-pointer text-sm select-none",title:"Delete this segment",children:"×"})]})]},r.id))}),e.jsxs("div",{className:"mt-2 text-[10px] text-right text-gray-500 font-mono select-none",children:[t==="zh"?"📈 环节累加公式:":"📈 Dynamic aggregation formula: ",e.jsx("span",{className:"text-gray-800 font-semibold",children:i.map(r=>r.duration).join(" + ")})]})]})]}),o===3&&e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 animate-in fade-in duration-200 font-sans text-left",children:[e.jsxs("div",{className:"space-y-3 flex flex-col h-full min-h-[360px] text-left",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-2",children:[e.jsx("label",{className:"block text-xs font-bold text-gray-500 uppercase tracking-wider select-none shrink-0",children:t==="zh"?"✏️ 使用 Markdown 语法编写课时材料":"✏️ Lesson Materials (Markdown)"}),e.jsxs("button",{type:"button",onClick:()=>{const r=T(p,n);h(r),b(t==="zh"?"大纲模板生成成功":"Curriculum Loaded",t==="zh"?"针对所选择的模型和属性已一键刷装教案模板框架。":"Prepopulated Markdown structure.","success")},className:"flex items-center gap-1 text-xs bg-indigo-50 border border-indigo-100 text-indigo-755 hover:bg-indigo-100 px-3 py-1 rounded-lg transition-colors font-bold cursor-pointer",children:[e.jsx(j,{size:13,className:"text-indigo-500 animate-spin"}),t==="zh"?"✨ 一键生成专家级教学大纲模版":"✨ Autofill Outline Template"]})]}),e.jsx("textarea",{rows:14,value:m,onChange:r=>h(r.target.value),placeholder:t==="zh"?`# 西方哲学三大经典原理
|
|
1
|
+
import{j as e,r as f}from"./vendor-react-0Lg0vA-4.js";import{m as D,M as P}from"./index-CCKb8B5h.js";import{B as y,f as j,t as W,ag as L,o as I,q as v,a9 as E,w as M}from"./vendor-icons-Dq6MhgH9.js";import"./vendor-pdf-Cp-cYteE.js";import"./vendor-utils-BEhuP0Zq.js";import"./vendor-motion-DjY2czvL.js";import"./vendor-pptx-B_NheIKl.js";import"./vendor-charts-CRXa4AlU.js";function Q(z){const{isCourseWizardOpen:w,setIsCourseWizardOpen:N,lang:t,wizardStep:o,setWizardStep:g,wizardIsSubmitting:x,wizardCourseTitle:p,setWizardCourseTitle:C,wizardCourseDescription:u,setWizardCourseDescription:k,wizardCourseCategory:n,setWizardCourseCategory:S,wizardCourseTimeline:i,setWizardCourseTimeline:c,wizardCourseContent:m,setWizardCourseContent:h,addToast:b,generateTemplateContent:T,handleDeployWizardCourse:A}=z;return e.jsx(e.Fragment,{children:w&&e.jsx("div",{className:"fixed inset-0 bg-gray-900/50 backdrop-blur-sm flex items-center justify-center p-4 md:p-6 z-50 overflow-y-auto text-gray-850",children:e.jsxs(D.div,{initial:{opacity:0,y:15,scale:.98},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:10,scale:.98},className:"bg-white border text-gray-900 border-gray-250 rounded-2xl shadow-2xl w-full max-w-4xl flex flex-col overflow-hidden max-h-[92vh] font-sans text-left",children:[e.jsxs("div",{className:"p-4 md:p-5 border-b border-gray-100 flex items-center justify-between bg-slate-50 shrink-0",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2 bg-indigo-50 border border-indigo-100 rounded-lg text-indigo-650",children:e.jsx(y,{size:20,className:"animate-pulse"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"font-bold text-gray-850 text-base md:text-lg",children:t==="zh"?"⭐ 互动课程发布与时间轴向导":"⭐ Course Design Guide & Wizard"}),e.jsx("p",{className:"text-xs text-gray-500 mt-0.5",children:t==="zh"?"遵循系统设计法,逐步构建您的学科专属教案与课堂时间轴流程。":"Follow best practices to define curriculum content, timeline segments, and deploy."})]})]}),e.jsx("button",{onClick:()=>N(!1),className:"text-gray-400 hover:text-gray-650 font-bold p-1 rounded-lg hover:bg-gray-150 transition-all text-xl leading-none",children:"×"})]}),e.jsx("div",{className:"px-6 py-4.5 border-b border-gray-50 bg-slate-50/50 flex items-center justify-between gap-2 shrink-0 select-none",children:[{step:1,zh:"1内容选题",en:"1 Background"},{step:2,zh:"2课堂脉络",en:"2 Timeslots"},{step:3,zh:"3编写大纲",en:"3 Syllabus"},{step:4,zh:"4总览部署",en:"4 Deploy"}].map((r,a)=>{const l=o===r.step,s=o>r.step;return e.jsxs(f.Fragment,{children:[e.jsxs("div",{onClick:()=>!x&&g(r.step),className:`flex items-center gap-2 cursor-pointer transition-all ${l?"text-indigo-650 font-boldScale":s?"text-emerald-600 font-medium":"text-gray-400 hover:text-gray-600"}`,children:[e.jsx("div",{className:`w-5 h-5 rounded-full flex items-center justify-center text-[10px] border ${l?"bg-indigo-600 border-indigo-600 text-white shadow-xs font-bold":s?"bg-emerald-50 border-emerald-500 text-emerald-600 font-bold":"bg-white border-gray-250 text-gray-500"}`,children:s?"✓":r.step}),e.jsx("span",{className:"text-xs font-semibold hidden sm:inline",children:t==="zh"?r.zh:r.en})]}),a<3&&e.jsx("div",{className:`flex-1 h-0.5 max-w-[40px] md:max-w-none transition-all ${o>r.step?"bg-emerald-500":"bg-gray-200"}`})]},r.step)})}),e.jsxs("div",{className:"flex-grow overflow-y-auto p-5 md:p-6 space-y-5",children:[o===1&&e.jsxs("div",{className:"space-y-4 animate-in fade-in duration-200 text-left",children:[e.jsxs("div",{className:"bg-indigo-50/70 py-3.5 px-4.5 rounded-xl border border-indigo-100 text-xs text-indigo-750 font-sans leading-relaxed flex items-start gap-2",children:[e.jsx(j,{size:16,className:"text-indigo-500 shrink-0 mt-0.5 animate-bounce"}),e.jsxs("div",{children:[e.jsx("strong",{children:t==="zh"?"设计理念:":"Instructional ConceptTip:"}),e.jsx("p",{className:"mt-0.5",children:t==="zh"?"一个高品质的课程往往始于明确的选题背景。选择适当的学科科目分类,系统不仅会按您的选择在后续步骤推荐量身定做的教案摸板,还可以一键预装适合该学科的课堂互动时间轴模板。":"Selecting a clear title and specific subject category helps pre-populate customized Markdown content outlines and specialized scheduling presets."})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 font-sans",children:[e.jsxs("div",{className:"md:col-span-2 space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-bold text-gray-500 uppercase tracking-wider mb-2",children:t==="zh"?"📍 课程/课件名称 *":"📍 Course Title *"}),e.jsx("input",{type:"text",required:!0,value:p,onChange:r=>C(r.target.value),placeholder:t==="zh"?"例:西方哲学:康德的三大批判、Python编程入门、高中物理电路并联原理":"e.g. Introduction to regressions, Western Philosophies, Lever Principles",className:"w-full px-4 py-3 border border-gray-250 rounded-xl focus:outline-none focus:ring-2 focus:ring-indigo-500 text-gray-800 text-sm shadow-xs"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-bold text-gray-500 uppercase tracking-wider mb-2",children:t==="zh"?"🎯 课程设计简介与要点说明 (Objectives)":"🎯 Description & Lesson Objectives"}),e.jsx("textarea",{rows:4,value:u,onChange:r=>k(r.target.value),placeholder:t==="zh"?"在此处编写您的授课背景、面向学段及最关键的 2-3 个核心教学总目标。":"Write a short description stating learning outcomes and student prerequisite goals.",className:"w-full p-4 border border-gray-255 rounded-xl focus:outline-none focus:ring-2 focus:ring-indigo-500 text-gray-800 text-sm shadow-xs resize-none"})]})]}),e.jsxs("div",{className:"col-span-1 border-l border-gray-100 md:pl-6 space-y-4 text-left",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-bold text-gray-500 uppercase tracking-wider mb-2",children:t==="zh"?"🎨 学部科目分类":"🎨 Subject Category"}),e.jsxs("select",{value:n,onChange:r=>{S(r.target.value)},className:"w-full bg-white border border-gray-250 text-gray-755 font-bold px-3 py-2.5 rounded-xl focus:outline-none focus:ring-2 focus:ring-indigo-500 shadow-xs text-sm cursor-pointer",children:[e.jsx("option",{value:"Mathematics",children:t==="zh"?"📐 基础数学与几何":"📐 Mathematics"}),e.jsx("option",{value:"ComputerScience",children:t==="zh"?"💻 计算机软件与人工智能":"💻 Computer Science"}),e.jsx("option",{value:"Literature",children:t==="zh"?"✍️ 语言文字与阅读理解":"✍️ Literature & Writing"}),e.jsx("option",{value:"Physics",children:t==="zh"?"⚡ 物理实验与自然探索":"⚡ Physics & Science"}),e.jsx("option",{value:"History",children:t==="zh"?"🏛️ 历史脉络与人地分析":"🏛️ History & Humanities"}),e.jsx("option",{value:"Art",children:t==="zh"?"🎨 交互设计与先锋创意艺术":"🎨 Visual Arts & Design"}),e.jsx("option",{value:"Other",children:t==="zh"?"🔮 交叉素养与综合学习":"🔮 General & Other"})]})]}),e.jsxs("div",{className:"bg-slate-50 p-4 rounded-xl border border-gray-100 space-y-2 select-none text-left",children:[e.jsx("span",{className:"text-[10px] font-bold text-gray-400 uppercase tracking-wider block",children:t==="zh"?"科目时间轴专家建议":"SUBJECT HEURISTICS"}),e.jsxs("div",{className:"text-xs text-gray-600 leading-relaxed font-sans mt-1",children:[n==="Mathematics"&&(t==="zh"?"💡 数学:偏向理论推演。推荐 20分公式精讲 + 15分黑板实践互动,强化基础。":"💡 Math recommends: 20m Core Lecture + 15m Practice for theorem grounding."),n==="ComputerScience"&&(t==="zh"?"💡 计算机:偏重编码体验。推荐 15分白板代码推演 + 20分终端实验与分享。":"💡 CS recommends: 15m Algorithms + 20m Interactive workshops on virtual boards."),n==="Literature"&&(t==="zh"?"💡 语文文学:注重文本深度。推荐 10分范文研习 + 20分分组思辨,提升理解。":"💡 Lit recommends: 10m Reading Analysis + 20m Collaborative Discussions."),n==="Physics"&&(t==="zh"?"💡 科学类:逻辑导向。推荐 10分虚拟视频实验 + 20分机理讲解 + 10分钟随堂答卷。":"💡 Science recommends: 10m virtual showcase + 20m principles + 10m evaluation."),n==="History"&&(t==="zh"?"💡 历史人文:情景引入。推荐 15分人文画卷重塑 + 15分史实论驳辩论。":"💡 History recommends: 15m Context Mapping + 15m Interactive Debate panels."),n==="Art"&&(t==="zh"?"💡 视觉创意:自由度高。推荐 10分美术鉴赏 + 25分白板手绘画布互动体验。":"💡 Art recommends: 10m Aesthetics inspiration + 25m real-time board drawing."),n==="Other"&&(t==="zh"?"💡 其他科目:均分各小节时间,循序渐进,打造完整的教学循环闭环。":"💡 Generic: Divide evenly into sequential warm-up, core presentation and quiz.")]})]})]})]})]}),o===2&&e.jsxs("div",{className:"space-y-5 animate-in fade-in duration-200 text-left font-sans",children:[e.jsxs("div",{className:"bg-emerald-50/40 py-3.5 px-4.5 rounded-xl border border-emerald-100 text-xs text-emerald-850 leading-relaxed flex items-start gap-2 text-left",children:[e.jsx(W,{size:16,className:"text-emerald-555 shrink-0 mt-0.5 animate-pulse"}),e.jsxs("div",{children:[e.jsx("strong",{children:t==="zh"?"专家课堂时间轴预设:":"Dynamic Class Presets:"}),e.jsx("p",{className:"mt-0.5",children:t==="zh"?"好的教授节奏必须动静相宜。以下提供三种国际领先的精品课件时间节点设计,点击即可一键刷装配置。您也可以在下方自由增删和重新指定每个环节的长短!":"Curating temporal context maximizes classroom retention. Load from predefined templates or tweak the active steps on the dynamic table."})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-bold text-gray-500 uppercase tracking-wider mb-2",children:t==="zh"?"💡 点击应用典型课堂框架模板 (Quick Apply)":"💡 Click to Auto-Apply Structure Presets"}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:[{id:"preset_standard",title:t==="zh"?"经典 5-20-15-5 讲授模式":"Traditional Dual-Lecture Paradigm",desc:t==="zh"?"由浅入深:先通过场景导入,后精讲,接着在白板配合大屏进行演练。":"Perfect dynamic for most standard classes.",segments:[{id:"seg-preset-1",title:"Course Orientation / 课堂导入",type:"intro",duration:"5m",color:"bg-blue-50 text-blue-700 border-blue-200 hover:bg-blue-100",notes:"Warm up topic"},{id:"seg-preset-2",title:"Subject Core Lecture / 核心理论精讲",type:"lecture",duration:"20m",color:"bg-indigo-50 text-indigo-700 border-indigo-200 hover:bg-indigo-100",notes:"Main content slide"},{id:"seg-preset-3",title:"Interactive Lab Work / 随堂协同演练",type:"practice",duration:"15m",color:"bg-green-50 text-green-700 border-green-200 hover:bg-green-100",notes:"Exercises & questions"},{id:"seg-preset-4",title:"Wrap up / 课堂成果总结与答疑",type:"summary",duration:"5m",color:"bg-purple-50 text-purple-700 border-purple-200 hover:bg-purple-100",notes:"Check answer notes"}]},{id:"preset_seminar",title:t==="zh"?"主题讨论工作坊模式":"Active Discussion Workshop",desc:t==="zh"?"协同探究:教师5分钟破冰,学生15分钟小组演练,15分钟对决汇报,10分钟定级。":"Discussion and presentation heavy layout.",segments:[{id:"seg-preset-5",title:"Debate Scenario Brief / 讨论情境简述",type:"intro",duration:"5m",color:"bg-amber-50 text-amber-700 border-amber-200 hover:bg-amber-100",notes:"Define debate metrics"},{id:"seg-preset-6",title:"Cooperative Ideation / 精英白板协作设计",type:"practice",duration:"15m",color:"bg-green-50 text-green-700 border-green-200 hover:bg-green-100",notes:"Joint workspace analysis"},{id:"seg-preset-7",title:"Student Team Presentation / 各小组交互汇报",type:"lecture",duration:"15m",color:"bg-indigo-50 text-indigo-700 border-indigo-200 hover:bg-indigo-100",notes:"Group screen sharing"},{id:"seg-preset-8",title:"Review & Grade Feedback / 教师深度对标点评",type:"summary",duration:"10m",color:"bg-purple-50 text-purple-700 border-purple-200 hover:bg-purple-100",notes:"Score reviews"}]},{id:"preset_flipped",title:t==="zh"?"翻转课堂高强度训练":"Targeted Problem-Solving Sprint",desc:t==="zh"?"应试/解惑突破:10分钟温习,15分钟重难盲点攻坚,15分钟专项题演习。":"Perfect for exams and targeted training courses.",segments:[{id:"seg-preset-9",title:"Blind Spot Evaluation / 温史自学效果自测",type:"intro",duration:"10m",color:"bg-blue-50 text-blue-700 border-blue-200 hover:bg-blue-100",notes:"Scan quiz"},{id:"seg-preset-10",title:"Advanced Principle Explores / 重难考点极限拆解",type:"lecture",duration:"15m",color:"bg-rose-50 text-rose-700 border-rose-200 hover:bg-rose-100",notes:"Analyse weak metrics"},{id:"seg-preset-11",title:"Mock Solving Battle / 核心精选题实操对抗",type:"practice",duration:"15m",color:"bg-emerald-50 text-emerald-700 border-emerald-200 hover:bg-emerald-100",notes:"Sprint workout"},{id:"seg-preset-12",title:"Anchor Recap / 知识网架构网节点固化",type:"summary",duration:"5m",color:"bg-purple-50 text-purple-700 border-purple-200 hover:bg-purple-100",notes:"Highlight checklist"}]}].map(r=>e.jsxs("button",{type:"button",onClick:()=>{c(r.segments),b(t==="zh"?"预设已刷装":"Preset Configured",t==="zh"?`已将《${r.title}》应用到您当前设计的课程中。`:`Assigned "${r.title}" timeslots.`,"success")},className:"bg-white border rounded-xl p-3 text-left transition-all hover:bg-indigo-50/20 hover:border-indigo-400 cursor-pointer active:scale-98",children:[e.jsx("div",{className:"font-bold text-gray-800 text-xs sm:text-sm",children:r.title}),e.jsx("div",{className:"text-[10px] text-gray-400 mt-1.5 leading-relaxed",children:r.desc})]},r.id))})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-2 select-none",children:[e.jsx("label",{className:"block text-xs font-bold text-gray-500 uppercase tracking-wider",children:t==="zh"?"📌 流程时间卡编辑 (拖拽或直接对表格字段赋值)":"📌 Custom Timeslot Table (Edit fields directly)"}),e.jsxs("button",{type:"button",onClick:()=>{const r={id:`seg-w-custom-${Date.now()}`,title:t==="zh"?`自理授课阶段 ${i.length+1}`:`Interactive Step ${i.length+1}`,type:"practice",duration:"10m",color:"bg-slate-50 text-slate-700 border-slate-200 hover:bg-slate-100",notes:""};c([...i,r])},className:"flex items-center gap-1 text-[11px] font-bold text-indigo-600 hover:text-indigo-800 cursor-pointer",children:[e.jsx(L,{size:12})," ",t==="zh"?"增设阶段":"Append Phase"]})]}),e.jsx("div",{className:"space-y-2 border border-gray-150 rounded-xl p-3.5 bg-gray-50/50",children:i.map((r,a)=>e.jsxs("div",{className:"flex flex-col sm:flex-row items-center gap-3 bg-white border border-gray-200 rounded-lg p-2.5 shadow-xs",children:[e.jsxs("div",{className:"flex items-center gap-2 w-full sm:w-auto",children:[e.jsx("span",{className:"w-5 h-5 rounded-full bg-slate-100 flex items-center justify-center text-[10px] text-gray-500 font-bold shrink-0",children:a+1}),e.jsx("input",{type:"text",value:r.title,onChange:l=>{const s=[...i];s[a].title=l.target.value,c(s)},className:"font-bold text-xs text-gray-800 bg-transparent border-b border-transparent hover:border-gray-200 focus:border-indigo-500 py-0.5 px-1 focus:outline-none focus:bg-gray-50/50 rounded flex-1 sm:w-56",placeholder:"Phase Title"})]}),e.jsxs("div",{className:"flex items-center gap-2.5 w-full sm:w-auto justify-end sm:ml-auto",children:[e.jsxs("div",{className:"flex items-center gap-1 bg-slate-50 border border-gray-200 rounded px-2 py-0.5 shrink-0",children:[e.jsx("span",{className:"text-[10px] font-bold text-gray-400",children:"时长:"}),e.jsx("input",{type:"text",value:r.duration,onChange:l=>{const s=[...i];s[a].duration=l.target.value,c(s)},className:"w-8 text-[11px] text-gray-800 font-extrabold bg-transparent text-center focus:outline-none"})]}),e.jsxs("select",{value:r.type,onChange:l=>{const s=l.target.value,d=[...i];d[a].type=s,s==="intro"?d[a].color="bg-blue-50 text-blue-700 border-blue-200 hover:bg-blue-100":s==="lecture"?d[a].color="bg-indigo-50 text-indigo-700 border-indigo-200 hover:bg-indigo-100":s==="practice"?d[a].color="bg-green-50 text-green-700 border-green-200 hover:bg-green-100":s==="summary"?d[a].color="bg-purple-50 text-purple-700 border-purple-200 hover:bg-purple-100":d[a].color="bg-gray-50 text-gray-700 border-gray-205 hover:bg-gray-100",c(d)},className:"bg-slate-50 border border-gray-200 text-[10px] font-bold text-gray-600 rounded p-1 focus:outline-none cursor-pointer",children:[e.jsx("option",{value:"intro",children:t==="zh"?"温习 / 导入":"Warm-up / Intro"}),e.jsx("option",{value:"lecture",children:t==="zh"?"主体 / 精讲":"Core Lecture"}),e.jsx("option",{value:"practice",children:t==="zh"?"交互白板练习":"Practice Workshop"}),e.jsx("option",{value:"summary",children:t==="zh"?"总结 / 定级":"Wrap-up / Recap"})]}),e.jsx("button",{type:"button",onClick:()=>{if(i.length<=1){alert(t==="zh"?"请保留至少一个核心环节!":"At least one segment must exist.");return}const l=i.filter((s,d)=>d!==a);c(l)},className:"text-gray-400 hover:text-rose-600 font-bold p-1 cursor-pointer text-sm select-none",title:"Delete this segment",children:"×"})]})]},r.id))}),e.jsxs("div",{className:"mt-2 text-[10px] text-right text-gray-500 font-mono select-none",children:[t==="zh"?"📈 环节累加公式:":"📈 Dynamic aggregation formula: ",e.jsx("span",{className:"text-gray-800 font-semibold",children:i.map(r=>r.duration).join(" + ")})]})]})]}),o===3&&e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 animate-in fade-in duration-200 font-sans text-left",children:[e.jsxs("div",{className:"space-y-3 flex flex-col h-full min-h-[360px] text-left",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-2",children:[e.jsx("label",{className:"block text-xs font-bold text-gray-500 uppercase tracking-wider select-none shrink-0",children:t==="zh"?"✏️ 使用 Markdown 语法编写课时材料":"✏️ Lesson Materials (Markdown)"}),e.jsxs("button",{type:"button",onClick:()=>{const r=T(p,n);h(r),b(t==="zh"?"大纲模板生成成功":"Curriculum Loaded",t==="zh"?"针对所选择的模型和属性已一键刷装教案模板框架。":"Prepopulated Markdown structure.","success")},className:"flex items-center gap-1 text-xs bg-indigo-50 border border-indigo-100 text-indigo-755 hover:bg-indigo-100 px-3 py-1 rounded-lg transition-colors font-bold cursor-pointer",children:[e.jsx(j,{size:13,className:"text-indigo-500 animate-spin"}),t==="zh"?"✨ 一键生成专家级教学大纲模版":"✨ Autofill Outline Template"]})]}),e.jsx("textarea",{rows:14,value:m,onChange:r=>h(r.target.value),placeholder:t==="zh"?`# 西方哲学三大经典原理
|
|
2
2
|
|
|
3
3
|
在此输入您的具体内容讲解、白板图形绘制节点、以及课后实践任务大纲...`:"# Course curriculum content",className:"w-full flex-grow p-4 bg-slate-900 text-slate-100 border border-slate-700 rounded-xl focus:outline-none focus:ring-2 focus:ring-indigo-500 font-mono text-xs shadow-inner leading-relaxed text-left"})]}),e.jsxs("div",{className:"space-y-3 flex flex-col h-full border border-gray-150 rounded-xl bg-slate-50/50 p-4 text-left",children:[e.jsxs("span",{className:"block text-xs font-bold text-gray-400 uppercase tracking-wider select-none shrink-0",children:["🖥️ ",t==="zh"?"大纲资料实时交互渲染":"Syllabus Live Context rendering"]}),e.jsx("div",{className:"flex-grow overflow-y-auto bg-white border border-gray-150 rounded-lg p-4 text-xs font-sans text-gray-700 max-h-[380px] overflow-x-hidden text-left select-text",children:m.trim()?e.jsx("div",{className:"markdown-body",children:e.jsx(P,{children:m})}):e.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-gray-400 italic py-16",children:[e.jsx(y,{size:32,className:"mb-2 opacity-20 text-indigo-500"}),e.jsx("span",{children:t==="zh"?"教案空无内容,等待输入或一键填充模板...":"Waiting for materials..."})]})})]})]}),o===4&&e.jsxs("div",{className:"space-y-6 animate-in fade-in duration-200 text-center font-sans max-w-xl mx-auto py-3",children:[e.jsx("div",{className:"inline-flex p-3 bg-emerald-50 border border-emerald-100 text-emerald-500 rounded-full",children:e.jsx(I,{size:36,className:"animate-pulse text-emerald-555"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-extrabold text-gray-800 text-base md:text-lg",children:t==="zh"?"🚀 互动课程已精心筹备成功!":"🚀 Materials Generated successfully!"}),e.jsx("p",{className:"text-xs text-gray-400 mt-1",children:t==="zh"?"设计与时间轴逻辑全部检验合格。请在下方核验新课卡片,确认无误一键部署入 SQLite 内核数据库。":"Curriculum parameters are ready to boot inside the Secure Host."})]}),e.jsxs("div",{className:"border border-indigo-200 rounded-2xl p-5 bg-linear-to-b from-indigo-50/20 to-white shadow-md text-left space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-indigo-50 pb-3 gap-2",children:[e.jsx("div",{className:"font-bold text-indigo-950 text-base sm:text-lg truncate",children:p||(t==="zh"?"未指定课程主题":"Blank Topic")}),e.jsx("span",{className:"inline-flex px-2 py-0.5 rounded text-[10px] font-extrabold bg-indigo-50 text-indigo-800 uppercase tracking-wide border border-indigo-150 shrink-0",children:n})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4 text-xs",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-gray-400 block tracking-wider text-[10px] font-bold",children:t==="zh"?"教研环节数":"TOTAL STEPS"}),e.jsxs("span",{className:"text-gray-800 font-extrabold text-sm block mt-1",children:[i.length," ",t==="zh"?"项教学环节":"slots"]})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-gray-400 block tracking-wider text-[10px] font-bold",children:t==="zh"?"发布载体引擎":"STORAGE MEDIUM"}),e.jsxs("div",{className:"flex items-center gap-1 text-emerald-650 font-extrabold text-sm mt-1",children:[e.jsx(v,{size:11,className:"text-emerald-500"}),e.jsx("span",{children:"SQLite DB"})]})]})]}),e.jsx("div",{className:"bg-slate-50 border border-gray-150 p-3 rounded-lg text-[11px] text-gray-600 line-clamp-2 italic leading-relaxed text-left",children:u||(t==="zh"?"无科目描述内容":"No description written.")}),e.jsxs("div",{className:"space-y-1.5 select-none",children:[e.jsx("span",{className:"text-[10px] font-extrabold text-gray-400 uppercase tracking-wider block",children:t==="zh"?"教学时间轴环流预览":"TIMELINE PROGRESS OVERVIEW"}),e.jsx("div",{className:"flex items-center gap-1 w-full overflow-x-auto py-1",children:i.map((r,a)=>e.jsxs(f.Fragment,{children:[e.jsxs("div",{className:`px-2 py-1 text-[10px] font-bold rounded border truncate max-w-[120px] ${r.color.split(" ")[0]}`,children:[r.title.split(" / ")[0]," (",r.duration,")"]}),a<i.length-1&&e.jsx(E,{size:11,className:"text-gray-300"})]},r.id))})]})]})]})]}),e.jsxs("div",{className:"p-4 border-t border-gray-105 bg-slate-50 flex justify-between items-center shrink-0",children:[e.jsx("span",{className:"text-[11px] font-bold font-mono text-gray-400 uppercase select-none",children:t==="zh"?"⚙️ SQLITE 写入预检通过":"⚙️ SQLITE VERIFICATION SUCCESS"}),e.jsxs("div",{className:"flex items-center gap-2",children:[o>1&&e.jsx("button",{type:"button",onClick:()=>g(r=>r-1),disabled:x,className:"px-4 py-2 text-xs font-semibold border border-gray-200 text-gray-700 bg-white hover:bg-gray-50 rounded-lg transition-colors cursor-pointer select-none",children:t==="zh"?"上一步":"Back"}),o<4?e.jsx("button",{type:"button",onClick:()=>{if(o===1&&!p.trim()){alert(t==="zh"?"请输入课程课题名称!":"Please type course title to proceed.");return}g(r=>r+1)},className:"px-4.5 py-2 text-xs font-bold bg-indigo-600 hover:bg-indigo-700 text-white rounded-lg shadow-sm flex items-center gap-1 cursor-pointer select-none",children:t==="zh"?"继续前进":"Continue"}):e.jsx("button",{type:"button",onClick:A,disabled:x,className:"px-5 py-2 text-xs font-bold bg-emerald-600 hover:bg-emerald-700 text-white rounded-lg shadow-md flex items-center gap-1.5 cursor-pointer disabled:opacity-50 select-none animate-bounce",children:x?e.jsxs(e.Fragment,{children:[e.jsx(M,{size:13,className:"animate-spin"}),e.jsx("span",{children:t==="zh"?"写入底库中...":"Deploying..."})]}):e.jsxs(e.Fragment,{children:[e.jsx(v,{size:13}),e.jsx("span",{children:t==="zh"?"部署并激活新课程":"Deploy & Activate"})]})})]})]})]})})})}export{Q as CourseWizardModal};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as c,j as e}from"./vendor-react-0Lg0vA-4.js";import{A as V,m as O,E as X}from"./index-
|
|
1
|
+
import{r as c,j as e}from"./vendor-react-0Lg0vA-4.js";import{A as V,m as O,E as X}from"./index-CCKb8B5h.js";import{au as J,X as H,a5 as R,W as K,B as q,av as Y,o as Z,U as Q,f as ee,I as se,w as te,aw as le,ag as ae,ai as ne,ao as re,b as U,ax as G,e as ie,t as oe}from"./vendor-icons-Dq6MhgH9.js";import"./vendor-pdf-Cp-cYteE.js";import"./vendor-utils-BEhuP0Zq.js";import"./vendor-motion-DjY2czvL.js";import"./vendor-pptx-B_NheIKl.js";import"./vendor-charts-CRXa4AlU.js";function de({classes:x,lessons:n,lang:g,onScheduleClass:z,onGenerateAssignment:A,onCreateLesson:E}){const[m,v]=c.useState(!1),[r,h]=c.useState("menu"),[y,N]=c.useState(""),[w,p]=c.useState(""),[C,T]=c.useState(""),[k,L]=c.useState(""),[D,F]=c.useState(""),[P,M]=c.useState(""),[S,I]=c.useState(""),[_,f]=c.useState(!1),[$,l]=c.useState(!1),[o,i]=c.useState(null),s={zh:{quickActions:"快捷操作指令",quickDesc:"无需切换页面,在此直接向教育总线或班级下发运行调度命令。",scheduleClass:"排课计划调度",scheduleDesc:"为班级分配课程段并指定授课时间",generateAssignment:"生成 AI 测验任务",generateDesc:"利用代理模型为班级定制专属能力题目",createLesson:"注册教学课件",createDesc:"发布新的富文本 Markdown 教材大纲",back:"返回上级",confirm:"确认并下发指令",classSelect:"选择目标班级",lessonSelect:"选择关联课件",dateSelect:"授课日期选择",assignmentTopic:"测验主题方向 / 核心知识点",assignmentTopicPlaceholder:"例: 一元二次方程,光合作用,牛顿运动定律等...",lessonTitle:"课件名称(大纲标题)",lessonTitlePlaceholder:"例: 量子力学初步 / 物理实验基础",lessonContent:"详细授课内容 (Markdown 支持)",successScheduled:"排课成功!总线已捕获日程数据。",successAssignment:"AI 测验任务成功生成,稍后同步。",successLesson:"新课件发布成功!画板白板可直接拖拽加载。",emptyClasses:"未检测到活跃班级",emptyLessons:"未检测到可用课件",loadingBus:"内核微服务运行中...",genericError:"网络或核指令总线调用失败,请重试"},en:{quickActions:"Quick Actions",quickDesc:"Deploy scheduler and class orchestration bus commands instantly from here.",scheduleClass:"Schedule Lesson Period",scheduleDesc:"Assign a lesson package and scheduled date to an active class",generateAssignment:"Generate AI Assignment",generateDesc:"Deploy agent workflows to design tailored student test cases",createLesson:"Register Lesson Curriculum",createDesc:"Publish new rich Markdown-based whiteboard syllabus",back:"Back",confirm:"Execute Command",classSelect:"Select Class",lessonSelect:"Select Lesson Template",dateSelect:"Choose Scheduled Date",assignmentTopic:"Assignment Topic / Target Knowledge",assignmentTopicPlaceholder:"e.g., Quadratic equations, Photosynthesis, Newtonian gravity...",lessonTitle:"Lesson Curriculum Title",lessonTitlePlaceholder:"e.g., Intro to Quantum Mechanics",lessonContent:"Whiteboard Curriculum Content (Markdown)",successScheduled:"Success! Dynamic class schedule updated.",successAssignment:"Success! AI is compiling custom quiz structures.",successLesson:"Success! Ready to orchestrate inside classroom sandbox.",emptyClasses:"No classes discovered",emptyLessons:"No lessons discovered",loadingBus:"Interfacing core services...",genericError:"System bus execute command failure, please retry"}}[g],a=()=>{N(""),p(""),T(""),L(""),F(""),M(""),I(""),i(null),l(!1),f(!1)},d=()=>{switch(r){case"schedule":return s.successScheduled;case"assignment":return s.successAssignment;case"lesson":return s.successLesson;default:return""}},b=t=>{a(),h(t),x.length>0&&(N(x[0].id),L(x[0].id)),n.length>0&&p(n[0].id),t==="lesson"&&I(`# 新课件名称
|
|
2
2
|
|
|
3
3
|
## 教学目标
|
|
4
4
|
- 掌握核心考点
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./vendor-react-0Lg0vA-4.js";import{m as z}from"./index-
|
|
1
|
+
import{j as e}from"./vendor-react-0Lg0vA-4.js";import{m as z}from"./index-CCKb8B5h.js";import{aj as k,ak as C,a6 as S,s as $,D as q}from"./vendor-icons-Dq6MhgH9.js";import"./vendor-pdf-Cp-cYteE.js";import"./vendor-utils-BEhuP0Zq.js";import"./vendor-motion-DjY2czvL.js";import"./vendor-pptx-B_NheIKl.js";import"./vendor-charts-CRXa4AlU.js";function F({isExportWeightModalOpen:p,setIsExportWeightModalOpen:x,lang:s,quizzesWeight:g,setQuizzesWeight:h,assignmentsWeight:m,setAssignmentsWeight:b,handleQuizzesWeightChange:f,handleAssignmentsWeightChange:j,customCategoryOverrides:u,setCustomCategoryOverrides:y,classDashboardMap:i,exportClassId:r,exportClassName:N,csvPreviewData:n,handleExportGrades:v}){return p?e.jsx("div",{className:"fixed inset-0 bg-gray-900/40 backdrop-blur-sm flex items-center justify-center p-6 z-50",children:e.jsxs(z.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},className:"bg-white border text-gray-900 border-gray-200 rounded-2xl shadow-2xl w-full max-w-2xl flex flex-col overflow-hidden max-h-[85vh]",children:[e.jsxs("div",{className:"p-4 border-b border-gray-100 flex items-center justify-between bg-gray-50/80 shrink-0",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(k,{className:"text-indigo-600 font-sans",size:20}),e.jsx("h2",{className:"font-bold text-gray-800 text-lg font-sans",children:s==="zh"?"导出成绩权重设置":"Grade Export & Weighting Settings"})]}),e.jsx("button",{onClick:()=>x(!1),className:"text-gray-400 hover:text-gray-600 font-bold p-1 hover:bg-gray-200 rounded transition-colors text-lg",children:"×"})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto p-6 space-y-6",children:[e.jsx("div",{className:"bg-indigo-50 border border-indigo-150 rounded-xl p-4 text-indigo-800 text-xs font-sans leading-relaxed",children:s==="zh"?"您可以自定义测验与作业在期末成绩(平均分)中的计算权重。系统已根据测验名和内容自动对课程内容进行分类,您可以在下方手动微调分类。":"Customize the calculation weight of quizzes and assignments in the calculated average score. The system automatically classifies items, but you can manually override categorized groups below."}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("h3",{className:"font-bold text-sm text-gray-800 flex items-center gap-2 font-sans",children:[e.jsx(C,{size:16,className:"text-indigo-500 font-sans"}),s==="zh"?"定义成绩占比权重":"Define Weighting Percentages"]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 bg-gray-50 p-4 rounded-xl border border-gray-100 font-sans",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-xs font-semibold text-gray-700",children:s==="zh"?"测验权重 (Quizzes)":"Quizzes Weight"}),e.jsxs("span",{className:"text-xs font-bold text-indigo-600 bg-indigo-50 px-2 py-0.5 rounded border border-indigo-100",children:[g,"%"]})]}),e.jsx("input",{type:"range",min:"0",max:"100",value:g,onChange:t=>f(Number(t.target.value)),className:"w-full h-1.5 bg-gray-200 rounded-lg appearance-none cursor-pointer accent-indigo-600"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-xs font-semibold text-gray-700",children:s==="zh"?"作业权重 (Assignments)":"Assignments Weight"}),e.jsxs("span",{className:"text-xs font-bold text-indigo-600 bg-indigo-50 px-2 py-0.5 rounded border border-indigo-100",children:[m,"%"]})]}),e.jsx("input",{type:"range",min:"0",max:"100",value:m,onChange:t=>j(Number(t.target.value)),className:"w-full h-1.5 bg-gray-200 rounded-lg appearance-none cursor-pointer accent-indigo-600"})]})]}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx("button",{type:"button",onClick:()=>{h(50),b(50)},className:"text-[10px] text-gray-500 hover:text-gray-700 bg-white border border-gray-200 hover:bg-gray-50 font-bold px-2.5 py-1 rounded transition-colors cursor-pointer",children:s==="zh"?"均衡配比 50/50":"Balance 50/50"}),e.jsx("button",{type:"button",onClick:()=>{h(40),b(60)},className:"text-[10px] text-gray-500 hover:text-gray-700 bg-white border border-gray-200 hover:bg-gray-50 font-bold px-2.5 py-1 rounded transition-colors cursor-pointer",children:s==="zh"?"推荐配比 40/60":"Recommend 40/60"})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("h3",{className:"font-bold text-sm text-gray-800 flex items-center justify-between font-sans",children:[e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(S,{size:16,className:"text-indigo-500"}),s==="zh"?"期末考核项目微调":"Item Categorization Overrides"]}),e.jsx("span",{className:"text-[10px] text-gray-400 font-medium font-sans",children:s==="zh"?`共 ${i[r]?.assignments?.length||0} 项`:`${i[r]?.assignments?.length||0} items total`})]}),e.jsxs("div",{className:"border border-gray-150 rounded-xl overflow-hidden divide-y divide-gray-100 max-h-60 overflow-y-auto bg-white shadow-inner",children:[(i[r]?.assignments||[]).map(t=>{const d=t.content&&t.content.startsWith('{"quizType":"mcq_learning_objectives"'),l=t.title&&(t.title.toLowerCase().includes("quiz")||t.title.toLowerCase().includes("test")||t.title.includes("测验")||t.title.includes("测试")),o=d||l?"quiz":"assignment",a=u[t.id]||o;return e.jsxs("div",{className:"p-3 flex items-center justify-between gap-4 font-sans hover:bg-gray-50/50 transition-colors",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("div",{className:"font-semibold text-xs text-gray-800 truncate",title:t.title,children:t.title}),e.jsx("div",{className:"text-[10px] text-gray-400 truncate mt-0.5",children:t.description||(s==="zh"?"无描述信息":"No description provided")})]}),e.jsxs("div",{className:"flex border border-gray-200 rounded-lg p-0.5 bg-gray-50 shrink-0",children:[e.jsx("button",{type:"button",onClick:()=>y(c=>({...c,[t.id]:"quiz"})),className:`px-2.5 py-1 text-[10px] font-bold rounded-md transition-all cursor-pointer ${a==="quiz"?"bg-indigo-600 text-white shadow":"text-gray-500 hover:text-gray-800 hover:bg-gray-100"}`,children:s==="zh"?"测验":"Quiz"}),e.jsx("button",{type:"button",onClick:()=>y(c=>({...c,[t.id]:"assignment"})),className:`px-2.5 py-1 text-[10px] font-bold rounded-md transition-all cursor-pointer ${a==="assignment"?"bg-emerald-600 text-white shadow":"text-gray-500 hover:text-gray-800 hover:bg-gray-100"}`,children:s==="zh"?"作业":"Assignment"})]})]},t.id)}),(!i[r]?.assignments||i[r].assignments.length===0)&&e.jsx("div",{className:"p-8 text-center text-xs text-gray-400 italic",children:s==="zh"?"此班级暂未创建任何考核项目":"No graded items exist in this class."})]})]}),n&&n.rows.length>0&&e.jsxs("div",{className:"space-y-3 pt-2",children:[e.jsxs("h3",{className:"font-bold text-sm text-gray-800 flex items-center justify-between font-sans",children:[e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx($,{size:16,className:"text-emerald-500"}),s==="zh"?"CSV 实时成绩表预览 (前5行数据)":"Live CSV Grade Preview (First 5 Rows)"]}),e.jsx("span",{className:"text-[10px] bg-emerald-50 text-emerald-700 border border-emerald-100 font-bold px-2 py-0.5 rounded shadow-xs font-sans",children:s==="zh"?`展示 5 / ${n.totalStudents} 名学生`:`Showing 5 of ${n.totalStudents} students`})]}),e.jsx("div",{className:"border border-gray-150 rounded-xl overflow-hidden bg-white shadow-xs max-w-full",children:e.jsx("div",{className:"overflow-x-auto max-h-56 overflow-y-auto",children:e.jsxs("table",{className:"w-full border-collapse text-left",children:[e.jsx("thead",{children:e.jsx("tr",{className:"bg-gray-50 border-b border-gray-150 sticky top-0 z-10",children:n.headers.map((t,d)=>{const l=t.includes("Average")||t.includes("Avg")||t.includes("Score"),o=t.includes("Weighted");return e.jsx("th",{className:`p-2.5 text-[10px] font-bold tracking-wider uppercase border-r border-gray-150 whitespace-nowrap font-sans font-semibold ${o?"text-indigo-700 bg-indigo-50/70 border-indigo-150 font-bold":l?"text-emerald-700 bg-emerald-50/70":"text-gray-500"}`,children:t},d)})})}),e.jsx("tbody",{className:"divide-y divide-gray-100",children:n.rows.map((t,d)=>e.jsx("tr",{className:"hover:bg-gray-50/50 transition-colors font-mono text-[10px]",children:t.map((l,o)=>{const a=n.headers[o]||"",c=a.includes("Weighted"),w=a.includes("Average")||a.includes("Avg")||a.includes("Score");return e.jsx("td",{className:`p-2 border-r border-gray-100 font-mono text-[10px] text-gray-700 whitespace-nowrap text-center ${c?"bg-indigo-50/30 font-bold text-indigo-700 border-indigo-100":w?"bg-emerald-50/10 font-semibold text-emerald-800":o<2?"text-left font-sans font-medium":""}`,children:l},o)})},d))})]})})}),e.jsx("p",{className:"text-[10px] text-gray-400 font-sans italic",children:s==="zh"?"* 改变上方权重占比或调整项目分类时,此预览与计算结果会立即实时刷新。":"* Calculations and layout values in this preview refresh dynamically as you tweak sliders and overrides."})]})]}),e.jsxs("div",{className:"p-4 border-t border-gray-100 bg-gray-50/85 flex justify-end gap-2.5 shrink-0",children:[e.jsx("button",{type:"button",onClick:()=>x(!1),className:"px-4 py-2 text-xs font-semibold border border-gray-300 text-gray-700 bg-white rounded-lg hover:bg-gray-100 transition-colors cursor-pointer",children:s==="zh"?"取消":"Cancel"}),e.jsxs("button",{type:"button",disabled:!i[r]?.assignments||i[r].assignments.length===0,onClick:()=>{v(r,N,g,m,u),x(!1)},className:"px-4 py-2 text-xs font-bold bg-indigo-600 text-white border border-indigo-700 rounded-lg hover:bg-indigo-700 hover:shadow shadow-sm transition-all flex items-center gap-1.5 cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",children:[e.jsx(q,{size:14}),s==="zh"?"导出 CSV 成绩表":"Export Grade Sheet"]})]})]})}):null}export{F as ExportWeightModal};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as m,j as e}from"./vendor-react-0Lg0vA-4.js";import{M as D,E as M,a as W}from"./index-
|
|
1
|
+
import{r as m,j as e}from"./vendor-react-0Lg0vA-4.js";import{M as D,E as M,a as W}from"./index-CCKb8B5h.js";import{g as ge}from"./index-CCKb8B5h.js";import{s as v,ay as $,B as S,U as z,ai as _,W as R,u as C,ao as U,a9 as H,t as J,w as P,a1 as O,o as q,X as G,aH as I,e as T,I as w,l as V,f as F,ac as Q,p as K,O as X}from"./vendor-icons-Dq6MhgH9.js";import"./vendor-pdf-Cp-cYteE.js";import"./vendor-utils-BEhuP0Zq.js";import"./vendor-motion-DjY2czvL.js";import"./vendor-pptx-B_NheIKl.js";import"./vendor-charts-CRXa4AlU.js";const L=r=>r.startsWith("vfs.")?"vfs":r.startsWith("lesson.")||r.startsWith("whiteboard.")?"edu":r.startsWith("class.")||r.startsWith("student.")||r.startsWith("assignment.")||r.startsWith("attendance.")||r.startsWith("schedule.")?"mgmt":r.startsWith("process.")?"proc":r.startsWith("ai.")?"ai":"plugin",B=r=>{if(!r||r.type!=="OBJECT")return"{}";const a={};return r.properties&&Object.keys(r.properties).forEach(t=>{const n=r.properties[t];n.type==="ARRAY"?a[t]=n.items?.type==="STRING"?["选项 A","选项 B","选项 C"]:[]:n.type==="INTEGER"||n.type==="NUMBER"?a[t]=100:n.type==="BOOLEAN"?a[t]=!0:t.toLowerCase().includes("id")?a[t]="auto-id-or-current":t.toLowerCase().includes("name")?a[t]="测试名称":t.toLowerCase().includes("content")?a[t]=`# 初始内容
|
|
2
2
|
这是一个通过命令创建的组件或段落。`:a[t]=n.description||"示例参数"}),JSON.stringify(a,null,2)},Y=({registeredCommands:r,onRefresh:a})=>{const[t,n]=m.useState(""),[g,h]=m.useState("all"),[b,j]=m.useState(null),[u,y]=m.useState({}),[k,f]=m.useState({}),E=[{id:"all",name:"全部命令",icon:$},{id:"edu",name:"教学与画板",icon:S},{id:"mgmt",name:"班级与学生",icon:z},{id:"vfs",name:"虚拟文件系统",icon:_},{id:"proc",name:"进程控制",icon:v},{id:"ai",name:"AI 规划生成",icon:R},{id:"plugin",name:"第三方插件",icon:C}],A=r.filter(s=>{const l=g==="all"||L(s.commandType)===g,d=t===""||s.commandType.toLowerCase().includes(t.toLowerCase())||s.description&&s.description.toLowerCase().includes(t.toLowerCase())||s.id.toLowerCase().includes(t.toLowerCase());return l&&d}),o=async(s,l)=>{f(d=>({...d,[l]:{success:!1,loading:!0}}));try{const d=u[l]||"{}";let p={};try{p=JSON.parse(d)}catch(c){f(N=>({...N,[l]:{success:!1,error:`JSON 语法解析错误: ${c.message}`,loading:!1}}));return}const i=await fetch("/api/commands/execute",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({commandType:s,payload:p})}),x=await i.json();i.ok&&x.success?(f(c=>({...c,[l]:{success:!0,data:x.result,loading:!1}})),a()):f(c=>({...c,[l]:{success:!1,error:x.error||"执行命令失败",loading:!1}}))}catch(d){f(p=>({...p,[l]:{success:!1,error:d.message,loading:!1}}))}};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"p-4 border-b border-gray-100 bg-gray-50/50 flex flex-col gap-4 shrink-0 col-span-1",children:[e.jsxs("div",{className:"relative",children:[e.jsx(v,{className:"absolute left-3.5 top-1/2 -translate-y-1/2 text-gray-400",size:16}),e.jsx("input",{type:"text",placeholder:"通过命令类型、描述或 Action ID 搜索活跃指令...",value:t,onChange:s=>n(s.target.value),className:"w-full pl-10 pr-4 py-2.5 bg-white border border-gray-200 rounded-xl text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent transition-all shadow-sm"})]}),e.jsx("div",{className:"flex flex-wrap gap-2",children:E.map(s=>{const l=s.icon,d=g===s.id;return e.jsxs("button",{onClick:()=>h(s.id),className:`flex items-center gap-1.5 px-3.5 py-1.5 rounded-full text-xs font-semibold transition-all ${d?"bg-indigo-600 text-white shadow shadow-indigo-200 scale-102 font-bold":"bg-white text-gray-600 hover:text-gray-900 border border-gray-200 hover:border-gray-300"}`,children:[e.jsx(l,{size:13}),e.jsx("span",{children:s.name}),s.id==="all"?e.jsx("span",{className:`ml-1 text-[10px] px-1.5 py-0.2 rounded-full ${d?"bg-indigo-700/80 text-white":"bg-gray-100 text-gray-500"}`,children:r.length}):null]},s.id)})})]}),e.jsx("div",{className:"flex-1 overflow-y-auto p-6 bg-gray-50/30",children:A.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center p-12 text-gray-400",children:[e.jsx(U,{size:48,className:"text-gray-300 mb-4 animate-pulse"}),e.jsx("h3",{className:"font-semibold text-gray-700",children:"没有找到匹配的指令"}),e.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"请尝试清空查询条件或检查当前的插件状态"})]}):e.jsx("div",{className:"space-y-4 max-w-5xl mx-auto",children:A.map(s=>{const l=b===s.id,d=L(s.commandType),p=s.isHighRisk;u[s.id]===void 0&&(u[s.id]=B(s.inputSchema));const i=k[s.id];return e.jsxs("div",{className:`bg-white rounded-xl border transition-all duration-200 overflow-hidden shadow-sm hover:shadow ${l?"border-indigo-400 ring-1 ring-indigo-100":p?"border-orange-200 hover:border-orange-300":"border-gray-200 hover:border-indigo-200"}`,children:[e.jsxs("div",{onClick:()=>{j(l?null:s.id)},className:"p-4 flex flex-col sm:flex-row sm:items-center justify-between gap-4 cursor-pointer hover:bg-gray-50/30 transition-colors select-none",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:`p-2 rounded-lg shrink-0 ${p?"bg-orange-50 text-orange-600":"bg-indigo-50 text-indigo-600"}`,children:d==="vfs"?e.jsx(_,{size:18}):d==="edu"?e.jsx(S,{size:18}):d==="mgmt"?e.jsx(z,{size:18}):d==="proc"?e.jsx(v,{size:18}):d==="ai"?e.jsx(R,{size:18}):e.jsx(C,{size:18})}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("span",{className:"font-mono font-bold text-sm bg-gray-100 text-gray-800 px-2 py-0.5 rounded border border-gray-200",children:s.commandType}),p&&e.jsx("span",{className:"text-[10px] bg-red-100 text-red-700 border border-red-200 rounded font-extrabold px-1.5 py-0.5 uppercase tracking-wide flex items-center gap-0.5",children:"⚠️ 高风险操作"}),e.jsxs("span",{className:"text-xs bg-indigo-50 text-indigo-700 border border-indigo-100 rounded-full px-2 py-0.5",children:["🔒 ",s.capabilityRequired||"无公开权限"]})]}),e.jsx("p",{className:"text-gray-600 text-xs mt-1.5 font-medium line-clamp-1",children:s.description})]})]}),e.jsxs("div",{className:"flex items-center gap-3 self-end sm:self-auto",children:[e.jsxs("span",{className:"text-[10px] text-gray-400 font-mono hidden md:inline",children:["ID: ",s.id]}),e.jsxs("button",{className:`text-xs px-3 py-1 bg-gray-100 text-gray-700 rounded-lg font-semibold border hover:bg-gray-200 transition-all flex items-center gap-1 ${l?"bg-indigo-50 border-indigo-200 text-indigo-700":""}`,children:[l?"折叠面板":"交互调试 Shell",e.jsx(H,{size:12,className:`transform transition-transform ${l?"rotate-90":""}`})]})]})]}),l&&e.jsxs("div",{className:"border-t border-gray-100 bg-gray-50/50 p-5 space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:[e.jsxs("h4",{className:"text-xs font-bold text-gray-700 uppercase tracking-widest mb-3 flex items-center gap-1.5 border-b border-gray-100 pb-2",children:[e.jsx(J,{size:12,className:"text-gray-400"}),"入参规范 (JSON Schema Definition)"]}),s.inputSchema?.properties?e.jsx("div",{className:"space-y-3 font-mono text-[11px]",children:Object.keys(s.inputSchema.properties).map(x=>{const c=s.inputSchema.properties[x],N=s.inputSchema.required?.includes(x);return e.jsxs("div",{className:"flex flex-col gap-1 border-b border-gray-50 last:border-b-0 pb-1.5",children:[e.jsxs("div",{className:"flex items-baseline gap-1.5",children:[e.jsx("span",{className:"text-indigo-600 font-semibold",children:x}),e.jsxs("span",{className:"text-gray-400 text-[10px]",children:["(",c.type,")"]}),N&&e.jsx("span",{className:"text-red-500 text-[9px] font-bold bg-red-50 border border-red-100 rounded px-1",children:"REQUIRED"})]}),c.description&&e.jsx("span",{className:"text-gray-500 font-sans leading-relaxed text-xs",children:c.description})]},x)})}):e.jsx("p",{className:"text-xs text-gray-400 italic",children:"该命令不需要接收任何入参负载 (Payload)。"})]}),e.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-4 flex flex-col",children:[e.jsxs("h4",{className:"text-xs font-bold text-gray-700 uppercase tracking-widest mb-3 flex items-center gap-1.5 border-b border-gray-100 pb-2 justify-between",children:[e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(v,{size:12,className:"text-gray-400"}),"Payload 调试区"]}),e.jsx("button",{onClick:()=>{y(x=>({...x,[s.id]:B(s.inputSchema)}))},className:"text-[9px] text-indigo-600 hover:underline hover:text-indigo-800 uppercase tracking-wider",children:"恢复默认模版"})]}),e.jsx("label",{className:"text-[10px] font-semibold text-gray-400 block mb-1",children:"Payload JSON:"}),e.jsx("textarea",{value:u[s.id]||"",onChange:x=>{const c=x.target.value;y(N=>({...N,[s.id]:c}))},rows:6,className:"w-full font-mono text-[11px] p-2.5 bg-gray-900 text-indigo-300 border border-gray-800 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:outline-none resize-none leading-relaxed flex-1 shadow-inner"}),e.jsx("div",{className:"mt-3 flex justify-end",children:e.jsx("button",{onClick:()=>o(s.commandType,s.id),disabled:i?.loading,className:`px-4 py-2 text-xs font-bold font-sans text-white hover:shadow-md active:scale-95 transition-all flex items-center gap-1.5 rounded-lg ${p?"bg-red-600 hover:bg-red-700":"bg-indigo-600 hover:bg-indigo-700 focus:ring-2 focus:ring-indigo-500"} disabled:opacity-50`,children:i?.loading?e.jsxs(e.Fragment,{children:[e.jsx(P,{size:13,className:"animate-spin"}),e.jsx("span",{children:"内核正在调度总线..."})]}):e.jsxs(e.Fragment,{children:[e.jsx(O,{size:13}),e.jsx("span",{children:"提交执行指令 (Deploy Command)"})]})})})]})]}),i&&e.jsxs("div",{className:`p-4 rounded-xl border flex flex-col font-mono text-[11px] leading-relaxed relative ${i.loading?"bg-gray-50 border-gray-200":i.success?"bg-green-50/50 border-green-200 text-green-900":"bg-red-50/50 border-red-200 text-red-900"}`,children:[e.jsx("div",{className:"absolute top-2 right-3 uppercase text-[10px] font-bold text-gray-400",children:"Console Output log"}),e.jsx("div",{className:"font-bold flex items-center gap-1.5 mb-1 bg-transparent border-0 p-0 text-xs text-neutral-800",children:i.loading?e.jsx("span",{className:"text-gray-500",children:"⏳ COMMAND QUEUED..."}):i.success?e.jsxs("span",{className:"text-green-700 flex items-center gap-1",children:[e.jsx(q,{size:14})," STATUS: 200 SUCCESS (Action Completed)"]}):e.jsxs("span",{className:"text-red-700 flex items-center gap-1",children:[e.jsx(G,{size:14})," STATUS: 500 INTERNAL_BUS_ERROR"]})}),!i.loading&&e.jsx("pre",{className:"mt-2 p-3 bg-gray-900/95 text-gray-200 rounded-lg overflow-x-auto border border-gray-800 shadow-inner max-h-56 select-all font-mono",children:i.success?JSON.stringify(i.data,null,2):i.error})]})]})]},s.id)})})})]})},Z=({pluginGuideMd:r,loadingMd:a,copiedId:t,handleCopy:n,pluginBoilerplateCode:g,pluginInteractiveCode:h,pluginExamCode:b})=>e.jsx("div",{className:"flex-1 overflow-y-auto p-6 bg-slate-50/50",children:e.jsxs("div",{className:"max-w-5xl mx-auto space-y-6",children:[a?e.jsxs("div",{className:"flex flex-col items-center justify-center p-12 bg-white rounded-2xl border border-gray-200",children:[e.jsx(P,{size:32,className:"animate-spin text-indigo-600 mb-2"}),e.jsx("span",{className:"text-xs text-gray-500 font-semibold",children:"正在从服务器拉取 SDK 文档..."})]}):r?e.jsx("div",{className:"bg-white rounded-2xl border border-gray-200 p-8 shadow-sm prose prose-slate max-w-none text-xs leading-relaxed",children:e.jsx(D,{children:r})}):null,e.jsxs("div",{className:"bg-white rounded-2xl border border-indigo-100 p-6 shadow-sm flex flex-col md:flex-row gap-5 items-start",children:[e.jsx("div",{className:"p-4 bg-indigo-50 text-indigo-600 rounded-2xl shrink-0",children:e.jsx(C,{size:28})}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h3",{className:"text-base font-bold text-gray-900",children:"Edu-OS 插件开发指南 & API 参考"}),e.jsxs("p",{className:"text-xs text-gray-600 leading-relaxed",children:["Edu-OS 基于 ",e.jsx("span",{className:"font-semibold text-indigo-600",children:"CommandBus(命令总线)"})," + ",e.jsx("span",{className:"font-semibold text-indigo-600",children:"EventBus(事件总线)"})," 微内核架构。 插件通过标准 ESM 模块导出 ",e.jsx("code",{className:"bg-gray-100 text-rose-600 px-1 rounded text-[10px]",children:"activate(ctx)"})," 函数接收 ",e.jsx("span",{className:"font-semibold",children:"PluginContext"}),", 进而访问 7 大内核服务。本页提供完整的 API 参考、参数说明和可运行示例。"]}),e.jsxs("div",{className:"flex flex-wrap gap-2 pt-1",children:[e.jsx("span",{className:"text-[10px] bg-indigo-50 text-indigo-700 border border-indigo-100 px-2 py-0.5 rounded-full font-medium",children:"🔄 DI 依赖注入"}),e.jsx("span",{className:"text-[10px] bg-emerald-50 text-emerald-700 border border-emerald-100 px-2 py-0.5 rounded-full font-medium",children:"🔒 能力安全模型"}),e.jsx("span",{className:"text-[10px] bg-amber-50 text-amber-700 border border-amber-100 px-2 py-0.5 rounded-full font-medium",children:"⚡ 热重载 + Worker 隔离"}),e.jsx("span",{className:"text-[10px] bg-rose-50 text-rose-700 border border-rose-100 px-2 py-0.5 rounded-full font-medium",children:"📦 ESM + CommonJS 双格式"}),e.jsx("span",{className:"text-[10px] bg-sky-50 text-sky-700 border border-sky-100 px-2 py-0.5 rounded-full font-medium",children:"🆔 别名生命周期 (Alias Lifecycle)"}),e.jsx("span",{className:"text-[10px] bg-teal-50 text-teal-700 border border-teal-100 px-2 py-0.5 rounded-full font-medium",children:"🛡️ Worker Storage 安全隔离"})]})]})]}),e.jsxs("div",{className:"bg-white rounded-2xl border border-gray-200 overflow-hidden shadow-sm",children:[e.jsxs("div",{className:"px-5 py-4 bg-gray-50 border-b border-gray-100 flex flex-col sm:flex-row sm:items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx("div",{className:"p-1.5 bg-indigo-50 text-indigo-600 rounded",children:e.jsx(I,{size:16})}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-xs font-bold text-gray-900",children:"示例 1:思维导图插件 — 注册 Action + 处理器 + 发布事件"}),e.jsx("p",{className:"text-[10px] text-gray-500 mt-0.5",children:"演示 ctx.services 解构、Action 注册、createCommand 创建信封、eventBus.publish 发布事件"})]})]}),e.jsxs("button",{onClick:()=>n("tpl1",g),className:`px-3 py-1.5 rounded-lg text-xs font-semibold flex items-center gap-1.5 transition-all shadow-sm shrink-0 ${t==="tpl1"?"bg-emerald-50 text-emerald-700 border border-emerald-250":"bg-white text-indigo-600 border border-indigo-150 hover:bg-indigo-50"}`,children:[t==="tpl1"?e.jsx(T,{size:12}):e.jsx(w,{size:12}),e.jsx("span",{children:t==="tpl1"?"已复制!":"复制代码"})]})]}),e.jsx("pre",{className:"text-xs font-mono p-5 bg-gray-950 text-gray-200 overflow-x-auto leading-relaxed max-h-[360px] shadow-inner select-all",children:g})]}),e.jsxs("div",{className:"bg-white rounded-2xl border border-gray-200 overflow-hidden shadow-sm",children:[e.jsxs("div",{className:"px-5 py-4 bg-gray-50 border-b border-gray-100 flex flex-col sm:flex-row sm:items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx("div",{className:"p-1.5 bg-emerald-50 text-emerald-600 rounded",children:e.jsx(I,{size:16})}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-xs font-bold text-gray-900",children:"示例 2:AI 作业批改插件 — 演示 AI + 事件订阅 + 存储 + DI"}),e.jsx("p",{className:"text-[10px] text-gray-500 mt-0.5",children:"演示 ctx.resolve 获取数据库、services.ai 生成文本、services.storage 持久化、eventBus 订阅"})]})]}),e.jsxs("button",{onClick:()=>n("tpl2",h),className:`px-3 py-1.5 rounded-lg text-xs font-semibold flex items-center gap-1.5 transition-all shadow-sm shrink-0 ${t==="tpl2"?"bg-emerald-50 text-emerald-700 border border-emerald-250":"bg-white text-emerald-600 border border-emerald-150 hover:bg-emerald-50"}`,children:[t==="tpl2"?e.jsx(T,{size:12}):e.jsx(w,{size:12}),e.jsx("span",{children:t==="tpl2"?"已复制!":"复制代码"})]})]}),e.jsx("pre",{className:"text-xs font-mono p-5 bg-gray-950 text-gray-200 overflow-x-auto leading-relaxed max-h-[360px] shadow-inner select-all",children:h})]}),e.jsxs("div",{className:"bg-white rounded-2xl border border-gray-200 overflow-hidden shadow-sm",children:[e.jsxs("div",{className:"px-5 py-4 bg-gray-50 border-b border-gray-100 flex flex-col sm:flex-row sm:items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx("div",{className:"p-1.5 bg-amber-50 text-amber-600 rounded",children:e.jsx(I,{size:16})}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-xs font-bold text-gray-900",children:"示例 3:考试系统插件 — 演示 ctx.db 自建表 + deactivate 清理"}),e.jsx("p",{className:"text-[10px] text-gray-500 mt-0.5",children:"演示 ctx.db.ensureTable 建表、ctx.db.table 获取带前缀表名、deactivate 生命周期"})]})]}),e.jsxs("button",{onClick:()=>n("tpl3",b),className:`px-3 py-1.5 rounded-lg text-xs font-semibold flex items-center gap-1.5 transition-all shadow-sm shrink-0 ${t==="tpl3"?"bg-emerald-50 text-emerald-700 border border-emerald-250":"bg-white text-amber-600 border border-amber-150 hover:bg-amber-50"}`,children:[t==="tpl3"?e.jsx(T,{size:12}):e.jsx(w,{size:12}),e.jsx("span",{children:t==="tpl3"?"已复制!":"复制代码"})]})]}),e.jsx("pre",{className:"text-xs font-mono p-5 bg-gray-950 text-gray-200 overflow-x-auto leading-relaxed max-h-[360px] shadow-inner select-all",children:b})]})]})}),ee=({copiedId:r,handleCopy:a})=>e.jsx("div",{className:"flex-1 overflow-y-auto p-6 bg-slate-50/50",children:e.jsxs("div",{className:"max-w-5xl mx-auto space-y-8",children:[e.jsxs("div",{className:"bg-gradient-to-r from-indigo-900 to-indigo-950 rounded-2xl p-6 text-white shadow-md flex flex-col md:flex-row gap-5 items-start",children:[e.jsx("div",{className:"p-4 bg-indigo-500/20 text-indigo-300 border border-indigo-500/30 rounded-2xl shrink-0",children:e.jsx(S,{size:32})}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("h3",{className:"text-lg font-bold text-white flex items-center gap-2",children:["Edu-OS 核心系统主要特性使用教程",e.jsx("span",{className:"text-[10px] bg-indigo-500/30 text-indigo-200 border border-indigo-500/50 px-2 py-0.5 rounded-full font-normal",children:"v2.1.0 LTS"})]}),e.jsx("p",{className:"text-xs text-indigo-200 leading-relaxed",children:"本指南为教育实验操作系统 (Edu-OS) 的深度使用手册。详细阐述如何使用内核指令管理班级与学生、基于大纲结构化推进课件时间轴、在互动白板中动态注入脑图和测验元素、启动全屏锁定与签到的教学控制流,以及编写并集成支持 AI 成绩回传的 HTML Applet 实验组件。"}),e.jsxs("div",{className:"flex flex-wrap gap-2 pt-1",children:[e.jsx("span",{className:"text-[10px] bg-indigo-800/40 text-indigo-150 border border-indigo-700/50 px-2 py-0.5 rounded-full font-medium",children:"🏫 班级与学生指令集"}),e.jsx("span",{className:"text-[10px] bg-emerald-800/40 text-emerald-150 border border-emerald-700/50 px-2 py-0.5 rounded-full font-medium",children:"📋 课程大纲时间轴同步"}),e.jsx("span",{className:"text-[10px] bg-amber-800/40 text-amber-150 border border-amber-700/50 px-2 py-0.5 rounded-full font-medium",children:"🎨 协作白板指令渲染"}),e.jsx("span",{className:"text-[10px] bg-sky-800/40 text-sky-150 border border-sky-700/50 px-2 py-0.5 rounded-full font-medium",children:"🚀 postMessage 成绩监听"})]})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[e.jsxs("div",{className:"bg-white rounded-2xl border border-gray-200 shadow-sm p-6 space-y-4 hover:shadow-md transition-all flex flex-col justify-between",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-3 border-b border-gray-100 pb-3 text-indigo-600 font-bold",children:[e.jsx("div",{className:"p-2 bg-indigo-50 rounded-xl",children:e.jsx(z,{size:20})}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-sm text-gray-900",children:"1. 使用核心指令管理班级与学生"}),e.jsx("p",{className:"text-[11px] text-gray-400 font-normal mt-0.5",children:"Administrative CLI & Capability Model"})]})]}),e.jsxs("p",{className:"text-xs text-gray-600 leading-relaxed mt-3",children:["Edu-OS 采用权限隔离的",e.jsx("strong",{children:"能力安全模型 (Capability Model)"}),"。任何行政、学籍以及课表排期修改,底层最终都会被封装为非对称的内核指令,经由分布式指令总线进行安全校验与事务落库。"]}),e.jsxs("div",{className:"p-3 bg-indigo-50/50 rounded-xl border border-indigo-100 text-[11px] text-indigo-900 space-y-1.5 mt-3",children:[e.jsx("span",{className:"font-bold block",children:"🔒 核心访问权限声明 (RBAC Capabilities):"}),e.jsxs("ul",{className:"list-disc list-inside space-y-1 text-gray-600 text-[10.5px]",children:[e.jsxs("li",{children:[e.jsx("code",{className:"bg-white/80 px-1 rounded border border-indigo-150",children:"class:write"}),":允许创建/删除行政班级。"]}),e.jsxs("li",{children:[e.jsx("code",{className:"bg-white/80 px-1 rounded border border-indigo-150",children:"student:write"}),":允许注册学生、修改学籍或修改设备锁定状态。"]}),e.jsxs("li",{children:[e.jsx("code",{className:"bg-white/80 px-1 rounded border border-indigo-150",children:"schedule:write"}),":允许编排课程,或临时将某一日期的课程替换为星期几的常规课表。"]})]})]})]}),e.jsxs("div",{className:"space-y-3 font-mono text-[11px] mt-4",children:[e.jsxs("div",{className:"bg-gray-50 rounded-xl p-3 border border-gray-150 relative",children:[e.jsxs("div",{className:"flex justify-between items-center mb-1",children:[e.jsx("span",{className:"text-indigo-600 font-bold",children:"A. 创建班级 (class.create)"}),e.jsx("button",{onClick:()=>a("guide_cmd_class",`{
|
|
3
3
|
"name": "高三一班",
|
|
4
4
|
"description": "物理实验班"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./vendor-react-0Lg0vA-4.js";import{m as v}from"./index-afBTqYFz.js";import{d as h,D as N,w,o as C,e as z}from"./vendor-icons-Dq6MhgH9.js";import"./vendor-pdf-Cp-cYteE.js";import"./vendor-utils-BEhuP0Zq.js";import"./vendor-motion-DjY2czvL.js";import"./vendor-pptx-B_NheIKl.js";import"./vendor-charts-CRXa4AlU.js";function T(g){const{isImportLessonsOpen:p,setIsImportLessonsOpen:i,lang:s,importStatus:r,setIsDraggingImport:d,handleCSVFileChange:x,downloadCsvTemplate:b,isDraggingImport:u,previewImportData:a,setPreviewImportData:m,setImportStatus:c,importProgress:l,importProgressTotal:o,importErrorMsg:f,setImportErrorMsg:y,handleCSVImportSubmit:j}=g;return e.jsx(e.Fragment,{children:p&&e.jsx("div",{className:"fixed inset-0 bg-gray-900/50 backdrop-blur-sm flex items-center justify-center p-4 md:p-6 z-50 overflow-y-auto text-gray-850",children:e.jsxs(v.div,{initial:{opacity:0,y:15,scale:.98},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:10,scale:.98},className:"bg-white border text-gray-900 border-gray-250 rounded-2xl shadow-2xl w-full max-w-2xl flex flex-col overflow-hidden max-h-[90vh] font-sans text-left",children:[e.jsxs("div",{className:"p-4 md:p-5 border-b border-gray-100 flex items-center justify-between bg-slate-50 shrink-0",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2 bg-indigo-50 border border-indigo-100 rounded-lg text-indigo-650",children:e.jsx(h,{size:20,className:"animate-pulse"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"font-bold text-gray-850 text-base md:text-lg",children:s==="zh"?"批量导入课程 (CSV)":"Bulk-Import Courses (CSV)"}),e.jsx("p",{className:"text-xs text-gray-500 mt-0.5",children:s==="zh"?"上传包含标准表头的 CSV 教案,一键实现秒级批量底库写入。":"Upload a standard CSV file matching our predefined schema to perform instantaneous bulk curriculum imports."})]})]}),e.jsx("button",{onClick:()=>{r!=="importing"&&i(!1)},disabled:r==="importing",className:"text-gray-400 hover:text-gray-650 font-bold p-1 rounded-lg hover:bg-gray-150 transition-all text-xl leading-none disabled:opacity-40",children:"×"})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto p-6 space-y-5",children:[r==="idle"&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"p-4 bg-indigo-50/50 border border-indigo-100 rounded-xl",children:[e.jsxs("h4",{className:"text-xs font-bold text-indigo-850 uppercase tracking-wide flex items-center gap-1",children:[e.jsx("span",{children:"📌"}),s==="zh"?"预定义数据格式说明":"Predefined Schema Information"]}),e.jsx("p",{className:"text-xs text-indigo-900 mt-1 leading-relaxed",children:s==="zh"?"CSV 文件的首行必须 define 列标题(分大小写且无多余空格),包含以下两项必需内容:":"Your CSV file must include exactly these header columns on the first row (case-insensitive):"}),e.jsxs("ul",{className:"list-disc pl-5 mt-2 text-xs text-indigo-950 space-y-1",children:[e.jsxs("li",{children:[e.jsx("strong",{children:"title"}),": ",s==="zh"?'课程名 (非空,例如 "代数几何")':'Course title (Required, e.g. "Linear Algebra")']}),e.jsxs("li",{children:[e.jsx("strong",{children:"content"}),": ",s==="zh"?"教学大纲 / Markdown 格式的课堂细目":"Syllabus content supporting rich markdown."]})]}),e.jsx("div",{className:"mt-3.5 flex justify-start",children:e.jsxs("button",{onClick:b,className:"flex items-center gap-1 p-2 text-xs font-bold text-indigo-700 bg-white border border-indigo-200 rounded-lg shadow-3xs hover:bg-indigo-50 hover:-translate-y-0.5 hover:shadow-xs transition-all cursor-pointer",children:[e.jsx(N,{size:12}),s==="zh"?"获取标准 CSV 模板":"Download Template CSV"]})})]}),e.jsxs("div",{onDragOver:t=>{t.preventDefault(),d(!0)},onDragLeave:()=>d(!1),onDrop:t=>{t.preventDefault(),d(!1),t.dataTransfer.files&&t.dataTransfer.files[0]&&x(t.dataTransfer.files[0])},onClick:()=>{document.getElementById("import-csv-file-picker")?.click()},className:`border-2 border-dashed rounded-2xl p-8 text-center cursor-pointer transition-all flex flex-col items-center justify-center min-h-[180px] ${u?"border-indigo-500 bg-indigo-50/70 scale-[1.01]":"border-gray-250 bg-gray-50/50 hover:bg-gray-50 hover:border-indigo-400"}`,children:[e.jsx("input",{id:"import-csv-file-picker",type:"file",accept:".csv",className:"hidden",onChange:t=>{t.target.files&&t.target.files[0]&&x(t.target.files[0])}}),e.jsx("div",{className:"p-3 bg-gray-100 border border-gray-200 rounded-full text-indigo-600 mb-3 group-hover:scale-105 transition-all",children:e.jsx(h,{size:24})}),e.jsx("span",{className:"text-sm font-bold text-gray-800",children:s==="zh"?"选择 CSV 文件或拖放至此处":"Click to select or drag and drop CSV file here"}),e.jsx("span",{className:"text-xs text-gray-400 mt-1",children:s==="zh"?"支持标准 CSV 文件,最大不超过 5MB":"Supports standard CSV format up to 5MB"})]})]}),r==="parsing"&&a.length>0&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{className:"text-xs font-bold text-emerald-600 bg-emerald-50 border border-emerald-200 px-2.5 py-1 rounded-full",children:["✓ ",s==="zh"?`解析成功:查找到 ${a.length} 门课程`:`Parsed Successfully: Found ${a.length} records`]}),e.jsx("button",{onClick:()=>{m([]),c("idle")},className:"text-xs text-indigo-600 hover:text-indigo-800 font-semibold",children:s==="zh"?"重新上传":"Upload Different File"})]}),e.jsx("div",{className:"border border-gray-200 rounded-xl overflow-hidden shadow-3xs max-h-[300px] overflow-y-auto",children:e.jsxs("table",{className:"w-full text-left text-xs border-collapse",children:[e.jsx("thead",{className:"bg-gray-50 text-gray-600 border-b border-gray-200 font-bold",children:e.jsxs("tr",{children:[e.jsx("th",{className:"p-3 w-1/4",children:s==="zh"?"课程名称":"Course Title"}),e.jsx("th",{className:"p-3 w-3/4",children:s==="zh"?"大纲简介片段":"Syllabus Preview"})]})}),e.jsx("tbody",{className:"divide-y divide-gray-100 bg-white",children:a.map((t,n)=>e.jsxs("tr",{className:"hover:bg-slate-50/50",children:[e.jsx("td",{className:"p-3 font-semibold text-gray-800 align-top truncate max-w-[150px]",title:t.title,children:t.title}),e.jsx("td",{className:"p-3 text-gray-500 font-mono text-[11px] leading-relaxed break-words col-span-2",children:t.content.length>150?t.content.substring(0,150)+"...":t.content||e.jsx("em",{className:"text-gray-300 italic",children:"None"})})]},n))})]})}),e.jsxs("div",{className:"bg-amber-50 border border-amber-100 text-amber-900 text-xs rounded-xl p-3 flex gap-2.5 items-start",children:[e.jsx("span",{className:"text-base leading-none",children:"⚠️"}),e.jsx("p",{className:"leading-relaxed",children:s==="zh"?'请确认课程名称没有与系统已有的课程同名。确认无误后点击下方"开始导入"写入 SQLite。':"Please ensure column details are accurate. Clicking Import will instantly commit all parsed courses into the server SQLite backend."})]})]}),r==="importing"&&e.jsxs("div",{className:"py-8 flex flex-col items-center justify-center space-y-4",children:[e.jsxs("div",{className:"relative w-20 h-20 flex items-center justify-center",children:[e.jsx(w,{size:36,className:"text-indigo-600 animate-spin"}),e.jsxs("span",{className:"absolute text-[11px] font-extrabold text-indigo-700",children:[Math.round(l/o*100),"%"]})]}),e.jsxs("div",{className:"text-center",children:[e.jsx("h3",{className:"font-bold text-gray-800 text-sm",children:s==="zh"?"正在写入数据库":"Populating Database Records"}),e.jsx("p",{className:"text-xs text-gray-500 mt-1",children:s==="zh"?`正在导入第 ${l} / ${o} 项...`:`Importing item ${l} of ${o}...`})]}),e.jsx("div",{className:"w-full max-w-sm bg-gray-100 h-2 rounded-full overflow-hidden border border-gray-200",children:e.jsx("div",{className:"bg-indigo-600 h-full transition-all duration-300 rounded-full",style:{width:`${l/o*100}%`}})}),e.jsxs("div",{className:"w-full max-w-md bg-gray-50 rounded-xl p-3 border border-gray-150 font-mono text-[10px] text-gray-400 max-h-[140px] overflow-y-auto",children:[e.jsx("div",{children:"[API] POST /api/lessons -> Request batch transaction..."}),a.slice(0,l).map((t,n)=>e.jsx("div",{className:"text-indigo-600 font-bold mt-1",children:`✓ [${n+1}] "${t.title}" -> status 200 (Success)`},n))]})]}),r==="success"&&e.jsxs("div",{className:"py-8 text-center flex flex-col items-center justify-center space-y-4",children:[e.jsx("div",{className:"w-16 h-16 bg-emerald-50 rounded-full flex items-center justify-center border border-emerald-200 text-emerald-600 animate-bounce",children:e.jsx(C,{size:32})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-bold text-gray-800 text-base",children:s==="zh"?"🎉 批量导入大功告成":"🎉 Bulk-Import Complete"}),e.jsx("p",{className:"text-xs text-gray-500 mt-1 max-w-md mx-auto",children:s==="zh"?`所有 ${a.length} 门学科教案数据已顺畅写入系统底层 SQLite 数据仓库,现在已可以用于备课。`:`All ${a.length} curriculum lessons records have been successfully saved into security logs and SQLite storage.`})]})]}),r==="error"&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"p-4 bg-rose-50 border border-rose-100 rounded-xl flex gap-3 items-start",children:[e.jsx("span",{className:"text-rose-600 font-bold text-lg leading-none",children:"⚠️"}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-xs font-bold text-rose-850",children:s==="zh"?"数据导入或解析中断":"Import or Parsing Error"}),e.jsx("p",{className:"text-xs text-rose-900 mt-1 leading-relaxed",children:f||(s==="zh"?"未知异常或文件破损。":"An unknown exception or corrupted CSV formatting occurred.")})]})]}),e.jsxs("div",{className:"flex gap-3 justify-end",children:[e.jsx("button",{onClick:()=>{c("idle"),y("")},className:"px-4 py-2 text-xs font-bold text-gray-700 bg-white border border-gray-250 cursor-pointer hover:bg-gray-50 rounded-lg transition-all",children:s==="zh"?"返回重试":"Go Back & Retry"}),e.jsx("button",{onClick:()=>i(!1),className:"px-4 py-2 text-xs font-bold text-white bg-indigo-600 cursor-pointer hover:bg-indigo-700 rounded-lg transition-all",children:s==="zh"?"关闭窗口":"Close"})]})]})]}),r!=="idle"&&r!=="error"&&e.jsxs("div",{className:"p-4 md:p-5 border-t border-gray-100 flex items-center justify-between bg-slate-50 shrink-0",children:[e.jsx("button",{onClick:()=>{m([]),c("idle")},disabled:r==="importing",className:"px-4 py-2 text-xs font-bold text-gray-650 bg-white border border-gray-200 hover:bg-gray-100 rounded-lg transition-all disabled:opacity-40 cursor-pointer",children:s==="zh"?"重置重选":"Reset & Clear"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:()=>i(!1),disabled:r==="importing",className:"px-4 py-2 text-xs font-bold text-gray-600 hover:text-gray-800 transition-all disabled:opacity-40 cursor-pointer",children:s==="zh"?"取消":"Cancel"}),r==="parsing"&&e.jsxs("button",{onClick:j,className:"px-4 py-2 text-xs font-bold text-white bg-indigo-600 hover:bg-indigo-700 rounded-lg shadow-sm transition-all flex items-center gap-1 cursor-pointer",children:[e.jsx(z,{size:12}),s==="zh"?`开始导入 (${a.length} 类)`:`Proceed and Import (${a.length})`]}),r==="success"&&e.jsx("button",{onClick:()=>i(!1),className:"px-4 py-2 text-xs font-bold text-white bg-indigo-600 hover:bg-indigo-700 rounded-lg shadow-sm transition-all cursor-pointer",children:s==="zh"?"完成":"Done"})]})]})]})})})}export{T as ImportLessonsModal};
|
|
1
|
+
import{j as e}from"./vendor-react-0Lg0vA-4.js";import{m as v}from"./index-CCKb8B5h.js";import{d as h,D as N,w,o as C,e as z}from"./vendor-icons-Dq6MhgH9.js";import"./vendor-pdf-Cp-cYteE.js";import"./vendor-utils-BEhuP0Zq.js";import"./vendor-motion-DjY2czvL.js";import"./vendor-pptx-B_NheIKl.js";import"./vendor-charts-CRXa4AlU.js";function T(g){const{isImportLessonsOpen:p,setIsImportLessonsOpen:i,lang:s,importStatus:r,setIsDraggingImport:d,handleCSVFileChange:x,downloadCsvTemplate:b,isDraggingImport:u,previewImportData:a,setPreviewImportData:m,setImportStatus:c,importProgress:l,importProgressTotal:o,importErrorMsg:f,setImportErrorMsg:y,handleCSVImportSubmit:j}=g;return e.jsx(e.Fragment,{children:p&&e.jsx("div",{className:"fixed inset-0 bg-gray-900/50 backdrop-blur-sm flex items-center justify-center p-4 md:p-6 z-50 overflow-y-auto text-gray-850",children:e.jsxs(v.div,{initial:{opacity:0,y:15,scale:.98},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:10,scale:.98},className:"bg-white border text-gray-900 border-gray-250 rounded-2xl shadow-2xl w-full max-w-2xl flex flex-col overflow-hidden max-h-[90vh] font-sans text-left",children:[e.jsxs("div",{className:"p-4 md:p-5 border-b border-gray-100 flex items-center justify-between bg-slate-50 shrink-0",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2 bg-indigo-50 border border-indigo-100 rounded-lg text-indigo-650",children:e.jsx(h,{size:20,className:"animate-pulse"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"font-bold text-gray-850 text-base md:text-lg",children:s==="zh"?"批量导入课程 (CSV)":"Bulk-Import Courses (CSV)"}),e.jsx("p",{className:"text-xs text-gray-500 mt-0.5",children:s==="zh"?"上传包含标准表头的 CSV 教案,一键实现秒级批量底库写入。":"Upload a standard CSV file matching our predefined schema to perform instantaneous bulk curriculum imports."})]})]}),e.jsx("button",{onClick:()=>{r!=="importing"&&i(!1)},disabled:r==="importing",className:"text-gray-400 hover:text-gray-650 font-bold p-1 rounded-lg hover:bg-gray-150 transition-all text-xl leading-none disabled:opacity-40",children:"×"})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto p-6 space-y-5",children:[r==="idle"&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"p-4 bg-indigo-50/50 border border-indigo-100 rounded-xl",children:[e.jsxs("h4",{className:"text-xs font-bold text-indigo-850 uppercase tracking-wide flex items-center gap-1",children:[e.jsx("span",{children:"📌"}),s==="zh"?"预定义数据格式说明":"Predefined Schema Information"]}),e.jsx("p",{className:"text-xs text-indigo-900 mt-1 leading-relaxed",children:s==="zh"?"CSV 文件的首行必须 define 列标题(分大小写且无多余空格),包含以下两项必需内容:":"Your CSV file must include exactly these header columns on the first row (case-insensitive):"}),e.jsxs("ul",{className:"list-disc pl-5 mt-2 text-xs text-indigo-950 space-y-1",children:[e.jsxs("li",{children:[e.jsx("strong",{children:"title"}),": ",s==="zh"?'课程名 (非空,例如 "代数几何")':'Course title (Required, e.g. "Linear Algebra")']}),e.jsxs("li",{children:[e.jsx("strong",{children:"content"}),": ",s==="zh"?"教学大纲 / Markdown 格式的课堂细目":"Syllabus content supporting rich markdown."]})]}),e.jsx("div",{className:"mt-3.5 flex justify-start",children:e.jsxs("button",{onClick:b,className:"flex items-center gap-1 p-2 text-xs font-bold text-indigo-700 bg-white border border-indigo-200 rounded-lg shadow-3xs hover:bg-indigo-50 hover:-translate-y-0.5 hover:shadow-xs transition-all cursor-pointer",children:[e.jsx(N,{size:12}),s==="zh"?"获取标准 CSV 模板":"Download Template CSV"]})})]}),e.jsxs("div",{onDragOver:t=>{t.preventDefault(),d(!0)},onDragLeave:()=>d(!1),onDrop:t=>{t.preventDefault(),d(!1),t.dataTransfer.files&&t.dataTransfer.files[0]&&x(t.dataTransfer.files[0])},onClick:()=>{document.getElementById("import-csv-file-picker")?.click()},className:`border-2 border-dashed rounded-2xl p-8 text-center cursor-pointer transition-all flex flex-col items-center justify-center min-h-[180px] ${u?"border-indigo-500 bg-indigo-50/70 scale-[1.01]":"border-gray-250 bg-gray-50/50 hover:bg-gray-50 hover:border-indigo-400"}`,children:[e.jsx("input",{id:"import-csv-file-picker",type:"file",accept:".csv",className:"hidden",onChange:t=>{t.target.files&&t.target.files[0]&&x(t.target.files[0])}}),e.jsx("div",{className:"p-3 bg-gray-100 border border-gray-200 rounded-full text-indigo-600 mb-3 group-hover:scale-105 transition-all",children:e.jsx(h,{size:24})}),e.jsx("span",{className:"text-sm font-bold text-gray-800",children:s==="zh"?"选择 CSV 文件或拖放至此处":"Click to select or drag and drop CSV file here"}),e.jsx("span",{className:"text-xs text-gray-400 mt-1",children:s==="zh"?"支持标准 CSV 文件,最大不超过 5MB":"Supports standard CSV format up to 5MB"})]})]}),r==="parsing"&&a.length>0&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{className:"text-xs font-bold text-emerald-600 bg-emerald-50 border border-emerald-200 px-2.5 py-1 rounded-full",children:["✓ ",s==="zh"?`解析成功:查找到 ${a.length} 门课程`:`Parsed Successfully: Found ${a.length} records`]}),e.jsx("button",{onClick:()=>{m([]),c("idle")},className:"text-xs text-indigo-600 hover:text-indigo-800 font-semibold",children:s==="zh"?"重新上传":"Upload Different File"})]}),e.jsx("div",{className:"border border-gray-200 rounded-xl overflow-hidden shadow-3xs max-h-[300px] overflow-y-auto",children:e.jsxs("table",{className:"w-full text-left text-xs border-collapse",children:[e.jsx("thead",{className:"bg-gray-50 text-gray-600 border-b border-gray-200 font-bold",children:e.jsxs("tr",{children:[e.jsx("th",{className:"p-3 w-1/4",children:s==="zh"?"课程名称":"Course Title"}),e.jsx("th",{className:"p-3 w-3/4",children:s==="zh"?"大纲简介片段":"Syllabus Preview"})]})}),e.jsx("tbody",{className:"divide-y divide-gray-100 bg-white",children:a.map((t,n)=>e.jsxs("tr",{className:"hover:bg-slate-50/50",children:[e.jsx("td",{className:"p-3 font-semibold text-gray-800 align-top truncate max-w-[150px]",title:t.title,children:t.title}),e.jsx("td",{className:"p-3 text-gray-500 font-mono text-[11px] leading-relaxed break-words col-span-2",children:t.content.length>150?t.content.substring(0,150)+"...":t.content||e.jsx("em",{className:"text-gray-300 italic",children:"None"})})]},n))})]})}),e.jsxs("div",{className:"bg-amber-50 border border-amber-100 text-amber-900 text-xs rounded-xl p-3 flex gap-2.5 items-start",children:[e.jsx("span",{className:"text-base leading-none",children:"⚠️"}),e.jsx("p",{className:"leading-relaxed",children:s==="zh"?'请确认课程名称没有与系统已有的课程同名。确认无误后点击下方"开始导入"写入 SQLite。':"Please ensure column details are accurate. Clicking Import will instantly commit all parsed courses into the server SQLite backend."})]})]}),r==="importing"&&e.jsxs("div",{className:"py-8 flex flex-col items-center justify-center space-y-4",children:[e.jsxs("div",{className:"relative w-20 h-20 flex items-center justify-center",children:[e.jsx(w,{size:36,className:"text-indigo-600 animate-spin"}),e.jsxs("span",{className:"absolute text-[11px] font-extrabold text-indigo-700",children:[Math.round(l/o*100),"%"]})]}),e.jsxs("div",{className:"text-center",children:[e.jsx("h3",{className:"font-bold text-gray-800 text-sm",children:s==="zh"?"正在写入数据库":"Populating Database Records"}),e.jsx("p",{className:"text-xs text-gray-500 mt-1",children:s==="zh"?`正在导入第 ${l} / ${o} 项...`:`Importing item ${l} of ${o}...`})]}),e.jsx("div",{className:"w-full max-w-sm bg-gray-100 h-2 rounded-full overflow-hidden border border-gray-200",children:e.jsx("div",{className:"bg-indigo-600 h-full transition-all duration-300 rounded-full",style:{width:`${l/o*100}%`}})}),e.jsxs("div",{className:"w-full max-w-md bg-gray-50 rounded-xl p-3 border border-gray-150 font-mono text-[10px] text-gray-400 max-h-[140px] overflow-y-auto",children:[e.jsx("div",{children:"[API] POST /api/lessons -> Request batch transaction..."}),a.slice(0,l).map((t,n)=>e.jsx("div",{className:"text-indigo-600 font-bold mt-1",children:`✓ [${n+1}] "${t.title}" -> status 200 (Success)`},n))]})]}),r==="success"&&e.jsxs("div",{className:"py-8 text-center flex flex-col items-center justify-center space-y-4",children:[e.jsx("div",{className:"w-16 h-16 bg-emerald-50 rounded-full flex items-center justify-center border border-emerald-200 text-emerald-600 animate-bounce",children:e.jsx(C,{size:32})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-bold text-gray-800 text-base",children:s==="zh"?"🎉 批量导入大功告成":"🎉 Bulk-Import Complete"}),e.jsx("p",{className:"text-xs text-gray-500 mt-1 max-w-md mx-auto",children:s==="zh"?`所有 ${a.length} 门学科教案数据已顺畅写入系统底层 SQLite 数据仓库,现在已可以用于备课。`:`All ${a.length} curriculum lessons records have been successfully saved into security logs and SQLite storage.`})]})]}),r==="error"&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"p-4 bg-rose-50 border border-rose-100 rounded-xl flex gap-3 items-start",children:[e.jsx("span",{className:"text-rose-600 font-bold text-lg leading-none",children:"⚠️"}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-xs font-bold text-rose-850",children:s==="zh"?"数据导入或解析中断":"Import or Parsing Error"}),e.jsx("p",{className:"text-xs text-rose-900 mt-1 leading-relaxed",children:f||(s==="zh"?"未知异常或文件破损。":"An unknown exception or corrupted CSV formatting occurred.")})]})]}),e.jsxs("div",{className:"flex gap-3 justify-end",children:[e.jsx("button",{onClick:()=>{c("idle"),y("")},className:"px-4 py-2 text-xs font-bold text-gray-700 bg-white border border-gray-250 cursor-pointer hover:bg-gray-50 rounded-lg transition-all",children:s==="zh"?"返回重试":"Go Back & Retry"}),e.jsx("button",{onClick:()=>i(!1),className:"px-4 py-2 text-xs font-bold text-white bg-indigo-600 cursor-pointer hover:bg-indigo-700 rounded-lg transition-all",children:s==="zh"?"关闭窗口":"Close"})]})]})]}),r!=="idle"&&r!=="error"&&e.jsxs("div",{className:"p-4 md:p-5 border-t border-gray-100 flex items-center justify-between bg-slate-50 shrink-0",children:[e.jsx("button",{onClick:()=>{m([]),c("idle")},disabled:r==="importing",className:"px-4 py-2 text-xs font-bold text-gray-650 bg-white border border-gray-200 hover:bg-gray-100 rounded-lg transition-all disabled:opacity-40 cursor-pointer",children:s==="zh"?"重置重选":"Reset & Clear"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:()=>i(!1),disabled:r==="importing",className:"px-4 py-2 text-xs font-bold text-gray-600 hover:text-gray-800 transition-all disabled:opacity-40 cursor-pointer",children:s==="zh"?"取消":"Cancel"}),r==="parsing"&&e.jsxs("button",{onClick:j,className:"px-4 py-2 text-xs font-bold text-white bg-indigo-600 hover:bg-indigo-700 rounded-lg shadow-sm transition-all flex items-center gap-1 cursor-pointer",children:[e.jsx(z,{size:12}),s==="zh"?`开始导入 (${a.length} 类)`:`Proceed and Import (${a.length})`]}),r==="success"&&e.jsx("button",{onClick:()=>i(!1),className:"px-4 py-2 text-xs font-bold text-white bg-indigo-600 hover:bg-indigo-700 rounded-lg shadow-sm transition-all cursor-pointer",children:s==="zh"?"完成":"Done"})]})]})]})})})}export{T as ImportLessonsModal};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,j as e}from"./vendor-react-0Lg0vA-4.js";import{d,i as x,j as f}from"./index-
|
|
1
|
+
import{r as t,j as e}from"./vendor-react-0Lg0vA-4.js";import{d,i as x,j as f}from"./index-CCKb8B5h.js";import{p as o,$ as h,ah as g,X as b}from"./vendor-icons-Dq6MhgH9.js";import"./vendor-pdf-Cp-cYteE.js";import"./vendor-utils-BEhuP0Zq.js";import"./vendor-motion-DjY2czvL.js";import"./vendor-pptx-B_NheIKl.js";import"./vendor-charts-CRXa4AlU.js";function k({coursewareId:l,onClose:n}){const[a,c]=t.useState(!1),s=t.useRef(null),{theme:i}=d(),u=()=>{x(i,f(i))};t.useEffect(()=>{const r=()=>{c(!!document.fullscreenElement&&document.fullscreenElement===s.current)};return document.addEventListener("fullscreenchange",r),()=>{document.removeEventListener("fullscreenchange",r)}},[]);const m=()=>{const r=s.current;r&&(document.fullscreenElement?document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen&&document.webkitExitFullscreen():r.requestFullscreen?r.requestFullscreen():r.webkitRequestFullscreen&&r.webkitRequestFullscreen())};return l?e.jsxs("div",{ref:s,className:"flex flex-col h-full bg-white rounded-xl shadow-sm border border-gray-200 overflow-hidden relative",children:[e.jsxs("div",{className:"flex items-center justify-between px-4 py-2 bg-gray-100 border-b border-gray-200 shrink-0",children:[e.jsxs("div",{className:"flex items-center gap-2 select-none",children:[e.jsx(o,{size:16,className:"text-indigo-500"}),e.jsx("span",{className:"font-semibold text-sm text-gray-700",children:"Interactive Courseware"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:m,className:"p-1 hover:bg-gray-200 rounded-lg text-gray-500 transition-colors cursor-pointer",title:a?"退出全屏":"全屏播放",children:a?e.jsx(h,{size:16}):e.jsx(g,{size:16})}),n&&e.jsx("button",{onClick:n,className:"p-1 hover:bg-gray-200 rounded-lg text-gray-500 transition-colors cursor-pointer",children:e.jsx(b,{size:16})})]})]}),e.jsx("div",{className:"flex-1 relative bg-white",children:e.jsx("iframe",{src:`/api/courseware/${l}`,sandbox:"allow-scripts allow-forms allow-downloads",allowFullScreen:!0,className:"w-full h-full border-none",title:"Interactive Courseware",onLoad:u})})]}):e.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-gray-400 bg-gray-50 rounded-xl border border-dashed border-gray-300",children:[e.jsx(o,{size:48,className:"mb-4 text-gray-300 opacity-50"}),e.jsx("h3",{className:"text-lg font-medium text-gray-700",children:"No Courseware Selected"}),e.jsx("p",{className:"mt-2 text-sm text-center",children:"Please select a courseware from the list to view it interactively."})]})}export{k as InteractiveCoursewareViewer};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as p,j as e,R as _t,b as Dr}from"./vendor-react-0Lg0vA-4.js";import{S as Mr,L as Tr,G as Ce,H as Pe,a as tt,R as Ot,C as Lt,T as Bt}from"./vendor-konva-CzxOmTv9.js";/* empty css */import{u as $r,M as Ft,E as ae,f as B,d as Er,e as Rr,F as Or,p as Lr,H as Ht,h as qe}from"./index-
|
|
1
|
+
import{r as p,j as e,R as _t,b as Dr}from"./vendor-react-0Lg0vA-4.js";import{S as Mr,L as Tr,G as Ce,H as Pe,a as tt,R as Ot,C as Lt,T as Bt}from"./vendor-konva-CzxOmTv9.js";/* empty css */import{u as $r,M as Ft,E as ae,f as B,d as Er,e as Rr,F as Or,p as Lr,H as Ht,h as qe}from"./index-CCKb8B5h.js";import{w as st,f as yt,T as oe,aI as Yt,O as Br,v as Fr,W as wt,r as bt,ae as Ie,a9 as Je,z as Ar,B as Xr,aJ as gt,d as Wr,ah as ze,I as It,b8 as Jt,ac as qt,aV as Ut,aD as Gt,b9 as Kt,ba as Qt,s as _r,t as Hr,p as Yr,a_ as Ir,bb as Jr,R as qr,aZ as At,b as Ur,j as Xt,ag as rt,X as Zt,aE as Gr,bc as Kr,bd as Qr,be as Zr,$ as ft}from"./vendor-icons-Dq6MhgH9.js";import{t as Vr,v as F}from"./vendor-pptx-B_NheIKl.js";import"./vendor-pdf-Cp-cYteE.js";import"./vendor-utils-BEhuP0Zq.js";import"./vendor-motion-DjY2czvL.js";import"./vendor-charts-CRXa4AlU.js";class es{constructor(){this.frameTimes=[],this.lastTime=performance.now(),this.stats={fps:60,renderTimeMs:0,drawCount:0,visibleCount:0,totalCount:0,memoryUsageMb:0}}recordFrame(x,k,h,v){const T=performance.now(),f=T-this.lastTime;this.lastTime=T,f>0&&(this.frameTimes.push(1e3/f),this.frameTimes.length>30&&this.frameTimes.shift());const w=Math.round(this.frameTimes.reduce((N,P)=>N+P,0)/(this.frameTimes.length||1));let l=0;performance.memory&&(l=Math.round(performance.memory.usedJSHeapSize/(1024*1024)*10)/10),this.stats={fps:w,renderTimeMs:Math.round(x*100)/100,drawCount:k,visibleCount:h,totalCount:v,memoryUsageMb:l}}getStats(){return{...this.stats}}}new es;class ts{constructor(){this.currentTheme="light",this.lightTokens={primary:"#4f46e5",background:"#f8fafc",gridDot:"#cbd5e1",selectionBorder:"#6366f1",selectionHandle:"#4f46e5",textPrimary:"#1e293b",borderDefault:"#e2e8f0",guideLine:"#ec4899"},this.darkTokens={primary:"#6366f1",background:"#0b0f19",gridDot:"#334155",selectionBorder:"#818cf8",selectionHandle:"#6366f1",textPrimary:"#f8fafc",borderDefault:"#1e293b",guideLine:"#f472b6"},this.eyecareTokens={primary:"#2d6a4f",background:"#f2f7f4",gridDot:"#b7d5c5",selectionBorder:"#40916c",selectionHandle:"#2d6a4f",textPrimary:"#143526",borderDefault:"#cce0d6",guideLine:"#10b981"},this.chalkboardTokens={primary:"#4caf50",background:"#0e1713",gridDot:"#2d5242",selectionBorder:"#81c784",selectionHandle:"#4caf50",textPrimary:"#e8f5e9",borderDefault:"#1f382d",guideLine:"#66bb6a"},this.teachingTokens={primary:"#d97706",background:"#fffbeb",gridDot:"#fde68a",selectionBorder:"#f59e0b",selectionHandle:"#d97706",textPrimary:"#78350f",borderDefault:"#fef3c7",guideLine:"#ef4444"},this.customTokens=new Map,this.listeners=new Set}getTokens(){if(this.customTokens.has(this.currentTheme))return this.customTokens.get(this.currentTheme);switch(this.currentTheme){case"dark":return this.darkTokens;case"eyecare":return this.eyecareTokens;case"chalkboard":return this.chalkboardTokens;case"teaching":return this.teachingTokens;default:return this.lightTokens}}setTheme(x){this.currentTheme=x;const k=this.getTokens();this.listeners.forEach(h=>{try{h(k,x)}catch(v){console.error("[ThemeManager] Error in theme change listener:",v)}})}getTheme(){return this.currentTheme}registerCustomTokens(x,k){this.customTokens.set(x,k),this.currentTheme===x&&this.setTheme(x)}unregisterCustomTokens(x){this.customTokens.delete(x),this.currentTheme===x&&this.setTheme("light")}subscribe(x){return this.listeners.add(x),()=>{this.listeners.delete(x)}}}const Wt=new ts;function rs({pluginId:o,slot:x,widgetId:k,elementId:h,lessonId:v}){const f=$r(N=>N.extensionPoints).get(x)||[],w=f.find(N=>N.id===k)??f.find(N=>N.pluginId===o&&N.id===k),l=p.useRef(null);return p.useEffect(()=>{w&&l.current&&(l.current.innerHTML="",!w.component&&w.render&&Promise.resolve(w.render(l.current,{elementId:h,lessonId:v})).catch(console.error))},[w,o,k,h,v]),w?w.component?_t.createElement(w.component,{elementId:h,lessonId:v}):e.jsx("div",{ref:l,className:"w-full h-full min-h-0"}):e.jsxs("div",{className:"text-center py-6 text-xs text-gray-400 italic flex flex-col justify-center items-center h-full",children:[e.jsx(st,{size:16,className:"animate-spin mb-1"}),e.jsxs("span",{children:["组件 [",k,"] 正在加载或未启用..."]})]})}function ss({elementId:o,data:x,onElementUpdate:k,onPointerDown:h,onPointerMove:v,onPointerUp:T,onDelete:f}){const w=x.allStudents||[{id:"mock-s-1",name:"张明",email:"zhangming@edu-os.org"},{id:"mock-s-2",name:"李华",email:"lihua@edu-os.org"},{id:"mock-s-3",name:"王超",email:"wangchao@edu-os.org"},{id:"mock-s-4",name:"赵丽",email:"zhaoli@edu-os.org"},{id:"mock-s-5",name:"钱科",email:"qianke@edu-os.org"},{id:"mock-s-6",name:"孙雪",email:"sunxue@edu-os.org"}],[l,N]=p.useState(x.selectedStudent||null),[P,L]=p.useState(!1),[Z,j]=p.useState(""),Y=()=>{if(w.length===0||P)return;L(!0);let $=0;const X=16,u=setInterval(()=>{const C=Math.floor(Math.random()*w.length);if(j(w[C].name),$++,$>=X){clearInterval(u);const E=Math.floor(Math.random()*w.length),D=w[E];N(D),L(!1),k&&k(o,{...x,selectedStudent:D,pickedTime:new Date().toISOString(),status:"picked"})}},80)};return e.jsxs("div",{className:"w-full h-full bg-gradient-to-br from-indigo-950 via-slate-900 to-indigo-900 border border-indigo-500/50 rounded-xl shadow-2xl overflow-hidden flex flex-col font-sans select-none",style:{pointerEvents:"auto"},children:[e.jsxs("div",{className:"bg-indigo-950/80 text-indigo-200 px-3 py-2 flex justify-between items-center text-xs font-semibold border-b border-indigo-900/50 cursor-move select-none shrink-0",onPointerDown:h,onPointerMove:v,onPointerUp:T,children:[e.jsxs("span",{className:"flex items-center gap-1.5 text-indigo-300",children:[e.jsx(yt,{size:13,className:"animate-pulse text-indigo-400"}),e.jsx("span",{children:"随机点名助手 (Picker Ext)"})]}),e.jsx("button",{onClick:f,onPointerDown:$=>$.stopPropagation(),className:"p-1 hover:bg-indigo-900/60 rounded text-indigo-400 hover:text-red-450 transition-colors cursor-pointer",title:"删除组件",children:e.jsx(oe,{size:13})})]}),e.jsxs("div",{className:"flex-1 p-3.5 flex flex-col justify-between min-h-0 text-white gap-2",children:[e.jsx("div",{className:"w-full flex-1 flex flex-col items-center justify-center p-2 rounded-lg bg-indigo-950/50 border border-indigo-900/30",children:P?e.jsxs("div",{className:"text-center space-y-2",children:[e.jsx("div",{className:"text-[10px] text-indigo-300 uppercase tracking-widest animate-pulse font-semibold",children:"检索班级学生中..."}),e.jsx("div",{className:"text-2xl font-extrabold text-amber-300 scale-105 tracking-wider font-sans",children:Z})]}):l?e.jsxs("div",{className:"text-center space-y-1.5",children:[e.jsxs("div",{className:"text-[9px] text-indigo-400 uppercase tracking-widest font-semibold flex items-center justify-center gap-1",children:[e.jsx(Yt,{size:11,className:"text-emerald-400 animate-bounce"}),e.jsx("span",{children:"抽中的幸运学生"})]}),e.jsx("div",{className:"text-2xl font-extrabold text-transparent bg-clip-text bg-gradient-to-r from-amber-200 via-yellow-400 to-amber-300 tracking-wider",children:l.name}),e.jsx("div",{className:"text-[9px] text-indigo-300/70 font-mono overflow-hidden text-ellipsis max-w-full",children:l.email||"No Email Account"})]}):e.jsxs("div",{className:"text-center space-y-1",children:[e.jsx(Br,{size:28,className:"text-indigo-400/80 mx-auto animate-pulse"}),e.jsx("div",{className:"text-xs text-indigo-300 font-semibold",children:"随机抽取摇奖板"}),e.jsx("p",{className:"text-[9px] text-indigo-400/60 leading-tight",children:"将在白板上演示随机滚动,对课堂提问大有裨益"})]})}),e.jsxs("div",{className:"w-full shrink-0 flex flex-col items-center gap-1",onPointerDown:$=>$.stopPropagation(),children:[e.jsxs("button",{onClick:Y,disabled:P,className:"w-full py-1.5 bg-gradient-to-r from-indigo-500 to-purple-600 hover:from-indigo-650 hover:to-purple-750 text-white font-bold text-[11px] uppercase tracking-wider rounded-lg shadow-md active:scale-97 disabled:opacity-50 transition-all flex items-center justify-center gap-1.5",children:[e.jsx(Fr,{size:12,className:P?"animate-spin":""}),e.jsx("span",{children:P?"滚轮运转中...":l?"重新随机点名":"开始随机点名"})]}),e.jsxs("div",{className:"text-[8.5px] text-indigo-400/60 text-center font-mono",children:["班级人数:",w.length," 人 • 内核总线热同步"]})]})]})]})}function ns({elementId:o,data:x,onElementUpdate:k,onPointerDown:h,onPointerMove:v,onPointerUp:T,onDelete:f}){const[w,l]=p.useState(x.code||"console.log('Hello from sandbox!');"),[N,P]=p.useState(""),L=()=>{P("Running in isolated Web Worker...");try{const j=`
|
|
2
2
|
const logs = [];
|
|
3
3
|
const originalLog = console.log;
|
|
4
4
|
console.log = (...args) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as a}from"./vendor-pdf-Cp-cYteE.js";import{j as e,r as s}from"./vendor-react-0Lg0vA-4.js";const t=s.lazy(()=>a(()=>import("./index-
|
|
1
|
+
import{_ as a}from"./vendor-pdf-Cp-cYteE.js";import{j as e,r as s}from"./vendor-react-0Lg0vA-4.js";const t=s.lazy(()=>a(()=>import("./index-CWqYoxFP.js"),[]).then(r=>({default:r.CoursewareViewer})));function n(r){return e.jsx(s.Suspense,{fallback:e.jsx("div",{className:"flex items-center justify-center h-full bg-gray-50",children:e.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-indigo-500"})}),children:e.jsx(t,{...r})})}export{n as L};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-B-YxO39A.css","assets/vendor-reveal-DcQQzuI9.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as s}from"./vendor-pdf-Cp-cYteE.js";import{r as t,j as e}from"./vendor-react-0Lg0vA-4.js";const i=t.lazy(()=>s(()=>import("./InteractiveWhiteboard-
|
|
2
|
+
import{_ as s}from"./vendor-pdf-Cp-cYteE.js";import{r as t,j as e}from"./vendor-react-0Lg0vA-4.js";const i=t.lazy(()=>s(()=>import("./InteractiveWhiteboard-6y5vg8O_.js"),__vite__mapDeps([0,1])).then(r=>({default:r.InteractiveWhiteboard}))),n=t.forwardRef((r,a)=>e.jsx(t.Suspense,{fallback:e.jsx("div",{className:"flex items-center justify-center h-full bg-gray-50",children:e.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-indigo-500"})}),children:e.jsx(i,{ref:a,...r})}));export{n as L};
|