From 8583e3e3877caf45b588f8abcf72e160bb86b966 Mon Sep 17 00:00:00 2001
From: SpecialX <47072643+wangxiner55@users.noreply.github.com>
Date: Sat, 4 Jul 2026 11:28:11 +0800
Subject: [PATCH] =?UTF-8?q?feat(lesson-preparation):=20inline-node=20?=
=?UTF-8?q?=E5=B1=95=E5=BC=80=E8=8A=82=E7=82=B9=E5=AE=B9=E5=99=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/paper-editor/inline-node.tsx | 108 ++++++++++++++++++
1 file changed, 108 insertions(+)
create mode 100644 src/modules/lesson-preparation/components/paper-editor/inline-node.tsx
diff --git a/src/modules/lesson-preparation/components/paper-editor/inline-node.tsx b/src/modules/lesson-preparation/components/paper-editor/inline-node.tsx
new file mode 100644
index 0000000..b9e5fb6
--- /dev/null
+++ b/src/modules/lesson-preparation/components/paper-editor/inline-node.tsx
@@ -0,0 +1,108 @@
+"use client";
+
+import { useTranslations } from "next-intl";
+import type { Block, LessonPlanNode } from "../../types";
+import { InlineQaDialog } from "./inline-qa-dialog";
+import { useLessonPlanEditor } from "../../hooks/use-lesson-plan-editor";
+
+interface Props {
+ node: LessonPlanNode;
+}
+
+/**
+ * V4 inline-node:展开到正文流的节点渲染。
+ * 用 Inter 字体 + 左侧细线区分正文(Fraunces)。
+ */
+export function InlineNode({ node }: Props) {
+ const t = useTranslations("lessonPreparation");
+ const toggleExpand = useLessonPlanEditor((s) => s.toggleExpand);
+
+ // 师生交互节点用专门的对话体渲染
+ if (node.type === "interaction") {
+ return
—
; + return ( +—
; + return ( +{d.items?.length ?? 0} 道练习
; + } + default: + return{node.title}
; + } +}