@bytechain.cn/colamd 1.5.1-beta.2 → 1.5.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 (204) hide show
  1. package/CHANGELOG.md +194 -162
  2. package/README.md +148 -5
  3. package/README_CN.md +163 -13
  4. package/dist/lib/colamd-renderer.js +193804 -0
  5. package/dist/lib/colamd-renderer.js.map +1 -0
  6. package/dist/lib/colamd.css +1810 -0
  7. package/dist/lib/editor/editor.d.ts +27 -0
  8. package/dist/lib/editor/html-view.d.ts +2 -0
  9. package/dist/lib/editor/lib.d.ts +49 -0
  10. package/dist/lib/editor/plugins/index.d.ts +56 -0
  11. package/dist/lib/editor/plugins/lib-entry.d.ts +10 -0
  12. package/dist/lib/editor/plugins/math-plugin.d.ts +9 -0
  13. package/dist/lib/editor/plugins/mermaid-plugin.d.ts +19 -0
  14. package/dist/lib/editor/plugins/themes/theme-manager.d.ts +30 -0
  15. package/dist/main/index.js +107 -37
  16. package/dist/preload/index.js +3 -2
  17. package/dist/renderer/assets/{arc-CPdeInCG.js → arc-CpIo2PoE.js} +1 -1
  18. package/dist/renderer/assets/{architectureDiagram-3BPJPVTR-BAbnaR9G.js → architectureDiagram-3BPJPVTR-T-4Cq0Bz.js} +2 -2
  19. package/dist/renderer/assets/{blockDiagram-GPEHLZMM-CYSWjnJg.js → blockDiagram-GPEHLZMM-C-SuR6eu.js} +4 -4
  20. package/dist/renderer/assets/{c4Diagram-AAUBKEIU-Rb1tstnr.js → c4Diagram-AAUBKEIU-PJp81cGm.js} +2 -2
  21. package/dist/renderer/assets/{channel-DpG2A6fE.js → channel-CtIHaaRI.js} +1 -1
  22. package/dist/renderer/assets/{chunk-2J33WTMH-DFc0Jxy_.js → chunk-2J33WTMH-BrchfQL6.js} +1 -1
  23. package/dist/renderer/assets/{chunk-4BX2VUAB-BhRxDTNn.js → chunk-4BX2VUAB-BCc3Ev_H.js} +1 -1
  24. package/dist/renderer/assets/{chunk-55IACEB6-DEgMVBk8.js → chunk-55IACEB6-B2M27HQo.js} +1 -1
  25. package/dist/renderer/assets/{chunk-727SXJPM-bjBIfiz8.js → chunk-727SXJPM-DXDHGECs.js} +5 -5
  26. package/dist/renderer/assets/{chunk-AQP2D5EJ-DwQMzTzD.js → chunk-AQP2D5EJ-BNb1lOQY.js} +3 -3
  27. package/dist/renderer/assets/{chunk-FMBD7UC4-CkphwJzs.js → chunk-FMBD7UC4-CzgfEH2z.js} +1 -1
  28. package/dist/renderer/assets/{chunk-ND2GUHAM-oU09z4y4.js → chunk-ND2GUHAM-BUFT_yOe.js} +1 -1
  29. package/dist/renderer/assets/{chunk-QZHKN3VN-rCbVuPBn.js → chunk-QZHKN3VN-C-zV7oBi.js} +1 -1
  30. package/dist/renderer/assets/{classDiagram-v2-Q7XG4LA2-DGS2faoM.js → classDiagram-4FO5ZUOK-CAyhGSvf.js} +6 -6
  31. package/dist/renderer/assets/{classDiagram-4FO5ZUOK-DGS2faoM.js → classDiagram-v2-Q7XG4LA2-CAyhGSvf.js} +6 -6
  32. package/dist/renderer/assets/{cose-bilkent-S5V4N54A-iqY6-EwA.js → cose-bilkent-S5V4N54A-ldu81kCk.js} +1 -1
  33. package/dist/renderer/assets/{dagre-BM42HDAG-5t3X5sDa.js → dagre-BM42HDAG-NJgy8CTw.js} +3 -3
  34. package/dist/renderer/assets/{diagram-2AECGRRQ-DzHiYDPh.js → diagram-2AECGRRQ-CuIcMpOn.js} +2 -2
  35. package/dist/renderer/assets/{diagram-5GNKFQAL-BiNv6Keq.js → diagram-5GNKFQAL-BJwFCroB.js} +3 -3
  36. package/dist/renderer/assets/{diagram-KO2AKTUF-ClzeDG6f.js → diagram-KO2AKTUF-C7NgQ8ju.js} +2 -2
  37. package/dist/renderer/assets/{diagram-LMA3HP47-CGkw7wII.js → diagram-LMA3HP47-B71v6MOq.js} +2 -2
  38. package/dist/renderer/assets/{diagram-OG6HWLK6-Dl-Hyk1_.js → diagram-OG6HWLK6-D2ZxkrSe.js} +3 -3
  39. package/dist/renderer/assets/{erDiagram-TEJ5UH35-BxUN79Qb.js → erDiagram-TEJ5UH35-4ToW0p3h.js} +4 -4
  40. package/dist/renderer/assets/{flowDiagram-I6XJVG4X-CzFk-KNI.js → flowDiagram-I6XJVG4X-DBkZLqwn.js} +6 -6
  41. package/dist/renderer/assets/{ganttDiagram-6RSMTGT7-C2xl6Igx.js → ganttDiagram-6RSMTGT7-G3xD2VXj.js} +2 -2
  42. package/dist/renderer/assets/{gitGraphDiagram-PVQCEYII-_fn7XCa7.js → gitGraphDiagram-PVQCEYII-BcTNiFfg.js} +3 -3
  43. package/dist/renderer/assets/{graph-CDoHYrHm.js → graph--Vhl4p4D.js} +1 -1
  44. package/dist/renderer/assets/{index-DAlXyxzt.js → index-C63bU7CF.js} +693 -162
  45. package/dist/renderer/assets/{index-CeFpoCKV.css → index-D8nA981z.css} +17 -6
  46. package/dist/renderer/assets/{infoDiagram-5YYISTIA-DL6XIxLz.js → infoDiagram-5YYISTIA-DjKa7Yv-.js} +1 -1
  47. package/dist/renderer/assets/{ishikawaDiagram-YF4QCWOH-BUZLjRo-.js → ishikawaDiagram-YF4QCWOH-xIWzW1pL.js} +1 -1
  48. package/dist/renderer/assets/{journeyDiagram-JHISSGLW-C4rH_mQM.js → journeyDiagram-JHISSGLW-DxMBkVOF.js} +4 -4
  49. package/dist/renderer/assets/{kanban-definition-UN3LZRKU-DRbrBcWV.js → kanban-definition-UN3LZRKU-DqJeL6E1.js} +2 -2
  50. package/dist/renderer/assets/{layout-DZl4n4qu.js → layout-B3giiMoK.js} +2 -2
  51. package/dist/renderer/assets/{linear-B0Krxg21.js → linear-Cqh3vVIf.js} +1 -1
  52. package/dist/renderer/assets/{mindmap-definition-RKZ34NQL-DdmPsWrn.js → mindmap-definition-RKZ34NQL-DUay02ma.js} +3 -3
  53. package/dist/renderer/assets/{pieDiagram-4H26LBE5-BPZLqwG0.js → pieDiagram-4H26LBE5-CVcfLtky.js} +3 -3
  54. package/dist/renderer/assets/{quadrantDiagram-W4KKPZXB-Dr-oWRk9.js → quadrantDiagram-W4KKPZXB-wDHffPOs.js} +2 -2
  55. package/dist/renderer/assets/{requirementDiagram-4Y6WPE33-B6QZd0lo.js → requirementDiagram-4Y6WPE33-C4pgGDGv.js} +3 -3
  56. package/dist/renderer/assets/{sankeyDiagram-5OEKKPKP-Cyl9ojEt.js → sankeyDiagram-5OEKKPKP-Jsf0rRMo.js} +1 -1
  57. package/dist/renderer/assets/{sequenceDiagram-3UESZ5HK-D48Yr9T6.js → sequenceDiagram-3UESZ5HK-e6QS7gt8.js} +3 -3
  58. package/dist/renderer/assets/{stateDiagram-AJRCARHV-qyb8ETsa.js → stateDiagram-AJRCARHV-DgYKZzDq.js} +6 -6
  59. package/dist/renderer/assets/{stateDiagram-v2-BHNVJYJU-DmDOyyrJ.js → stateDiagram-v2-BHNVJYJU-CUdmd_50.js} +4 -4
  60. package/dist/renderer/assets/{timeline-definition-PNZ67QCA-C-KQxTi1.js → timeline-definition-PNZ67QCA-S12e1Mp_.js} +2 -2
  61. package/dist/renderer/assets/{vennDiagram-CIIHVFJN-BdaZlnH-.js → vennDiagram-CIIHVFJN-CNDBG6A2.js} +1 -1
  62. package/dist/renderer/assets/{wardleyDiagram-YWT4CUSO-B2hBE-EE.js → wardleyDiagram-YWT4CUSO-CLlGQcof.js} +2 -2
  63. package/dist/renderer/assets/{xychartDiagram-2RQKCTM6-CSvswDTY.js → xychartDiagram-2RQKCTM6-CUtsHUQd.js} +2 -2
  64. package/dist/renderer/index.html +6 -2
  65. package/package.json +25 -1
  66. package/themes/README.md +18 -1
  67. package/themes/academic-paper-pt.css +1321 -0
  68. package/themes/academic-paper.css +192 -97
  69. package/.github/workflows/release.yml +0 -66
  70. package/.trae/specs/optimize-theme-loading/checklist.md +0 -20
  71. package/.trae/specs/optimize-theme-loading/spec.md +0 -103
  72. package/.trae/specs/optimize-theme-loading/tasks.md +0 -40
  73. package/CLAUDE.md +0 -143
  74. package/android/app/build/.npmkeep +0 -0
  75. package/android/app/build.gradle +0 -76
  76. package/android/app/capacitor.build.gradle +0 -24
  77. package/android/app/proguard-rules.pro +0 -21
  78. package/android/app/release.keystore +0 -0
  79. package/android/app/src/androidTest/java/com/getcapacitor/myapp/ExampleInstrumentedTest.java +0 -26
  80. package/android/app/src/main/AndroidManifest.xml +0 -64
  81. package/android/app/src/main/java/cn/bytechain/colamd/MainActivity.java +0 -180
  82. package/android/app/src/main/res/drawable/ic_launcher_background.xml +0 -170
  83. package/android/app/src/main/res/drawable/splash.png +0 -0
  84. package/android/app/src/main/res/drawable-land-hdpi/splash.png +0 -0
  85. package/android/app/src/main/res/drawable-land-mdpi/splash.png +0 -0
  86. package/android/app/src/main/res/drawable-land-xhdpi/splash.png +0 -0
  87. package/android/app/src/main/res/drawable-land-xxhdpi/splash.png +0 -0
  88. package/android/app/src/main/res/drawable-land-xxxhdpi/splash.png +0 -0
  89. package/android/app/src/main/res/drawable-port-hdpi/splash.png +0 -0
  90. package/android/app/src/main/res/drawable-port-mdpi/splash.png +0 -0
  91. package/android/app/src/main/res/drawable-port-xhdpi/splash.png +0 -0
  92. package/android/app/src/main/res/drawable-port-xxhdpi/splash.png +0 -0
  93. package/android/app/src/main/res/drawable-port-xxxhdpi/splash.png +0 -0
  94. package/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml +0 -34
  95. package/android/app/src/main/res/layout/activity_main.xml +0 -12
  96. package/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +0 -5
  97. package/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +0 -5
  98. package/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  99. package/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png +0 -0
  100. package/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  101. package/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  102. package/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png +0 -0
  103. package/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  104. package/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  105. package/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png +0 -0
  106. package/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  107. package/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  108. package/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png +0 -0
  109. package/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  110. package/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  111. package/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png +0 -0
  112. package/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  113. package/android/app/src/main/res/values/ic_launcher_background.xml +0 -4
  114. package/android/app/src/main/res/values/strings.xml +0 -7
  115. package/android/app/src/main/res/values/styles.xml +0 -22
  116. package/android/app/src/main/res/xml/file_paths.xml +0 -5
  117. package/android/app/src/main/res/xml/network_security_config.xml +0 -8
  118. package/android/app/src/test/java/com/getcapacitor/myapp/ExampleUnitTest.java +0 -18
  119. package/android/build.gradle +0 -29
  120. package/android/capacitor.settings.gradle +0 -21
  121. package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  122. package/android/gradle/wrapper/gradle-wrapper.properties +0 -7
  123. package/android/gradle.properties +0 -22
  124. package/android/gradlew +0 -248
  125. package/android/gradlew.bat +0 -92
  126. package/android/settings.gradle +0 -5
  127. package/android/variables.gradle +0 -16
  128. package/bytechain.cn-colamd-1.5.1-beta.2.tgz +0 -0
  129. package/capacitor.config.js +0 -29
  130. package/capacitor.config.ts +0 -30
  131. package/demo.md +0 -193
  132. package/docs/academic-demo.md +0 -566
  133. package/docs/agent-diff-view.md +0 -48
  134. package/docs/demo.html +0 -748
  135. package/docs/demo.md +0 -546
  136. package/docs/demo.pdf +0 -0
  137. package/docs/theme-paradigm.md +0 -658
  138. package/electron-builder.yml +0 -64
  139. package/electron.vite.config.js +0 -31
  140. package/electron.vite.config.ts +0 -30
  141. package/ios/App/App/AppDelegate.swift +0 -49
  142. package/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png +0 -0
  143. package/ios/App/App/Assets.xcassets/AppIcon.appiconset/Contents.json +0 -14
  144. package/ios/App/App/Assets.xcassets/Contents.json +0 -6
  145. package/ios/App/App/Assets.xcassets/Splash.imageset/Contents.json +0 -23
  146. package/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-1.png +0 -0
  147. package/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-2.png +0 -0
  148. package/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732.png +0 -0
  149. package/ios/App/App/Base.lproj/LaunchScreen.storyboard +0 -32
  150. package/ios/App/App/Base.lproj/Main.storyboard +0 -19
  151. package/ios/App/App/Info.plist +0 -49
  152. package/ios/App/App.xcodeproj/project.pbxproj +0 -408
  153. package/ios/App/App.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  154. package/ios/App/Podfile +0 -28
  155. package/resources/entitlements.mac.plist +0 -12
  156. package/resources/icon.icns +0 -0
  157. package/resources/icon.png +0 -0
  158. package/resources/icon.svg +0 -23
  159. package/resources/templates/slides/icon.png +0 -0
  160. package/resources/templates/slides/slides-template.md +0 -74
  161. package/resources/templates/slides/template-forest-ink.html +0 -540
  162. package/resources/templates/slides/template.html +0 -535
  163. package/scripts/afterPack.js +0 -13
  164. package/scripts/generate-icons.js +0 -102
  165. package/src/main/index.ts +0 -905
  166. package/src/preload/index.d.ts +0 -51
  167. package/src/preload/index.js +0 -70
  168. package/src/preload/index.ts +0 -110
  169. package/src/renderer/capacitor-api.ts +0 -713
  170. package/src/renderer/editor/editor.ts +0 -287
  171. package/src/renderer/editor/html-view.ts +0 -15
  172. package/src/renderer/editor/plugins/index.ts +0 -68
  173. package/src/renderer/editor/plugins/math-plugin.ts +0 -297
  174. package/src/renderer/editor/plugins/mermaid-plugin-custom.css +0 -46
  175. package/src/renderer/editor/plugins/mermaid-plugin-dark.css +0 -428
  176. package/src/renderer/editor/plugins/mermaid-plugin-elegant.css +0 -443
  177. package/src/renderer/editor/plugins/mermaid-plugin-newsprint.css +0 -208
  178. package/src/renderer/editor/plugins/mermaid-plugin.css +0 -111
  179. package/src/renderer/editor/plugins/mermaid-plugin.ts +0 -670
  180. package/src/renderer/editor/plugins/themes/base/dark.css +0 -23
  181. package/src/renderer/editor/plugins/themes/base/elegant.css +0 -32
  182. package/src/renderer/editor/plugins/themes/base/light.css +0 -20
  183. package/src/renderer/editor/plugins/themes/base/newsprint.css +0 -27
  184. package/src/renderer/editor/plugins/themes/base.css +0 -509
  185. package/src/renderer/editor/plugins/themes/components/mermaid/academic.css +0 -43
  186. package/src/renderer/editor/plugins/themes/components/mermaid/dark.css +0 -20
  187. package/src/renderer/editor/plugins/themes/components/mermaid/elegant.css +0 -24
  188. package/src/renderer/editor/plugins/themes/components/mermaid/light.css +0 -21
  189. package/src/renderer/editor/plugins/themes/components/mermaid/newsprint.css +0 -26
  190. package/src/renderer/editor/plugins/themes/components/mermaid/variables.css +0 -592
  191. package/src/renderer/editor/plugins/themes/foundation.css +0 -143
  192. package/src/renderer/editor/plugins/themes/theme-manager.ts +0 -92
  193. package/src/renderer/env.d.ts +0 -10
  194. package/src/renderer/index.html +0 -76
  195. package/src/renderer/main.ts +0 -678
  196. package/src/renderer/mobile.css +0 -429
  197. package/tsconfig.json +0 -14
  198. package/tsconfig.main.json +0 -12
  199. package/tsconfig.main.tsbuildinfo +0 -1
  200. package/tsconfig.preload.json +0 -12
  201. package/tsconfig.preload.tsbuildinfo +0 -1
  202. package/tsconfig.renderer.json +0 -13
  203. package/tsconfig.renderer.tsbuildinfo +0 -1
  204. package/tsconfig.tsbuildinfo +0 -1
