4 Commits
Author SHA1 Message Date
qiqi 23cba0ccf3 sync(gallery,promptlib): 把桌面仓产物层的改动回写为源码(gallery 1.9.5 / promptlib 1.14.9)
validate / validate (push) Canceled after 0s
背景:11-28 的图库性能改造与提示词库参考图开关/勾选框/暗色对比度,是直接改在桌面仓
plugins/<id>/main.js 上的(产物层),本仓源码没跟上,导致本仓停在 gallery 1.7.5 / promptlib 1.13.1。

- gallery/src/index.js、styles.css ← 桌面仓 plugins/gallery(虚拟列表、拖动只改列宽、按宽高比占位等)
- promptlib/src/index.js、styles.css ← 桌面仓 plugins/promptlib(参考图上移、自绘蓝勾、accent token、兜底)
- 两处 package.json 版本与 entry 内 register manifest 的 version 同步到 1.9.5 / 1.14.9
  (此前 entry 内还是 1.7.5 / 1.14.0,被 validate 判为不一致)

scripts/validate.mjs:字段扫描改为「优先 register( 之后,找不到再回退整份源码」。
旧逻辑在整份源码里找第一个 id:/version:,会被 promptlib 业务代码里的 { id: 'q' + Date.now() } 误命中,
误报「entry 内 id (q) 与 ibwPlugin.id 不一致」;反过来只扫 register 之后又会让 __IWB_ANNOTATE_MANIFEST__ 这类
构建产物插件找不到字段。现在两段扫描,validate 15/15 通过。
2026-11-29 12:16:06 +08:00
qiqi d99173321e chore(validate): entry version 与 package.json 交叉核对;README 补复杂插件约定
- 需构建的插件由 build-plugin.mjs 从 package.json 注入版本,校验器负责兜底
- 根 README 记录 plugin/ → src/index.js 的三段构建原因与 shared/ 约定
- 修 xianyi-cutout/README 里 plugins-publish.sh 的过时警示(现已产出 integrity)
2026-10-19 14:03:55 +08:00
qiqi e7b6e23f8f feat(plugin): 新增 image-annotate 标注/修图插件 + 构建链
- 编辑器逐字移植自 iwb-plaus/iwb-cutout-extension(11 模块 + 2 个 shared 文件,纯 Canvas 2D、零第三方库)
- plugin/ 存 ESM 源码,src/index.js 是构建产物(提交进仓,CI 只校验不构建)
- scripts/build-plugin.mjs:esbuild 打包 + banner/footer 手写单引号 manifest + 产物自检
- 能力 commands / nodeActions / canvas / canvasWrite;入口 = 节点漂浮菜单 + 右键命令
- 导出模式按编辑器字面量映射:replace → setNodeImage,newNode → createImageNode
2026-10-19 14:03:55 +08:00
qiqi a2ead34483 ci: 插件仓校验(P4-15 之三)——契约校验器 + GitHub Actions
- scripts/validate.mjs:逐个插件校验
  · package.json 的 ibwPlugin(id 须 ^[a-z][a-z0-9-]{2,31}$、apiVersion 正整数、entry 存在)
  · entry 语法(node --check)+ 必须调用 IWBPluginHost.register(
  · entry 内 manifest 与契约一致(id / apiVersion 对齐、name/version/capabilities 齐备)
  · 仓库内 id 不得重复
  只读源码、不构建 ⇒ CI 无需网络或依赖
- .github/workflows/ci.yml:push / PR 跑 node scripts/validate.mjs
- package.json(根,private):npm run validate
- README:补「校验(本地 + CI)」段

本地验证:node scripts/validate.mjs → 2/2 通过(template-demo / xianyi-cutout)
2026-10-18 01:44:49 +08:00