@marktowin/prototype-core 1.2.7 → 1.2.9
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/README.md +5 -1
- package/dist/App-BQrSS3_w.js +8258 -0
- package/dist/core/productAdapter.d.ts +6 -0
- package/dist/core/versionUpdate.d.ts +7 -0
- package/dist/exceljs.min-8TIUlALm.js +23048 -0
- package/dist/{index-BWVVDO7u.js → index-CaXbnLkU.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/prototype/annotationClient.d.ts +10 -5
- package/dist/prototype/collaborationStore.d.ts +4 -4
- package/dist/prototype/usePrototype.d.ts +19 -7
- package/dist/style.css +1 -1
- package/dist/tools/test-cases/TestCaseWorkbench.vue.d.ts +15 -0
- package/dist/tools/test-cases/exportTestCases.d.ts +5 -0
- package/dist/tools/test-cases/model.d.ts +33 -0
- package/dist/tools/test-cases/useTestCases.d.ts +87 -0
- package/dist/types/prototype.d.ts +22 -5
- package/package.json +5 -2
- package/dist/App-BbKNxwgq.js +0 -7226
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Prototype Core
|
|
2
2
|
|
|
3
|
-
面向移动端与 PC Web 产品原型的 Vue
|
|
3
|
+
面向移动端与 PC Web 产品原型的 Vue 评审内核,提供交互、全图、流程、流程编排、测试用例、主题、i18n、注释、页面描述、健康检查和协作能力。
|
|
4
4
|
|
|
5
5
|
## 安装
|
|
6
6
|
|
|
@@ -23,12 +23,16 @@ void mountPrototypeApp({
|
|
|
23
23
|
|
|
24
24
|
完整接入方式见 `examples/basic`。默认关闭访问认证并使用本地协作模式;需要云端协作时通过 `runtimeConfig` 显式注入配置。
|
|
25
25
|
|
|
26
|
+
应用可通过顶部“测试用例”或固定路由 `#/test-cases` 打开工作台。测试用例按页面/状态 scope 管理:有状态页面使用 `<screenId>__<stateId>`,无状态页面使用 `<screenId>`。消费者可在 `public/test-cases.json` 提供数组种子,也可直接使用工作台导出的 `{ version, testCases }`;启用 Gitee 后,远端 `test-cases/<scopeId>.json` 和 `test-cases/manifest.json` 是协作真值。工作台支持整体导出 JSON 和带筛选、冻结表头的 `.xlsx`,导出不代表已写入消费者种子或 Gitee。
|
|
27
|
+
|
|
26
28
|
人或 AI 在消费者项目中执行接入、新建页面、状态、流程、页面描述、协作配置与验收时,统一参照 [消费者原型实施操作手册](https://github.com/MarkTina/prototype-core/blob/main/AI-PROTOTYPE-GUIDE.md) 的“触发词 → 标准动作 → 完成判定”流程。
|
|
27
29
|
|
|
28
30
|
已挂载内核的应用可直接访问 `#/prototype-core-help` 阅读并复制同一份手册;该帮助路由只包含公开通用规则,不读取消费者业务数据。
|
|
29
31
|
|
|
30
32
|
涉及 UI 或主题实现时,可访问 `#/prototype-core-theme` 阅读并复制主题实现准则;该页面内容来自构建时内嵌的 `DESIGN-TOKENS.md`。
|
|
31
33
|
|
|
34
|
+
消费者可通过 `runtimeConfig.versionUpdate` 注册业务构建版本。内核会在启动、每分钟轮询和页面恢复可见时读取 `version.json`,发现新版本后通知所有已打开窗口刷新;同源窗口会通过 `BroadcastChannel` 加速同步。当前页面版本与 `version.json.version` 必须由消费者同一次构建生成,完整 Vite 接入、部署顺序和缓存规则见 `AI-PROTOTYPE-GUIDE.md` 的“业务版本注册与升级通知”。未注册 `currentVersion` 时该检测关闭。
|
|
35
|
+
|
|
32
36
|
AI 修改消费者 `page-descriptions.json` 后,可在已启用 Gitee 协作的应用页面上下文执行 `await window.__PROTOTYPE_CORE__.syncPageDescriptionsFromJson()`。该指令只写入远端缺失或内容变化的 scope,完成 manifest 合并、远端回读和缓存刷新;不会删除 JSON 中未列出的远端 scope。指定单个 scope 时传入 `await window.__PROTOTYPE_CORE__.syncPageDescriptionsFromJson({ scopeIds: ['home'] })`。返回值分别列出 `syncedScopes`、`skippedScopes` 和 `failedScopes`,单个 scope 失败不会中止其余目标。
|
|
33
37
|
|
|
34
38
|
也可从消费者项目终端执行同一类差异同步和精确回读。Token 只从 `AGENT_GITEE_ACCESS_TOKEN` 或 `GITEE_TOKEN` 读取:
|