feat(lesson-preparation): add anchor canvas design, new blocks, and textbook content node
- Add anchor injector for canvas-based anchor positioning - Add new block components: blackboard, homework, import, key-point, new-teaching, objective, summary - Add textbook content node for React Flow canvas - Update actions (kp, publish, main), data-access (templates, versions, main) - Update editor, node-editor, block-renderer, and picker components - Update schema, types, hooks, and lib utilities (document-migration, node-summary, rf-mappers)
This commit is contained in:
@@ -96,10 +96,12 @@ export async function saveAsTemplate(input: {
|
||||
if (plan.length === 0) throw new LessonPlanDataError("NOT_FOUND");
|
||||
|
||||
const doc = normalizeDocument(plan[0].content);
|
||||
const skeleton: TemplateBlockSkeleton[] = doc.nodes.map((b) => ({
|
||||
type: b.type,
|
||||
title: b.title,
|
||||
}));
|
||||
const skeleton: TemplateBlockSkeleton[] = doc.nodes
|
||||
.filter((b): b is import("./types").LessonPlanNode => b.type !== "textbook_content")
|
||||
.map((b) => ({
|
||||
type: b.type,
|
||||
title: b.title,
|
||||
}));
|
||||
|
||||
const templateId = createId();
|
||||
await db.insert(lessonPlanTemplates).values({
|
||||
|
||||
Reference in New Issue
Block a user