Fix findUsages/undo/node-lookup bugs, split Viewport and Editor, share command and inspector helpers

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
rootandClaude Opus 5 committed 2026-09-08 09:22:49 +02:00
1 parent 1eb28314cf
commit f140c2fd77
58 files changed
+1969 -1171

No files matched your search

+5 -5
View File
@@ -7,6 +7,7 @@ const CATEGORY_ORDER: NodeCategory[] = ['event', 'flow', 'variable', 'data', 'ac
export class NodePalette extends Popup {
private readonly search: TextField;
private readonly list = new ListView();
private readonly scroll = new ScrollContainer();
private filtered: NodeDef[] = [];
/** Guards against a second pick per opening (e.g. Enter and a row click racing). */
private picked = false;
@@ -25,10 +26,9 @@ export class NodePalette extends Popup {
},
});
this.content.add(this.search);
const scroll = new ScrollContainer();
scroll.minHeight = 260;
scroll.setContent(this.list);
this.content.add(scroll, 1);
this.scroll.minHeight = 260;
this.scroll.setContent(this.list);
this.content.add(this.scroll, 1);
this.list.rowHeight = Theme.rowHeight - 2;
this.list.emptyText = 'No matching node';
this.list.onSelect = (id) => {
@@ -50,7 +50,7 @@ export class NodePalette extends Popup {
.filter((d) => !query || d.label.toLowerCase().includes(query) || d.type.toLowerCase().includes(query) || d.description.toLowerCase().includes(query))
.sort((a, b) => CATEGORY_ORDER.indexOf(a.category) - CATEGORY_ORDER.indexOf(b.category) || a.label.localeCompare(b.label));
this.list.setItems(this.filtered.map((d) => ({ id: d.type, label: d.label, hint: d.category })));
(this.content.items[1] as ScrollContainer | undefined)?.relayoutContent();
this.scroll.relayoutContent();
}
private pick(def: NodeDef): void {