@bytechain.cn/colamd 1.5.1 → 2.7.7

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 (398) hide show
  1. package/LICENSE +22 -21
  2. package/README.md +160 -1012
  3. package/README_CN.md +210 -1070
  4. package/dist/main/chunks/docx-export.js +29695 -0
  5. package/dist/main/chunks/image-export.js +175 -0
  6. package/dist/main/index.js +17765 -452
  7. package/dist/preload/index.js +135 -23
  8. package/dist/renderer/assets/2DXBBFLN-BmaQ8lqV.js +667 -0
  9. package/dist/renderer/assets/46IJ22JX-Caywmaj-.js +854 -0
  10. package/dist/renderer/assets/4TTDE5I4-C82Tw8vO.js +502 -0
  11. package/dist/renderer/assets/4UF3HTLV-BD8W-BSm.js +30 -0
  12. package/dist/renderer/assets/5THPTBWS-2mBFupjU.js +21 -0
  13. package/dist/renderer/assets/7WLXJQOR-C8MM6Bra.js +23 -0
  14. package/dist/renderer/assets/AAXQQPKT-CCArPgA1.js +1131 -0
  15. package/dist/renderer/assets/AKE5O7KZ-DOAgUvEX.js +185 -0
  16. package/dist/renderer/assets/BNMLP6AG-igM96Ol7.js +805 -0
  17. package/dist/renderer/assets/DKTLEL5E-Dj3316cp.js +42 -0
  18. package/dist/renderer/assets/DR6PKOQU-C-e6zzyf.js +302 -0
  19. package/dist/renderer/assets/E4RJ7UJB-BMF4zoOQ.js +442 -0
  20. package/dist/renderer/assets/ELSXBIJH-BI2ySIoX.js +39 -0
  21. package/dist/renderer/assets/ERTIBQVS-CnvF3w9r.js +183 -0
  22. package/dist/renderer/assets/F653G4FO-CgzvjfOe.js +1498 -0
  23. package/dist/renderer/assets/FKCDD66M-BkVPFntx.js +205 -0
  24. package/dist/renderer/assets/FP7KDXVC-K0VCFuri.js +222 -0
  25. package/dist/renderer/assets/FT5I3RHX-zgsvTvBh.js +244 -0
  26. package/dist/renderer/assets/FTXIJQGB-BX14b7pN.js +13 -0
  27. package/dist/renderer/assets/G3MDBVQH-qZ3yfAIw.js +25 -0
  28. package/dist/renderer/assets/GY35JXOZ-Lo9DxsPK.js +169 -0
  29. package/dist/renderer/assets/H5EEJPP2-Bw2musel.js +354 -0
  30. package/dist/renderer/assets/HWDLEDTA-CCOSSl9K.js +982 -0
  31. package/dist/renderer/assets/JZWSX6AR-BBtw8K-1.js +67 -0
  32. package/dist/renderer/assets/KQOEJWJY-Brg31xSn.js +84 -0
  33. package/dist/renderer/assets/KS3BB3KE-2GQdjVNT.js +139 -0
  34. package/dist/renderer/assets/KXJRRZHI-B0Oj-tMS.js +503 -0
  35. package/dist/renderer/assets/MFVI5XKI-BpwEOECT.js +10 -0
  36. package/dist/renderer/assets/MWY2J62P-CSmi7lMQ.js +1103 -0
  37. package/dist/renderer/assets/MXGNCBL2-CSoCLfJw.js +217 -0
  38. package/dist/renderer/assets/N6DAJLIZ-DB-xlSjM.js +120 -0
  39. package/dist/renderer/assets/NU5M23IW-BhGgUeDk.js +117 -0
  40. package/dist/renderer/assets/NV4XNBIS-DMg8ibKU.js +1221 -0
  41. package/dist/renderer/assets/OGLU4SIR-DOU7cIL3.js +290 -0
  42. package/dist/renderer/assets/OUNS5N76-BO_k5M0O.js +1065 -0
  43. package/dist/renderer/assets/PU4ISKXV-Cw53csyu.js +516 -0
  44. package/dist/renderer/assets/PUZGS23X-_iUQg51-.js +21 -0
  45. package/dist/renderer/assets/Q3IYVLG5-ZFBZi3vs.js +501 -0
  46. package/dist/renderer/assets/QYHQDLKZ-BPb6lHi6.js +984 -0
  47. package/dist/renderer/assets/RVARI57O-DMrXgtoB.js +10 -0
  48. package/dist/renderer/assets/RZSVICHU-I7fvqLMQ.js +263 -0
  49. package/dist/renderer/assets/UEXXS2NB-AVpw2xTC.js +25 -0
  50. package/dist/renderer/assets/UHTQJXKL-6oSc4D2k.js +135 -0
  51. package/dist/renderer/assets/URA2L2QI-DkFUeeK0.js +201 -0
  52. package/dist/renderer/assets/UXCHDUKG-B54p4156.js +174 -0
  53. package/dist/renderer/assets/VKNV3BUX-Cc_4x0WI.js +278 -0
  54. package/dist/renderer/assets/VMV7XPHP-BjfrE66I.js +127 -0
  55. package/dist/renderer/assets/WEVWDWVA-Ca8eMbXN.js +57 -0
  56. package/dist/renderer/assets/XRRJ35LF-EWRU-xXu.js +120 -0
  57. package/dist/renderer/assets/YFKBLVVN-D2oaE2c2.js +991 -0
  58. package/dist/renderer/assets/YHRE5QGZ-ucJgE2vP.js +698 -0
  59. package/dist/renderer/assets/ZF3OVT4B-SN2E7Wbi.js +421 -0
  60. package/dist/renderer/assets/apl-fqmucPXA.js +140 -0
  61. package/dist/renderer/assets/asciiarmor-DucZyvP0.js +56 -0
  62. package/dist/renderer/assets/asn1-BnOEsgAm.js +144 -0
  63. package/dist/renderer/assets/asterisk-QAlztEwS.js +345 -0
  64. package/dist/renderer/assets/brainfuck-DZVCuF_t.js +53 -0
  65. package/dist/renderer/assets/clike-xqXYL6ge.js +805 -0
  66. package/dist/renderer/assets/clojure-BhXMqnxz.js +849 -0
  67. package/dist/renderer/assets/cmake-BGaNd9E7.js +71 -0
  68. package/dist/renderer/assets/cobol-4yqQntpt.js +120 -0
  69. package/dist/renderer/assets/coffeescript-D2dXvhEc.js +308 -0
  70. package/dist/renderer/assets/commonlisp-CF_VNHQR.js +130 -0
  71. package/dist/renderer/assets/crystal-DyuLTqLs.js +398 -0
  72. package/dist/renderer/assets/css-c-jst79C.js +1783 -0
  73. package/dist/renderer/assets/cypher-Dlu_3r4V.js +121 -0
  74. package/dist/renderer/assets/d-UURgV0Ux.js +179 -0
  75. package/dist/renderer/assets/diff-B_Bi2Crb.js +25 -0
  76. package/dist/renderer/assets/dockerfile-Bvk733Ga.js +201 -0
  77. package/dist/renderer/assets/dtd-Dy74G54E.js +114 -0
  78. package/dist/renderer/assets/dylan-TSb-Nfix.js +314 -0
  79. package/dist/renderer/assets/ebnf-4fKAGW3a.js +140 -0
  80. package/dist/renderer/assets/ecl-B59qGGVg.js +178 -0
  81. package/dist/renderer/assets/eiffel-Dze7nlu3.js +134 -0
  82. package/dist/renderer/assets/elm-DG7jkhNZ.js +176 -0
  83. package/dist/renderer/assets/erlang-BO6gOnGA.js +674 -0
  84. package/dist/renderer/assets/factor-CMxFHDqz.js +65 -0
  85. package/dist/renderer/assets/fcl-CDDUNjTj.js +141 -0
  86. package/dist/renderer/assets/forth-B9D2JCeE.js +116 -0
  87. package/dist/renderer/assets/fortran-CAG2BFbe.js +467 -0
  88. package/dist/renderer/assets/gas-d3KEcW3x.js +294 -0
  89. package/dist/renderer/assets/gherkin-DhZlEZiy.js +115 -0
  90. package/dist/renderer/assets/groovy-CpwJiBl7.js +223 -0
  91. package/dist/renderer/assets/haskell-ySd-OUo8.js +459 -0
  92. package/dist/renderer/assets/haxe-7MlzfeYV.js +514 -0
  93. package/dist/renderer/assets/http-BqypyemW.js +79 -0
  94. package/dist/renderer/assets/idl-4HIGJlDI.js +985 -0
  95. package/dist/renderer/assets/index-6G13Twgt.js +311 -0
  96. package/dist/renderer/assets/index-B2_pQa3G.js +384 -0
  97. package/dist/renderer/assets/index-B4keY9Xz.js +328 -0
  98. package/dist/renderer/assets/index-B5Jih3QA.js +47421 -0
  99. package/dist/renderer/assets/index-BH0PaTow.js +405 -0
  100. package/dist/renderer/assets/index-BWfIKsyn.js +8 -0
  101. package/dist/renderer/assets/index-B_BLxvag.js +156 -0
  102. package/dist/renderer/assets/index-BnXxA35e.js +325 -0
  103. package/dist/renderer/assets/index-Bu1PrnbA.js +81 -0
  104. package/dist/renderer/assets/index-BvXJHaQ4.js +60 -0
  105. package/dist/renderer/assets/index-BzHXcCGC.js +307 -0
  106. package/dist/renderer/assets/index-CXI9cRfo.js +287 -0
  107. package/dist/renderer/assets/index-Ccsf_83j.js +149 -0
  108. package/dist/renderer/assets/index-CkLQq2g4.js +688 -0
  109. package/dist/renderer/assets/index-DNL6Tijf.js +8 -0
  110. package/dist/renderer/assets/index-DRZsGkXi.js +78 -0
  111. package/dist/renderer/assets/index-Dfyz4Aee.js +181 -0
  112. package/dist/renderer/assets/index-HtqODURL.js +703 -0
  113. package/dist/renderer/assets/{index-DxOzbfR-.js → index-MJfkvBRx.js} +1 -1
  114. package/dist/renderer/assets/index-NsiBA9UX.js +113 -0
  115. package/dist/renderer/assets/index-aUzhL6sM.js +96 -0
  116. package/dist/renderer/assets/index-bx07CRyn.css +2503 -0
  117. package/dist/renderer/assets/{index-CBcVpA3d.js → index-k1ZFPJcr.js} +3 -4
  118. package/dist/renderer/assets/javascript-C_OHM9hj.js +994 -0
  119. package/dist/renderer/assets/julia-Bs6JJhYG.js +407 -0
  120. package/dist/renderer/assets/lazy-BY7ljzvO.js +1041 -0
  121. package/dist/renderer/assets/livescript-DmzgM3Yt.js +296 -0
  122. package/dist/renderer/assets/lua-Cvg8VrAA.js +256 -0
  123. package/dist/renderer/assets/mathematica-DNLOL9PQ.js +110 -0
  124. package/dist/renderer/assets/mbox-Ga7d4MMN.js +117 -0
  125. package/dist/renderer/assets/mirc-Dma3B8rS.js +107 -0
  126. package/dist/renderer/assets/mllike-DHn7xckP.js +334 -0
  127. package/dist/renderer/assets/modelica-0d55jYY0.js +147 -0
  128. package/dist/renderer/assets/mscgen-DdqZYINH.js +135 -0
  129. package/dist/renderer/assets/mumps-Btr8VblO.js +93 -0
  130. package/dist/renderer/assets/nginx-DTDtBDVN.js +141 -0
  131. package/dist/renderer/assets/nsis-CyKBdPWp.js +62 -0
  132. package/dist/renderer/assets/ntriples-CvgOYMpL.js +153 -0
  133. package/dist/renderer/assets/octave-DYBj3-tl.js +200 -0
  134. package/dist/renderer/assets/oz-R_e8WMIi.js +231 -0
  135. package/dist/renderer/assets/pascal-GD8iposT.js +105 -0
  136. package/dist/renderer/assets/perl-DL9mHpoi.js +1105 -0
  137. package/dist/renderer/assets/pig-C_4T4YIV.js +101 -0
  138. package/dist/renderer/assets/powershell-B0suO7Vd.js +328 -0
  139. package/dist/renderer/assets/properties-BR-vP1aU.js +58 -0
  140. package/dist/renderer/assets/protobuf-BxgpyhoW.js +77 -0
  141. package/dist/renderer/assets/pug-CTXt1f8z.js +405 -0
  142. package/dist/renderer/assets/puppet-Bdao66PW.js +137 -0
  143. package/dist/renderer/assets/python-CvWbmiX4.js +427 -0
  144. package/dist/renderer/assets/q-CrbCVq4a.js +131 -0
  145. package/dist/renderer/assets/r-V7nswm59.js +170 -0
  146. package/dist/renderer/assets/rpm-C-DLY-If.js +109 -0
  147. package/dist/renderer/assets/ruby-CQTpZw6f.js +331 -0
  148. package/dist/renderer/assets/sas-D2UG-yhZ.js +207 -0
  149. package/dist/renderer/assets/scheme-BKzrkGJD.js +222 -0
  150. package/dist/renderer/assets/shell-BlsXDxCn.js +222 -0
  151. package/dist/renderer/assets/sieve-CjwBwOY5.js +135 -0
  152. package/dist/renderer/assets/simple-mode-DMneyfDu.js +130 -0
  153. package/dist/renderer/assets/smalltalk-BOIGQuhN.js +121 -0
  154. package/dist/renderer/assets/solr-CwD7U71z.js +69 -0
  155. package/dist/renderer/assets/sparql-DYskk2vE.js +249 -0
  156. package/dist/renderer/assets/spreadsheet-Bgtt3oLP.js +87 -0
  157. package/dist/renderer/assets/sql-BSrOzCRI.js +354 -0
  158. package/dist/renderer/assets/stex-B6LNC55o.js +231 -0
  159. package/dist/renderer/assets/stylus-BkS-boTH.js +565 -0
  160. package/dist/renderer/assets/swift-FRZi1uvB.js +291 -0
  161. package/dist/renderer/assets/tcl-CUcaCdmq.js +114 -0
  162. package/dist/renderer/assets/textile-BnFpjsrl.js +414 -0
  163. package/dist/renderer/assets/tiddlywiki-CjprD-Qp.js +218 -0
  164. package/dist/renderer/assets/tiki-DK9DOeWn.js +268 -0
  165. package/dist/renderer/assets/toml-BOuWGMcf.js +76 -0
  166. package/dist/renderer/assets/troff-E1bJ0PPL.js +61 -0
  167. package/dist/renderer/assets/ttcn-cfg-Dc39-fIP.js +133 -0
  168. package/dist/renderer/assets/ttcn-tKd4HLu4.js +192 -0
  169. package/dist/renderer/assets/turtle-Dq7-1WAf.js +124 -0
  170. package/dist/renderer/assets/vb-Dp90gtsv.js +196 -0
  171. package/dist/renderer/assets/vbscript-CI6_mxxU.js +479 -0
  172. package/dist/renderer/assets/velocity-BwIZK1TH.js +149 -0
  173. package/dist/renderer/assets/verilog-DDCYnHN8.js +430 -0
  174. package/dist/renderer/assets/vhdl-DCkMIyT9.js +158 -0
  175. package/dist/renderer/assets/{web-BKE0SH0E.js → web-C4yaM4Cl.js} +1 -1
  176. package/dist/renderer/assets/{web-CBsFp24u.js → web-CF2Dtak3.js} +2 -3
  177. package/dist/renderer/assets/{web-Dc8YgoHP.js → web-DUy9unYf.js} +1 -1
  178. package/dist/renderer/assets/webidl-BTLTThCm.js +204 -0
  179. package/dist/renderer/assets/xquery-BrBUuxMR.js +525 -0
  180. package/dist/renderer/assets/yacas-b5lAVEIl.js +130 -0
  181. package/dist/renderer/assets/z80-BZV19vqv.js +93 -0
  182. package/dist/renderer/index.html +97 -77
  183. package/package.json +88 -60
  184. package/themes/README.md +99 -300
  185. package/themes/bear.css +38 -0
  186. package/themes/dark.css +20 -0
  187. package/themes/dracula.css +38 -0
  188. package/themes/elegant.css +53 -671
  189. package/themes/gruvbox.css +42 -0
  190. package/themes/light.css +20 -0
  191. package/themes/midnight.css +31 -0
  192. package/themes/nord.css +38 -0
  193. package/themes/notion.css +48 -0
  194. package/themes/sepia.css +48 -0
  195. package/themes/solarized-dark.css +35 -0
  196. package/themes/template.css +76 -498
  197. package/themes/writer.css +44 -0
  198. package/.github/workflows/release.yml +0 -66
  199. package/.trae/specs/optimize-theme-loading/checklist.md +0 -20
  200. package/.trae/specs/optimize-theme-loading/spec.md +0 -103
  201. package/.trae/specs/optimize-theme-loading/tasks.md +0 -40
  202. package/CHANGELOG.md +0 -320
  203. package/CLAUDE.md +0 -143
  204. package/android/app/build/.npmkeep +0 -0
  205. package/android/app/build.gradle +0 -76
  206. package/android/app/capacitor.build.gradle +0 -24
  207. package/android/app/proguard-rules.pro +0 -21
  208. package/android/app/release.keystore +0 -0
  209. package/android/app/src/androidTest/java/com/getcapacitor/myapp/ExampleInstrumentedTest.java +0 -26
  210. package/android/app/src/main/AndroidManifest.xml +0 -64
  211. package/android/app/src/main/java/cn/bytechain/colamd/MainActivity.java +0 -180
  212. package/android/app/src/main/res/drawable/ic_launcher_background.xml +0 -170
  213. package/android/app/src/main/res/drawable/splash.png +0 -0
  214. package/android/app/src/main/res/drawable-land-hdpi/splash.png +0 -0
  215. package/android/app/src/main/res/drawable-land-mdpi/splash.png +0 -0
  216. package/android/app/src/main/res/drawable-land-xhdpi/splash.png +0 -0
  217. package/android/app/src/main/res/drawable-land-xxhdpi/splash.png +0 -0
  218. package/android/app/src/main/res/drawable-land-xxxhdpi/splash.png +0 -0
  219. package/android/app/src/main/res/drawable-port-hdpi/splash.png +0 -0
  220. package/android/app/src/main/res/drawable-port-mdpi/splash.png +0 -0
  221. package/android/app/src/main/res/drawable-port-xhdpi/splash.png +0 -0
  222. package/android/app/src/main/res/drawable-port-xxhdpi/splash.png +0 -0
  223. package/android/app/src/main/res/drawable-port-xxxhdpi/splash.png +0 -0
  224. package/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml +0 -34
  225. package/android/app/src/main/res/layout/activity_main.xml +0 -12
  226. package/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +0 -5
  227. package/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +0 -5
  228. package/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  229. package/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png +0 -0
  230. package/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  231. package/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  232. package/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png +0 -0
  233. package/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  234. package/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  235. package/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png +0 -0
  236. package/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  237. package/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  238. package/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png +0 -0
  239. package/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  240. package/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  241. package/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png +0 -0
  242. package/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  243. package/android/app/src/main/res/values/ic_launcher_background.xml +0 -4
  244. package/android/app/src/main/res/values/strings.xml +0 -7
  245. package/android/app/src/main/res/values/styles.xml +0 -22
  246. package/android/app/src/main/res/xml/file_paths.xml +0 -5
  247. package/android/app/src/main/res/xml/network_security_config.xml +0 -8
  248. package/android/app/src/test/java/com/getcapacitor/myapp/ExampleUnitTest.java +0 -18
  249. package/android/build.gradle +0 -29
  250. package/android/capacitor.settings.gradle +0 -21
  251. package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  252. package/android/gradle/wrapper/gradle-wrapper.properties +0 -7
  253. package/android/gradle.properties +0 -22
  254. package/android/gradlew +0 -248
  255. package/android/gradlew.bat +0 -92
  256. package/android/settings.gradle +0 -5
  257. package/android/variables.gradle +0 -16
  258. package/capacitor.config.js +0 -29
  259. package/capacitor.config.ts +0 -30
  260. package/demo.md +0 -193
  261. package/dist/renderer/assets/arc-_lugyDzx.js +0 -131
  262. package/dist/renderer/assets/architectureDiagram-3BPJPVTR-DDfP-F9D.js +0 -8721
  263. package/dist/renderer/assets/blockDiagram-GPEHLZMM-DOETUKma.js +0 -3826
  264. package/dist/renderer/assets/c4Diagram-AAUBKEIU-kAmLfVtk.js +0 -2483
  265. package/dist/renderer/assets/channel-CD4vJFwr.js +0 -7
  266. package/dist/renderer/assets/chunk-2J33WTMH-DkVrgw4l.js +0 -24
  267. package/dist/renderer/assets/chunk-4BX2VUAB-JTZ-VKNX.js +0 -16
  268. package/dist/renderer/assets/chunk-55IACEB6-Di_O5box.js +0 -13
  269. package/dist/renderer/assets/chunk-727SXJPM-BgKvwR8w.js +0 -2016
  270. package/dist/renderer/assets/chunk-AQP2D5EJ-DonSXCCQ.js +0 -1953
  271. package/dist/renderer/assets/chunk-FMBD7UC4-CsV8Lmy6.js +0 -19
  272. package/dist/renderer/assets/chunk-ND2GUHAM-C_-_dlq7.js +0 -116
  273. package/dist/renderer/assets/chunk-QZHKN3VN-aCmcDsfu.js +0 -19
  274. package/dist/renderer/assets/classDiagram-4FO5ZUOK-nuHQLjzM.js +0 -24
  275. package/dist/renderer/assets/classDiagram-v2-Q7XG4LA2-nuHQLjzM.js +0 -24
  276. package/dist/renderer/assets/cose-bilkent-S5V4N54A-Di1_SXt9.js +0 -4943
  277. package/dist/renderer/assets/cytoscape.esm-CpHeHM5e.js +0 -30269
  278. package/dist/renderer/assets/dagre-BM42HDAG-CqOUIYsL.js +0 -706
  279. package/dist/renderer/assets/defaultLocale-B2RvLBDe.js +0 -206
  280. package/dist/renderer/assets/diagram-2AECGRRQ-F-fP19TC.js +0 -302
  281. package/dist/renderer/assets/diagram-5GNKFQAL-BD5XZc8G.js +0 -170
  282. package/dist/renderer/assets/diagram-KO2AKTUF-Qa3ZxA67.js +0 -633
  283. package/dist/renderer/assets/diagram-LMA3HP47-DqDnw2RA.js +0 -213
  284. package/dist/renderer/assets/diagram-OG6HWLK6-BH4Elzby.js +0 -852
  285. package/dist/renderer/assets/erDiagram-TEJ5UH35-CaKZCewa.js +0 -1228
  286. package/dist/renderer/assets/flowDiagram-I6XJVG4X-C8znUgyL.js +0 -2333
  287. package/dist/renderer/assets/ganttDiagram-6RSMTGT7-DnRvbMnU.js +0 -3721
  288. package/dist/renderer/assets/gitGraphDiagram-PVQCEYII-CZuRZzk4.js +0 -1374
  289. package/dist/renderer/assets/graph-CYiEKt0j.js +0 -1988
  290. package/dist/renderer/assets/index-B4uDgADr.js +0 -530
  291. package/dist/renderer/assets/index-BX6JHKv6.js +0 -73314
  292. package/dist/renderer/assets/index-CGj1spkU.js +0 -27
  293. package/dist/renderer/assets/index-CcwAgVRi.css +0 -2226
  294. package/dist/renderer/assets/index-D4CPFkph.js +0 -9
  295. package/dist/renderer/assets/index-Y89U1ptl.js +0 -9
  296. package/dist/renderer/assets/infoDiagram-5YYISTIA-BlBUdqMb.js +0 -32
  297. package/dist/renderer/assets/init-ZxktEp_H.js +0 -16
  298. package/dist/renderer/assets/ishikawaDiagram-YF4QCWOH-TeVytCrP.js +0 -968
  299. package/dist/renderer/assets/journeyDiagram-JHISSGLW-BLZa3jnX.js +0 -1256
  300. package/dist/renderer/assets/kanban-definition-UN3LZRKU-foVxWrJn.js +0 -1053
  301. package/dist/renderer/assets/layout-DOAlFUVb.js +0 -2610
  302. package/dist/renderer/assets/linear-BMBn6kVq.js +0 -340
  303. package/dist/renderer/assets/mindmap-definition-RKZ34NQL-5pGeNCcp.js +0 -1181
  304. package/dist/renderer/assets/ordinal-DSZU4PqD.js +0 -76
  305. package/dist/renderer/assets/pieDiagram-4H26LBE5-N9aAUxfr.js +0 -247
  306. package/dist/renderer/assets/preload-helper-tXtZnHb0.js +0 -88
  307. package/dist/renderer/assets/quadrantDiagram-W4KKPZXB-BPxbtjga.js +0 -1345
  308. package/dist/renderer/assets/requirementDiagram-4Y6WPE33-CK1LrJyG.js +0 -1205
  309. package/dist/renderer/assets/sankeyDiagram-5OEKKPKP-BNj7Sqii.js +0 -1275
  310. package/dist/renderer/assets/sequenceDiagram-3UESZ5HK-B-r7lNhI.js +0 -4515
  311. package/dist/renderer/assets/stateDiagram-AJRCARHV-wrWE0MRa.js +0 -451
  312. package/dist/renderer/assets/stateDiagram-v2-BHNVJYJU-CE-Lqo2d.js +0 -22
  313. package/dist/renderer/assets/timeline-definition-PNZ67QCA-BkeMGH4J.js +0 -1597
  314. package/dist/renderer/assets/vennDiagram-CIIHVFJN-BTxVzto3.js +0 -2487
  315. package/dist/renderer/assets/wardley-L42UT6IY-b-_GPpqL.js +0 -30699
  316. package/dist/renderer/assets/wardleyDiagram-YWT4CUSO-D2r5dVGW.js +0 -976
  317. package/dist/renderer/assets/web-TfDzToU7.js +0 -58
  318. package/dist/renderer/assets/xychartDiagram-2RQKCTM6-BHQdINVc.js +0 -1933
  319. package/docs/RELEASE_NOTES_v1.5.1.md +0 -382
  320. package/docs/academic-demo.md +0 -567
  321. package/docs/agent-diff-view.md +0 -48
  322. package/docs/demo.html +0 -748
  323. package/docs/demo.md +0 -546
  324. package/docs/demo.pdf +0 -0
  325. package/docs/theme-paradigm.md +0 -797
  326. package/electron-builder.yml +0 -64
  327. package/electron.vite.config.js +0 -31
  328. package/electron.vite.config.ts +0 -30
  329. package/ios/App/App/AppDelegate.swift +0 -49
  330. package/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png +0 -0
  331. package/ios/App/App/Assets.xcassets/AppIcon.appiconset/Contents.json +0 -14
  332. package/ios/App/App/Assets.xcassets/Contents.json +0 -6
  333. package/ios/App/App/Assets.xcassets/Splash.imageset/Contents.json +0 -23
  334. package/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-1.png +0 -0
  335. package/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-2.png +0 -0
  336. package/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732.png +0 -0
  337. package/ios/App/App/Base.lproj/LaunchScreen.storyboard +0 -32
  338. package/ios/App/App/Base.lproj/Main.storyboard +0 -19
  339. package/ios/App/App/Info.plist +0 -49
  340. package/ios/App/App.xcodeproj/project.pbxproj +0 -408
  341. package/ios/App/App.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  342. package/ios/App/Podfile +0 -28
  343. package/resources/entitlements.mac.plist +0 -12
  344. package/resources/icon.icns +0 -0
  345. package/resources/icon.png +0 -0
  346. package/resources/icon.svg +0 -23
  347. package/resources/templates/slides/icon.png +0 -0
  348. package/resources/templates/slides/slides-template.md +0 -74
  349. package/resources/templates/slides/template-forest-ink.html +0 -540
  350. package/resources/templates/slides/template.html +0 -535
  351. package/scripts/afterPack.js +0 -13
  352. package/scripts/generate-icons.js +0 -102
  353. package/src/main/index.ts +0 -919
  354. package/src/preload/index.d.ts +0 -51
  355. package/src/preload/index.js +0 -70
  356. package/src/preload/index.ts +0 -110
  357. package/src/renderer/capacitor-api.ts +0 -713
  358. package/src/renderer/editor/editor.ts +0 -287
  359. package/src/renderer/editor/html-view.ts +0 -15
  360. package/src/renderer/editor/plugins/index.ts +0 -86
  361. package/src/renderer/editor/plugins/math-plugin.ts +0 -305
  362. package/src/renderer/editor/plugins/mermaid-plugin-custom.css +0 -46
  363. package/src/renderer/editor/plugins/mermaid-plugin-dark.css +0 -428
  364. package/src/renderer/editor/plugins/mermaid-plugin-elegant.css +0 -443
  365. package/src/renderer/editor/plugins/mermaid-plugin-newsprint.css +0 -208
  366. package/src/renderer/editor/plugins/mermaid-plugin.css +0 -111
  367. package/src/renderer/editor/plugins/mermaid-plugin.ts +0 -680
  368. package/src/renderer/editor/plugins/themes/base/dark.css +0 -23
  369. package/src/renderer/editor/plugins/themes/base/elegant.css +0 -32
  370. package/src/renderer/editor/plugins/themes/base/light.css +0 -20
  371. package/src/renderer/editor/plugins/themes/base/newsprint.css +0 -27
  372. package/src/renderer/editor/plugins/themes/base.css +0 -509
  373. package/src/renderer/editor/plugins/themes/components/mermaid/academic.css +0 -43
  374. package/src/renderer/editor/plugins/themes/components/mermaid/dark.css +0 -20
  375. package/src/renderer/editor/plugins/themes/components/mermaid/elegant.css +0 -24
  376. package/src/renderer/editor/plugins/themes/components/mermaid/light.css +0 -21
  377. package/src/renderer/editor/plugins/themes/components/mermaid/newsprint.css +0 -26
  378. package/src/renderer/editor/plugins/themes/components/mermaid/variables.css +0 -592
  379. package/src/renderer/editor/plugins/themes/foundation.css +0 -143
  380. package/src/renderer/editor/plugins/themes/theme-manager.ts +0 -133
  381. package/src/renderer/env.d.ts +0 -10
  382. package/src/renderer/index.html +0 -76
  383. package/src/renderer/main.ts +0 -775
  384. package/src/renderer/mobile.css +0 -428
  385. package/themes/academic-paper-pt.css +0 -1321
  386. package/themes/academic-paper.css +0 -1416
  387. package/themes/forest-ink.css +0 -664
  388. package/themes/guizang.css +0 -732
  389. package/themes/pixso-design.css +0 -1261
  390. package/themes/swiss-design.css +0 -596
  391. package/tsconfig.json +0 -14
  392. package/tsconfig.main.json +0 -12
  393. package/tsconfig.main.tsbuildinfo +0 -1
  394. package/tsconfig.preload.json +0 -12
  395. package/tsconfig.preload.tsbuildinfo +0 -1
  396. package/tsconfig.renderer.json +0 -13
  397. package/tsconfig.renderer.tsbuildinfo +0 -1
  398. package/tsconfig.tsbuildinfo +0 -1
