Remove exports and methods nothing uses any more

A reference search over every export and method in src/ found code that
only tests still called, or that was never called at all:

- RemoveSceneObjectCommand: the product only removes through the
  multi-object command; the tests now use that one too.
- NodeRegistry.requireNodeDef: a second function of the same name in
  commands/require.ts raises a CommandError instead of throwing, and is
  the one the product uses. The twin invited the wrong import.
- isTextureAsset, listContainers, AssetTabEditor.show,
  FocusManager.destroy, KeyboardBridge.selectAll and the getters
  ColorField.value, ListView.selected, NumberField.number.

Also: Theme.controlActive now matches the resting control colour, and a
new note asks what editing the graph during play would take.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
rootandClaude Opus 5 committed 2026-09-11 20:15:49 +02:00
1 parent 0376ae175d
commit 495756b500
24 files changed
+22 -77

No files matched your search

+1 -4
View File
@@ -62,10 +62,7 @@ export function requireNode(project: Project, assetId: string, nodeId: string):
return node;
}
/**
* `NodeRegistry.requireNodeDef` throws a plain `Error`, which the editor does not catch; a command
* needs a `CommandError` so an unknown type becomes a notice instead of a crash.
*/
/** A `CommandError`, so an unknown type becomes a notice instead of a crash. */
export function requireNodeDef(type: string): NodeDef {
const def = nodeDef(type);
if (!def) throw new CommandError(`Unknown node type "${type}"`);
-6
View File
@@ -111,12 +111,6 @@ export class RemoveSceneObjectsCommand implements Command {
}
}
export class RemoveSceneObjectCommand extends RemoveSceneObjectsCommand {
constructor(holderId: string, objectId: string) {
super(holderId, [objectId]);
}
}
/**
* The previous position is read at execution time, so a caller that previewed the move must
* restore the model before executing.
-6
View File
@@ -111,12 +111,6 @@ export function nodeDef(type: string): NodeDef | undefined {
return defs.get(type);
}
export function requireNodeDef(type: string): NodeDef {
const def = defs.get(type);
if (!def) throw new Error(`Unknown node type "${type}"`);
return def;
}
export function allNodeDefs(): NodeDef[] {
return [...defs.values()];
}
-4
View File
@@ -86,7 +86,3 @@ export type Asset =
export function isSceneAsset(asset: Asset): asset is SceneAsset {
return asset.type === 'scene';
}
export function isTextureAsset(asset: Asset): asset is TextureAsset {
return asset.type === 'texture';
}
-4
View File
@@ -64,7 +64,3 @@ export function findObjectHolder(project: Project, holderId: string): ObjectHold
const asset = findAsset(project, holderId);
return asset && isObjectHolder(asset) ? asset : undefined;
}
export function listContainers(project: Project): ContainerAsset[] {
return project.assets.filter((a): a is ContainerAsset => a.type === 'container');
}