清理已退役的前端绑定模块

删除无现役导入的 binding.ts 及其 BindingDTO、BindingChange 类型。
This commit is contained in:
2026-09-11 19:39:59 +08:00
parent 53008959c5
commit a5e936dd27
3 changed files with 0 additions and 33 deletions
@@ -1,23 +0,0 @@
import type { BindingDTO } from './types/BindingDTO';
import type { Node } from './types/Node';
import type { State } from './types/State';
function applyChanges(node: Node, result: BindingDTO): void {
const change = result.changes.find(
(candidate) => candidate.node_id === node.id,
);
if (change) {
node.component = structuredClone(
change.component === 'PureNode' ? null : change.component.WithComponent,
);
node.metadata.component_status = structuredClone(change.component_status);
}
for (const child of node.children) applyChanges(child, result);
}
/** Applies only explicit component changes; omitted nodes remain untouched. */
export function applyBindingResult(state: State, result: BindingDTO): State {
const next = structuredClone(state);
for (const tree of next.ui_trees) applyChanges(tree.root, result);
return next;
}
@@ -1,6 +0,0 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { NodeComponent } from "./NodeComponent";
import type { NodeId } from "./NodeId";
import type { StageStatus } from "./StageStatus";
export type BindingChange = { node_id: NodeId, component: NodeComponent, component_status: StageStatus, };
@@ -1,4 +0,0 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { BindingChange } from "./BindingChange";
export type BindingDTO = { changes: Array<BindingChange>, };