package/CHANGELOG.md CHANGED
@@ -5,6 +5,199 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [Unreleased]
9
+
10
+ ---
11
+
12
+ ## [1.5.2] - 2026-05-28
13
+
14
+ ### Added
15
+
16
+ #### Internationalization (i18n) System
17
+ - **Complete i18n architecture** ([`src/renderer/i18n/index.ts`](src/renderer/i18n/index.ts), [`src/main/i18n.ts`](src/main/i18n.ts)):
18
+ - Added multi-language support for English (`en`) and Simplified Chinese (`zh-CN`)
19
+ - Auto-detect system language at startup (Electron `app.getLocale()` / browser `navigator.language`)
20
+ - Language preference persistence via `localStorage`
21
+ - Dynamic locale switching with real-time UI updates
22
+
23
+ #### Desktop Menu Internationalization
24
+ - **Electron menu i18n** ([`src/main/index.ts`](src/main/index.ts)):
25
+ - All menu items now use `i18n.t()` for dynamic translation (File, Edit, View, Theme, Help menus)
26
+ - Fixed `role`-based menu items to show localized labels by explicitly adding `label` property
27
+ - Supported menus: File, Edit (Undo/Redo/Cut/Copy/Paste/SelectAll), View (Zoom/Fullscreen), Theme, Help
28
+ - Custom theme names remain unchanged (no internationalization)
29
+ - IPC channel `set-locale` added for runtime menu language synchronization from renderer process
30
+
31
+ #### Mobile Menu Internationalization
32
+ - **Capacitor mobile menu i18n** ([`src/renderer/main.ts`](src/renderer/main.ts), [`src/renderer/index.html`](src/renderer/index.html)):
33
+ - Complete sidebar menu localization with `updateMobileMenuI18n()` function
34
+ - Added Language selector section with one-click switching between English and Chinese
35
+ - Toast messages localized (Saved, Save failed, etc.)
36
+ - Theme list and plugin list dynamically updated on language change
37
+ - Language change listener triggers full UI refresh without page reload
38
+
39
+ #### IPC Bridge for Locale Sync
40
+ - **Cross-process locale synchronization** ([`src/preload/index.ts`](src/preload/index.ts)):
41
+ - Exposed `setLocale()` API in ElectronAPI interface
42
+ - Main process handler rebuilds menu when locale changes
43
+ - Capacitor bridge includes compatible `setLocale()` method for mobile platform
44
+
45
+ ### Changed
46
+
47
+ #### PDF Export & Plugin System
48
+ - **Refactored PDF export pipeline** ([`src/renderer/main.ts`](src/renderer/main.ts), [`src/main/index.ts`](src/main/index.ts)):
49
+ - Support for custom print styles with simplified base print CSS
50
+ - Refactored `buildExportHTML` function to auto-extract current theme styles
51
+ - Added auto-injection of custom theme print styles
52
+ - Streamlined export HTML template, removed hardcoded plugin styles in favor of plugin-injected styles
53
+
54
+ #### Plugin Style Management
55
+ - **Unified plugin style management** ([`src/renderer/editor/plugins/index.ts`](src/renderer/editor/plugins/index.ts), [`src/renderer/editor/plugins/math-plugin.ts`](src/renderer/editor/plugins/math-plugin.ts), [`src/renderer/editor/plugins/mermaid-plugin.ts`](src/renderer/editor/plugins/mermaid-plugin.ts)):
56
+ - Added unified configuration fields (clipboard styles, export styles) for Math and Mermaid plugins
57
+ - Replaced hardcoded style handling logic with dynamic retrieval from plugin configuration
58
+ - Optimized error recovery logic to dynamically skip failing plugins instead of hard-excluding math plugin
59
+
60
+ #### Theme System
61
+ - **Fixed custom theme export issues** ([`src/renderer/editor/plugins/themes/theme-manager.ts`](src/renderer/editor/plugins/themes/theme-manager.ts)):
62
+ - Fixed custom theme print CSS extraction logic to avoid Chromium CSSOM serialization issues
63
+ - **Rendering output optimization** ([`src/renderer/editor/editor.ts`](src/renderer/editor/editor.ts), [`src/renderer/main.ts`](src/renderer/main.ts)):
64
+ - Wrapped `getLiveHTML` return content in a div with id "write"
65
+ - Only render base element styles when not using custom themes
66
+
67
+ #### Mobile Platform
68
+ - **Fixed mobile media query** ([`src/renderer/mobile.css`](src/renderer/mobile.css)):
69
+ - Fixed missing screen type in media queries
70
+
71
+ ### Removed
72
+ - Removed outdated PDF font compensation document ([`docs/PDF_FONT_COMPENSATION.md`](docs/PDF_FONT_COMPENSATION.md))
73
+
74
+ ---
75
+
76
+ ## [1.5.1] - 2026-05-23
77
+
78
+ ### Added
79
+
80
+ #### Themes
81
+ - **Academic Paper theme** ([`themes/academic-paper.css`](themes/academic-paper.css)) — Academic paper theme strictly following GB/T 7713 national standard specifications, including three-line tables, SimHei/SimSun typography, multi-level headings, figure/table caption standards
82
+ - **Swiss Design theme** ([`themes/swiss-design.css`](themes/swiss-design.css)) 🇨🇭 — Swiss International Typographic Style: black-white-red color system, geometric sans-serif fonts, grid-based layout, white-on-black table headers
83
+ - **Pixso Design theme** ([`themes/pixso-design.css`](themes/pixso-design.css)) — Pixso design specification theme
84
+ - **Forest Ink theme** ([`themes/forest-ink.css`](themes/forest-ink.css)) — Forest ink style theme
85
+ - **Standardized template** ([`themes/template.css`](themes/template.css)) — Reference implementation template following v3.0 paradigm: variable-based + modular + print fidelity
86
+
87
+ #### Theme Development Framework
88
+ - **Theme paradigm document** ([`docs/theme-paradigm.md`](docs/theme-paradigm.md)) — Complete CSS theme development specification (v3.2):
89
+ - Design principles: variable-driven, modular, semantic naming, AI-agent derivable
90
+ - Design specifications: 30+ verifiable rules (MUST / MUST NOT / SHOULD) including WCAG contrast formula
91
+ - Print fidelity specifications: variable re-declaration, required element coverage list (12 categories), Chromium print constraints
92
+ - px unit unification standard (9.x): prohibits pt/rem mixing to ensure consistent PDF export font sizes
93
+
94
+ #### Platform Support
95
+ - **Android platform**: Capacitor 6 integration, native APK build, file picker, mobile-adapted styles ([`mobile.css`](src/renderer/mobile.css))
96
+ - **iOS platform**: Capacitor 6 integration, native IPA build
97
+ - **Dual-platform bridge**: Runtime auto-detection of Electron/Capacitor API (`capacitor-api.ts`)
98
+
99
+ #### Documentation & Demo
100
+ - **Academic paper demo document** ([`docs/academic-demo.md`](docs/academic-demo.md)) — Wanhua ecosystem research report with 8 Mermaid diagram groups
101
+ - **Inline SVG guide** ([`docs/demo.html`](docs/demo.html)) — Best practices demonstration for embedding SVG in Markdown
102
+ - **General demo document** ([`docs/demo.md`](docs/demo.md)) — Full feature showcase
103
+
104
+ ### Changed
105
+
106
+ #### Theme System Architecture
107
+ - **Modular refactoring**: Theme system split into `foundation.css` + `base/` built-in themes + `components/mermaid/` Mermaid variable mapping + user theme directory
108
+ - **Mermaid variable system**: 20 core CSS variables (`--mermaid-*`) auto-mapped to 22 chart type SVG selectors
109
+ - **Academic paper theme refactoring**: Section 14 hardcoded color values all refactored to `var()` variable references; all `pt` units replaced with `px` even integers
110
+
111
+ #### PDF Export & Plugin System (Post-release)
112
+ - **Refactored PDF export pipeline** ([`src/renderer/main.ts`](src/renderer/main.ts), [`src/main/index.ts`](src/main/index.ts)):
113
+ - Support for custom print styles with simplified base print CSS
114
+ - Refactored `buildExportHTML` function to auto-extract current theme styles and inject into export HTML
115
+ - Streamlined export HTML template, removed hardcoded plugin styles in favor of plugin-injected styles
116
+ - **Unified plugin style management** ([`src/renderer/editor/plugins/index.ts`](src/renderer/editor/plugins/index.ts), [`src/renderer/editor/plugins/math-plugin.ts`](src/renderer/editor/plugins/math-plugin.ts), [`src/renderer/editor/plugins/mermaid-plugin.ts`](src/renderer/editor/plugins/mermaid-plugin.ts)):
117
+ - Added unified configuration fields (clipboard styles, export styles) for Math and Mermaid plugins
118
+ - Replaced hardcoded style handling logic with dynamic retrieval from plugin configuration
119
+ - Optimized error recovery logic to dynamically skip failing plugins instead of hard-excluding math plugin
120
+
121
+ #### Editor Core & Rendering
122
+ - Removed debug auto-open developer tools code
123
+ - Optimized academic paper theme styles
124
+ - **Rendering output optimization** ([`src/renderer/editor/editor.ts`](src/renderer/editor/editor.ts), [`src/renderer/main.ts`](src/renderer/main.ts)):
125
+ - Wrapped `getLiveHTML` return content in a div with id "write"
126
+ - Only render base element styles when not using custom themes
127
+
128
+ ### Fixed
129
+
130
+ #### TypeScript Type System (beta.2)
131
+ - **Fixed 15 TypeScript type errors**:
132
+ - [`capacitor-api.ts`](src/renderer/capacitor-api.ts): Fixed `string | null` type assignment error
133
+ - [`editor.ts`](src/renderer/editor/editor.ts): Fixed `remarkPluginsCtx` type mismatch and `rootEl` null check
134
+ - [`math-plugin.ts`](src/renderer/editor/plugins/math-plugin.ts): Fixed `$NodeSchema` type compatibility with `$view` function
135
+ - [`mermaid-plugin.ts`](src/renderer/editor/plugins/mermaid-plugin.ts): Fixed Mermaid theme type and `$NodeSchema` type issues
136
+ - [`main.ts`](src/renderer/main.ts): Added Vite client types reference for `import.meta.glob`
137
+ - [`main/index.ts`](src/main/index.ts): Removed invalid `fs.createServer` import and `PrintToPDFOptions.marginType`
138
+ - **TypeScript project configuration update**: Added `"composite": true` to all project configurations for proper project references
139
+ - [`tsconfig.main.json`](tsconfig.main.json)
140
+ - [`tsconfig.preload.json`](tsconfig.preload.json)
141
+ - [`tsconfig.renderer.json`](tsconfig.renderer.json)
142
+
143
+ #### Mermaid Diagram Rendering
144
+ - **Fixed text offset and border issues** (elegant + academic-paper themes):
145
+ - Fixed Mermaid text offset problem
146
+ - Fixed variable name mismatch issue
147
+ - Fixed double border display issue
148
+ - **Mermaid theme system refactoring**:
149
+ - Adjusted to Guizang warm color palette (cream background + brown tones)
150
+ - Font size adjusted to 10.5pt for academic printing compatibility
151
+ - Added Typora compatible selectors (`.md-diagram-panel`)
152
+ - Added mobile responsive adaptation
153
+ - Unified text color and border styles
154
+
155
+ #### Theme Print Fidelity
156
+ - **Fixed missing print style mirrors**: Completed `@media print` screen attribute mirrors for template CSS and Swiss Design CSS
157
+ - Covered attributes include: font size, line height, font family, borders, spacing, letter spacing, etc.
158
+ - Ensured consistency between screen preview and PDF export
159
+ - **Fixed custom theme export issues** ([`theme-manager.ts`](src/renderer/editor/plugins/themes/theme-manager.ts)):
160
+ - Fixed custom theme print CSS extraction logic to avoid Chromium CSSOM serialization issues
161
+ - Added auto-injection of custom theme print styles
162
+
163
+ #### Android Platform (beta.1)
164
+ - **Chinese IME (Input Method Editor) fix**:
165
+ - Removed `e.preventDefault()` in `beforeinput` event to resolve CJK input method issues
166
+ - Enhanced ProseMirror editor IME composition event handling
167
+ - Used `-webkit-user-modify: read-write-plaintext-only` to improve input experience
168
+ - **Intent file open fix**:
169
+ - Added `Intent.ACTION_VIEW` handling in `MainActivity`
170
+ - Supported `onNewIntent` for opening new files when app is already running
171
+ - Passed file content to WebView via JavaScript events
172
+ - **PDF export fix**:
173
+ - Replaced Capacitor Plugin bridge with `JavascriptInterface`
174
+ - Added `ColaMDNativeBridge` class to call Android native `PrintManager`
175
+ - Added "Save as PDF" option
176
+ - Fixed pagination, save button, Mermaid version, and layer residue issues
177
+
178
+ #### Export Functionality Improvements
179
+ - **PDF/HTML export optimization**:
180
+ - Refactored Mermaid rendering logic with export sync wait mechanism
181
+ - Supported real-time rendered content export
182
+ - Fixed default filename logic
183
+ - **File manager open mechanism**:
184
+ - Adopted pull model: JS actively calls Java `checkPendingFile()` to query
185
+ - Eliminated JS event injection timing issues
186
+ - Added init detection + setInterval polling for dual guarantee
187
+
188
+ #### Mobile Adaptation
189
+ - **Fixed missing media query type** ([`mobile.css`](src/renderer/mobile.css)):
190
+ - Fixed missing screen type in media queries
191
+
192
+ #### Plugin System
193
+ - **Plugin import fixes and package version updates**
194
+ - **Decoupled plugin system**: Reduced main.ts dependency on specific plugins
195
+
196
+ ### Removed
197
+ - Removed outdated PDF font compensation document ([`docs/PDF_FONT_COMPENSATION.md`](docs/PDF_FONT_COMPENSATION.md))
198
+
199
+ ---
200
+
8
201
  ## [1.5.1-beta.2] - 2026-05-22
