documentation-hub 5.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (271) hide show
  1. package/.eslintrc.json +43 -0
  2. package/.github/workflows/build.yml +64 -0
  3. package/.github/workflows/ci.yml +39 -0
  4. package/.vscode/extensions.json +3 -0
  5. package/Current.md +97 -0
  6. package/DocHub_Image.png +0 -0
  7. package/README.md +666 -0
  8. package/USER_GUIDE.md +1173 -0
  9. package/Updater.md +311 -0
  10. package/build/256x256.png +0 -0
  11. package/build/512x512.png +0 -0
  12. package/build/app-update.yml +4 -0
  13. package/build/create-icon.js +208 -0
  14. package/build/icon.ico +0 -0
  15. package/build/icon.png +0 -0
  16. package/build/icon_1024x1024.png +0 -0
  17. package/dist/assets/Analytics-BpsG9895.js +1 -0
  18. package/dist/assets/Card-IAZin8kp.js +1 -0
  19. package/dist/assets/CurrentSession-B-rFkHvf.js +12 -0
  20. package/dist/assets/Dashboard-C_5gMb0q.js +1 -0
  21. package/dist/assets/Documents-CqZ25axS.js +1 -0
  22. package/dist/assets/Input-l89xwXBi.js +1 -0
  23. package/dist/assets/Reporting-DqdHJY_a.js +1 -0
  24. package/dist/assets/Search-XNbu5z_3.js +1 -0
  25. package/dist/assets/SessionManager-lH9hZfzH.js +1 -0
  26. package/dist/assets/Sessions-ClZOPYNc.js +1 -0
  27. package/dist/assets/Settings-DUEHGURa.js +11 -0
  28. package/dist/assets/index-8xUe8ptc.js +24 -0
  29. package/dist/assets/index-RYyJqF7O.css +1 -0
  30. package/dist/assets/path-BkOl0AGO.js +1 -0
  31. package/dist/assets/promises-ID_B9S-h.js +1 -0
  32. package/dist/assets/urlHelpers-TvgahX0r.js +1 -0
  33. package/dist/assets/useToast-yRSO1dkm.js +1 -0
  34. package/dist/assets/vendor-charts-RkGK5ROP.js +36 -0
  35. package/dist/assets/vendor-db-l0sNRNKZ.js +1 -0
  36. package/dist/assets/vendor-react-BVZ_anCF.js +4 -0
  37. package/dist/assets/vendor-search-Dw8P0qyA.js +1 -0
  38. package/dist/assets/vendor-ui-BU7NfluV.js +53 -0
  39. package/dist/electron/PowerAutomateApiService-LfW09ZGr.js +147 -0
  40. package/dist/electron/main-CXkNtyv-.js +19789 -0
  41. package/dist/electron/main.js +5 -0
  42. package/dist/electron/preload.js +1 -0
  43. package/dist/icon.png +0 -0
  44. package/dist/index.html +27 -0
  45. package/docs/CODEBASE_ANALYSIS_REPORT.md +309 -0
  46. package/docs/DEBUG_LOGGING_GUIDE.md +244 -0
  47. package/docs/README.md +115 -0
  48. package/docs/TOC_WIRING_GUIDE.md +344 -0
  49. package/docs/analysis/Bullet_Symbol_Bug_Analysis.md +136 -0
  50. package/docs/analysis/DOCXMLATER_ANALYSIS_SUMMARY.txt +169 -0
  51. package/docs/analysis/Document_Processing_Issues_Analysis.md +704 -0
  52. package/docs/analysis/FIELD_PRESERVATION_ANALYSIS.md +1200 -0
  53. package/docs/analysis/INDENTATION_PRESERVE_ANALYSIS.md +181 -0
  54. package/docs/analysis/INDENTATION_PRESERVE_IMPLEMENTATION.md +207 -0
  55. package/docs/analysis/List_Implementation.md +206 -0
  56. package/docs/analysis/List_Implementation_Accuracy_Report.md +366 -0
  57. package/docs/analysis/PROCESSING_OPTIONS_UI_UPDATES.md +220 -0
  58. package/docs/analysis/RefactorStyles.md +852 -0
  59. package/docs/analysis/STYLE_PARAMETER_ENHANCEMENT.md +143 -0
  60. package/docs/analysis/docxmlater-comparison-todo-2025-11-13.md +636 -0
  61. package/docs/analysis/docxmlater-implementation-analysis-2025-11-13.md +340 -0
  62. package/docs/analysis/docxmlater-template_ui-integration-analysis.md +263 -0
  63. package/docs/analysis/github-issues-to-create.md +237 -0
  64. package/docs/api/API_README.md +538 -0
  65. package/docs/api/API_REFERENCE.md +751 -0
  66. package/docs/api/TYPE_DEFINITIONS.md +869 -0
  67. package/docs/architecture/FONT_EMBEDDING_GUIDE.md +318 -0
  68. package/docs/architecture/docxmlater-functions-and-structure.md +726 -0
  69. package/docs/docxmlater-readme.md +1341 -0
  70. package/docs/fixes/EXECUTION_LOG_TEST_BASE.md +573 -0
  71. package/docs/fixes/HYPERLINK_TEXT_SANITIZATION.md +253 -0
  72. package/docs/fixes/README.md +37 -0
  73. package/docs/github-issues/issue-1-body.md +125 -0
  74. package/docs/github-issues/issue-10-body.md +850 -0
  75. package/docs/github-issues/issue-2-body.md +200 -0
  76. package/docs/github-issues/issue-3-body.md +270 -0
  77. package/docs/github-issues/issue-4-body.md +169 -0
  78. package/docs/github-issues/issue-5-body.md +173 -0
  79. package/docs/github-issues/issue-6-body.md +158 -0
  80. package/docs/github-issues/issue-7-body.md +171 -0
  81. package/docs/github-issues/issue-8-body.md +407 -0
  82. package/docs/github-issues/issue-9-body.md +515 -0
  83. package/docs/github-issues/issue-tracker.md +274 -0
  84. package/docs/github-issues/predictive-analysis-2025-10-18.md +2131 -0
  85. package/docs/implementation/List_Framework_Refactor_Plan.md +336 -0
  86. package/docs/implementation/PRIMARY_TEXT_COLOR_FEATURE.md +217 -0
  87. package/docs/implementation/RELEASE_PLAN_v2.1.0.md +362 -0
  88. package/docs/implementation/RefactorStyles.md +588 -0
  89. package/docs/implementation/implement-plan.md +489 -0
  90. package/docs/implementation/missing-helpers-implementation.md +391 -0
  91. package/docs/implementation/refactor-plan.md +520 -0
  92. package/docs/implementation/session-implementation-complete.md +233 -0
  93. package/docs/implementation/session-management-plan.md +250 -0
  94. package/docs/setup-checklist.md +77 -0
  95. package/docs/versions/changelog.md +345 -0
  96. package/electron/customUpdater.ts +656 -0
  97. package/electron/main.ts +2441 -0
  98. package/electron/memoryConfig.ts +187 -0
  99. package/electron/preload.ts +394 -0
  100. package/electron/proxyConfig.ts +340 -0
  101. package/electron/services/BackupService.ts +452 -0
  102. package/electron/services/DictionaryService.ts +402 -0
  103. package/electron/services/LocalDictionaryLookupService.ts +147 -0
  104. package/electron/services/PowerAutomateApiService.ts +231 -0
  105. package/electron/services/SharePointSyncService.ts +474 -0
  106. package/electron/windowsCertStore.ts +427 -0
  107. package/electron/zscalerConfig.ts +381 -0
  108. package/eslint.config.js +92 -0
  109. package/jest.config.js +52 -0
  110. package/package.json +214 -0
  111. package/postcss.config.mjs +6 -0
  112. package/public/icon.png +0 -0
  113. package/publish-release.ps1 +5 -0
  114. package/renovate.json +30 -0
  115. package/src/App.tsx +216 -0
  116. package/src/__mocks__/p-limit.js +12 -0
  117. package/src/__mocks__/styleMock.js +1 -0
  118. package/src/components/common/BugReportButton.tsx +44 -0
  119. package/src/components/common/BugReportDialog.tsx +193 -0
  120. package/src/components/common/Button.tsx +153 -0
  121. package/src/components/common/Card.tsx +86 -0
  122. package/src/components/common/ColorPickerDialog.tsx +177 -0
  123. package/src/components/common/ConfirmDialog.tsx +96 -0
  124. package/src/components/common/DebugConsole.tsx +275 -0
  125. package/src/components/common/EmptyState.tsx +183 -0
  126. package/src/components/common/ErrorBoundary.tsx +98 -0
  127. package/src/components/common/ErrorDetailsDialog.tsx +153 -0
  128. package/src/components/common/ErrorFallback.tsx +218 -0
  129. package/src/components/common/Input.tsx +109 -0
  130. package/src/components/common/Skeleton.tsx +184 -0
  131. package/src/components/common/SplashScreen.tsx +81 -0
  132. package/src/components/common/Toast.tsx +155 -0
  133. package/src/components/common/Tooltip.tsx +79 -0
  134. package/src/components/common/UpdateNotification.tsx +320 -0
  135. package/src/components/comparison/ComparisonWindow.tsx +374 -0
  136. package/src/components/comparison/SideBySideDiff.tsx +486 -0
  137. package/src/components/comparison/index.ts +8 -0
  138. package/src/components/document/DocumentUploader.tsx +288 -0
  139. package/src/components/document/HyperlinkPreview.tsx +430 -0
  140. package/src/components/document/HyperlinkService.md +1484 -0
  141. package/src/components/document/Hyperlink_Technical_Documentation.md +496 -0
  142. package/src/components/document/InlineChangesView.tsx +707 -0
  143. package/src/components/document/ProcessingProgress.tsx +303 -0
  144. package/src/components/document/ProcessingResults.tsx +256 -0
  145. package/src/components/document/TrackedChangesDetail.tsx +530 -0
  146. package/src/components/document/TrackedChangesPanel.tsx +546 -0
  147. package/src/components/document/VirtualDocumentList.tsx +240 -0
  148. package/src/components/editor/DocumentEditor.tsx +723 -0
  149. package/src/components/editor/DocumentEditorModal.tsx +640 -0
  150. package/src/components/editor/EditorQuickActions.tsx +502 -0
  151. package/src/components/editor/EditorToolbar.tsx +312 -0
  152. package/src/components/editor/TableEditor.tsx +926 -0
  153. package/src/components/editor/index.ts +18 -0
  154. package/src/components/layout/Header.tsx +190 -0
  155. package/src/components/layout/Sidebar.tsx +313 -0
  156. package/src/components/layout/TitleBar.tsx +190 -0
  157. package/src/components/navigation/CommandPalette.tsx +233 -0
  158. package/src/components/navigation/KeyboardShortcutsModal.tsx +173 -0
  159. package/src/components/sessions/ChangeItem.tsx +408 -0
  160. package/src/components/sessions/ChangeViewer.tsx +1155 -0
  161. package/src/components/sessions/DocumentComparisonModal.tsx +314 -0
  162. package/src/components/sessions/ProcessingOptions.tsx +297 -0
  163. package/src/components/sessions/ReplacementsTab.tsx +438 -0
  164. package/src/components/sessions/RevisionHandlingOptions.tsx +87 -0
  165. package/src/components/sessions/SessionManager.tsx +188 -0
  166. package/src/components/sessions/StylesEditor.tsx +1335 -0
  167. package/src/components/sessions/TabContainer.tsx +151 -0
  168. package/src/components/sessions/VirtualSessionList.tsx +157 -0
  169. package/src/components/sessions/sessionToProcessorManager.tsx +420 -0
  170. package/src/components/settings/CertificateManager.tsx +410 -0
  171. package/src/components/settings/SegmentedControl.tsx +88 -0
  172. package/src/components/settings/SettingRow.tsx +52 -0
  173. package/src/contexts/GlobalStatsContext.tsx +396 -0
  174. package/src/contexts/SessionContext.tsx +2129 -0
  175. package/src/contexts/ThemeContext.tsx +428 -0
  176. package/src/contexts/UserSettingsContext.tsx +290 -0
  177. package/src/contexts/__tests__/GlobalStatsContext.test.tsx +390 -0
  178. package/src/global.d.ts +273 -0
  179. package/src/hooks/useDocumentQueue.tsx +210 -0
  180. package/src/hooks/useToast.tsx +55 -0
  181. package/src/main.tsx +10 -0
  182. package/src/pages/Analytics.tsx +386 -0
  183. package/src/pages/CurrentSession.tsx +1174 -0
  184. package/src/pages/Dashboard.tsx +319 -0
  185. package/src/pages/Documents.tsx +317 -0
  186. package/src/pages/Projects.tsx +250 -0
  187. package/src/pages/Reporting.tsx +386 -0
  188. package/src/pages/Search.tsx +349 -0
  189. package/src/pages/Sessions.tsx +285 -0
  190. package/src/pages/Settings.tsx +2662 -0
  191. package/src/services/HyperlinkService.ts +1085 -0
  192. package/src/services/document/DocXMLaterProcessor.ts +617 -0
  193. package/src/services/document/DocumentProcessingComparison.ts +856 -0
  194. package/src/services/document/DocumentSnapshotService.ts +575 -0
  195. package/src/services/document/WordDocumentProcessor.ts +10509 -0
  196. package/src/services/document/__tests__/DocXMLaterProcessor.hyperlinks.test.md +311 -0
  197. package/src/services/document/__tests__/WordDocumentProcessor.integration.test.ts +515 -0
  198. package/src/services/document/__tests__/WordDocumentProcessor.test.ts +812 -0
  199. package/src/services/document/blanklines/BlankLineManager.ts +658 -0
  200. package/src/services/document/blanklines/__tests__/paragraphChecks.test.ts +281 -0
  201. package/src/services/document/blanklines/helpers/blankLineInsertion.ts +87 -0
  202. package/src/services/document/blanklines/helpers/blankLineSnapshot.ts +251 -0
  203. package/src/services/document/blanklines/helpers/clearCustom.ts +121 -0
  204. package/src/services/document/blanklines/helpers/contextChecks.ts +117 -0
  205. package/src/services/document/blanklines/helpers/imageChecks.ts +51 -0
  206. package/src/services/document/blanklines/helpers/paragraphChecks.ts +236 -0
  207. package/src/services/document/blanklines/helpers/removeBlanksBetweenListItems.ts +91 -0
  208. package/src/services/document/blanklines/helpers/removeTrailingBlanks.ts +35 -0
  209. package/src/services/document/blanklines/helpers/tableGuards.ts +21 -0
  210. package/src/services/document/blanklines/index.ts +67 -0
  211. package/src/services/document/blanklines/rules/additionRules.ts +337 -0
  212. package/src/services/document/blanklines/rules/indentationRules.ts +317 -0
  213. package/src/services/document/blanklines/rules/removalRules.ts +362 -0
  214. package/src/services/document/blanklines/rules/ruleTypes.ts +92 -0
  215. package/src/services/document/blanklines/types.ts +29 -0
  216. package/src/services/document/helpers/ImageBorderCropper.ts +377 -0
  217. package/src/services/document/helpers/__tests__/whitespace.test.ts +272 -0
  218. package/src/services/document/helpers/whitespace.ts +117 -0
  219. package/src/services/document/list/ListNormalizer.ts +947 -0
  220. package/src/services/document/list/index.ts +45 -0
  221. package/src/services/document/list/list-detection.ts +275 -0
  222. package/src/services/document/list/list-types.ts +162 -0
  223. package/src/services/document/processors/HyperlinkProcessor.ts +370 -0
  224. package/src/services/document/processors/ListProcessor.ts +257 -0
  225. package/src/services/document/processors/StructureProcessor.ts +176 -0
  226. package/src/services/document/processors/StyleProcessor.ts +389 -0
  227. package/src/services/document/processors/TableProcessor.ts +2238 -0
  228. package/src/services/document/processors/__tests__/HyperlinkProcessor.test.ts +314 -0
  229. package/src/services/document/processors/__tests__/ListProcessor.test.ts +291 -0
  230. package/src/services/document/processors/__tests__/StructureProcessor.test.ts +257 -0
  231. package/src/services/document/processors/__tests__/TableProcessor.hlp-tips-bullets.test.ts +459 -0
  232. package/src/services/document/processors/__tests__/TableProcessor.test.ts +1604 -0
  233. package/src/services/document/processors/index.ts +28 -0
  234. package/src/services/document/types/docx-processing.ts +310 -0
  235. package/src/services/editor/EditorActionHandlers.ts +901 -0
  236. package/src/services/editor/index.ts +13 -0
  237. package/src/setupTests.ts +47 -0
  238. package/src/styles/global.css +782 -0
  239. package/src/types/backup.ts +132 -0
  240. package/src/types/dictionary.ts +125 -0
  241. package/src/types/document-processing.ts +331 -0
  242. package/src/types/docxmlater-augments.d.ts +142 -0
  243. package/src/types/editor.ts +280 -0
  244. package/src/types/electron.ts +340 -0
  245. package/src/types/globalStats.ts +155 -0
  246. package/src/types/hyperlink.ts +471 -0
  247. package/src/types/operations.ts +354 -0
  248. package/src/types/session.ts +427 -0
  249. package/src/types/settings.ts +112 -0
  250. package/src/utils/MemoryMonitor.ts +248 -0
  251. package/src/utils/cn.ts +6 -0
  252. package/src/utils/colorConvert.ts +306 -0
  253. package/src/utils/diffUtils.ts +347 -0
  254. package/src/utils/documentUtils.ts +202 -0
  255. package/src/utils/electronGuard.ts +62 -0
  256. package/src/utils/indexedDB.ts +915 -0
  257. package/src/utils/logger.ts +717 -0
  258. package/src/utils/pathSecurity.ts +232 -0
  259. package/src/utils/pathValidator.ts +236 -0
  260. package/src/utils/processingTimeEstimator.ts +153 -0
  261. package/src/utils/safeJsonParse.ts +62 -0
  262. package/src/utils/textSanitizer.ts +162 -0
  263. package/src/utils/urlHelpers.ts +304 -0
  264. package/src/utils/urlPatterns.ts +198 -0
  265. package/src/utils/urlSanitizer.ts +152 -0
  266. package/src/vite-env.d.ts +11 -0
  267. package/tsconfig.electron.json +19 -0
  268. package/tsconfig.json +36 -0
  269. package/tsconfig.node.json +12 -0
  270. package/typedoc.json +45 -0
  271. package/vite.config.ts +152 -0
