diff --git a/repo-map.md b/repo-map.md new file mode 100644 index 0000000..267ae53 --- /dev/null +++ b/repo-map.md @@ -0,0 +1,718 @@ +# Repository Structure Map + +Auto-generated by `~/.claude-shared/scripts/repo-map.sh` (universal-ctags). +Signatures only — classes, functions, methods, interfaces, enums, types, namespaces, traits. +Regenerate after structural changes. Languages: `JavaScript,Sh,TypeScript`. + +``` +scripts/download-tools.js: + L28 function findFile + L46 method extract (PANDOC_CONFIG.linux) + L61 method extract (PANDOC_CONFIG.win32) + L77 method extract (PANDOC_CONFIG.darwin) + L90 function download + L97 function get (download) + L136 function downloadPandoc + +scripts/generate-icons.js: + L17 function generateIcons + +scripts/verify-open-export.mjs: + L60 function showSaveDialogSync (dialog) + +src/adapters/electron/fs.js: + L20 method readFile (electronFsAdapter) + L30 method writeFile (electronFsAdapter) + L39 method deleteFile (electronFsAdapter) + L48 method ensureDir (electronFsAdapter) + L57 method listDirectory (electronFsAdapter) + L77 method exists (electronFsAdapter) + L86 method isDirectory (electronFsAdapter) + L96 method copy (electronFsAdapter) + L106 method move (electronFsAdapter) + +src/analytics/analytics-panel.js: + L7 function showAnalyticsModal + L105 function escHandler (showAnalyticsModal) + L116 function escapeHtml + +src/analytics/writing-analytics.js: + L77 function countSyllables + L83 function extractWords + L87 function getReadabilityLabel + L95 function analyze + +src/editor/codemirror-setup.js: + L46 function createEditor + L61 function onChange (createEditor) + L118 function getLanguageExtension + L120 method javascript (getLanguageExtension.loaders) + L124 method html (getLanguageExtension.loaders) + L128 method css (getLanguageExtension.loaders) + L132 method json (getLanguageExtension.loaders) + L136 method python (getLanguageExtension.loaders) + +src/main/GitOperations.js: + L3 function getGitInstance + L7 function getStatus + L31 function stage + L56 function commit + L66 function log + L84 function diff + +src/main/PDFOperations.js: + L5 function parsePageRanges + L28 function hexToRgb + L39 function pdfMerge + L59 function pdfSplit + L126 function pdfCompress + L152 function pdfRotate + L182 function pdfDeletePages + L208 function pdfReorder + L233 function pdfWatermark + L319 function pdfEncrypt + L353 function pdfDecrypt + L370 function pdfSetPermissions + L404 function executeOperation + L431 function getPageCount + +src/main/files/binary.js: + L6 function register + +src/main/files/git.js: + L6 function register + +src/main/files/index.js: + L9 function register + +src/main/index.js: + L28 function getPandocPath + L46 function getFFmpegPath + L65 function sanitizeErrorMessage + L74 function createRateLimiter + L76 function canProceed (createRateLimiter) + L86 function convertDataToMarkdown + L108 function runPandocCmd + L124 function parseCommand + L319 function checkPandocAvailability + L334 function showAboutDialog + L437 function showDependenciesDialog + L550 function openFile + L580 function openPdfFile + L599 function saveAsFile + L614 function exportFile + L624 function showExportOptionsDialog + L628 function showBatchConversionDialog + L633 function selectWordTemplate + L654 function showTemplateSettings + L847 function processDynamicFields + L868 function setDocxPageSize + L927 function addHeaderFooterToDocx + L1060 function exportWordWithTemplate + L1100 function exportPDFViaWordTemplate + L1180 function showUniversalConverterDialog + L1185 function showPDFEditorDialog + L1195 function checkConverterAvailable + L1336 function collectFiles + L1431 function convertWithLibreOffice + L1466 function convertWithImageMagick + L1475 function convertWithFFmpeg + L1483 function convertWithPandoc + L1490 function performExportWithOptions + L1741 function tryPdfFallback + L1818 function showExportSuccess + L1828 function exportWithPandoc + L1907 function exportToHTML + L2026 function exportToPDFElectron + L2174 function exportSpreadsheet + L2184 function importDocument + L2280 function setTheme + L2488 function extractTablesFromMarkdown + L2530 function performBatchConversion + L2552 function findMarkdownFiles (performBatchConversion) + L2579 function processNextFile (performBatchConversion) + L2855 function handleCLIConversion + L2883 function showConversionDialog + L2932 function performCLIConversion + L2974 function buildPandocCommand + L3152 method transform (anonymousObject0b93a19c6805) + L3273 function openFileFromPath + L3468 function loadSnippets + L3479 function saveSnippetsFile + +src/main/ipc/crash-handlers.js: + L3 function register + +src/main/ipc/updater-handlers.js: + L4 function register + +src/main/menu/index.js: + L16 function buildMenu + L30 function register + +src/main/menu/items.js: + L9 function buildRecentFilesMenu + L18 method click (buildRecentFilesMenu.anonymousObject59dd54ea0305) + L27 method click (anonymousObject59dd54ea0505) + L40 function fileItems + L143 method click (fileItems.anonymousObject59dd54ea1005) + L150 method click (fileItems.anonymousObject59dd54ea1105) + L157 method click (fileItems.anonymousObject59dd54ea1205) + L165 method click (fileItems.anonymousObject59dd54ea1305) + L172 method click (fileItems.anonymousObject59dd54ea1405) + L180 method click (fileItems.anonymousObject59dd54ea1505) + L187 method click (fileItems.anonymousObject59dd54ea1605) + L194 method click (fileItems.anonymousObject59dd54ea1705) + L201 method click (fileItems.anonymousObject59dd54ea1805) + L209 method click (fileItems.anonymousObject59dd54ea1a05) + L216 method click (fileItems.anonymousObject59dd54ea1b05) + L224 method click (fileItems.anonymousObject59dd54ea1d05) + L232 method click (fileItems.anonymousObject59dd54ea1f05) + L239 method click (fileItems.anonymousObject59dd54ea2005) + L246 method click (fileItems.anonymousObject59dd54ea2105) + L254 method click (fileItems.anonymousObject59dd54ea2305) + L261 method click (fileItems.anonymousObject59dd54ea2405) + L300 function editItems + L326 function viewItems + L372 method click (viewItems.anonymousObject59dd54ea2a05) + L379 method click (viewItems.anonymousObject59dd54ea2b05) + L386 method click (viewItems.anonymousObject59dd54ea2c05) + L393 method click (viewItems.anonymousObject59dd54ea2d05) + L400 method click (viewItems.anonymousObject59dd54ea2e05) + L407 method click (viewItems.anonymousObject59dd54ea2f05) + L414 method click (viewItems.anonymousObject59dd54ea3005) + L421 method click (viewItems.anonymousObject59dd54ea3105) + L428 method click (viewItems.anonymousObject59dd54ea3205) + L435 method click (viewItems.anonymousObject59dd54ea3305) + L443 method click (viewItems.anonymousObject59dd54ea3505) + L450 method click (viewItems.anonymousObject59dd54ea3605) + L457 method click (viewItems.anonymousObject59dd54ea3705) + L464 method click (viewItems.anonymousObject59dd54ea3805) + L471 method click (viewItems.anonymousObject59dd54ea3905) + L478 method click (viewItems.anonymousObject59dd54ea3a05) + L485 method click (viewItems.anonymousObject59dd54ea3b05) + L492 method click (viewItems.anonymousObject59dd54ea3c05) + L499 method click (viewItems.anonymousObject59dd54ea3d05) + L506 method click (viewItems.anonymousObject59dd54ea3e05) + L513 method click (viewItems.anonymousObject59dd54ea3f05) + L520 method click (viewItems.anonymousObject59dd54ea4005) + L527 method click (viewItems.anonymousObject59dd54ea4105) + L534 method click (viewItems.anonymousObject59dd54ea4205) + L541 method click (viewItems.anonymousObject59dd54ea4305) + L602 function batchItems + L631 function convertItems + L644 function pdfEditorItems + L712 method click (pdfEditorItems.anonymousObject59dd54ea4905) + L719 method click (pdfEditorItems.anonymousObject59dd54ea4a05) + L726 method click (pdfEditorItems.anonymousObject59dd54ea4b05) + L744 function toolsItems + L757 function helpItems + +src/main/store.js: + L11 method get (store) + L20 method set (store) + +src/main/updater/crash-writer.js: + L5 class CrashWriter + L6 method constructor (CrashWriter) + L12 method handleUncaught (CrashWriter) + L28 method _prune (CrashWriter) + L40 method list (CrashWriter) + L54 method delete (CrashWriter) + L59 method path (CrashWriter) + +src/main/updater/feed-config.js: + L1 function feedConfigFor + +src/main/updater/migration-runner.js: + L4 class MigrationRunner + L5 method constructor (MigrationRunner) + L12 method run (MigrationRunner) + L36 method _writeDefaults (MigrationRunner) + +src/main/updater/migration-transform.js: + L49 function isAlreadyV5 + L56 function normalizeAlreadyV5 + L95 function migrateV4ToV5 + +src/main/updater/updater-service.js: + L4 class UpdaterService + L5 method constructor (UpdaterService) + L13 method _wire (UpdaterService) + L27 method _emit (UpdaterService) + L32 method check (UpdaterService) + L38 method install (UpdaterService) + +src/main/utils/paths.js: + L7 function getAllowedDirectories + L23 function validatePath + L58 function resolveWritablePath + L88 function isPathAccessible + +src/main/window/index.js: + L10 function createMainWindow + +src/main/window/state.js: + L10 function load + L18 function save + +src/main/word-template/index.js: + L11 class WordTemplateExporter + L12 method constructor (WordTemplateExporter) + L21 method convert (WordTemplateExporter) + L58 method setPageSize (WordTemplateExporter) + L111 method insertContentAfterPage (WordTemplateExporter) + L140 method markdownToWordXml (WordTemplateExporter) + L251 method createHeadingXml (WordTemplateExporter) + L266 method createParagraphXml (WordTemplateExporter) + L280 method createQuoteXml (WordTemplateExporter) + L294 method createListItemXml (WordTemplateExporter) + L315 method createCodeBlockXml (WordTemplateExporter) + L352 method createHorizontalRuleXml (WordTemplateExporter) + L366 method createTableXml (WordTemplateExporter) + L502 method isAsciiArt (WordTemplateExporter) + L606 method createAsciiArtXml (WordTemplateExporter) + L715 method parseInlineFormatting (WordTemplateExporter) + L776 method createRunXml (WordTemplateExporter) + L797 method escapeXml (WordTemplateExporter) + +src/plugins/built-in/_sample/index.js: + L3 class SamplePlugin + L4 method init (SamplePlugin) + +src/plugins/built-in/writing-studio/goal-tracker.js: + L3 class GoalTracker + L7 method constructor (GoalTracker) + L11 method _getHistory (GoalTracker) + L16 method _setHistory (GoalTracker) + L20 method _setHistoryDay (GoalTracker) + L26 method addWords (GoalTracker) + L37 method getDailyProgress (GoalTracker) + L44 method getStreak (GoalTracker) + L61 method getLast30Days (GoalTracker) + L74 method getWeeklyTotal (GoalTracker) + +src/plugins/built-in/writing-studio/index.js: + L7 class WritingStudioPlugin + L8 method init (WritingStudioPlugin) + L34 method _registerCommands (WritingStudioPlugin) + L112 method _registerStatusBar (WritingStudioPlugin) + L123 method deactivate (WritingStudioPlugin) + L127 method getEngines (WritingStudioPlugin) + +src/plugins/built-in/writing-studio/panels/goals-panel.js: + L1 function renderGoalsPanel + +src/plugins/built-in/writing-studio/panels/manuscript-panel.js: + L1 function renderManuscriptPanel + +src/plugins/built-in/writing-studio/panels/proofread-panel.js: + L1 function renderProofreadPanel + L41 method callback (anonymousObjectd036aefd0105) + L50 function renderIssues + +src/plugins/built-in/writing-studio/panels/snapshots-panel.js: + L1 function renderSnapshotsPanel + +src/plugins/built-in/writing-studio/project-manager.js: + L1 class ProjectManager + L5 method constructor (ProjectManager) + L9 method createProject (ProjectManager) + L21 method loadProject (ProjectManager) + L27 method _saveProject (ProjectManager) + L31 method addChapter (ProjectManager) + L38 method updateChapter (ProjectManager) + L45 method compileManuscript (ProjectManager) + L56 method getStats (ProjectManager) + +src/plugins/built-in/writing-studio/snapshot-manager.js: + L1 class SnapshotManager + L6 method constructor (SnapshotManager) + L11 method _getAll (SnapshotManager) + L16 method _saveAll (SnapshotManager) + L20 method create (SnapshotManager) + L34 method list (SnapshotManager) + L38 method getById (SnapshotManager) + L42 method restore (SnapshotManager) + L48 method delete (SnapshotManager) + L53 method diff (SnapshotManager) + L71 method prune (SnapshotManager) + +src/plugins/built-in/writing-studio/sprint-engine.js: + L1 class SprintEngine + L6 method constructor (SprintEngine) + L14 method start (SprintEngine) + L22 method stop (SprintEngine) + L33 method tick (SprintEngine) + L43 method isActive (SprintEngine) + L47 method getRemaining (SprintEngine) + +src/plugins/event-bus.js: + L1 class EventBus + L2 method constructor (EventBus) + L6 method on (EventBus) + L13 method off (EventBus) + L25 method emit (EventBus) + L37 method hasHandler (EventBus) + +src/plugins/plugin-api.js: + L1 class PluginAPI + L7 method init (PluginAPI) + L12 method activate (PluginAPI) + L15 method deactivate (PluginAPI) + L18 method getManifest (PluginAPI) + +src/plugins/plugin-context.js: + L1 class PluginContext + L14 method constructor (PluginContext) + L23 method register (PluginContext.constructor.commands) + L24 function safeHandler (PluginContext.constructor.commands.register) + L65 method registerPreHook (PluginContext.constructor.exports) + L68 method registerPostHook (PluginContext.constructor.exports) + +src/plugins/plugin-loader.js: + L4 class PluginLoader + L8 method constructor (PluginLoader) + L17 method discoverPlugins (PluginLoader) + L66 method validateManifest (PluginLoader) + +src/plugins/plugin-registry.js: + L4 class PluginRegistry + L5 method constructor (PluginRegistry) + L15 method register (PluginRegistry) + L49 method getPlugin (PluginRegistry) + L53 method getAll (PluginRegistry) + L57 method activate (PluginRegistry) + L68 method deactivate (PluginRegistry) + +src/plugins/settings-store.js: + L1 class SettingsStore + L5 method constructor (SettingsStore) + L9 method get (SettingsStore) + L13 method set (SettingsStore) + L17 method onChanged (SettingsStore) + +src/preload.js: + L275 method send (anonymousObject04f5e4370105) + L289 method invoke (anonymousObject04f5e4370105) + L308 method on (anonymousObject04f5e4370105) + L310 function subscription (anonymousObject04f5e4370105.on) + L328 method once (anonymousObject04f5e4370105) + L340 method removeAllListeners (anonymousObject04f5e4370105) + L488 function subscription + +src/renderer/hooks/use-export-source.ts: + L4 interface ExportSource + L14 function useExportSource + +src/renderer/hooks/use-file-shortcuts.ts: + L15 function useFileShortcuts + +src/renderer/hooks/use-menu-action.ts: + L6 alias Transform + L17 function useMenuAction + +src/renderer/hooks/use-restore-last-folder.ts: + L9 function useRestoreLastFolder + +src/renderer/hooks/use-scroll-sync.ts: + L3 interface Options + L8 function useScrollSync + +src/renderer/hooks/use-shortcut.ts: + L20 function useShortcut + L44 interface ComboSpec + L53 function parseCombo + L71 function matchCombo + +src/renderer/hooks/use-welcome-trigger.ts: + L9 function useWelcomeTrigger + +src/renderer/hooks/use-zen-mode.ts: + L8 function useZenMode + +src/renderer/hooks/useAutoUpdateCheck.ts: + L5 function useAutoUpdateCheck + +src/renderer/lib/ascii-table.ts: + L5 function toAsciiTable + L36 function applyAsciiTransform + +src/renderer/lib/commands/register-menu-commands.ts: + L24 alias HeadingItem + L26 alias OpenModal + L28 function confirmCloseFlow + L45 function registerMenuCommands + L411 function useRegisterMenuCommands + L421 function useBridgeNativeMenu + +src/renderer/lib/docx-export.ts: + L4 interface DocxOptions + L10 function generateDocx + +src/renderer/lib/editor-commands.ts: + L18 function setActiveView + L22 function getActiveView + L27 function wrap + L57 function setLineHeading + L76 function toggleLinePrefix + L103 function toggleBold + L107 function toggleItalic + L111 function toggleCode + L115 function toggleCodeBlock + L143 function toggleUnorderedList + L147 function toggleOrderedList + L151 function insertLink + L167 function setHeadingLevel + L171 function scrollToLine + L185 function undo + L192 function redo + L199 function selectCurrentLine + L210 function insertSnippet + +src/renderer/lib/figlet.ts: + L13 alias FigletFont + L15 function figletText + +src/renderer/lib/headings.ts: + L1 interface HeadingItem + L13 function extractHeadings + +src/renderer/lib/html-export.ts: + L11 interface HtmlExportOptions + L101 function generateHtml + L125 function escapeHtml + +src/renderer/lib/ipc.ts: + L14 alias ChannelMissing + L16 function wrap + +src/renderer/lib/markdown.ts: + L11 function renderMarkdown + +src/renderer/lib/migrations/v4-to-v5.ts: + L16 function isAlreadyV5 + L22 function normalizeAlreadyV5 + L37 function migrateV4ToV5 + +src/renderer/lib/pdf-export.ts: + L13 interface PdfExportOptions + L28 function generatePdf + +src/renderer/lib/updater-store.ts: + L4 alias State + L6 interface UpdaterState + +src/renderer/lib/utils.ts: + L1 alias ClassValue + L4 function cn + +src/renderer/lib/validators.ts: + L30 alias Settings + L38 alias ExportPdfOptions + L44 alias ExportDocxOptions + L51 alias ExportHtmlOptions + L58 alias ExportBatchOptions + +src/renderer/lib/writing-analytics.ts: + L115 function countSyllables + L122 function extractWords + L126 function getReadabilityLabel + L134 interface WritingMetrics + L151 function analyzeText + +src/renderer/stores/app-store.ts: + L4 interface PaneSizes + L10 interface ConfirmProps + L20 alias ModalState + L42 alias ModalKind + L44 interface AppState + L57 method openModal (AppState) + +src/renderer/stores/command-store.ts: + L4 alias CommandId + L6 alias CommandHandler + L13 alias UserBindings + L15 interface CommandState + +src/renderer/stores/editor-store.ts: + L7 interface Buffer + L15 interface EditorState + +src/renderer/stores/file-store.ts: + L12 interface FileNode + L21 interface OpenTab + L28 interface FileState + L50 function entryToNode + L60 function updateNode + +src/renderer/stores/preview-store.ts: + L3 interface PreviewState + +src/renderer/stores/settings-store.ts: + L3 alias Settings + L5 alias Omit + L5 alias SettingsLeaf + L7 interface SettingsState + L8 method setSetting (SettingsState) + +src/renderer/test/setup.ts: + L7 interface Window + L119 class ResizeObserver + L120 method observe (ResizeObserver) + L121 method unobserve (ResizeObserver) + L122 method disconnect (ResizeObserver) + L141 class DOMMatrix + +src/renderer/types/electron.d.ts: + L1 interface ElectronAPI + L134 interface Window + +src/renderer/types/ipc.ts: + L1 alias IpcResult + L5 interface FileEntry + L13 interface FileResult + L18 interface PdfOptions + L27 interface DocxOptions + L34 interface HtmlOptions + L41 interface ExportResult + L47 interface BatchItem + L52 interface BatchOptions + L57 interface BatchResult + +src/repl/repl-panel.js: + L1 class ReplPanel + L2 method constructor (ReplPanel) + L8 method setupEventListeners (ReplPanel) + L13 method toggle (ReplPanel) + L19 method show (ReplPanel) + L25 method clear (ReplPanel) + L29 method appendOutput (ReplPanel) + L42 method escapeHtml (ReplPanel) + +src/sidebar/explorer-panel.js: + L1 function renderExplorerPanel + L40 function renderTree + L79 function getFileIcon + +src/sidebar/git-panel.js: + L1 function renderGitPanel + L24 function loadGitStatus (renderGitPanel) + +src/sidebar/outline-panel.js: + L6 function renderOutlinePanel + L18 function parseHeadings (renderOutlinePanel) + L36 function findActiveHeading (renderOutlinePanel) + L48 function renderHeadings (renderOutlinePanel) + L89 function escapeHtml (renderOutlinePanel) + L95 function refresh (renderOutlinePanel) + L100 function setActiveHeading (renderOutlinePanel) + +src/sidebar/sidebar-manager.js: + L1 class SidebarManager + L2 method constructor (SidebarManager) + L11 method setupEventListeners (SidebarManager) + L20 method registerPanel (SidebarManager) + L24 method togglePanel (SidebarManager) + L32 method expand (SidebarManager) + L45 method collapse (SidebarManager) + +src/sidebar/snippets-panel.js: + L1 function renderSnippetsPanel + L14 function loadSnippets (renderSnippetsPanel) + L19 function renderList (renderSnippetsPanel) + +src/sidebar/templates-panel.js: + L18 function renderTemplatesPanel + +src/utils/ModalManager.js: + L5 class ModalManager + L16 method constructor (ModalManager) + L31 method init (ModalManager) + L47 method setupCloseTriggers (ModalManager) + L51 function handler (ModalManager.setupCloseTriggers) + L65 function handler + L74 method getFocusableElements (ModalManager) + L89 method trapFocus (ModalManager) + L111 method handleKeydown (ModalManager) + L119 method open (ModalManager) + L141 function keydownHandler (ModalManager.open) + L164 method close (ModalManager) + L182 function addHidden (ModalManager.close) + L188 function onTransitionEnd (ModalManager.close) + L223 method isOpen (ModalManager) + L227 method destroy (ModalManager) + +tests/git-operations.test.js: + L26 function asyncFn + L35 function asyncFnWithError + +tests/main-utils.test.js: + L7 function sanitizeErrorMessage + L49 function createRateLimiter + L51 function canProceed (createRateLimiter) + +tests/markdown-extensions.test.js: + L83 method start (extension) + L86 method tokenizer (extension) + L102 method renderer (extension) + L151 function plantumlEncode + L176 function slugify + L203 function scopeCSS + +tests/modal-manager.test.js: + L11 function createModalElement + +tests/plugin-api.test.js: + L18 class MyPlugin + L19 method init (MyPlugin) + +tests/plugin-context.test.js: + L39 function badHandler + +tests/plugin-loader.test.js: + L17 function writeManifest + +tests/plugin-registry.test.js: + L5 class TestPlugin + L6 method init (TestPlugin) + L10 method activate (TestPlugin) + L13 method deactivate (TestPlugin) + L69 class BadPlugin + L70 method init (BadPlugin) + +tests/setup.js: + L96 function error (console) + +tests/sidebar.test.js: + L41 method render (anonymousObject7c2818c30105) + L52 method render (anonymousObject7c2818c30205) + L62 method render (anonymousObject7c2818c30305) + L68 method render (anonymousObject7c2818c30405) + L80 method render (anonymousObject7c2818c30505) + L88 method render (anonymousObject7c2818c30605) + L96 method render (anonymousObject7c2818c30705) + L120 method render (anonymousObject7c2818c30905) + L130 method render (anonymousObject7c2818c30a05) + +tests/unit/hooks/use-menu-action.test.ts: + L6 alias Cleanup + L27 function fireMenu + +tests/unit/main/updater/crash-writer.test.js: + L6 function tmpDir + +tests/unit/main/updater/migration-runner.test.js: + L6 function tmpDir + L47 method transform (anonymousObject196c14410c05) + L63 method transform (anonymousObject196c14410d05) + +tests/unit/stores/file-store.test.ts: + L26 function fakeFileEntry + +tests/utils.test.js: + L9 function parseCommand + L78 function hexToRgb + L121 function getExtension + L133 function replaceExtension +```