9
202
 
10
203
  ### Fixed
@@ -149,89 +342,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
149
342
  | @capawesome/capacitor-file-picker | ^6.2.0 | Android file picker plugin |
150
343
  | sharp | ^0.34.5 | Icon generation tool |
151
344
 
152
- ---
153
-
154
- ## [1.5.1] - 2026-05-18
155
-
156
- ### Added
157
-
158
- #### Capacitor 6 — Mobile Platform Support (Cross-Platform Extension)
159
- - **Capacitor 6 integration** for building native Android (.apk) and iOS (.ipa) apps
160
- - **Platform bridge layer** ([`capacitor-api.ts`](src/renderer/capacitor-api.ts)): Full replacement of Electron IPC with Capacitor native plugins
161
- - Filesystem plugin for file read/write on mobile devices
162
- - Share plugin for content sharing and export
163
- - App plugin for lifecycle management and deep linking
164
- - Status bar plugin for mobile UI integration
165
- - Haptics plugin for tactile feedback support
166
- - **Auto-detection runtime**: `window.electronAPI || createCapacitorAPI()` — seamless switching between desktop (Electron) and mobile (Capacitor) environments
167
- - **Mobile responsive UI** ([`mobile.css`](src/renderer/mobile.css)):
168
- - Touch-optimized interactions with `-webkit-tap-highlight-color: transparent`
169
- - Safe area insets support (`env(safe-area-inset-*)`) for notched devices
170
- - Responsive breakpoints: 768px (tablet), 480px (phone)
171
- - Optimized font sizes, padding, and scroll behavior for mobile screens
172
- - Context menu adaptation for touch interfaces
173
-
174
- #### Android Platform Configuration
175
- - Android project initialized at [`android/`](android/) with Gradle build system
176
- - **File association**: Registered `.md` / `.markdown` file handlers in `AndroidManifest.xml`
177
- - **Storage permissions**: `READ_EXTERNAL_STORAGE`, `WRITE_EXTERNAL_STORAGE`, `MANAGE_EXTERNAL_STORAGE`
178
- - **Network security config**: Cleartext traffic allowed for local development
179
- - **Soft input mode**: `adjustResize` for proper keyboard handling in editor
180
- - **5 Capacitor plugins auto-detected**: @capacitor/app, filesystem, haptics, share, status-bar
181
-
182
- #### iOS Platform Configuration
183
- - Xcode project initialized at [`ios/`](ios/) with CocoaPods dependency management
184
- - Requires Xcode + CocoaPods for full build (pod install)
185
- - Web assets synced to `ios/App/App/public/`
186
-
187
- #### Build Scripts & Workflow
188
- - New npm scripts for Capacitor development workflow:
189
-
190
- | Script | Purpose |
191
- |--------|---------|
192
- | `npm run cap:sync` | Sync web assets to native platforms |
193
- | `npm run cap:open:android` | Open in Android Studio |
194
- | `npm run cap:open:ios` | Open in Xcode |
195
- | `npm run cap:run:android` | Build → Sync → Run on Android device/emulator |
196
- | `npm run cap:run:ios` | Build → Sync → Run on iOS simulator |
197
- | `npm run cap:build:android` | Build debug APK |
198
- | `npm run cap:build:ios` | Build iOS project |
199
-
200
- #### Dual-Platform Architecture
201
- ```
202
- ┌─────────────────────────────────────┐
203
- │ src/renderer/main.ts │
204
- │ api = electronAPI || capacitorAPI │ ← Auto-detect platform
205
- ├──────────────┬──────────────────────┤
206
- │ Electron │ Capacitor 6 │
207
- │ (Desktop) │ (Mobile) │
208
- │ │ │
209
- │ IPC comm │ Filesystem Plugin │
210
- │ dialog │ Share Plugin │
211
- │ shell.open │ App Plugin │
212
- │ fs module │ localStorage storage │
213
- └──────────────┴──────────────────────┘
214
- ```
215
-
216
- ### Changed
217
- - Updated [`editor.ts`](src/renderer/editor/editor.ts): Added fallback `window.capacitorAPI?.openExternal()` for link handling on mobile
218
- - Updated [`env.d.ts`](src/renderer/env.d.ts): Extended type declarations to include `window.capacitorAPI`
219
- - Package version bumped to **1.5.1**
220
-
221
- ### Dependencies
222
-
223
- | Package | Version | Purpose |
224
- |---------|---------|---------|
225
- | @capacitor/core | ^6.2.1 | Capacitor core runtime |
226
- | @capacitor/cli | ^6.2.1 | Capacitor CLI tools |
227
- | @capacitor/android | ^6.2.1 | Android native bridge |
228
- | @capacitor/ios | ^6.2.1 | iOS native bridge |
229
- | @capacitor/filesystem | ^6.0.4 | Mobile file I/O |
230
- | @capacitor/share | ^6.0.4 | Native sharing |
231
- | @capacitor/app | ^6.0.3 | App lifecycle |
232
- | @capacitor/haptics | ^6.0.3 | Tactile feedback |
233
- | @capacitor/status-bar | ^6.0.3 | Status bar control |
234
-
235
345
  ## [1.5.0] - 2026-05-18
