feat(lesson-preparation): add readonly view, anchor node selector, and type guards

- Add lesson-plan-readonly-view for viewing published plans

- Add anchor-node-selector and textbook-segments for canvas anchor positioning

- Add i18n-errors and type-guards lib utilities

- Add lesson-plan-provider-setup for provider initialization

- Update actions, data-access (knowledge, versions, main), publish-service

- Update blocks (blackboard, exercise, homework, import, key-point, objective, reflection)

- Update editor, node-editor, node-edit-panel, pickers, and providers
This commit is contained in:
SpecialX
2026-06-24 12:02:42 +08:00
parent a48e7d0e27
commit 6bc113eaff
39 changed files with 2129 additions and 571 deletions

View File

@@ -114,6 +114,8 @@ export async function revertToVersion(
planId: string,
versionNo: number,
userId: string,
// V3 修复:由 actions 层传入 i18n 翻译的回退标签,避免 data-access 硬编码中文
revertLabel: string,
): Promise<{ newVersionNo: number } | null> {
const content = await getVersionContent(planId, versionNo, userId);
if (!content) return null;
@@ -138,7 +140,7 @@ export async function revertToVersion(
id: createId(),
planId,
versionNo: newNo,
label: `回退到 v${versionNo}`,
label: revertLabel,
content,
isAuto: false,
creatorId: userId,