refactor: rewrite playground

This commit is contained in:
2025-03-27 02:54:04 +08:00
parent 3c317627e7
commit 39e17eb6a5
19 changed files with 1161 additions and 1067 deletions

View File

@@ -0,0 +1,14 @@
import type { ClusterType } from '../schema';
export function* clusterBlocks(cluster: ClusterType) {
if (cluster.SimpleBlock) {
for (const simpleBlock of cluster.SimpleBlock) {
yield simpleBlock;
}
}
if (cluster.BlockGroup) {
for (const block of cluster.BlockGroup) {
yield block;
}
}
}