236
346
 
237
347
  ### Added
@@ -242,82 +352,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
242
352
  - **Plug** menu in menu bar for unified plugin render control
243
353
 
244
354
  #### Math Plugin (KaTeX Integration)
245
- - Add KaTeX rendering engine for LaTeX math equation support
246
- - **Inline equations** (`$...$`): embedded within paragraphs, e.g., $E = mc^2$
247
- - **Block equations** (`$$...$$`): centered display with support for complex expressions (equation systems, matrices, physics formulas)
248
- - **Dual-mode toggle**: switch between rendered preview and source editing with one click
249
- - Live editing: edit LaTeX source directly in raw mode; auto-save and re-render on blur
250
- - Graceful fallback: degrade to plain text on KaTeX parse failure without blocking workflow
251
-
252
- #### Mermaid Plugin (Diagram Rendering)
253
- - Add Mermaid.js v11.15 for 17+ diagram type visualization:
254
-
255
- | Category | Supported Diagrams |
256
- |----------|-------------------|
257
- | Flowchart | `graph` (TD/LR/RL/BT), `flowchart` |
258
- | Sequence | `sequenceDiagram` |
259
- | Class | `classDiagram` |
260
- | State | `stateDiagram-v2` |
261
- | ER | `erDiagram` |
262
- | User Journey | `journey` |
263
- | Pie | `pie` |
264
- | Gantt | `gantt` |
265
- | Git Graph | `gitGraph` |
266
- | Mind Map | `mindmap` |
267
- | Timeline | `timeline` |
268
- | Quadrant Chart | `quadrantChart` |
269
- | XY/Line/Bar Chart | `xyChart` |
270
- | C4 Architecture | `C4Context`, `C4Container`, `C4Component`, `C4Dynamic`, `C4Deployment` |
271
- | Sankey | `sankey-beta` |
272
- | Block | `block-beta` |
273
- | Architecture | `architecture-beta` |
274
-
275
- - Input shortcut: typing `` ```mermaid `` + Enter auto-converts to mermaid_block node
276
- - Async-safe rendering: render counter prevents race conditions
277
- - Multi-theme deep adaptation: each built-in theme has corresponding Mermaid color scheme
278
- - C4 architecture-specific semantic colors for persons/systems/containers/components
279
- - Auto node height adjustment after rendering (+6px padding) to prevent content overflow
280
-
281
- #### Theme Support
282
- - **Guizang theme**: new Chinese-style dark theme with traditional aesthetics
283
- - Custom Mermaid theme adaptation for Elegant, Newsprint, Dark, and Guizang themes:
284
- - Light → Default Mermaid theme (clean & bright)
285
- - Dark → GitHub Dark style (`#0d1117` background, `#8b949e` border/text)
286
- - Elegant → Custom warm palette (`#e8e2db` background, LXGW WenKai font)
287
- - Newsprint → Print style (PT Serif font, newsprint texture)
288
-
289
- #### Slides Feature — Markdown as Database
290
- - New concept: Markdown as content layer, HTML templates as view layer
291
- - Supported layouts: `cover` · `statement` · `section` · `video` · `thankyou`
292
- - Optional features: background image (`bg:`), video embed (`src:`), inline image preview (`preview:`)
293
- - Export formats: single-file HTML (Base64-inlined images) or folder (with video resources)
294
- - Tutorial template included at `resources/templates/slides/`
295
-
296
- ### Fixed
297
- - Mermaid diagram color scheme issues in dark themes causing unreadable content
298
- - Mermaid diagram container offset/miscalculation leading to content overflow
299
- - Sankey diagram syntax parsing compatibility
300
- - Slides templates not properly bundled into extraResources during build
301
-
302
- ### Dependencies
303
-
304
- | Package | Version | Purpose |
305
- |---------|---------|---------|
306
- | @milkdown/kit | ^7.19.2 | WYSIWYG editor core |
307
- | katex | ^0.16.46 | Math equation rendering engine |
308
- | mermaid | ^11.15.0 | Diagram rendering library |
309
- | electron | ^34.0.0 | Cross-platform desktop framework |
310
-
311
- ## [1.4.0] - Previous Release
312
-
313
- ### Added
314
- - Slides feature — Markdown as Database concept
315
- - Slide export capabilities (HTML single-file and folder formats)
316
-
317
- ---
318
-
319
- [1.5.1-beta.2]: https://github.com/byteuser1977/ColaMD-extend/releases/tag/v1.5.1-beta.2
320
- [1.5.1-beta.1]: https://github.com/byteuser1977/ColaMD-extend/releases/tag/v1.5.1-beta.1
321
- [1.5.1]: https://github.com/byteuser1977/ColaMD-extend/releases/tag/v1.5.1
322
- [1.5.0]: https://github.com/byteuser1977/ColaMD-extend/releases/tag/v1.5.0
323
- [1.4.0]: https://github.com/byteuser1977/ColaMD-extend/releases/tag/v1.4.0
355
+ - Add KaTeX rendering engine for LaTeX math equation support
package/README.md CHANGED
@@ -8,9 +8,73 @@ Real-time collaboration between humans and AI agents — see your agent's change
8
8
 
