@@ -81,7 +81,7 @@ import {
8181import { useNoteEditorSearchSync } from "@/features/editor/hooks/use-note-editor-search-sync" ;
8282import { useNoteEditorToolbarActions } from "@/features/editor/hooks/use-note-editor-toolbar-actions" ;
8383import { uiStore } from "@/shared/stores/use-ui-store" ;
84- import { useShellNavigationStore } from "@/shared/stores/use-shell -navigation-store" ;
84+ import { useNavigationStore } from "@/shared/stores/use-navigation-store" ;
8585import {
8686 isEditorFindShortcut ,
8787 isNotesSearchShortcut ,
@@ -250,7 +250,7 @@ function focusEditorPreservingScroll(view: EditorView) {
250250 const scrollContainer = findEditorScrollContainer ( view ) ;
251251 const scrollTop = scrollContainer ?. scrollTop ?? 0 ;
252252
253- useShellNavigationStore . getState ( ) . actions . setFocusedPane ( "editor" ) ;
253+ useNavigationStore . getState ( ) . actions . setFocusedPane ( "editor" ) ;
254254 view . focus ( ) ;
255255
256256 if ( scrollContainer ) {
@@ -262,7 +262,7 @@ function focusEditorAtEndPreservingScroll(view: EditorView) {
262262 const scrollContainer = findEditorScrollContainer ( view ) ;
263263 const scrollTop = scrollContainer ?. scrollTop ?? 0 ;
264264
265- useShellNavigationStore . getState ( ) . actions . setFocusedPane ( "editor" ) ;
265+ useNavigationStore . getState ( ) . actions . setFocusedPane ( "editor" ) ;
266266 view . dispatch ( {
267267 selection : EditorSelection . cursor ( view . state . doc . length ) ,
268268 scrollIntoView : false ,
@@ -275,7 +275,7 @@ function focusEditorAtEndPreservingScroll(view: EditorView) {
275275}
276276
277277function focusEditorAtStart ( view : EditorView ) {
278- useShellNavigationStore . getState ( ) . actions . setFocusedPane ( "editor" ) ;
278+ useNavigationStore . getState ( ) . actions . setFocusedPane ( "editor" ) ;
279279 view . focus ( ) ;
280280 view . dispatch ( {
281281 selection : EditorSelection . cursor ( 0 ) ,
@@ -305,7 +305,7 @@ function handleSpecialMouseDownSelection(view: EditorView, event: MouseEvent) {
305305 if ( horizontalRuleSelection ) {
306306 event . preventDefault ( ) ;
307307 event . stopPropagation ( ) ;
308- useShellNavigationStore . getState ( ) . actions . setFocusedPane ( "editor" ) ;
308+ useNavigationStore . getState ( ) . actions . setFocusedPane ( "editor" ) ;
309309 view . focus ( ) ;
310310 view . dispatch ( { selection : horizontalRuleSelection } ) ;
311311 return true ;
@@ -320,7 +320,7 @@ function handleSpecialMouseDownSelection(view: EditorView, event: MouseEvent) {
320320 if ( tableBoundarySelection ) {
321321 event . preventDefault ( ) ;
322322 event . stopPropagation ( ) ;
323- useShellNavigationStore . getState ( ) . actions . setFocusedPane ( "editor" ) ;
323+ useNavigationStore . getState ( ) . actions . setFocusedPane ( "editor" ) ;
324324 view . focus ( ) ;
325325 view . dispatch ( {
326326 scrollIntoView : false ,
@@ -368,7 +368,7 @@ export const NoteEditor = forwardRef<NoteEditorHandle, NoteEditorProps>(
368368 const vimCompartmentRef = useRef ( new Compartment ( ) ) ;
369369 const applyingExternalChangeRef = useRef ( false ) ;
370370 const lastLoadKeyRef = useRef ( loadKey ) ;
371- const prevPaneRef = useRef ( useShellNavigationStore . getState ( ) . focusedPane ) ;
371+ const prevPaneRef = useRef ( useNavigationStore . getState ( ) . focusedPane ) ;
372372 const initialAutoFocusRef = useRef ( autoFocus ) ;
373373 const initialOnAutoFocusHandledRef = useRef ( onAutoFocusHandled ) ;
374374 const initialMarkdownRef = useRef ( markdown ) ;
@@ -568,9 +568,7 @@ export const NoteEditor = forwardRef<NoteEditorHandle, NoteEditorProps>(
568568 if ( ! uiState . notesPanelVisible ) {
569569 uiState . actions . toggleFocusMode ( ) ;
570570 }
571- useShellNavigationStore
572- . getState ( )
573- . actions . setFocusedPane ( "notes" ) ;
571+ useNavigationStore . getState ( ) . actions . setFocusedPane ( "notes" ) ;
574572 blurEditorView ( view ) ;
575573 return true ;
576574 } ,
@@ -662,7 +660,7 @@ export const NoteEditor = forwardRef<NoteEditorHandle, NoteEditorProps>(
662660 ) ;
663661
664662 syncEditorPaneFocusState ( view , prevPaneRef . current ) ;
665- const unsubscribeShell = useShellNavigationStore . subscribe ( ( state ) => {
663+ const unsubscribeShell = useNavigationStore . subscribe ( ( state ) => {
666664 prevPaneRef . current = state . focusedPane ;
667665 syncEditorPaneFocusState ( view , state . focusedPane ) ;
668666 } ) ;
@@ -755,13 +753,13 @@ export const NoteEditor = forwardRef<NoteEditorHandle, NoteEditorProps>(
755753 } ) ;
756754
757755 if ( autoFocus ) {
758- useShellNavigationStore . getState ( ) . actions . setFocusedPane ( "editor" ) ;
756+ useNavigationStore . getState ( ) . actions . setFocusedPane ( "editor" ) ;
759757 view . focus ( ) ;
760758 onAutoFocusHandled ?.( ) ;
761759 } else {
762760 requestAnimationFrame ( ( ) => {
763761 requestAnimationFrame ( ( ) => {
764- if ( useShellNavigationStore . getState ( ) . focusedPane !== "editor" ) {
762+ if ( useNavigationStore . getState ( ) . focusedPane !== "editor" ) {
765763 blurEditorView ( view ) ;
766764 }
767765 } ) ;
0 commit comments