Whitespace

This commit is contained in:
Connor Yoh 2025-08-14 15:05:57 +01:00
parent 675718f7cd
commit db30eb9e6c

View File

@ -14,11 +14,11 @@ interface ToolWorkflowState {
sidebarsVisible: boolean; sidebarsVisible: boolean;
leftPanelView: 'toolPicker' | 'toolContent'; leftPanelView: 'toolPicker' | 'toolContent';
readerMode: boolean; readerMode: boolean;
// File/Preview State // File/Preview State
previewFile: File | null; previewFile: File | null;
pageEditorFunctions: PageEditorFunctions | null; pageEditorFunctions: PageEditorFunctions | null;
// Search State // Search State
searchQuery: string; searchQuery: string;
} }
@ -71,7 +71,7 @@ interface ToolWorkflowContextValue extends ToolWorkflowState {
selectedToolKey: string | null; selectedToolKey: string | null;
selectedTool: ToolConfiguration | null; selectedTool: ToolConfiguration | null;
toolRegistry: any; // From useToolManagement toolRegistry: any; // From useToolManagement
// UI Actions // UI Actions
setSidebarsVisible: (visible: boolean) => void; setSidebarsVisible: (visible: boolean) => void;
setLeftPanelView: (view: 'toolPicker' | 'toolContent') => void; setLeftPanelView: (view: 'toolPicker' | 'toolContent') => void;
@ -79,16 +79,16 @@ interface ToolWorkflowContextValue extends ToolWorkflowState {
setPreviewFile: (file: File | null) => void; setPreviewFile: (file: File | null) => void;
setPageEditorFunctions: (functions: PageEditorFunctions | null) => void; setPageEditorFunctions: (functions: PageEditorFunctions | null) => void;
setSearchQuery: (query: string) => void; setSearchQuery: (query: string) => void;
// Tool Actions // Tool Actions
selectTool: (toolId: string) => void; selectTool: (toolId: string) => void;
clearToolSelection: () => void; clearToolSelection: () => void;
// Workflow Actions (compound actions) // Workflow Actions (compound actions)
handleToolSelect: (toolId: string) => void; handleToolSelect: (toolId: string) => void;
handleBackToTools: () => void; handleBackToTools: () => void;
handleReaderToggle: () => void; handleReaderToggle: () => void;
// Computed values // Computed values
filteredTools: [string, any][]; // Filtered by search filteredTools: [string, any][]; // Filtered by search
isPanelVisible: boolean; isPanelVisible: boolean;
@ -105,7 +105,7 @@ interface ToolWorkflowProviderProps {
export function ToolWorkflowProvider({ children, onViewChange }: ToolWorkflowProviderProps) { export function ToolWorkflowProvider({ children, onViewChange }: ToolWorkflowProviderProps) {
const [state, dispatch] = useReducer(toolWorkflowReducer, initialState); const [state, dispatch] = useReducer(toolWorkflowReducer, initialState);
// Tool management hook // Tool management hook
const { const {
selectedToolKey, selectedToolKey,
@ -166,7 +166,7 @@ export function ToolWorkflowProvider({ children, onViewChange }: ToolWorkflowPro
); );
}, [toolRegistry, state.searchQuery]); }, [toolRegistry, state.searchQuery]);
const isPanelVisible = useMemo(() => const isPanelVisible = useMemo(() =>
state.sidebarsVisible && !state.readerMode, state.sidebarsVisible && !state.readerMode,
[state.sidebarsVisible, state.readerMode] [state.sidebarsVisible, state.readerMode]
); );
@ -178,7 +178,7 @@ export function ToolWorkflowProvider({ children, onViewChange }: ToolWorkflowPro
selectedToolKey, selectedToolKey,
selectedTool, selectedTool,
toolRegistry, toolRegistry,
// Actions // Actions
setSidebarsVisible, setSidebarsVisible,
setLeftPanelView, setLeftPanelView,
@ -188,12 +188,12 @@ export function ToolWorkflowProvider({ children, onViewChange }: ToolWorkflowPro
setSearchQuery, setSearchQuery,
selectTool, selectTool,
clearToolSelection, clearToolSelection,
// Workflow Actions // Workflow Actions
handleToolSelect, handleToolSelect,
handleBackToTools, handleBackToTools,
handleReaderToggle, handleReaderToggle,
// Computed // Computed
filteredTools, filteredTools,
isPanelVisible, isPanelVisible,
@ -217,5 +217,5 @@ export function useToolWorkflow(): ToolWorkflowContextValue {
// Convenience exports for specific use cases (optional - components can use useToolWorkflow directly) // Convenience exports for specific use cases (optional - components can use useToolWorkflow directly)
export const useToolSelection = useToolWorkflow; export const useToolSelection = useToolWorkflow;
export const useToolPanelState = useToolWorkflow; export const useToolPanelState = useToolWorkflow;
export const useWorkbenchState = useToolWorkflow; export const useWorkbenchState = useToolWorkflow;