9
9
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
10
10
  [![GitHub release](https://img.shields.io/github/release/marswaveai/colamd.svg)](https://github.com/marswaveai/colamd/releases)
11
+ [![Version: 1.5.2](https://img.shields.io/badge/Version-1.5.2-blue.svg)](https://github.com/byteuser1977/ColaMD-extend/releases/tag/v1.5.2)
11
12
 
12
13
  **This Extended Edition**: [git@github.com:byteuser1977/ColaMD-extend.git](https://github.com/byteuser1977/ColaMD-extend)
13
14
 
15
+ ## 🎉 v1.5.2 Release Highlights (2026-05-28)
16
+
17
+ ### 🌐 Complete Internationalization (i18n) System
18
+ - **Multi-language Support** — Built-in English and Simplified Chinese with auto-detection based on system locale
19
+ - **Desktop Menu Localization** — All Electron menus (File, Edit, View, Theme, Help) display in the selected language
20
+ - **Mobile Menu Localization** — Complete sidebar menu with language switcher for on-the-fly switching
21
+ - **Dynamic Switching** — Change language anytime without restart; UI updates instantly
22
+ - **Persistent Preference** — Language choice saved to `localStorage` and remembered across sessions
23
+
24
+ ### 🔧 Improvements
25
+
26
+ #### 📄 Enhanced PDF Export Pipeline
27
+ - **Auto Theme Style Extraction** — Automatically extracts and injects current theme styles into exported documents
28
+ - **Custom Print Style Support** — Supports passing custom print CSS with simplified base print styles
29
+ - **Refactored Export HTML** — Streamlined `buildExportHTML` function, removed hardcoded plugin styles in favor of plugin-injected styles
30
+ - **Clean Output** — Proper A4 pagination with 15mm margins, background color preservation
31
+
32
+ #### 🔌 Unified Plugin Style Management
33
+ - **Dynamic Configuration** — Math and Mermaid plugins now support unified configuration fields (clipboard styles, export styles)
34
+ - **Dynamic Style Retrieval** — Replaced hardcoded style handling with dynamic retrieval from plugin configuration
35
+ - **Smart Error Recovery** — Dynamically skips failing plugins during export instead of hard-coded exclusions
36
+
37
+ #### 🎨 Rendering & Theme Optimization
38
+ - **Optimized HTML Structure** — Wrapped `getLiveHTML` return content in a div with id "write" for better compatibility
39
+ - **Conditional Base Styles** — Only renders base element styles when not using custom themes
40
+ - **Fixed Custom Theme Export** — Resolved Chromium CSSOM serialization issues for custom theme print CSS extraction
41
+
42
+ #### 📱 Mobile Platform Fixes
43
+ - **Fixed Media Query** — Corrected missing screen type in mobile media queries for better responsive behavior
44
+
45
+ ### 🗑️ Removed
46
+ - Removed outdated PDF font compensation document ([`docs/PDF_FONT_COMPENSATION.md`](docs/PDF_FONT_COMPENSATION.md))
47
+
48
+ > 💡 **Note**: This release includes complete internationalization support and export pipeline improvements. Theme updates continue in [ColaMD-themes](https://github.com/byteuser1977/ColaMD-themes) repository.
49
+
50
+ ---
51
+
52
+ ## 🚀 VSCode ColaView Extension
53
+
54
+ Seamlessly integrate ColaMD with your VSCode workflow using our companion extension:
55
+
56
+ ### [vscode_colaview](https://github.com/byteuser1977/vscode_colaview) 🆕
57
+
58
+ **The VSCode extension to view and edit ColaMD-rendered Markdown files**
59
+
60
+ | Feature | Description |
61
+ |---------|-------------|
62
+ | **Real-time Preview** | View math equations and Mermaid diagrams rendered directly in VSCode |
63
+ | **Seamless Integration** | Work with ColaMD content without leaving your code editor |
64
+ | **Consistency** | Maintain visual consistency between ColaMD desktop and VSCode |
65
+ | **Productivity** | Enhanced workflow for developers working with Markdown + rich content |
66
+
67
+ **Why use vscode_colaview?**
68
+ - Preview ColaMD-rendered content alongside your code
69
+ - No need to switch between applications
70
+ - Perfect for documentation-heavy projects
71
+ - Supports the same Math and Mermaid rendering as ColaMD desktop
72
+
73
+ 🔗 **Install**: [vscode_colaview on GitHub](https://github.com/byteuser1977/vscode_colaview)
74
+ 📦 **VSCode Marketplace**: Search for "colaview" in VSCode extensions
75
+
76
+ ---
77
+
14
78
  [Features](#features) | [Renderer Plugins](#renderer-plugin-system) | [Plug Menu](#plug-menu--plugin-render-control) | [Quick Start](#quick-start) | [Mobile Build](#mobile-build--capacitor-6) | [Themes](#theme-system) | [Architecture](#technical-architecture) | [中文](README_CN.md)
15
79
 
16
80
  ---
@@ -131,10 +195,36 @@ No image? The cover falls back to a clean orange-on-white design — it just wor
131
195
 
132
196
  ### 📤 Export Capabilities
133
197
 
134
- - **PDF / HTML export**
198
+ #### PDF / HTML Export (Enhanced in v1.5.1)
199
+ - **Auto Theme Style Extraction** — Automatically extracts and injects current theme styles into exported documents
200
+ - **Custom Print Style Support** — Supports passing custom print CSS for advanced use cases
201
+ - **Plugin-Injected Styles** — Math and Mermaid plugins dynamically inject their export styles (no more hardcoded style handling)
202
+ - **Smart Error Recovery** — Dynamically skips failing plugins during export instead of hard-coded exclusions
203
+ - **A4 PDF Output** — Proper pagination with 15mm margins, background color preservation, clean output without UI elements
204
+ - **HTML Export** — Standalone HTML with embedded styles, KaTeX CDN for math, inline SVG for Mermaid diagrams, zero-dependency sharing
205
+
135
206
  - **Slide export** — Single HTML file (images Base64-inlined) or folder format (with video resources)
136
207
  - **Equation / Diagram PNG export** — Right-click to export as high-definition PNG images (2x scaling)
137
208
 
209
+ > 💡 **Mobile Export**: On Android/iOS, exported files trigger system share panel for direct sending to WeChat, email, etc.
210
+
211
+ ### 🌐 Internationalization (i18n)
212
+
213
+ - **Multi-language Support** — Built-in English and Simplified Chinese with auto-detection based on system locale
214
+ - **Desktop Menu Localization** — All Electron menus (File, Edit, View, Theme, Help) display in the selected language
215
+ - **Mobile Menu Localization** — Complete sidebar menu with language switcher for on-the-fly switching
216
+ - **Dynamic Switching** — Change language anytime without restart; UI updates instantly
217
+ - **Persistent Preference** — Language choice saved to `localStorage` and remembered across sessions
218
+ - **Custom Theme Names** — User-imported theme names remain unchanged (no forced translation)
219
+ - **IPC Synchronization** — Renderer process can notify main process to rebuild menus when language changes
220
+
221
+ #### Supported Languages
222
+
223
+ | Code | Language | Auto-detection |
224
+ |------|----------|----------------|
225
+ | `en` | English | Default |
226
+ | `zh-CN` | Simplified Chinese | System locale contains `zh` |
227
+
138
228
  ### 🎨 Themes & Cross-Platform (Inherited from Original)
139
229
 
140
230
  - **4 built-in themes** + [downloadable themes](themes/) + custom CSS import
@@ -212,7 +302,9 @@ $$
212
302
 
213
303
  #### Supported Diagram Types (17+)
214
304
 
215
- ```markdown
305
+ To create a Mermaid diagram, type the following in the editor:
306
+
307
+ ````markdown
216
308
  ```mermaid
217
309
  graph TD
218
310
  A[Markdown] --> B[ColaMD]
@@ -221,7 +313,7 @@ graph TD
221
313
  C --> E[Rich Content]
222
314
  D --> E
223
315
  ```
224
- ```
316
+ ````
225
317
 
226
318
  | Category | Supported Diagrams |
227
319
  |----------|-------------------|
@@ -628,12 +720,40 @@ Downloadable external themes (located in [`themes/`](themes/) directory):
628
720
  | [elegant.css](themes/elegant.css) | Warm serif with terracotta accents, LXGW WenKai font |
629
721
  | [guizang.css](themes/guizang.css) | Ancient Guizang style, ochre accents, ink-black code blocks |
630
722
  | [forest-ink.css](themes/forest-ink.css) | 🌲 Forest Ink, warm paper base + forest green ink text + forest green accent |
631
- | [academic-paper.css](themes/academic-paper.css) | 📄 **Academic Paper (Enhanced)** — GB/T 7713 compliant, SimHei headings + SimSun body text, three-line tables, print-optimized Mermaid diagrams, footnotes & references styling. See [`academic-demo.md`](docs/academic-demo.md) for a complete example |
723
+ | [academic-paper.css](themes/academic-paper.css) | 📄 **Academic Paper** — GB/T 7713 compliant, SimHei headings + SimSun body text, three-line tables, print-optimized Mermaid diagrams (10.5pt font). See [`academic-demo.md`](docs/academic-demo.md) for a complete example |
724
+ | [academic-paper-pt.css](themes/academic-paper-pt.css) | 📄 **Academic Paper (PT units)** — Same GB/T 7713 design as academic-paper.css but using pt units for specific print scenarios |
632
725
  | [pixso-design.css](themes/pixso-design.css) | 🎨 Pixso Design, modern design system style |
633
- | [swiss-design.css](themes/swiss-design.css) | 🇨🇭 **Swiss Design (International Typographic Style)** — Pure black-white-red color system, geometric sans-serif fonts (Helvetica/Inter), grid-based layout with generous whitespace, form follows function. Minimalist and restrained aesthetic inspired by Swiss International Typographic Style |
726
+ | [swiss-design.css](themes/swiss-design.css) | 🇨🇭 **Swiss Design (International Typographic Style)** — Pure black-white-red color system, geometric sans-serif fonts (Helvetica/Inter), grid-based layout with generous whitespace, form follows function. Complete Mermaid diagram integration with monochrome + accent red styling |
727
+ | [template.css](themes/template.css) | 📝 **Standardized Template** — Reference implementation following v3.0 paradigm. Includes complete design tokens, editor styles, code blocks, blockquotes, tables, Mermaid variables, and print styles. Ready-to-use template for creating custom themes |
728
+
729
+ > ⚠️ **Theme Migration Notice**
730
+ >
731
+ > Starting from v1.5.1, **theme updates and maintenance have been migrated to the dedicated repository**:
732
+ >
733
+ > 🔗 **[https://github.com/byteuser1977/ColaMD-themes](https://github.com/byteuser1977/ColaMD-themes)**
734
+ >
735
+ > Future theme enhancements, bug fixes, and new theme submissions will be handled in the ColaMD-themes repository. This allows for:
736
+ > - Faster iteration and release cycles for theme-specific changes
737
+ > - Community contributions and theme submissions
738
+ > - Independent versioning from the core ColaMD application
739
+ > - Focused issue tracking for theme-related problems
740
+ >
741
+ > The themes included in this release will remain available for backward compatibility, but we recommend checking the dedicated repository for the latest versions and new themes.
634
742
 
635
743
  Custom theme support: Place CSS files in `~/.colamd/themes/` directory, then import via **Theme > Import Theme**. Imported themes persist across sessions.
636
744
 
745
+ ### Theme Development
746
+
747
+ For developers who want to create custom themes, refer to:
748
+
749
+ - **Theme Paradigm Document**: [`docs/theme-paradigm.md`](docs/theme-paradigm.md) — Complete CSS theme development specification (v3.2)
750
+ - Design principles: variable-driven, modular, semantic naming, AI-agent derivable
751
+ - 30+ verifiable rules (MUST / MUST NOT / SHOULD) including WCAG contrast formulas
752
+ - Print fidelity requirements: variable re-declaration, required element coverage (12 categories)
753
+ - px unit unification standard: prohibits pt/rem mixing for consistent PDF export
754
+ - **Theme Template**: [`themes/template.css`](themes/template.css) — Copy this file as a starting point for your custom theme
755
+ - **Mermaid Variable Reference**: See [`themes/README.md`](themes/README.md) for complete Mermaid CSS variable documentation
756
+
637
757
  ---
638
758
 
639
759
  ## Technical Architecture
@@ -933,4 +1053,27 @@ ColaMD will evolve alongside the agent ecosystem:
933
1053
 
934
1054
  ---
935
1055
 
1056
+ ## 📬 Contact & Support
1057
+
1058
+ Need help? Want to contribute? Have feedback?
1059
+
1060
+ ### 📱 Feishu (Lark) Contact
1061
+
1062
+ Scan the QR code below to connect with the project maintainer:
1063
+
1064
+ ![Feishu QR Code](docs/feishu-contact.jpg)
1065
+
1066
+ **Contact**: Byteuser
1067
+
1068
+ ### 📧 Other Contact Methods
1069
+
1070
+ | Method | Link |
1071
+ |--------|------|
1072
+ | 🐛 **Report Bugs** | [Open an Issue](https://github.com/byteuser1977/ColaMD-extend/issues/new?labels=bug) |
1073
+ | 💡 **Feature Requests** | [Open an Issue](https://github.com/byteuser1977/ColaMD-extend/issues/new?labels=enhancement) |
1074
+ | 💬 **Discussions** | [GitHub Discussions](https://github.com/byteuser1977/ColaMD-extend/discussions/new?category=q-a) |
1075
+ | 📧 **Email** | byteuser@qq.com |
1076
+
1077
+ ---
1078
+
936
1079
  *Extended from [marswaveai/ColaMD](https://github.com/marswaveai/colamd), built for the agent-native future.*