From 551f38fea337082173e6456af41937c58ed5cda5 Mon Sep 17 00:00:00 2001 From: wass08 Date: Tue, 10 Mar 2026 18:22:28 +0100 Subject: [PATCH] fix build --- apps/editor/components/ui/command-palette/index.tsx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/apps/editor/components/ui/command-palette/index.tsx b/apps/editor/components/ui/command-palette/index.tsx index efea3c31..2c27bf45 100644 --- a/apps/editor/components/ui/command-palette/index.tsx +++ b/apps/editor/components/ui/command-palette/index.tsx @@ -192,7 +192,7 @@ export function CommandPalette() { activeLevelNode?.type === "level" && (activeLevelNode as LevelNode).level === 0; // Reactive snapshot status for the selected camera scope - const cameraScopeNode = useScene((s) => cameraScope ? s.nodes[cameraScope.nodeId] : null); + const cameraScopeNode = useScene((s) => cameraScope ? s.nodes[cameraScope.nodeId as AnyNodeId] : null); const hasScopeSnapshot = !!(cameraScopeNode as any)?.camera; const allLevels = useScene( @@ -282,8 +282,9 @@ export function CommandPalette() { }); }; - const wallModeLabel: Record = { cutaway: "Cutaway", up: "Up", down: "Down" }; - const levelModeLabel: Record = { + const wallModeLabel: Record<"cutaway" | "up" | "down", string> = { cutaway: "Cutaway", up: "Up", down: "Down" }; + const levelModeLabel: Record<"manual" | "stacked" | "exploded" | "solo", string> = { + manual: "Manual", stacked: "Stacked", exploded: "Exploded", solo: "Solo", @@ -319,7 +320,7 @@ export function CommandPalette() { const level0 = Object.values(nodes).find( (n) => n.type === "level" && (n as LevelNode).level === 0 ); - if (level0) useViewer.getState().setSelection({ levelId: level0.id }); + if (level0) useViewer.getState().setSelection({ levelId: level0.id as `level_${string}` }); }); }; @@ -333,12 +334,12 @@ export function CommandPalette() { // Camera snapshot (scoped to the currently selected camera scope) const takeSnapshot = () => { if (!cameraScope) return; - run(() => emitter.emit("camera-controls:capture", { nodeId: cameraScope.nodeId })); + run(() => emitter.emit("camera-controls:capture", { nodeId: cameraScope.nodeId as AnyNodeId })); }; const viewSnapshot = () => { if (!cameraScope || !hasScopeSnapshot) return; - run(() => emitter.emit("camera-controls:view", { nodeId: cameraScope.nodeId })); + run(() => emitter.emit("camera-controls:view", { nodeId: cameraScope.nodeId as AnyNodeId })); }; const clearSnapshot = () => {