@flowgram.ai/document 0.2.4 → 0.2.6
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/dist/esm/index.js +6 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.mts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/esm/index.js
CHANGED
|
@@ -1419,13 +1419,15 @@ var FlowVirtualTree = class _FlowVirtualTree {
|
|
|
1419
1419
|
get size() {
|
|
1420
1420
|
return this.map.size;
|
|
1421
1421
|
}
|
|
1422
|
-
toString() {
|
|
1422
|
+
toString(showType) {
|
|
1423
1423
|
const ret = [];
|
|
1424
1424
|
this.traverse((node, depth) => {
|
|
1425
1425
|
if (depth === 0) {
|
|
1426
1426
|
ret.push(node.id);
|
|
1427
1427
|
} else {
|
|
1428
|
-
ret.push(
|
|
1428
|
+
ret.push(
|
|
1429
|
+
`|${new Array(depth).fill("--").join("")} ${showType ? `${node.flowNodeType}(${node.id})` : node.id}`
|
|
1430
|
+
);
|
|
1429
1431
|
}
|
|
1430
1432
|
});
|
|
1431
1433
|
return `${ret.join("\n")}`;
|
|
@@ -2083,8 +2085,8 @@ var FlowDocument = class {
|
|
|
2083
2085
|
getAllNodes() {
|
|
2084
2086
|
return this.entityManager.getEntities(FlowNodeEntity);
|
|
2085
2087
|
}
|
|
2086
|
-
toString() {
|
|
2087
|
-
return this.originTree.toString();
|
|
2088
|
+
toString(showType) {
|
|
2089
|
+
return this.originTree.toString(showType);
|
|
2088
2090
|
}
|
|
2089
2091
|
/**
|
|
2090
2092
|
* 返回需要渲染的数据
|