@vcp-dev/site-edit-bridge 0.10.27 → 0.10.29

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 CHANGED
@@ -26,6 +26,12 @@
26
26
 
27
27
  包还发布 `vcp-site-edit-next-dev-server` CLI,供受控 preview 启动流程使用。不要把它替换成浏览器可提交的任意 shell 命令。
28
28
 
29
+ ## 修改回执与预览重载
30
+
31
+ `execute` 的操作 ID 标识一次源码修改。preview server 在进程内保留原请求指纹与执行结果,最多保留 256 个已完成回执;等待中的操作不提前淘汰。WebSocket 的只读 `get-operation-result` 和 frame channel 的 `bridge-get-operation-result` 接受完整原请求,核对站点、快照、操作 ID 与指纹后返回结果;不存在或身份不匹配时返回 `null`,不会再次执行修改。
32
+
33
+ Fast Refresh 导致 iframe/桥连接中断时,Designer 等同一 composition 重新就绪,再通过新桥查询原结果。只有明确成功且仍属于同一站点、快照的回执才能继续平台快照保存。跨页面/快照切换不应用旧 UI 状态;服务器或引擎线程重启导致回执不可查询时进入恢复流程,不根据 DOM、文档版本或图片已显示推定保存成功。
34
+
29
35
  ## 开发
30
36
 
31
37
  ```bash
@@ -63,7 +63,7 @@ export type SiteEditBootstrapClient = SiteEditBridgeClient & {
63
63
  subscribeConnectionStatus?: (listener: (status: SiteEditBridgeConnectionStatus) => void) => () => void;
64
64
  };
65
65
  type BridgeFrameRuntimeRequestBody = Extract<SiteEditFrameRuntimeRequestBody, {
66
- kind: "bridge-initialize-session" | "bridge-get-document" | "bridge-get-history-status" | "bridge-get-style-context" | "bridge-ensure-document-version" | "bridge-acknowledge-document-version" | "bridge-get-object-edit-context" | "bridge-get-class-name-source" | "bridge-get-source-tree" | "bridge-get-source-file" | "bridge-resolve-source-location" | "bridge-execute" | "bridge-undo" | "bridge-redo" | "bridge-subscribe" | "bridge-unsubscribe";
66
+ kind: "bridge-initialize-session" | "bridge-get-document" | "bridge-get-history-status" | "bridge-get-style-context" | "bridge-ensure-document-version" | "bridge-acknowledge-document-version" | "bridge-get-object-edit-context" | "bridge-get-class-name-source" | "bridge-get-source-tree" | "bridge-get-source-file" | "bridge-resolve-source-location" | "bridge-execute" | "bridge-get-operation-result" | "bridge-undo" | "bridge-redo" | "bridge-subscribe" | "bridge-unsubscribe";
67
67
  }>;
68
68
  /**
69
69
  * Adds the section identity required by Designer's preview-only interaction