package/README.md CHANGED
@@ -1,1012 +1,160 @@
1
- # ColaMD (Extended)
2
-
3
- **Markdown as Database. The Agent Native Editor and Rich Content Rendering Platform.**
4
-
5
- Extended from [marswaveai/ColaMD](https://github.com/marswaveai/colamd) v1.5.0 with a new **Renderer Plugin System** that supports WYSIWYG editing and rendering of math equations, Mermaid diagrams, and more. Markdown is no longer just plain text — it becomes a true content database.
6
-
7
- Real-time collaboration between humans and AI agents — see your agent's changes as they happen. Turn any Markdown file into a slide deck, blog post, resume, or product page.
8
-
9
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
10
- [![GitHub release](https://img.shields.io/github/release/marswaveai/colamd.svg)](https://github.com/marswaveai/colamd/releases)
11
- [![Version: 1.5.1](https://img.shields.io/badge/Version-1.5.1-blue.svg)](https://github.com/byteuser1977/ColaMD-extend/releases/tag/v1.5.1)
12
-
13
- **This Extended Edition**: [git@github.com:byteuser1977/ColaMD-extend.git](https://github.com/byteuser1977/ColaMD-extend)
14
-
15
- ## 🎉 v1.5.1 Release Highlights (2026-05-23)
16
-
17
- ### ✨ New Features
18
-
19
- #### 🎨 Enhanced Theme System
20
- - **Academic Paper Theme** — GB/T 7713 compliant academic paper formatting with three-line tables, SimHei/SimSun typography, and print-optimized Mermaid diagrams
21
- - **Swiss Design Theme** 🇨🇭 — Swiss International Typographic Style with black-white-red color system, geometric sans-serif fonts, and grid-based layout
22
- - **Pixso Design Theme** — Modern design system styling
23
- - **Forest Ink Theme** — Forest ink aesthetic with warm paper base and forest green accents
24
- - **Standardized Template** — Reference implementation following v3.0 theme paradigm for easy custom theme creation
25
- - **Theme Development Framework** — Complete CSS theme development specification (v3.2) with 30+ verifiable rules, WCAG contrast formulas, and print fidelity guidelines
26
-
27
- #### 📱 Mobile Platform Support
28
- - **Android (.apk)** — Capacitor 6 integration with native file picker, IME optimization, and PDF export
29
- - **iOS (.ipa)** — Full iOS support with Capacitor 6
30
- - **Dual-platform bridge** — Runtime auto-detection of Electron/Capacitor APIs
31
- - **Mobile-adapted styles** — Optimized touch interface and responsive design
32
-
33
- #### 🔧 Post-release Improvements
34
- - **Refactored PDF Export Pipeline** — Auto-extraction of current theme styles, custom print style support, plugin-injected styles
35
- - **Unified Plugin Style Management** — Dynamic configuration for Math/Mermaid plugins (clipboard, export, rendering styles)
36
- - **Enhanced Error Recovery** — Dynamic plugin skipping instead of hard-coded exclusions
37
- - **Custom Theme Export Fix** — Resolved Chromium CSSOM serialization issues
38
- - **Rendering Output Optimization** — Improved HTML structure for better compatibility
39
-
40
- ### 🐛 Key Fixes
41
- - Fixed 15 TypeScript type errors across the codebase
42
- - Fixed Mermaid text offset and border issues (elegant + academic-paper themes)
43
- - Fixed Chinese IME input on Android platform
44
- - Fixed Intent file opening and PDF export on Android
45
- - Fixed media query missing screen type for mobile
46
- - Fixed theme print fidelity (@media print mirrors)
47
- - Decoupled plugin system from main.ts dependencies
48
-
49
- > ⚠️ **Theme Migration Notice**: Starting from v1.5.1, theme updates have been migrated to [ColaMD-themes](https://github.com/byteuser1977/ColaMD-themes) repository for faster iteration and community contributions.
50
-
51
- ---
52
-
53
- [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)
54
-
55
- ---
56
-
57
- ## Why ColaMD?
58
-
59
- AI agents are rewriting how we work. They edit files, generate docs, and produce reports — all in Markdown.
60
-
61
- But how do you **watch** an agent work? You close the file. You reopen it. You wait.
62
-
63
- **ColaMD changes this.** Open a `.md` file in ColaMD, let your agent edit it, and watch the content update in real time — like pair programming with an AI. No refresh, no reload, no friction.
64
-
65
- This is what **Agent Native** means: built from the ground up for a world where humans and agents collaborate on the same files.
66
-
67
- ---
68
-
69
- ## What's Different from the Original
70
-
71
- This repository extends **[marswaveai/ColaMD](https://github.com/marswaveai/colamd)** v1.5.0 with the following key differences:
72
-
73
- | Aspect | Original ColaMD | This Extended Edition |
74
- |--------|-----------------|----------------------|
75
- | Content rendering | Plain Markdown text (GFM + Commonmark) only | **Markdown + Math Equations + Mermaid Diagrams** |
76
- | Plugin system | None | **Declarative plugin architecture, independently toggleable, dynamically registered** |
77
- | Math support | ❌ | ✅ KaTeX inline/block equations, live editing, PNG export |
78
- | Diagram support | ❌ | ✅ Mermaid full-type diagrams (17+ types), multi-theme adaptation, PNG export |
79
- | Dual-mode toggle | N/A | ✅ Each plugin supports **Rendered / Source Edit mode** one-click toggle |
80
- | Mobile platform | ❌ Desktop only | ✅ **Android (.apk) + iOS (.ipa)** via Capacitor 6 |
81
-
82
- > All original features are fully preserved: Agent real-time sync, activity indicator, WYSIWYG editor, slide system, themes & export, etc.
83
-
84
- ### Demo Documents
85
-
86
- This project includes comprehensive demo documents to showcase the plugin capabilities:
87
-
88
- #### General Demo — [`demo.md`](docs/demo.md)
89
-
90
- A comprehensive demo covering:
91
-
92
- - **Math Equations**: 7 inline equations + 6 block equations (including systems of equations, matrices, physics formulas)
93
- - **Mermaid Diagrams**: All 17 diagram types (flowchart, sequence, class, state, ER, Gantt, pie, journey, git graph, mindmap, timeline, quadrant, XY chart, C4 context, Sankey, block, complex clustered)
94
- - **Mixed Content**: Formulas and diagrams rendered together in the same document
95
-
96
- Open `docs/demo.md` to fully test the plugin rendering, mode switching, source editing, and PNG export capabilities of the extended ColaMD.
97
-
98
- #### Academic Paper Demo — [`academic-demo.md`](docs/academic-demo.md) 🆕
99
-
100
- A real-world academic paper demonstrating the enhanced **Academic Paper theme** (`academic-paper.css`):
101
-
102
- - **Full Academic Structure**: Abstract, keywords, CLC number, document identifier, introduction, methodology, tables, and references
103
- - **GB/T 7713 Compliance**: Follows Chinese academic paper formatting standards with proper typography (SimHei headings + SimSun body text)
104
- - **Three-Line Tables**: Academic-standard table format (top line + header bottom line + bottom line, no vertical borders)
105
- - **Mermaid Diagrams**: Complex organizational charts with custom color schemes optimized for print
106
- - **Mixed Content**: Mathematical formulas, Mermaid diagrams, tables, and citations in a single document
107
-
108
- Open `docs/academic-demo.md` in ColaMD with the **Academic Paper** theme active to see the full effect. This demo showcases:
109
- - Professional academic typography (黑体 for headings, 宋体 for body text)
110
- - Print-optimized Mermaid diagram rendering
111
- - Proper code block and blockquote styling for academic contexts
112
- - Footnotes and reference section formatting
113
-
114
- ---
115
-
116
- ## Features
117
-
118
- ### 🔗 Agent Native (Inherited from Original)
119
-
120
- - **Live Agent Sync** — When an AI agent (Claude Code, Cursor, Copilot, etc.) modifies your `.md` file, ColaMD detects changes via `fs.watch` and refreshes instantly. No manual reload needed. This is the core feature.
121
- - **Agent Activity Indicator** — A breathing dot in the titlebar tells you the agent's status: orange pulse while writing, green flash when done.
122
- - **Cmd+Click Links** — Click any link in the editor to open it directly in your browser.
123
-
124
- ### ✏️ Editor Core (Inherited from Original)
125
-
126
- - **True WYSIWYG** — Type Markdown, see rich text rendered instantly. No split-pane preview needed.
127
- - **Smart Line Breaks** — Single newlines render as `<br>`, matching how AI agents write Markdown.
128
- - **Rich Text Copy** — Copy content and paste into WeChat, email, or any rich text editor with formatting fully preserved.
129
- - **Minimal by Design** — No toolbar, no sidebar, no distractions. Just you and your content.
130
-
131
- ### 📊 Slides — Markdown as Database (Inherited from Original)
132
-
133
- HTML is hard to edit. Markdown is easy.
134
-
135
- ColaMD introduces a new idea: **Markdown as Database**. Your `.md` file is the content layer. HTML templates are the view layer. Change content by editing Markdown — never touch HTML.
136
-
137
- One Markdown file, many possible renderings: slides, blog, resume, product page... Future templates can consume the same file in completely different ways.
138
-
139
- #### How to Use
140
-
141
- - **File → New Slides (`⌘⇧N`)** — Creates a `slides.md` tutorial template and opens it in the editor
142
- - **File → Open as Slides (`⌘⇧P`)** — Spins up a local server and opens your current `.md` file as a slide deck in the browser
143
- - **File → Export Slides...** — Export a shareable version (single-file HTML or folder with video resources)
144
-
145
- #### Slide Format
146
-
147
- ```markdown
148
- ---
149
- kicker: YOUR BRAND
150
- chip: Event Name · 2026
151
- page: YOUR NAME
152
- ---
153
-
154
- <!-- type: cover -->
155
- # Title
156
- Subtitle here
157
-
158
- ---
159
-
160
- <!-- type: statement -->
161
- ## Key Message
162
- One powerful sentence.
163
- ```
164
-
165
- Supported layouts: `cover` · `statement` · `section` · `video` · `thankyou`
166
-
167
- Optional: background image (`bg: cover.png`), video embed (`src: demo.mp4`), inline image preview (`preview: screenshot.png`).
168
-
169
- No image? The cover falls back to a clean orange-on-white design — it just works.
170
-
171
- ### 📤 Export Capabilities
172
-
173
- #### PDF / HTML Export (Enhanced in v1.5.1)
174
- - **Auto Theme Style Extraction** — Automatically extracts and injects current theme styles into exported documents
175
- - **Custom Print Style Support** — Supports passing custom print CSS for advanced use cases
176
- - **Plugin-Injected Styles** — Math and Mermaid plugins dynamically inject their export styles (no more hardcoded style handling)
177
- - **Smart Error Recovery** — Dynamically skips failing plugins during export instead of hard-coded exclusions
178
- - **A4 PDF Output** — Proper pagination with 15mm margins, background color preservation, clean output without UI elements
179
- - **HTML Export** — Standalone HTML with embedded styles, KaTeX CDN for math, inline SVG for Mermaid diagrams, zero-dependency sharing
180
-
181
- - **Slide export** — Single HTML file (images Base64-inlined) or folder format (with video resources)
182
- - **Equation / Diagram PNG export** — Right-click to export as high-definition PNG images (2x scaling)
183
-
184
- > 💡 **Mobile Export**: On Android/iOS, exported files trigger system share panel for direct sending to WeChat, email, etc.
185
-
186
- ### 🎨 Themes & Cross-Platform (Inherited from Original)
187
-
188
- - **4 built-in themes** + [downloadable themes](themes/) + custom CSS import
189
- - **Cross-platform** — macOS (.dmg), Windows (.exe), Linux (.AppImage / .deb)
190
-
191
- ---
192
-
193
- ## Renderer Plugin System
194
-
195
- > ⭐ This is the core incremental feature of this extended edition. Plugins use a declarative registration architecture — each plugin is independently encapsulated and can be individually enabled or disabled.
196
-
197
- ### Architecture Overview
198
-
199
- ```
200
- src/renderer/editor/plugins/
201
- ├── index.ts # Plugin manager (register/query/toggle)
202
- ├── math-plugin.ts # 📐 Math equation renderer plugin
203
- ├── mermaid-plugin.ts # 🔀 Mermaid diagram renderer plugin
204
- ├── mermaid-plugin.css # Mermaid base styles
205
- ├── mermaid-plugin-dark.css # Mermaid dark theme
206
- ├── mermaid-plugin-elegant.css # Mermaid elegant theme
207
- └── mermaid-plugin-newsprint.css # Mermaid newsprint theme
208
- ```
209
-
210
- Every plugin follows a unified design pattern:
211
-
212
- ```
213
- Schema Definition → NodeView Interaction → Remark Parsing → Markdown Serialization → PNG Export → Rendered/Source Dual Mode
214
- ```
215
-
216
- ---
217
-
218
- ### 📐 Math Plugin — Equation Rendering
219
-
220
- **Source**: [math-plugin.ts](src/renderer/editor/plugins/math-plugin.ts) | **Dependencies**: [KaTeX](https://katex.org/) + remark-math
221
-
222
- | Property | Description |
223
- |-----------|-------------|
224
- | Plugin ID | `math` |
225
- | Default Enabled | ✅ Yes |
226
- | Context Menu | Save Equation as PNG |
227
- | Associated Nodes | `math_inline`, `math_block` |
228
-
229
- #### Supported Syntax
230
-
231
- ```markdown
232
- Inline equation: mass-energy equivalence $E = mc^2$ embedded within a paragraph.
233
-
234
- Block equation (centered display):
235
- $$
236
- \int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}
237
- $$
238
- ```
239
-
240
- #### Feature Details
241
-
242
- - **Inline equations (`$...$`)** — Uses `<span class="math-inline">` container, KaTeX rendered (`displayMode: false`), supports rendered / raw dual-mode toggle
243
- - **Block equations (`$$...$$`)** — Uses `<div class="math-block">` container, KaTeX rendered (`displayMode: true`, centered display), raw mode uses `<textarea>` with auto-adjusting row count
244
- - **Live editing** — Edit LaTeX source code directly in raw mode; auto-save and re-render on blur
245
- - **Graceful fallback** — KaTeX rendering failures degrade elegantly to plain text display without blocking the editing workflow
246
- - **PNG export** — Canvas + SVG foreignObject technology, 2x scaled high-definition output, white background, 16px padding
247
-
248
- ---
249
-
250
- ### 🔀 Mermaid Plugin — Diagram Rendering
251
-
252
- **Source**: [mermaid-plugin.ts](src/renderer/editor/plugins/mermaid-plugin.ts) | **Dependencies**: [Mermaid.js](https://mermaid.js.org/)
253
-
254
- | Property | Description |
255
- |-----------|-------------|
256
- | Plugin ID | `mermaid` |
257
- | Default Enabled | ✅ Yes |
258
- | Context Menu | Save Diagram as PNG |
259
- | Associated Nodes | `mermaid_block` |
260
-
261
- #### Supported Diagram Types (17+)
262
-
263
- ```markdown
264
- ```mermaid
265
- graph TD
266
- A[Markdown] --> B[ColaMD]
267
- B --> C[Math Plugin]
268
- B --> D[Mermaid Plugin]
269
- C --> E[Rich Content]
270
- D --> E
271
- ```
272
- ```
273
-
274
- | Category | Supported Diagrams |
275
- |----------|-------------------|
276
- | Flowchart | `graph` (TD/LR/RL/BT), `flowchart` |
277
- | Sequence Diagram | `sequenceDiagram` |
278
- | Class Diagram | `classDiagram` |
279
- | State Diagram | `stateDiagram-v2` |
280
- | ER Diagram | `erDiagram` |
281
- | User Journey | `journey` |
282
- | Pie Chart | `pie` |
283
- | Gantt Chart | `gantt` |
284
- | Git Graph | `gitGraph` |
285
- | Mind Map | `mindmap` |
286
- | Timeline | `timeline` |
287
- | Quadrant Chart | `quadrantChart` |
288
- | XY/Line/Bar Chart | `xyChart` |
289
- | C4 Architecture | `C4Context`, `C4Container`, `C4Component`, `C4Dynamic`, `C4Deployment` |
290
- | Sankey Diagram | `sankey-beta` |
291
- | Block Diagram | `block-beta` |
292
- | Architecture Diagram | `architecture-beta` |
293
-
294
- #### Feature Details
295
-
296
- - **Input shortcut rule** — Typing `\`\`\`mermaid` followed by Enter auto-converts to a mermaid_block node, no manual action needed
297
- - **Dual-mode toggle** — One-click switch between rendered preview and source editing; raw mode uses `<textarea>` for direct Mermaid code editing
298
- - **Async-safe rendering** — Render counter prevents race conditions, ensuring displayed results always match the latest code
299
- - **Multi-theme deep adaptation** — Each built-in theme has a corresponding Mermaid color scheme (see theme adaptation table below)
300
- - **C4 architecture-specific colors** — Independent semantic color configurations for persons/systems/containers/components
301
- - **Auto node height adjustment** — Container height auto-adjusts after rendering (+6px padding) to prevent content overflow
302
- - **PNG export** — SVG normalization → Image → Canvas → PNG, 2x high-definition output, white background
303
-
304
- #### Mermaid Theme Adaptation
305
-
306
- | UI Theme | Mermaid Theme Style | Font | Highlights |
307
- |----------|---------------------|------|------------|
308
- | **Light** | Default | System default | Clean & bright |
309
- | **Dark** | GitHub Dark | System default | `#0d1117` background, `#8b949e` border/text |
310
- | **Elegant** | Custom warm palette | LXGW WenKai | `#e8e2db` background, warm brown cScale |
311
- | **Newsprint** | Print style | PT Serif | Serif font, newsprint texture |
312
- | **Forest Ink** (custom) | Forest green palette | Noto Serif SC | `#f5f1e8` paper base, `#3d6b4a` forest green accent, ink-green lines |
313
-
314
- ---
315
-
316
- ## How It Works
317
-
318
- ```
319
- ┌─────────────┐ writes ┌──────────────┐
320
- │ AI Agent │ ──────────────▶│ .md file │
321
- │ (Claude, │ │ │
322
- │ Cursor...) │ └──────┬───────┘
323
- └─────────────┘ │
324
- fs.watch detects change
325
- │
326
- ┌───────▼───────┐
327
- │ ColaMD │
328
- │ auto-refresh │
329
- │ ✨ live! │
330
- │ │
331
- │ ┌───────────┐ │
332
- │ │ Plugin │ │
333
- │ │ ├─ Math │ │
334
- │ │ └─ Mermaid │ │
335
- │ └───────────┘ │
336
- └───────────────┘
337
- ```
338
-
339
- 1. Open any `.md` file in ColaMD
340
- 2. Let your AI agent edit that file
341
- 3. Watch the content update in real time — including instant rendering of math equations and Mermaid diagrams
342
- 4. The indicator dot pulses orange while the agent writes
343
-
344
- No configuration needed. It just works out of the box.
345
-
346
- ---
347
-
348
- ## Plug Menu — Plugin Render Control
349
-
350
- ColaMD provides a **Plug** menu in the top menu bar to control renderer plugin behavior. Each registered plugin (e.g., Math, Mermaid) can be independently managed through this menu.
351
-
352
- ### Menu Structure
353
-
354
- ```
355
- Plug
356
- ├── Math
357
- │ ├── Rendered # Rendered mode: display rich text effects of equations/diagrams
358
- │ └── Raw # Source mode: display raw Markdown code, editable directly
359
- └── Mermaid
360
- ├── Rendered # Rendered mode: display SVG visualization of diagrams
361
- └── Raw # Source mode: display Mermaid code, editable directly
362
- ```
363
-
364
- ### Rendered Mode
365
-
366
- - Plugin content is presented as rich text
367
- - **Math**: Beautiful math equations rendered by KaTeX, inline equations embedded in paragraphs, block equations centered
368
- - **Mermaid**: SVG vector diagrams, supporting visualization of 17+ diagram types
369
- - Right-click to export as PNG images
370
-
371
- ### Source Mode (Raw)
372
-
373
- - Plugin content is presented as raw Markdown source
374
- - Uses `<textarea>` to display and edit code directly
375
- - **Live editing**: Edit LaTeX equations or Mermaid diagram code directly in the text box
376
- - **Auto-save**: Modifications are automatically saved on blur, instantly switching back to rendered mode to display updated results
377
- - Text box height auto-adjusts based on content line count to avoid scrollbars
378
-
379
- ### Usage Example
380
-
381
- 1. Enter a Mermaid code block:
382
- ````markdown
383
- ```mermaid
384
- graph TD
385
- A[Start] --> B[Process]
386
- B --> C[End]
387
- ```
388
- ````
389
- 2. Click **Plug → Mermaid → Rendered** to view the diagram
390
- 3. Click **Plug → Mermaid → Raw** to switch to source mode, edit nodes and connections directly
391
- 4. Click elsewhere in the editor to blur, auto-save and re-render
392
-
393
- ### Design Intent
394
-
395
- - **WYSIWYG and source free switching**: Meet different scenario needs — view rendered effects when reading, edit source code when writing
396
- - **Zero-friction editing**: No need to memorize special shortcuts, one-click menu toggle, auto-save on blur
397
- - **Fully decoupled plugins**: Each plugin is independently controlled without mutual interference; newly added plugins automatically appear in the menu
398
-
399
- ---
400
-
401
- ## Quick Start
402
-
403
- ### Prerequisites
404
-
405
- - **Node.js** >= 18
406
- - **npm** >= 9
407
-
408
- ### Install & Run
409
-
410
- ```bash
411
- # Clone this extended edition repository
412
- git clone https://github.com/byteuser1977/ColaMD-extend.git
413
- cd ColaMD-extend
414
-
415
- # Install dependencies
416
- npm install
417
-
418
- # Start in development mode
419
- npm run dev
420
- ```
421
-
422
- ### Build & Package
423
-
424
- ```bash
425
- # Build
426
- npm run build
427
-
428
- # Package for current platform
429
- npm run dist
430
-
431
- # Package for specific platform
432
- npm run dist:mac # macOS (.dmg)
433
- npm run dist:win # Windows (.exe)
434
- npm run dist:linux # Linux (.AppImage / .deb)
435
- ```
436
-
437
- ### Download Pre-built Binaries
438
-
439
- > Check this extended edition's [GitHub Releases](https://github.com/byteuser1977/ColaMD-extend/releases) for the latest builds. Original releases are available at [marswaveai/colamd](https://github.com/marswaveai/colamd/releases).
440
-
441
- | Platform | Format |
442
- |----------|--------|
443
- | macOS | `.dmg` |
444
- | Windows | `.exe` |
445
- | Linux | `.AppImage` / `.deb` |
446
- | Android | `.apk` (via Capacitor) |
447
- | iOS | `.ipa` (via Capacitor, requires Xcode) |
448
-
449
- ---
450
-
451
- ## Mobile Build — Capacitor 6
452
-
453
- > Starting from v1.5.1, ColaMD supports building native mobile apps via **[Capacitor 6](https://capacitorjs.com/)** — the cross-platform runtime by Ionic. The same codebase that powers the Electron desktop app now runs on Android and iOS devices.
454
-
455
- ### Architecture: Dual-Platform Bridge
456
-
457
- ColaMD uses an **auto-detection bridge layer** that seamlessly switches between Electron (desktop) and Capacitor (mobile) APIs at runtime:
458
-
459
- ```
460
- ┌─────────────────────────────────────┐
461
- │ src/renderer/main.ts │
462
- │ api = electronAPI || capacitorAPI │ ← Auto-detect platform
463
- ├──────────────┬──────────────────────┤
464
- │ Electron │ Capacitor 6 │
465
- │ (Desktop) │ (Mobile) │
466
- │ │ │
467
- │ IPC comm │ Filesystem Plugin │
468
- │ dialog │ Share Plugin │
469
- │ shell.open │ App Plugin │
470
- │ fs module │ localStorage storage │
471
- └──────────────┴──────────────────────┘
472
- ```
473
-
474
- **Key files**:
475
- - [`capacitor-api.ts`](src/renderer/capacitor-api.ts) — Full Capacitor bridge implementing the same API surface as `electronAPI`
476
- - [`capacitor.config.ts`](capacitor.config.ts) — Capacitor configuration (appId, webDir, plugins)
477
- - [`mobile.css`](src/renderer/mobile.css) — Touch-optimized responsive styles
478
- - [`MainActivity.java`](android/app/src/main/java/cn/bytechain/colamd/MainActivity.java) — Android WebView IME support
479
-
480
- ### Technology Stack for Mobile
481
-
482
- | Component | Technology | Purpose |
483
- |-----------|------------|---------|
484
- | **Runtime** | Capacitor 6.x | Cross-platform native bridge |
485
- | **WebView Engine** | Android WebView / iOS WKWebView | Renders web content |
486
- | **File Access** | `@capacitor/filesystem` | Read/write local files |
487
- | **File Picker** | `@capawesome/capacitor-file-picker` | Native file selection dialog |
488
- | **Sharing** | `@capacitor/share` | System share sheet integration |
489
- | **App Lifecycle** | `@capacitor/app` | Handle app events (pause, resume) |
490
- | **Status Bar** | `@capacitor/status-bar` | Status bar styling |
491
- | **Haptics** | `@capacitor/haptics` | Haptic feedback |
492
-
493
- ### Prerequisites for Mobile Build
494
-
495
- | Platform | Requirements |
496
- |----------|-------------|
497
- | **Android** | Android Studio + SDK (API 34+) + **Java 21** (`brew install openjdk@21`) |
498
- | **iOS** | Xcode 15+ + CocoaPods + macOS |
499
-
500
- ### Quick Start — Android
501
-
502
- ```bash
503
- # 1. Install dependencies (Capacitor packages included)
504
- npm install
505
-
506
- # 2. Build web assets
507
- npm run build
508
-
509
- # 3. Sync to Android platform
510
- npx cap sync android
511
-
512
- # 4. Open in Android Studio
513
- npx cap open android
514
-
515
- # 5. Or build APK directly
516
- npm run cap:build:android
517
- # Output: android/app/build/outputs/apk/debug/app-debug.apk
518
- ```
519
-
520
- ### Quick Start — iOS
521
-
522
- ```bash
523
- # 1. Sync to iOS platform
524
- npx cap sync ios
525
-
526
- # 2. Open in Xcode
527
- npx cap open ios
528
-
529
- # 3. Build in Xcode (⌘R) or use:
530
- npm run cap:build:ios
531
- ```
532
-
533
- ### Build Commands
534
-
535
- | Command | Description | Output |
536
- |---------|-------------|--------|
537
- | `npm run cap:sync` | Sync web assets to all platforms | Updated `android/` and `ios/` |
538
- | `npm run cap:open:android` | Open Android project in Android Studio | — |
539
- | `npm run cap:open:ios` | Open iOS project in Xcode | — |
540
- | `npm run cap:run:android` | Build → Sync → Run on device/emulator | Live app on device |
541
- | `npm run cap:run:ios` | Build → Sync → Run on simulator | Live app in simulator |
542
- | `npm run cap:build:android` | Build **Debug APK** | `android/app/build/outputs/apk/debug/app-debug.apk` |
543
- | `npm run cap:build:android:release` | Build **Release APK** (signed) | `android/app/build/outputs/apk/release/app-release.apk` |
544
- | `npm run cap:build:ios` | Prepare iOS project for Xcode build | — |
545
-
546
- ### Release Build — Android
547
-
548
- For production release builds, the project includes a signing configuration:
549
-
550
- ```bash
551
- # Build signed release APK
552
- npm run cap:build:android:release
553
-
554
- # Output location
555
- android/app/build/outputs/apk/release/app-release.apk
556
- ```
557
-
558
- The release keystore is located at `android/app/release.keystore` with credentials stored in `build.gradle`.
559
-
560
- ### Release Build — iOS
561
-
562
- 1. Open the project in Xcode:
563
- ```bash
564
- npx cap open ios
565
- ```
566
-
567
- 2. In Xcode:
568
- - Select **Product → Archive**
569
- - Once archived, click **Distribute App**
570
- - Choose distribution method (App Store Connect, Ad Hoc, etc.)
571
-
572
- 3. For App Store submission:
573
- - Configure signing certificates in Xcode
574
- - Upload to App Store Connect via Xcode or Transporter
575
-
576
- ### Chinese IME Support (Android)
577
-
578
- ColaMD includes special handling for Chinese/Japanese/Korean input methods on Android WebView:
579
-
580
- **Implementation** ([`MainActivity.java`](android/app/src/main/java/cn/bytechain/colamd/MainActivity.java)):
581
- - WebView focus optimization for IME connection
582
- - Soft keyboard auto-show on focus
583
- - Touch mode focusability enabled
584
-
585
- **Known Limitations**:
586
- - ProseMirror/Milkdown has known IME composition issues on Android WebView
587
- - Some input methods may require tapping the editor area to activate
588
- - If input seems stuck, try tapping elsewhere then back to the editor
589
-
590
- ### File Picker Integration
591
-
592
- Mobile platforms use `@capawesome/capacitor-file-picker` for native file selection:
593
-
594
- ```typescript
595
- // Example usage (internal)
596
- const result = await FilePicker.pickFiles({
597
- types: ['text/markdown', 'text/plain'],
598
- multiple: false,
599
- readData: true,
600
- })
601
- ```
602
-
603
- **Supported file types**: `.md`, `.markdown`, `.txt`, `.css` (for themes)
604
-
605
- ### Mobile Features & Limitations
606
-
607
- | Feature | Status | Notes |
608
- |---------|--------|-------|
609
- | Markdown editing ✏️ | ✅ Fully supported | Milkdown editor runs in WebView |
610
- | Math rendering (KaTeX) 📐 | ✅ Fully supported | Same as desktop |
611
- | Mermaid diagrams 🔀 | ✅ Fully supported | SVG renders in WebView |
612
- | Plugin system | ✅ Fully supported | Toggle via UI, state in localStorage |
613
- | Themes | ✅ Fully supported | All themes work on mobile |
614
- | File open/save | ✅ Supported | Native file picker via FilePicker plugin |
615
- | Chinese/Japanese/Korean input | ⚠️ Partial | IME support implemented, may have edge cases |
616
- | Export HTML/PDF | ⚠️ Partial | HTML export works; PDF uses `window.print()` |
617
- | Agent file watch | ⚠️ Polling mode | Uses 2s interval instead of `fs.watch` |
618
- | Slides preview | ⚠️ Limited | Opens new browser window on desktop; basic on mobile |
619
- | External links | ✅ Supported | Opens in system browser via `_system` target |
620
-
621
- ### Responsive Design
622
-
623
- The mobile CSS ([`mobile.css`](src/renderer/mobile.css)) provides:
624
-
625
- - **Touch optimization**: Disabled tap highlight, proper touch-action
626
- - **Safe area support**: Automatic padding for notched devices (iPhone X+, modern Android)
627
- - **Responsive breakpoints**:
628
- - ≤768px: Tablet layout adjustments
629
- - ≤480px: Phone layout with smaller fonts
630
- - **Editor adaptation**: Fixed-position editor filling viewport below header
631
- - **Scroll behavior**: `-webkit-overflow-scrolling: touch` for smooth scrolling
632
- - **Context menu**: Touch-friendly with larger tap targets (12px padding, 15px font)
633
-
634
- ### Troubleshooting Mobile Issues
635
-
636
- **Chinese input not working**:
637
- - Tap the editor area to ensure focus
638
- - Try switching to another app and back
639
- - Check that the soft keyboard is visible
640
-
641
- **File picker not opening**:
642
- - Ensure storage permissions are granted
643
- - On Android 11+, check "Allow all the time" for storage permission
644
-
645
- **App crashes on launch**:
646
- - Run `npx cap sync android` to ensure latest web assets
647
- - Check Android Studio logcat for errors
648
- - Ensure Java 21 is correctly configured
649
-
650
- **Build fails**:
651
- ```bash
652
- # Clean and rebuild
653
- cd android
654
- ./gradlew clean
655
- cd ..
656
- npm run cap:build:android
657
- ```
658
-
659
- ---
660
-
661
- ## Theme System
662
-
663
- ColaMD includes **4 built-in themes**, and all renderer plugins automatically adapt to the active theme:
664
-
665
- | Theme | Identifier | Style Description |
666
- |-------|-----------|-------------------|
667
- | **Light** | `theme-light` | Light theme, clean & bright |
668
- | **Dark** | `theme-dark` | Dark theme, GitHub Dark style |
669
- | **Elegant** | `theme-elegant` | Elegant theme, warm serif style (**default theme**) |
670
- | **Newsprint** | `theme-newsprint` | Newsprint style |
671
-
672
- Downloadable external themes (located in [`themes/`](themes/) directory):
673
-
674
- | Theme File | Style Description |
675
- |------------|-------------------|
676
- | [elegant.css](themes/elegant.css) | Warm serif with terracotta accents, LXGW WenKai font |
677
- | [guizang.css](themes/guizang.css) | Ancient Guizang style, ochre accents, ink-black code blocks |
678
- | [forest-ink.css](themes/forest-ink.css) | 🌲 Forest Ink, warm paper base + forest green ink text + forest green accent |
679
- | [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 |
680
- | [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 |
681
- | [pixso-design.css](themes/pixso-design.css) | 🎨 Pixso Design, modern design system style |
682
- | [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 |
683
- | [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 |
684
-
685
- > ⚠️ **Theme Migration Notice**
686
- >
687
- > Starting from v1.5.1, **theme updates and maintenance have been migrated to the dedicated repository**:
688
- >
689
- > 🔗 **[https://github.com/byteuser1977/ColaMD-themes](https://github.com/byteuser1977/ColaMD-themes)**
690
- >
691
- > Future theme enhancements, bug fixes, and new theme submissions will be handled in the ColaMD-themes repository. This allows for:
692
- > - Faster iteration and release cycles for theme-specific changes
693
- > - Community contributions and theme submissions
694
- > - Independent versioning from the core ColaMD application
695
- > - Focused issue tracking for theme-related problems
696
- >
697
- > 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.
698
-
699
- Custom theme support: Place CSS files in `~/.colamd/themes/` directory, then import via **Theme > Import Theme**. Imported themes persist across sessions.
700
-
701
- ### Theme Development
702
-
703
- For developers who want to create custom themes, refer to:
704
-
705
- - **Theme Paradigm Document**: [`docs/theme-paradigm.md`](docs/theme-paradigm.md) — Complete CSS theme development specification (v3.2)
706
- - Design principles: variable-driven, modular, semantic naming, AI-agent derivable
707
- - 30+ verifiable rules (MUST / MUST NOT / SHOULD) including WCAG contrast formulas
708
- - Print fidelity requirements: variable re-declaration, required element coverage (12 categories)
709
- - px unit unification standard: prohibits pt/rem mixing for consistent PDF export
710
- - **Theme Template**: [`themes/template.css`](themes/template.css) — Copy this file as a starting point for your custom theme
711
- - **Mermaid Variable Reference**: See [`themes/README.md`](themes/README.md) for complete Mermaid CSS variable documentation
712
-
713
- ---
714
-
715
- ## Technical Architecture
716
-
717
- ```
718
- ┌─────────────────────────────────────────────────────────────┐
719
- │ ColaMD — Dual Platform │
720
- │ │
721
- │ ┌──────────────────────┐ ┌────────────────────────────┐ │
722
- │ │ Desktop (Electron) │ │ Mobile (Capacitor 6) │ │
723
- │ │ │ │ │ │
724
- │ │ ┌─────────┐ ┌──────┐ │ │ ┌──────────────────────┐ │ │
725
- │ │ │ Main │ │Preload│ │ │ │ Capacitor Runtime │ │ │
726
- │ │ │Process │ │Bridge │ │ │ │ (WebView / WKWebView)│ │ │
727
- │ │ └────┬────┘ └──┬───┘ │ │ └──────────┬───────────┘ │ │
728
- │ │ │ IPC │ │ │ │ Plugins │ │
729
- │ │ └────┬────┘ │ │ ├─ Filesystem │ │
730
- │ │ ▼ │ │ ├─ Share │ │
731
- │ │ ┌─────────────────┐ │ │ ├─ App │ │
732
- │ │ │ Renderer │ │ │ ├─ StatusBar │ │
733
- │ │ │ Process │◄─┼───┼─────────────┤ │ │
734
- │ │ └────────┬────────┘ │ │ └─ Haptics │ │
735
- │ │ ▼ │ └──────────────┬───────────────┘ │
736
- │ │ ┌──────────────────┐ │ │ │
737
- │ │ │ Milkdown Editor │◄┘ │ │
738
- │ │ │ (ProseMirror) │ │ │
739
- │ │ │ ┌────────────┐ │ │ │
740
- │ │ │ │Plugin Syst.│ │ │ │
741
- │ │ │ │├─ 📐 Math │ │ │ │
742
- │ │ │ │└─ 🔀Mermaid│ │ │ │
743
- │ │ │ └────────────┘ │ │ │
744
- │ │ └──────────────────┘ │ │
745
- │ └──────────────────────┘ │ │
746
- │ ┌──────────────────────────┘ │
747
- │ ▼ │
748
- │ Auto-detection: │
749
- │ api = electronAPI || capacitorAPI │
750
- └─────────────────────────────────────────────────────────────┘
751
- ```
752
-
753
- ### Tech Stack
754
-
755
- | Technology | Purpose | Version | Documentation |
756
- |------------|---------|---------|---------------|
757
- | [Electron](https://www.electronjs.org/) | Cross-platform desktop framework | ^34.0.0 | [📖 Docs](https://www.electronjs.org/docs/latest/) |
758
- | [Capacitor](https://capacitorjs.com/) | Cross-platform mobile runtime (Android/iOS) | ^6.2.1 | [📖 Docs](https://capacitorjs.com/docs/) |
759
- | [Milkdown](https://milkdown.dev/) | WYSIWYG Markdown editor core (ProseMirror-based) | ^7.19.2 | [📖 Docs](https://milkdown.dev/docs) |
760
- | [ProseMirror](https://prosemirror.net/) | Underlying rich text editing engine | — | [📖 Docs](https://prosemirror.net/docs/) |
761
- | [KaTeX](https://katex.org/) | Math equation rendering engine | ^0.16.46 | [📖 Docs](https://katex.org/docs/) |
762
- | [Mermaid.js](https://mermaid.js.org/) | Diagram rendering library | ^11.15.0 | [📖 Docs](https://mermaid.js.org/intro/) |
763
- | [TypeScript](https://www.typescriptlang.org/) | Type-safe development language | ^5.7.0 | [📖 Docs](https://www.typescriptlang.org/docs/) |
764
- | [electron-vite](https://electron-vite.org/) | Electron build toolchain | ^3.0.0 | [📖 Docs](https://electron-vite.org/guide/) |
765
- | [Vite](https://vitejs.dev/) | Underlying build engine | ^6.0.0 | [📖 Docs](https://vitejs.dev/guide/) |
766
-
767
- > 💡 **Dev Tip**: The official documentation of each library is the best reference for developing new plugins and custom features. In particular, the [KaTeX supported syntax](https://katex.org/docs/supported.html), [Mermaid diagram syntax](https://mermaid.js.org/intro/syntax-reference.html), and [Capacitor plugins API](https://capacitorjs.com/docs/apis) are essential for extending capabilities across platforms.
768
-
769
- ### Project Structure
770
-
771
- ```
772
- src/
773
- ├── main/
774
- │ └── index.ts # Main process: window management, file I/O, menus, file watching
775
- ├── preload/
776
- │ └── index.ts # Secure IPC bridge layer (Electron)
777
- └── renderer/
778
- ├── index.html # Entry HTML
779
- ├── main.ts # Renderer entry: auto-detects Electron or Capacitor
780
- ├── capacitor-api.ts # ★ Capacitor bridge layer (replaces Electron APIs on mobile)
781
- ├── mobile.css # ★ Touch-optimized responsive styles
782
- ├── editor/
783
- │ ├── editor.ts # Editor orchestration core (plugin integration)
784
- │ └── plugins/ # ★ Renderer plugin system
785
- │ ├── html-view.ts # HTML inline node view
786
- │ └── plugins/ # ★ Renderer plugin system
787
- │ ├── index.ts # Plugin manager (register/query/toggle)
788
- │ ├── math-plugin.ts
789
- │ ├── mermaid-plugin.ts
790
- │ └── *.css # Plugin styles (with multi-theme adaptation)
791
- └── themes/
792
- ├── base.css # Base styles
793
- └── theme-manager.ts # Theme switching manager
794
- ```
795
-
796
- ### Design Philosophy
797
-
798
- The entire project has only **5 runtime dependencies** + **6 dev dependencies**, strictly following the principle of **"If not necessary, do not add entity"**:
799
-
800
- - No toolbar (users use shortcuts and Markdown syntax)
801
- - No sidebar or status bar
802
- - No file management, cloud sync, or collaborative editing
803
- - Pursue extreme simplicity — each plugin has a single clear responsibility, fully decoupled and independently toggleable
804
-
805
- ---
806
-
807
- ## Inline SVG Guide
808
-
809
- > ⚠️ **Important**: ColaMD uses remark/rehype to parse Markdown, where **blank lines act as paragraph separators**. For inline SVG to render correctly, the entire HTML block (including `<div>`, `<svg>`, `<p>` tags) **must be on a single line without any line breaks**.
810
-
811
- ### Why Single-Line Format?
812
-
813
- ColaMD's parsing pipeline:
814
-
815
- ```
816
- Markdown Source
817
- ↓
818
- remark-parse (Markdown → MDAST)
819
- ↓
820
- remark plugins processing
821
- ↓
822
- Blank line detection: encountering blank line → creates new paragraph node
823
- ↓
824
- rehype (MDAST → HAST)
825
- ↓
826
- ProseMirror serialization
827
- ↓ Each paragraph → independent htmlSchema.node
828
- ↓
829
- html-view.ts injects into DOM
830
- ↓
831
- Final output: <span class="milkdown-html-inline">single block</span>
832
- ```
833
-
834
- **Multi-line format consequence**:
835
-
836
- ```html
837
- <!-- If SVG is split across multiple lines (with blank lines) -->
838
-
839
- Markdown:
840
- <div>
841
- <svg>
842
- <defs>...</defs>
843
-
844
- <rect/>
845
-
846
- <circle/>
847
- </svg>
848
- </div>
849
-
850
- Exported HTML:
851
- <p><span>...<svg><defs>...</defs></svg></span></p> ← Block 1
852
- <p><span> <rect/></span></p> ← Block 2 (independent!)
853
- <p><span> <circle/></span></p> ← Block 3 (independent!)
854
-
855
- Result: ❌ SVG fragmented, cannot render correctly
856
- ```
857
-
858
- **Single-line format effect**:
859
-
860
- ```html
861
- <!-- Entire content on one line (no blank lines) -->
862
-
863
- Markdown:
864
- <div><svg><defs>...</defs><rect/><circle/></svg><p>Caption</p></div>
865
-
866
- Exported HTML:
867
- <p><span>
868
- <div><svg>complete content</svg><p>Caption</p></div>
869
- </span></p>
870
-
871
- Result: ✅ Complete SVG renders correctly
872
- ```
873
-
874
- ### SVG Specification Requirements
875
-
876
- | # | Rule | Importance | Description |
877
- |---|------|------------|-------------|
878
- | 1 | 🔴 **Single-line compression** | **Required** | Entire `<div>` block must not contain line breaks |
879
- | 2 | ✅ **Tag closure** | Required | All tags must be properly closed or self-closing |
880
- | 3 | ✅ **Namespace** | Required | Must include `xmlns="http://www.w3.org/2000/svg"` |
881
- | 4 | **Size matching** | Required | `width`/`height` must match `viewBox` |
882
- | 5 | **Double quotes** | Recommended | All attribute values should use double quotes |
883
- | 6 | **ASCII characters** | Recommended | Avoid special symbols; use `-` instead of `→` |
884
-
885
- ### Example: Complex Inline SVG
886
-
887
- ```html
888
- <div style="text-align: center; margin: 20px 0;"><svg width="600" height="400" viewBox="0 0 600 400" xmlns="http://www.w3.org/2000/svg" style="display: block; margin: 0 auto; background: #f5f5f5; border-radius: 12px;"><defs><linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:#4A90E2;stop-opacity:1"/><stop offset="100%" style="stop-color:#357ABD;stop-opacity:1"/></linearGradient><linearGradient id="grad2" x1="0%" y1="0%" x2="100%" y2="0%"><stop offset="0%" style="stop-color:#7ED321;stop-opacity:1"/><stop offset="100%" style="stop-color:#5DB80D;stop-opacity:1"/></linearGradient></defs><rect width="600" height="400" fill="#f5f5f5" rx="12"/><rect x="40" y="40" width="520" height="60" rx="8" fill="url(#grad1)"/><text x="300" y="78" fill="white" text-anchor="middle" font-size="22" font-weight="bold">Inline SVG Example</text><circle cx="150" cy="180" r="50" fill="url(#grad1)"/><text x="150" y="188" fill="white" text-anchor="middle" font-size="16" font-weight="bold">Node A</text><rect x="250" y="130" width="100" height="100" rx="10" fill="url(#grad2)"/><text x="300" y="185" fill="white" text-anchor="middle" font-size="16" font-weight="bold">Node B</text><polygon points="450,130 500,180 450,230 400,180" fill="#E74C3C"/><text x="450" y="188" fill="white" text-anchor="middle" font-size="14" font-weight="bold">Node C</text><line x1="200" y1="180" x2="250" y2="180" stroke="#666" stroke-width="2" stroke-dasharray="5,5"/><line x1="350" y1="180" x2="400" y2="180" stroke="#666" stroke-width="2" stroke-dasharray="5,5"/><rect x="100" y="280" width="400" height="80" rx="8" fill="white" stroke="#ddd" stroke-width="1"/><text x="300" y="310" fill="#333" text-anchor="middle" font-size="14" font-weight="bold">Three-Layer Rocket Model</text><text x="300" y="335" fill="#666" text-anchor="middle" font-size="12">Material - Manufacturing - Platform</text></svg><p style="font-size: 10pt; color: #666; margin-top: 12px;">Figure: Complex inline SVG example (single-line compressed format)</p></div>
889
- ```
890
-
891
- ### Comparison: Inline vs External SVG
892
-
893
- | Feature | Inline SVG | External SVG |
894
- |---------|-----------|--------------|
895
- | **Use case** | Demo, learning, simple icons | Production environment, complex graphics |
896
- | **Code location** | Inside Markdown file | Independent `.svg` file |
897
- | **Format requirement** | 🔴 **Must be single-line compressed** | No special requirements |
898
- | **Maintainability** | ⚠️ Difficult (long lines hard to read) | ✅ Excellent (independent files) |
899
- | **Complexity limit** | Limited by single-line length | Unlimited |
900
- | **Browser cache** | ❌ Cannot be cached | ✅ Auto-cached |
901
-
902
- ### Best Practices
903
-
904
- #### When to Use Inline SVG:
905
- - ✅ Demonstrations and learning purposes
906
- - ✅ Simple icons (< 10 elements)
907
- - ✅ Need single-file delivery
908
- - ✅ Quick prototype development
909
-
910
- #### When to Use External SVG:
911
- - ✅ Production documents
912
- - ✅ Complex graphics (> 20 elements)
913
- - ✅ Need frequent editing and maintenance
914
- - ✅ Team collaboration projects
915
-
916
- ### Maintenance Tips
917
-
918
- 1. **Use temporary line breaks during editing**
919
- ```html
920
- <!-- Development phase: readable format -->
921
- <svg ...>
922
- <rect .../>
923
- <circle .../>
924
- </svg>
925
-
926
- <!-- Before saving: compress to one line -->
927
- <svg ...><rect .../><circle .../></svg>
928
- ```
929
-
930
- 2. **Use editor's "Join Lines" feature**
931
- - VS Code: `Ctrl+J` (Windows) / `Cmd+J` (Mac)
932
- - WebStorm: `Ctrl+Shift+J`
933
-
934
- 3. **Version control friendly**
935
- - Git diff shows entire line changes
936
- - Consider using `.gitattributes` for long-line handling
937
-
938
- ---
939
-
940
- ## Acknowledgments & Copyright
941
-
942
- ### Original Project
943
-
944
- This project is an extended development based on **[marswaveai/ColaMD](https://github.com/marswaveai/colamd)** v1.5.0.
945
-
946
- **Original Author**: [marswave.ai](https://marswave.ai) (hello@marswave.ai)
947
-
948
- The original ColaMD is an excellent Agent Native Markdown editor. Its design philosophy of "if not necessary, do not add entity" has profoundly influenced the development philosophy of this project. This extended edition preserves all original features while adding a renderer plugin system to support richer Markdown content expression.
949
-
950
- ### Third-Party Open Source Libraries
951
-
952
- This project depends on the following excellent open source projects:
953
-
954
- | Project | License | Purpose |
955
- |---------|---------|---------|
956
- | [Electron](https://github.com/electron/electron) | MIT | Cross-platform desktop framework |
957
- | [Milkdown](https://github.com/Milkdown/milkdown) | MIT | WYSIWYG Markdown editor core |
958
- | [ProseMirror](https://github.com/ProseMirror/prosemirror) | MIT | Underlying rich text editing engine |
959
- | [KaTeX](https://github.com/KaTeX/KaTeX) | MIT | Math equation rendering |
960
- | [Mermaid.js](https://github.com/mermaid-js/mermaid) | MIT | Diagram rendering |
961
- | [Vite](https://github.com/vitejs/vite) | MIT | Build tool |
962
- | [TypeScript](https://github.com/microsoft/TypeScript) | Apache-2.0 | Development language |
963
-
964
- We thank the authors and maintainers of the above projects for their outstanding contributions to the open source community.
965
-
966
- ### Open Source License
967
-
968
- Copyright (c) 2026 [marswave.ai](https://marswave.ai) (Original) | [byteuser1977](https://github.com/byteuser1977) (Extended Edition)
969
-
970
- Released under the [MIT License](LICENSE) — free and open source forever.
971
-
972
- > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
973
-
974
- ---
975
-
976
- ## Community & Support
977
-
978
- ### Related Links
979
-
980
- | Link | Description |
981
- |------|-------------|
982
- | [GitHub Repository (Extended)](https://github.com/byteuser1977/ColaMD-extend) | This extended edition |
983
- | [GitHub Repository (Original)](https://github.com/marswaveai/colamd) | Original project address |
984
- | [GitHub Releases (Extended)](https://github.com/byteuser1977/ColaMD-extend/releases) | Download latest extended version |
985
- | [GitHub Releases (Original)](https://github.com/marswaveai/colamd/releases) | Download original version |
986
- | [Issues (Extended)](https://github.com/byteuser1977/ColaMD-extend/issues) | Bug reports & suggestions for this edition |
987
- | [Issues (Original)](https://github.com/marswaveai/colamd/issues) | Bug reports for original project |
988
- | [marswave.ai](https://marswave.ai) | Official website |
989
-
990
- ### Contributing
991
-
992
- You are welcome to participate in the following ways:
993
-
994
- - **Submit Issues** — Please report bugs or share new feature ideas via GitHub Issues
995
- - **Pull Request** — Code improvements are welcome, especially new renderer plugins
996
- - **Theme Contributions** — Create beautiful CSS themes and share them with the community
997
-
998
- ### Roadmap
999
-
1000
- ColaMD will evolve alongside the agent ecosystem:
1001
-
1002
- - ~~v1.1~~ — ✅ Live file reload, file associations, drag & drop, theme system
1003
- - ~~v1.2~~ — ✅ New icon
1004
- - ~~v1.3~~ — ✅ Agent activity indicator, Cmd+click links, rich text copy, smart line breaks, PDF/HTML export, theme persistence
1005
- - ~~v1.4~~ — ✅ Slides: Markdown as Database, HTML template rendering
1006
- - ~~v1.5~~ — ✅ Export Slides: single-file HTML with inlined images
1007
- - **Current Version** — 🆕 Renderer Plugin System: Math equation rendering + Mermaid diagram rendering
1008
- - **Future Plans** — More renderer plugins (syntax highlighting, enhanced flowcharts, etc.), bidirectional sync, multi-file watching
1009
-
1010
- ---
1011
-
1012
- *Extended from [marswaveai/ColaMD](https://github.com/marswaveai/colamd), built for the agent-native future.*
1
+ # ColaMD Extend
2
+
3
+ > A free, elegant Markdown editor anyone can pick up. No toolbars, no clutter, and the file on disk is always what you see.
4
+
5
+ **Language / 语言: [English](README.md) · [中文](README_CN.md)** · [Website](https://colamd.com/)
6
+
7
+ ColaMD is an open-source, free, elegant Markdown editor for writing, notes, and documentation. It is built for people who just want to write: no toolbars, no status bar, nothing to configure: just your text and a file list, with a tab strip only when you open a second document.
8
+
9
+ It offers true WYSIWYG editing, 12 built-in themes, rich-text copy, smart line breaks, search and replace, a document outline, PDF / HTML / Word export, and support for macOS, Windows, and Linux.
10
+
11
+ Whatever writes the file (an AI agent such as Claude Code or Codex, a script, or another editor), ColaMD shows the new content right away. No reopening, no manual refresh.
12
+
13
+ **This repository (ColaMD-extend) is an extended fork of [marswaveai/ColaMD](https://github.com/marswaveai/colamd)**, currently based on upstream v2.7.7. Everything upstream offers is here; the fork ports its own features on top, see [Extend Features](#extend-features) and the [porting roadmap](#porting-roadmap-extend).
14
+
15
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
16
+ [![Upstream](https://img.shields.io/badge/upstream-v2.7.7-blue)](https://github.com/marswaveai/colamd)
17
+ [![GitHub release](https://img.shields.io/github/release/byteuser1977/ColaMD-extend.svg)](https://github.com/byteuser1977/ColaMD-extend/releases)
18
+
19
+ [Download](#download) | [Features](#features)
20
+
21
+ ---
22
+
23
+ ## Screenshots
24
+
25
+ <p align="center">
26
+ <img src="docs/images/tasks-en.png" alt="ColaMD showing an interactive task list" width="49%">
27
+ <img src="docs/images/rendering-en.png" alt="ColaMD rendering a table and inline code" width="49%">
28
+ </p>
29
+
30
+ <p align="center"><em>Interactive task lists, and Markdown rendered as you type: headings, links, tables and inline code.</em></p>
31
+
32
+ ## Themes
33
+
34
+ Twelve built-in themes, six light, six dark, inspired by Bear, Notion, iA Writer, Kindle, Solarized, Nord, Gruvbox, and Dracula. Every one of them is also a standalone CSS file in [`themes/`](themes/), with a guide to [writing your own](themes/README.md) and a commented [template](themes/template.css) to copy.
35
+
36
+ <p align="center">
37
+ <img src="docs/images/theme-swatches.svg" alt="ColaMD themes" width="92%">
38
+ </p>
39
+
40
+ ## Features
41
+
42
+ - **Always in Sync**: Whenever the file changes on disk (an AI agent, a script, another editor), the editor updates immediately. No reopening, no manual refresh.
43
+ - **True WYSIWYG Editing**: Type Markdown and see rich text directly. No split-pane preview.
44
+ - **Files & Outline**: Browse Markdown files in the selected folder, or switch to a document outline for focused heading navigation.
45
+ - **Source Mode**: Switch to the raw Markdown source whenever you need to inspect or edit it directly. The source is syntax-highlighted in the current theme, and switching modes keeps your caret, undo history and scroll position.
46
+ - **Task Lists**: Click checkboxes to complete tasks, or use the keyboard shortcut.
47
+ - **Highlights & LaTeX**: Write `==highlighted text==` and render mathematical formulas with KaTeX.
48
+ - **Mermaid Diagrams**: Mermaid code blocks render as diagrams, and a diagram wider than the reading column can be zoomed (Ctrl/⌘ + scroll wheel, or the buttons in its corner) and dragged to pan. The renderer is loaded only when a document contains one, and clicking a diagram opens its source.
49
+ - **Search & Replace**: Find anything in the current document with ⌘/Ctrl+F, then replace the current match or all matches.
50
+ - **Smart Line Breaks**: Single newlines render as line breaks, matching how people and AI tools write Markdown.
51
+ - **Rich Text Copy**: Copy content with formatting preserved into WeChat, email, and other rich-text editors.
52
+ - **Themes**: Twelve built-in themes for focused writing in light or dark environments.
53
+ - **Recent Files & Session Restore**: Jump back to the last 10 documents from the File menu, and reopen where you left off at launch.
54
+ - **Editor Font Settings**: Pick any installed system font and size for the editor; your choice wins over theme defaults.
55
+ - **Multiple Windows**: Independent editor windows, each with its own save queue and close protection.
56
+ - **Save Status Hint**: A quiet titlebar indicator shows unsaved/saved, then fades away.
57
+ - **Heading Anchors**: Click intra-document anchor links to jump between headings, CJK included.
58
+ - **Version Changelog**: The first launch after an update opens the built-in changelog once, so you can see what changed without repeated prompts.
59
+ - **PDF, HTML & Word Export**: Turn your Markdown document into a themed PDF, self-contained HTML, or editable Word document.
60
+ - **Image Export**: Share Markdown as one continuous PNG at the desktop or mobile reading width; longer documents continue as numbered pages.
61
+ - **Portable Image Paths**: Local images use safe `file://` URLs for display and return to relative paths when saved.
62
+ - **Minimal by Design**: No toolbar, no permanent sidebar, no distractions.
63
+ - **Cross-Platform**: Available for macOS, Windows, and Linux.
64
+
65
+ ## Extend Features
66
+
67
+ Built and planned on top of upstream (progress in the [porting roadmap](#porting-roadmap-extend)):
68
+
69
+ - **Display plugin system**: unified style management for math and Mermaid diagrams, applied consistently to clipboard copy and exports (PDF / HTML / Word)
70
+ - **More custom themes**: academic-paper (GB/T 7713), Swiss Design, Forest Ink, Guizang, Pixso Design — shipped as importable theme files, each with Mermaid color adaptation planned
71
+ - **i18n completion**: fill the remaining menu and UI coverage on top of upstream language switching
72
+ - **npm library build**: package the editor core as an npm package for external integrations such as the VSCode extension
73
+ - **Mobile**: a Capacitor-based Android build is in place: open a `.md` from the system file manager, a native menu that follows the theme, and a phone-width layout. Build an APK with `npm run dist:android`; it lands in `release/`. iOS is not started.
74
+
75
+ ## Branches
76
+
77
+ | Branch | Purpose |
78
+ |--------|---------|
79
+ | `main` | Upstream mirror: follows [marswaveai/ColaMD](https://github.com/marswaveai/colamd), no fork commits |
80
+ | `extend/2.x` | Main development line: ports develop features onto upstream 2.x (current branch) |
81
+ | `develop` | v1.5.2 archive: complete feature reference on the old (1.x) architecture, frozen |
82
+ | `release/1.5.2` / `mobile` | Release and mobile backups of the old version, read-only |
83
+
84
+ ## Works with your Markdown workflow
85
+
86
+ ColaMD does not ask you to change your habits. It works well alongside Obsidian, Typora, VS Code, and other Markdown apps, all sharing the same `.md` files, with each tool doing what it does best.
87
+
88
+ ## Download
89
+
90
+ > Check the [Extend releases](https://github.com/byteuser1977/ColaMD-extend/releases) for the latest builds; upstream builds live at [marswaveai/ColaMD Releases](https://github.com/marswaveai/colamd/releases).
91
+
92
+ | Platform | Format |
93
+ |----------|--------|
94
+ | macOS | `.dmg` |
95
+ | Windows | `.exe` |
96
+ | Linux | `.AppImage` / `.deb` |
97
+
98
+ ## Roadmap
99
+
100
+ ### Porting roadmap (Extend)
101
+
102
+ develop (v1.5.2) features are built on the old 1.x architecture and cannot be merged directly; they are re-adapted onto the 2.x core in this order:
103
+
104
+ 1. ✅ Custom themes: 5 pure-CSS themes (academic-paper, Swiss Design, Forest Ink, Guizang, Pixso Design) ship with the app under `templates/themes` and are loaded via Theme > Import Theme (no menu registration)
105
+ 2. Plugin style management: upstream 2.x already ships KaTeX and Mermaid; focus on unified style injection and export adaptation
106
+ 3. i18n completion: compare with upstream language switching and fill the gaps
107
+ 4. npm library build: package the editor core as a reusable npm package
108
+ 5. Mobile: Android is usable (system file-manager opening, native menu, phone-width layout, APK produced by `scripts/cap-android.mjs`); iOS is not started
109
+
110
+ ### Upstream roadmap
111
+
112
+ ColaMD will keep growing as a focused, free Markdown editor:
113
+
114
+ - v1.1: Live file reload, file associations, drag & drop, themes
115
+ - v1.2: New icon
116
+ - v1.3: Agent activity indicator, Cmd+click links, rich text copy, smart line breaks, PDF export, theme persistence
117
+ - v1.6: Robust live sync: atomic-save (rename) detection, watcher self-recovery, spellcheck off
118
+ - v1.6.1: Editable task lists (click / ⌘+Enter), ==highlight== syntax, Markdown cheatsheet
119
+ - v1.6.2: Temporarily remove HTML export
120
+ - v1.7: Same-directory file list: switch files in place, live updates when agents create/remove files; search (⌘F) + LaTeX (⌘⇧E) from community PR #14
121
+ - v1.7.1: Task checkbox click fix, centered SVG checkmark, titlebar file-panel toggle button
122
+ - v1.7.2: Playable demo page: Help → 新功能演示 (⌘⇧D), a real directory showcasing each release's features
123
+ - v1.7.3: Demo page becomes a cumulative changelog: resources/demo/changelog.md records every release and opens straight into it
124
+ - v1.7.4: Community-feedback release: file panel improvements, source mode, HTML export, Windows image paths, and a VS Code integration MVP
125
+ - v1.8.0: Portable image paths for Markdown and HTML images, plus editing fixes from community feedback
126
+ - v1.8.1: Refined first-launch experience and macOS icon; removed Mermaid rendering so code blocks remain native and editable
127
+ - v1.9.0: Word export, desktop and mobile reading-page image export, a document outline, themed PDF pages, and leaner startup loading
128
+ - v2.0.0: 1000-star release: Mermaid diagrams return with luminance-aware colors, recent files & session restore, editor font settings, heading anchors, multiple windows, and a save status hint
129
+ - v2.0.1: Universal macOS build for Apple silicon and Intel Macs, plus custom-theme restoration, Mermaid render recovery, and Windows updater fixes
130
+ - v2.0.2: Resizable file panel (180–420px, remembered) and an outline progress view that highlights the current heading and flashes the landing point after a jump
131
+ - v2.3.0: Folders expand in place in the file list, one root and downward, so nested documents are one click away. Plus a round of shell tightening: the tab strip starts on the panel's edge line, resizing the panel lights up the divider itself, long names in the list appear as a hover label instead of scrolling past the icon, and the title-bar controls express state through weight instead of boxes
132
+ - v2.7.0: The editor core is rewritten around a single rule: the editor holds the file's bytes, and rendering is a layer drawn on top of them. Characters you never touched can no longer change on save (table delimiter rows and `*`, `$`, `_` used to come back rewritten), long documents export whole instead of one screenful, and images, links, footnotes, inline HTML, Mermaid diagrams, code highlighting, copy buttons and list continuation are all back on the new core
133
+ - v2.6.0: Mermaid diagrams are drawn into exported Word documents (rendered light, because Word is a white page), the reading column has three widths in View → Text Width (640 / 780 / 1080, honoured by source mode and by the HTML and PDF exports), unsaved work is copied to `~/.colamd/recovered` before it is discarded, and the tab close button answers a 24×24 target while staying 16×16 on screen
134
+ - v2.5.0: The document becomes a slideshow (View → Play Slideshow, ⌘⇧P): one `---` per page, full screen, starting at your caret, with the theme's typography, tables, formulas and diagrams on every slide. The same deck exports as a 16:9 PDF. Empty lines you type are written as blank lines instead of `<br />` tags, and a mixed `---`/`***` document keeps the rule marker it mostly uses
135
+ - v2.4.4: YAML frontmatter survives a save byte for byte (opening a note and saving it used to rewrite the block into invalid YAML and overwrite the file), CRLF files stay CRLF, wide tables stop losing their last column in PDF exports, the find panel clears the window controls in the top row, a document opened from outside the app lands in the window you are looking at, and the file list can sit on either side from the View menu
136
+ - v2.4.3: The Windows window buttons finally follow the theme. The colour handed to the system was a CSS Color 4 value it cannot parse, so the whole update was rejected and the buttons kept the colours from window creation (a light strip over a black row)
137
+ - v2.4.2: Windows refinements to the one row: the system's window buttons are drawn in the row icons' grey instead of the document's ink, and the menu button moves to the row's left end with even spacing on both sides
138
+ - v2.4.1: Full screen stops reserving room for traffic lights that are not there; Windows gets a shell of one row instead of three stacked bars, with the menu as the row's fourth icon; the shell's focus ring follows the theme instead of the system accent; the Window menu speaks the interface language; and a new tab is ready to type in
139
+ - v2.4.0: The top row rebuilt. The left belongs to the document and the right is one column, with the file panel docked under the three controls that open it. Tabs fill the row as full-height columns and never collapse below twice the row height; every seam in the shell is one opaque hairline; the new-tab button keeps its place when the row fills up; and the panel shortcut is now `⌘\`
140
+ - v2.2.0: One top row: the tab strip is always there and a single document is a tab too. Opened files land as tabs instead of new windows, the window remembers its size and zoom, PDF export gets page margins painted with the theme, plus a Format submenu, footnote hover previews, and colours that follow the theme everywhere
141
+ - v2.1.2: A quieter tab strip: the first tab sits flush with the window edge, and the theme colour line on the active tab is gone. The editor is a canvas, the shell stays out of the way
142
+ - v2.1.1: Tabs get their plus back, at the end of the tab strip; a right-click menu on tabs (close, close others, close to the right, copy path, reveal); and a quieter hover hint that waits a second and shows only the shortcut
143
+ - v2.1.0: Tabs: keep several documents open in one window, each with its own content, undo history, unsaved state and scroll position. Open one with ⌘T, from the File menu, or with ⌘-click in the file list; with a single document the tab strip does not appear at all
144
+ - v2.0.7: Per-architecture macOS downloads (216 MB down to about 82 MB), a Windows zip build that runs without installing, a context menu in the file panel, and a document title that stays centred
145
+ - v2.0.6: Titlebar fixes: reveal-in-file-manager works again, tooltips paint above the document instead of showing through, and the top-right controls align with the top edge
146
+ - v2.0.5: The reveal-in-file-manager button is now reachable, hovering the document title brings it out
147
+ - v2.0.4: PDF export no longer captures app overlays, undo can no longer cross documents, rich-text copy no longer adds blank lines in chat apps, source mode no longer overflows with the file panel open, a reveal-in-file-manager action next to the document title, and the heuristic agent activity dot removed
148
+ - v2.0.3: Find & replace, UI language switch, large-document source-mode fallback, update download progress with retry, and differential (blockmap) updates
149
+ - Future: More themes, editor integrations, and smoother Markdown workflows
150
+
151
+ ## License
152
+
153
+ [MIT](LICENSE), Free forever.
154
+
155
+
156
+ ---
157
+
158
+ ColaMD is built by [Cola.app](https://cola.app) and maintained by [orange2ai](https://github.com/orange2ai). Issues, ideas and pull requests are welcome.
159
+
160
+ The Extend fork (ColaMD-extend) is maintained by [byteuser1977](https://github.com/byteuser1977).