This commit is contained in:
EthanHealy01 2025-10-09 03:14:28 +01:00
parent 816da8cda2
commit 3d85fce775
6 changed files with 4 additions and 6 deletions

View File

@ -6,7 +6,6 @@ import { useHotkeys } from '../../../../contexts/HotkeyContext';
import { ToolId } from '../../../../types/toolId';
import HotkeyDisplay from '../../../hotkeys/HotkeyDisplay';
import { bindingEquals, eventToBinding, HotkeyBinding } from '../../../../utils/hotkeys';
import { ToolId } from 'src/types/toolId';
import { ToolRegistryEntry } from 'src/data/toolsTaxonomy';
const rowStyle: React.CSSProperties = {

View File

@ -13,7 +13,7 @@ import { ToolPanelGeometry } from '../../hooks/tools/useToolPanelGeometry';
interface FullscreenToolSurfaceProps {
searchQuery: string;
toolRegistry: Record<ToolId, ToolRegistryEntry>;
toolRegistry: Partial<Record<ToolId, ToolRegistryEntry>>;
filteredTools: Array<{ item: [ToolId, ToolRegistryEntry]; matchedText?: string }>;
selectedToolKey: string | null;
showDescriptions: boolean;

View File

@ -8,7 +8,6 @@ import { useToolSections } from '../../hooks/useToolSections';
import SubcategoryHeader from './shared/SubcategoryHeader';
import NoToolsFound from './shared/NoToolsFound';
import "./toolPicker/ToolPicker.css";
import { ToolId } from 'src/types/toolId';
interface SearchResultsProps {
filteredTools: Array<{ item: [ToolId, ToolRegistryEntry]; matchedText?: string }>;

View File

@ -31,7 +31,7 @@ export function useToolMeta(id: string, tool: ToolRegistryEntry) {
const { isFavorite, toggleFavorite } = useToolWorkflow();
const isFav = isFavorite(id as ToolId);
const binding = hotkeys[id];
const binding = hotkeys[id as ToolId];
const disabled = isToolDisabled(id, tool);
return {

View File

@ -11,7 +11,7 @@ import { ToolId } from "src/types/toolId";
interface ToolSearchProps {
value: string;
onChange: (value: string) => void;
toolRegistry: Readonly<Record<ToolId, ToolRegistryEntry>>;
toolRegistry: Partial<Record<ToolId, ToolRegistryEntry>>;
onToolSelect?: (toolId: ToolId) => void;
mode: "filter" | "dropdown" | "unstyled";
selectedToolKey?: string | null;

View File

@ -4,7 +4,7 @@ import { ToolRegistryEntry } from '../../data/toolsTaxonomy';
export function useFavoriteToolItems(
favoriteTools: ToolId[],
toolRegistry: Readonly<Record<ToolId, ToolRegistryEntry>>
toolRegistry: Partial<Record<ToolId, ToolRegistryEntry>>
): Array<{ id: ToolId; tool: ToolRegistryEntry }> {
return useMemo(() => {
return favoriteTools