wip fix
This commit is contained in:
parent
dd67ef0c86
commit
930e685866
File diff suppressed because one or more lines are too long
|
|
@ -17,5 +17,8 @@
|
||||||
"y-pojo": "^0.0.8",
|
"y-pojo": "^0.0.8",
|
||||||
"yjs": "^13.6.10",
|
"yjs": "^13.6.10",
|
||||||
"yjs-types": "^0.0.1"
|
"yjs-types": "^0.0.1"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"bun-types": "^1.0.30"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -13,18 +13,6 @@ export const scanComponent = async (items: IContent[]) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (comp.pending.size > 0) {
|
|
||||||
let all_found = true;
|
|
||||||
const founds: any = [];
|
|
||||||
if (all_found) {
|
|
||||||
for (const id of [...comp.pending]) {
|
|
||||||
comp.pending.delete(id);
|
|
||||||
}
|
|
||||||
await scanComponent(founds);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (comp.pending.size > 0) {
|
if (comp.pending.size > 0) {
|
||||||
try {
|
try {
|
||||||
const res = (await (
|
const res = (await (
|
||||||
|
|
@ -48,6 +36,7 @@ const scanSingle = (item: IItem | ISection) => {
|
||||||
const comp = base.comp;
|
const comp = base.comp;
|
||||||
if (item.type === "item") {
|
if (item.type === "item") {
|
||||||
const comp_id = item.component?.id;
|
const comp_id = item.component?.id;
|
||||||
|
|
||||||
if (comp_id) {
|
if (comp_id) {
|
||||||
if (!comp.list[comp_id] && !comp.pending.has(comp_id)) {
|
if (!comp.list[comp_id] && !comp.pending.has(comp_id)) {
|
||||||
comp.pending.add(comp_id);
|
comp.pending.add(comp_id);
|
||||||
|
|
@ -63,8 +52,9 @@ const scanSingle = (item: IItem | ISection) => {
|
||||||
|
|
||||||
if (item.childs) {
|
if (item.childs) {
|
||||||
for (const child of item.childs) {
|
for (const child of item.childs) {
|
||||||
if (child && child.type !== "text") {
|
let c = child;
|
||||||
scanSingle(child);
|
if (c && c.type !== "text") {
|
||||||
|
scanSingle(c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,9 +19,6 @@
|
||||||
"app/*",
|
"app/*",
|
||||||
"pkgs/*"
|
"pkgs/*"
|
||||||
],
|
],
|
||||||
"devDependencies": {
|
|
||||||
"bun-types": "latest"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"typescript": "^5.0.0"
|
"typescript": "^5.0.0"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue