refactor: extract frontmatterOps, update imports for useNoteCreation/useNoteRename split

useNoteActions.ts reduced from 213 to 125 lines by extracting frontmatter
helpers into frontmatterOps.ts and removing re-exports. Consumers now
import directly from the extracted modules.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
lucaronin
2026-03-16 23:34:45 +01:00
parent 54e769fc21
commit 71ccae1c70
5 changed files with 86 additions and 96 deletions

View File

@@ -5,22 +5,22 @@ import { isTauri, mockInvoke } from '../mock-tauri'
import type { VaultEntry } from '../types'
import {
slugify,
needsRenameOnSave,
buildNewEntry,
generateUntitledName,
entryMatchesTarget,
buildNoteContent,
resolveNewNote,
resolveNewType,
frontmatterToEntryPatch,
todayDateString,
buildDailyNoteContent,
resolveDailyNote,
findDailyNote,
useNoteActions,
DEFAULT_TEMPLATES,
resolveTemplate,
} from './useNoteActions'
} from './useNoteCreation'
import { needsRenameOnSave } from './useNoteRename'
import { frontmatterToEntryPatch } from './frontmatterOps'
import { useNoteActions } from './useNoteActions'
import type { NoteActionsConfig } from './useNoteActions'
// Mock dependencies