Repository navigation
docs(app-kit): 契约文档与 Clairis 消费指南(#513) - #521
Merged
Merged
Conversation
- docs/app-kit/README.md:入口清单(以 package.json 的 exports 为准,逐条对齐)+ 四个子入口的签名与错误语义 + 网页端与 Electron 两种消费示例 + 「为什么不能各抄一份」; - 写清三个容易接错的点:exportMdpkg 是同步返回 Uint8Array;exportDocx 的 download seam 签名带第三个 createObjectUrl 参数;OutlineMenu 的 navigator 可选但 editorView/previewRef 仍必须传(高亮定位与预览滚动要用); - 写清两个已知的坑:./export barrel 会经 @md-bundle/editor 把 CM6 拉进 import 图, 纯函数消费方要走 ./export/<module>;./export/* 通配到 .ts,outline 三个入口是逐条枚举的; - 写清大纲的边界:注入实现只接管编辑/源码模式,预览态因 renderer 剥离 id 而走内置 DOM 路径。 纯文档,无代码改动;27 个文档声明的导出名与 9 条 import 路径已逐条对照源码与 exports 校验。 refs #513
|
🔔 change-close-pending:change change-workflow 会话启动时将自动执行 G4 收尾(sync → validate --strict → archive → 看板 Done → 关闭 spec issue)。无需人工提醒。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更概述
新增
docs/app-kit/README.md:四个子入口的契约、网页端与 Electron 两种消费示例、以及「为什么不能各抄一份」的事实依据。纯文档,no-ui-impact。关联 Issue
fixes #513
变更内容
docs/app-kit/(新建目录,单文件)docs/app-kit/README.md(269 行)packages/app-kit/package.json的exports为准逐条对齐,并写明两个坑:./exportbarrel 会经@md-bundle/editor把 CM6 拉进 import 图(纯函数消费方要走./export/<module>);./export/*通配到.ts,而 outline 含.tsx所以那三个入口是逐条枚举的。exportMdpkg同步返回Uint8Array;exportDocx的downloadseam 带第三个createObjectUrl参数;OutlineMenu的navigator可选但editorView/previewRef仍必填。id,scrollToHeading(id)对未自带锚点的消费方是 no-op)。SaveFileseam 的文件写入写法,避免有人照抄浏览器downloadBlob。影响范围
验证方式与结果
pnpm -r typecheck— 4 个包全 Done(确认没顺手弄坏什么)packages/app-kit/src/**或vendor/mdpkg-web.d.ts中查到,缺失 0package.json的exports,未匹配 0apps/web/src/App.tsx第 198 到 205 行(outlineNavigator)、第 956 到 974 行(handleCopyBodyAsImage)no-ui-impact:无代码改动,不跑 e2e(QG-2 豁免)质量门禁引用
no-ui-impact(纯文档)→ 不新增 e2e;改为做「文档声明 ↔ 源码」的机械核对,这才是这类票的可验证面。d463d24。CM6ViewLike是未导出的私有别名;「不再要求传 editorView / previewRef」与必填 props 相反),已修正并写进票上留痕,不静默改文档。风险评估
risk-lowai-generatedgit revert <merge-commit>即可回滚