package/package.json ADDED
@@ -0,0 +1,214 @@
1
+ {
2
+ "name": "documentation-hub",
3
+ "version": "5.7.2",
4
+ "description": "A modern document processing and session management desktop application",
5
+ "author": "DiaTech",
6
+ "main": "dist/electron/main.js",
7
+ "scripts": {
8
+ "dev": "vite",
9
+ "build": "tsc && vite build",
10
+ "build:electron": "electron-builder",
11
+ "preview": "vite preview",
12
+ "electron": "electron .",
13
+ "electron:dev": "concurrently -k \"npm run dev\" \"wait-on http://localhost:5173 && electron .\"",
14
+ "dist": "npm run build && npm run build:electron",
15
+ "release": "npm run build && npx electron-builder && node scripts/generate-latest-yml.js && npx electron-builder --publish always -c.publish.releaseType=release && gh release upload v%npm_package_version% release/latest.yml --clobber",
16
+ "update-server": "node scripts/local-update-server.js",
17
+ "test:update": "concurrently -k \"npm run dev\" \"wait-on http://localhost:5173 && node -e \\\"require('child_process').spawn(require('electron'), ['.'], {stdio:'inherit', env:{...process.env, FORCE_DEV_UPDATE_CONFIG:'true'}})\\\"\"",
18
+ "postinstall": "electron-builder install-app-deps",
19
+ "predist": "yalc remove --all && npm install",
20
+ "lint": "eslint src/ electron/",
21
+ "format": "prettier --write \"src/**/*.{ts,tsx,css,md}\"",
22
+ "typecheck": "tsc --noEmit",
23
+ "test": "jest",
24
+ "test:watch": "jest --watch",
25
+ "test:coverage": "jest --coverage",
26
+ "test:ci": "jest --ci --coverage --maxWorkers=2",
27
+ "test:toc": "node test-debug-toc.js",
28
+ "docs:generate": "typedoc",
29
+ "docs:watch": "typedoc --watch",
30
+ "generate:icons": "node build/create-icon.js",
31
+ "prepare": "husky"
32
+ },
33
+ "keywords": [
34
+ "electron",
35
+ "typescript",
36
+ "react",
37
+ "vite",
38
+ "desktop"
39
+ ],
40
+ "license": "MIT",
41
+ "devDependencies": {
42
+ "@tailwindcss/postcss": "4.1.18",
43
+ "@tailwindcss/vite": "4.1.18",
44
+ "@testing-library/jest-dom": "^6.9.1",
45
+ "@testing-library/react": "^16.3.2",
46
+ "@types/adm-zip": "^0.5.7",
47
+ "@types/better-sqlite3": "^7.6.13",
48
+ "@types/jest": "^30.0.0",
49
+ "@types/js-yaml": "^4.0.9",
50
+ "@types/node": "25.0.10",
51
+ "@types/react": "19.2.10",
52
+ "@types/react-dom": "19.2.3",
53
+ "@typescript-eslint/eslint-plugin": "8.54.0",
54
+ "@typescript-eslint/parser": "8.54.0",
55
+ "@vitejs/plugin-react": "5.1.2",
56
+ "autoprefixer": "^10.4.23",
57
+ "concurrently": "^9.2.1",
58
+ "electron": "^40.0.0",
59
+ "electron-builder": "^26.8.1",
60
+ "eslint": "9.39.2",
61
+ "eslint-config-prettier": "^10.1.8",
62
+ "eslint-plugin-react": "^7.37.5",
63
+ "eslint-plugin-react-hooks": "7.0.1",
64
+ "husky": "^9.1.7",
65
+ "jest": "^30.2.0",
66
+ "jest-environment-jsdom": "^30.2.0",
67
+ "patch-package": "^8.0.1",
68
+ "postcss": "8.5.6",
69
+ "prettier": "^3.8.1",
70
+ "prettier-plugin-tailwindcss": "0.7.2",
71
+ "react-router": "7.13.0",
72
+ "tailwindcss": "4.1.18",
73
+ "ts-jest": "^29.4.6",
74
+ "typescript": "5.9.3",
75
+ "vite": "7.3.1",
76
+ "vite-plugin-electron": "^0.29.0",
77
+ "vite-plugin-electron-renderer": "0.14.6",
78
+ "wait-on": "^9.0.3"
79
+ },
80
+ "dependencies": {
81
+ "@azure/msal-node": "^5.0.2",
82
+ "@radix-ui/react-dialog": "^1.1.15",
83
+ "@radix-ui/react-dropdown-menu": "^2.1.16",
84
+ "@radix-ui/react-popover": "^1.1.15",
85
+ "@radix-ui/react-select": "^2.2.6",
86
+ "@radix-ui/react-separator": "^1.1.8",
87
+ "@radix-ui/react-slot": "^1.2.4",
88
+ "@radix-ui/react-switch": "^1.2.6",
89
+ "@radix-ui/react-toast": "^1.2.15",
90
+ "@radix-ui/react-tooltip": "^1.2.8",
91
+ "@types/diff": "^7.0.2",
92
+ "@types/react-window": "^1.8.8",
93
+ "adm-zip": "^0.5.16",
94
+ "all": "^0.0.0",
95
+ "better-sqlite3": "^12.6.2",
96
+ "canvas": "^3.2.1",
97
+ "class-variance-authority": "^0.7.1",
98
+ "clsx": "^2.1.1",
99
+ "cmdk": "^1.1.1",
100
+ "diff": "^8.0.3",
101
+ "docx": "^9.5.1",
102
+ "docxmlater": "10.1.3",
103
+ "electron-log": "^5.4.3",
104
+ "electron-updater": "6.8.1",
105
+ "fast-diff": "^1.3.0",
106
+ "framer-motion": "^12.29.2",
107
+ "fuse.js": "^7.1.0",
108
+ "idb": "^8.0.3",
109
+ "lucide-react": "^0.563.0",
110
+ "mammoth": "^1.11.0",
111
+ "p-limit": "7.2.0",
112
+ "react": "^19.2.4",
113
+ "react-dom": "19.2.4",
114
+ "react-router-dom": "7.13.0",
115
+ "react-window": "^2.2.5",
116
+ "recharts": "3.7.0",
117
+ "rimraf": "^6.1.2",
118
+ "tailwind-merge": "^3.4.0",
119
+ "tw-animate-css": "^1.4.0",
120
+ "xlsx": "^0.18.5",
121
+ "zustand": "^5.0.10"
122
+ },
123
+ "build": {
124
+ "appId": "com.documentationhub.app",
125
+ "productName": "Documentation Hub",
126
+ "artifactName": "${productName}-Setup-${version}.${ext}",
127
+ "publish": [
128
+ {
129
+ "provider": "github",
130
+ "owner": "ItMeDiaTech",
131
+ "repo": "Documentation_Hub",
132
+ "releaseType": "release"
133
+ }
134
+ ],
135
+ "asar": true,
136
+ "asarUnpack": [
137
+ "**/*.node",
138
+ "**/better-sqlite3/**",
139
+ "**/canvas/**"
140
+ ],
141
+ "directories": {
142
+ "output": "release",
143
+ "buildResources": "build"
144
+ },
145
+ "files": [
146
+ "dist/**/*",
147
+ "node_modules/**/*",
148
+ "package.json"
149
+ ],
150
+ "extraResources": [
151
+ {
152
+ "from": "build/app-update.yml",
153
+ "to": "app-update.yml"
154
+ },
155
+ {
156
+ "from": "build/icon.ico",
157
+ "to": "icon.ico"
158
+ }
159
+ ],
160
+ "icon": "build/icon.png",
161
+ "win": {
162
+ "target": [
163
+ "msi"
164
+ ],
165
+ "icon": "build/icon.ico",
166
+ "artifactName": "Documentation-Hub-${version}.${ext}",
167
+ "signAndEditExecutable": false
168
+ },
169
+ "msi": {
170
+ "upgradeCode": "CF863E5D-30C2-470B-B337-4373B543F563",
171
+ "oneClick": false,
172
+ "perMachine": false,
173
+ "createDesktopShortcut": true,
174
+ "createStartMenuShortcut": true,
175
+ "runAfterFinish": true,
176
+ "warningsAsErrors": false,
177
+ "shortcutName": "DocumentationHub",
178
+ "additionalWixArgs": [
179
+ "-sval"
180
+ ]
181
+ },
182
+ "mac": {
183
+ "target": [
184
+ "dmg"
185
+ ],
186
+ "category": "public.app-category.productivity",
187
+ "icon": "build/icon.png",
188
+ "artifactName": "Documentation-Hub-${version}.${ext}"
189
+ },
190
+ "dmg": {
191
+ "contents": [
192
+ {
193
+ "x": 130,
194
+ "y": 220
195
+ },
196
+ {
197
+ "x": 410,
198
+ "y": 220,
199
+ "type": "link",
200
+ "path": "/Applications"
201
+ }
202
+ ],
203
+ "artifactName": "Documentation-Hub-${version}.dmg"
204
+ },
205
+ "linux": {
206
+ "target": [
207
+ "AppImage"
208
+ ],
209
+ "category": "Office",
210
+ "icon": "build",
211
+ "artifactName": "Documentation-Hub-${version}.${ext}"
212
+ }
213
+ }
214
+ }
@@ -0,0 +1,6 @@
1
+ export default {
2
+ plugins: {
3
+ // Tailwind is now handled by the Vite plugin
4
+ autoprefixer: {},
5
+ },
6
+ };
Binary file
@@ -0,0 +1,5 @@
1
+ $ghPath = "$env:USERPROFILE\AppData\Local\Programs\gh\gh.exe"
2
+ $token = & $ghPath auth token
3
+ $env:GH_TOKEN = $token
4
+ Set-Location 'c:\Users\DiaTech\Projects\DocHub\development\dochub-app'
5
+ npx electron-builder --publish always '-c.publish.releaseType=release'
package/renovate.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "$schema": "https://docs.renovatebot.com/renovate-schema.json",
3
+ "extends": ["config:recommended"],
4
+ "packageRules": [
5
+ {
6
+ "matchPackageNames": ["docxmlater"],
7
+ "automerge": true,
8
+ "schedule": ["at any time"],
9
+ "groupName": "docxmlater"
10
+ },
11
+ {
12
+ "matchDepTypes": ["devDependencies"],
13
+ "excludePackageNames": ["electron", "better-sqlite3", "canvas"],
14
+ "groupName": "dev-dependencies",
15
+ "schedule": ["every weekend"],
16
+ "automerge": true
17
+ },
18
+ {
19
+ "matchPackageNames": ["better-sqlite3", "canvas"],
20
+ "groupName": "native-modules",
21
+ "automerge": false
22
+ },
23
+ {
24
+ "matchPackageNames": ["electron"],
25
+ "matchUpdateTypes": ["major"],
26
+ "automerge": false,
27
+ "labels": ["breaking-change"]
28
+ }
29
+ ]
30
+ }
package/src/App.tsx ADDED
@@ -0,0 +1,216 @@
1
+ import { createHashRouter, RouterProvider, Outlet } from 'react-router-dom';
2
+ import { ThemeProvider } from '@/contexts/ThemeContext';
3
+ import { SessionProvider } from '@/contexts/SessionContext';
4
+ import { UserSettingsProvider } from '@/contexts/UserSettingsContext';
5
+ import { GlobalStatsProvider } from '@/contexts/GlobalStatsContext';
6
+ import { TitleBar } from '@/components/layout/TitleBar';
7
+ import { Sidebar } from '@/components/layout/Sidebar';
8
+ import { Header } from '@/components/layout/Header';
9
+ import { CommandPalette } from '@/components/navigation/CommandPalette';
10
+ import { KeyboardShortcutsModal } from '@/components/navigation/KeyboardShortcutsModal';
11
+ import { TooltipProvider } from '@/components/common/Tooltip';
12
+ import { BugReportButton } from '@/components/common/BugReportButton';
13
+ import { UpdateNotification } from '@/components/common/UpdateNotification';
14
+ import { DebugConsole } from '@/components/common/DebugConsole';
15
+ import { ErrorBoundary } from '@/components/common/ErrorBoundary';
16
+ import { ContextErrorFallback } from '@/components/common/ErrorFallback';
17
+ import { SplashScreen } from '@/components/common/SplashScreen';
18
+ import { useState, lazy, Suspense, useEffect, useCallback } from 'react';
19
+ import { useGlobalStats } from '@/contexts/GlobalStatsContext';
20
+ import { useNavigate } from 'react-router-dom';
21
+
22
+ // Lazy load pages for code splitting and faster initial load
23
+ const Dashboard = lazy(() => import('@/pages/Dashboard').then((m) => ({ default: m.Dashboard })));
24
+ const Settings = lazy(() => import('@/pages/Settings').then((m) => ({ default: m.Settings })));
25
+ const CurrentSession = lazy(() =>
26
+ import('@/pages/CurrentSession').then((m) => ({ default: m.CurrentSession }))
27
+ );
28
+ const Sessions = lazy(() => import('@/pages/Sessions').then((m) => ({ default: m.Sessions })));
29
+ const Documents = lazy(() => import('@/pages/Documents').then((m) => ({ default: m.Documents })));
30
+ const Analytics = lazy(() => import('@/pages/Analytics').then((m) => ({ default: m.Analytics })));
31
+ const Reporting = lazy(() => import('@/pages/Reporting').then((m) => ({ default: m.Reporting })));
32
+ const Search = lazy(() => import('@/pages/Search').then((m) => ({ default: m.Search })));
33
+
34
+ // Loading fallback component
35
+ function PageLoader() {
36
+ return (
37
+ <div className="flex items-center justify-center h-full">
38
+ <div className="text-center">
39
+ <div className="animate-spin rounded-full h-12 w-12 border-b-2 border-primary mx-auto mb-4" />
40
+ <p className="text-muted-foreground">Loading...</p>
41
+ </div>
42
+ </div>
43
+ );
44
+ }
45
+
46
+ function EmptyPage({ title }: { title: string }) {
47
+ return (
48
+ <div className="flex items-center justify-center h-full">
49
+ <div className="text-center">
50
+ <h2 className="text-2xl font-bold mb-2">{title}</h2>
51
+ <p className="text-muted-foreground">This page is under construction</p>
52
+ </div>
53
+ </div>
54
+ );
55
+ }
56
+
57
+ function Layout() {
58
+ const [commandPaletteOpen, setCommandPaletteOpen] = useState(false);
59
+ const [shortcutsModalOpen, setShortcutsModalOpen] = useState(false);
60
+ const { isLoading } = useGlobalStats();
61
+ const [isInitialized, setIsInitialized] = useState(false);
62
+ const navigate = useNavigate();
63
+
64
+ // Global keyboard shortcuts
65
+ const handleKeyDown = useCallback((e: KeyboardEvent) => {
66
+ // Don't trigger shortcuts when typing in inputs
67
+ const target = e.target as HTMLElement;
68
+ if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable) {
69
+ return;
70
+ }
71
+
72
+ // ? - Show keyboard shortcuts
73
+ if (e.key === '?' && !e.ctrlKey && !e.metaKey) {
74
+ e.preventDefault();
75
+ setShortcutsModalOpen(true);
76
+ return;
77
+ }
78
+
79
+ const isMod = e.ctrlKey || e.metaKey;
80
+
81
+ // Mod+K - Command palette (handled elsewhere, but ensure consistency)
82
+ if (isMod && e.key === 'k') {
83
+ e.preventDefault();
84
+ setCommandPaletteOpen(true);
85
+ return;
86
+ }
87
+
88
+ // Navigation shortcuts
89
+ if (isMod && e.key >= '1' && e.key <= '4') {
90
+ e.preventDefault();
91
+ const routes = ['/', '/sessions', '/analytics', '/documents'];
92
+ const index = parseInt(e.key) - 1;
93
+ if (routes[index]) {
94
+ navigate(routes[index]);
95
+ }
96
+ return;
97
+ }
98
+
99
+ // Mod+, - Settings
100
+ if (isMod && e.key === ',') {
101
+ e.preventDefault();
102
+ navigate('/settings');
103
+ return;
104
+ }
105
+ }, [navigate]);
106
+
107
+ useEffect(() => {
108
+ window.addEventListener('keydown', handleKeyDown);
109
+ return () => window.removeEventListener('keydown', handleKeyDown);
110
+ }, [handleKeyDown]);
111
+
112
+ // Track initialization completion with slight delay for smooth transition
113
+ useEffect(() => {
114
+ if (!isLoading && !isInitialized) {
115
+ // Add 300ms delay to ensure smooth transition
116
+ const timer = setTimeout(() => {
117
+ setIsInitialized(true);
118
+ }, 300);
119
+ return () => clearTimeout(timer);
120
+ }
121
+ }, [isLoading, isInitialized]);
122
+
123
+ // Show splash screen during initialization
124
+ if (!isInitialized) {
125
+ return <SplashScreen message="Loading your workspace..." />;
126
+ }
127
+
128
+ return (
129
+ <div className="h-screen flex flex-col overflow-hidden bg-background">
130
+ <TitleBar />
131
+
132
+ <div className="flex-1 flex overflow-hidden">
133
+ <Sidebar />
134
+
135
+ <div className="flex-1 flex flex-col overflow-hidden">
136
+ <Header onCommandPalette={() => setCommandPaletteOpen(true)} />
137
+
138
+ <main className="flex-1 overflow-auto">
139
+ <Suspense fallback={<PageLoader />}>
140
+ <Outlet />
141
+ </Suspense>
142
+ </main>
143
+ </div>
144
+ </div>
145
+
146
+ <CommandPalette open={commandPaletteOpen} onOpenChange={setCommandPaletteOpen} />
147
+
148
+ <KeyboardShortcutsModal open={shortcutsModalOpen} onOpenChange={setShortcutsModalOpen} />
149
+
150
+ <BugReportButton />
151
+
152
+ <UpdateNotification />
153
+
154
+ <DebugConsole />
155
+ </div>
156
+ );
157
+ }
158
+
159
+ const router = createHashRouter(
160
+ [
161
+ {
162
+ path: '/',
163
+ element: <Layout />,
164
+ children: [
165
+ { index: true, element: <Dashboard /> },
166
+ { path: 'sessions', element: <Sessions /> },
167
+ { path: 'session/:id', element: <CurrentSession /> },
168
+ { path: 'analytics', element: <Analytics /> },
169
+ { path: 'team', element: <EmptyPage title="Team" /> },
170
+ { path: 'documents', element: <Documents /> },
171
+ { path: 'reporting', element: <Reporting /> },
172
+ { path: 'search', element: <Search /> },
173
+ { path: 'profile', element: <EmptyPage title="Profile" /> },
174
+ { path: 'settings', element: <Settings /> },
175
+ ],
176
+ },
177
+ ],
178
+ {
179
+ future: {
180
+ v7_startTransition: true,
181
+ v7_relativeSplatPath: true,
182
+ v7_fetcherPersist: true,
183
+ v7_normalizeFormMethod: true,
184
+ v7_partialHydration: true,
185
+ v7_skipActionErrorRevalidation: true,
186
+ },
187
+ }
188
+ );
189
+
190
+ function App() {
191
+ return (
192
+ <ErrorBoundary>
193
+ <ErrorBoundary fallback={<ContextErrorFallback context="theme" />}>
194
+ <ThemeProvider>
195
+ <ErrorBoundary fallback={<ContextErrorFallback context="settings" />}>
196
+ <UserSettingsProvider>
197
+ <ErrorBoundary fallback={<ContextErrorFallback context="stats" />}>
198
+ <GlobalStatsProvider>
199
+ <ErrorBoundary fallback={<ContextErrorFallback context="session" />}>
200
+ <SessionProvider>
201
+ <TooltipProvider>
202
+ <RouterProvider router={router} />
203
+ </TooltipProvider>
204
+ </SessionProvider>
205
+ </ErrorBoundary>
206
+ </GlobalStatsProvider>
207
+ </ErrorBoundary>
208
+ </UserSettingsProvider>
209
+ </ErrorBoundary>
210
+ </ThemeProvider>
211
+ </ErrorBoundary>
212
+ </ErrorBoundary>
213
+ );
214
+ }
215
+
216
+ export default App;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Mock for p-limit ESM module
3
+ * p-limit is used for concurrency control in batch processing
4
+ */
5
+ const pLimit = (concurrency) => {
6
+ // Return a simple wrapper that just executes the function
7
+ return (fn) => fn();
8
+ };
9
+
10
+ // Named export
11
+ module.exports = pLimit;
12
+ module.exports.default = pLimit;
@@ -0,0 +1 @@
1
+ module.exports = {};
@@ -0,0 +1,44 @@
1
+ import { cn } from '@/utils/cn';
2
+ import { motion } from 'framer-motion';
3
+ import { Bug } from 'lucide-react';
4
+ import { useState } from 'react';
5
+ import { BugReportDialog } from './BugReportDialog';
6
+
7
+ export function BugReportButton() {
8
+ const [isDialogOpen, setIsDialogOpen] = useState(false);
9
+
10
+ return (
11
+ <>
12
+ <BugReportDialog isOpen={isDialogOpen} onClose={() => setIsDialogOpen(false)} />
13
+
14
+ <motion.button
15
+ onClick={() => setIsDialogOpen(true)}
16
+ initial={{ scale: 0 }}
17
+ animate={{ scale: 1 }}
18
+ whileHover={{ scale: 1.1, rotate: 10 }}
19
+ whileTap={{ scale: 0.9 }}
20
+ className={cn(
21
+ 'fixed bottom-4 right-4 z-50',
22
+ 'w-10 h-10 rounded-full',
23
+ 'bg-linear-to-br from-red-500 to-orange-600',
24
+ 'shadow-lg hover:shadow-xl',
25
+ 'flex items-center justify-center',
26
+ 'group transition-all duration-200',
27
+ 'focus:outline-none focus-visible:ring-2 focus-visible:ring-ring'
28
+ )}
29
+ aria-label="Report a bug"
30
+ title="Report a bug"
31
+ >
32
+ <Bug className="w-5 h-5 text-white" />
33
+
34
+ <motion.div
35
+ className="absolute -top-8 right-0 px-2 py-1 bg-popover text-popover-foreground text-xs rounded shadow-md pointer-events-none opacity-0 group-hover:opacity-100 transition-opacity whitespace-nowrap"
36
+ initial={{ y: 10, opacity: 0 }}
37
+ whileHover={{ y: 0, opacity: 1 }}
38
+ >
39
+ Report a Bug
40
+ </motion.div>
41
+ </motion.button>
42
+ </>
43
+ );
44
+ }