colonynote 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. package/README.md +108 -65
  2. package/README.zh.md +106 -63
  3. package/dist/client/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
  4. package/dist/client/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
  5. package/dist/client/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
  6. package/dist/client/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
  7. package/dist/client/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
  8. package/dist/client/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
  9. package/dist/client/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
  10. package/dist/client/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
  11. package/dist/client/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
  12. package/dist/client/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
  13. package/dist/client/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
  14. package/dist/client/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
  15. package/dist/client/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
  16. package/dist/client/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
  17. package/dist/client/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
  18. package/dist/client/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
  19. package/dist/client/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
  20. package/dist/client/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
  21. package/dist/client/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
  22. package/dist/client/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
  23. package/dist/client/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
  24. package/dist/client/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
  25. package/dist/client/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
  26. package/dist/client/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
  27. package/dist/client/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
  28. package/dist/client/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
  29. package/dist/client/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
  30. package/dist/client/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
  31. package/dist/client/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
  32. package/dist/client/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
  33. package/dist/client/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
  34. package/dist/client/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
  35. package/dist/client/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
  36. package/dist/client/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
  37. package/dist/client/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
  38. package/dist/client/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
  39. package/dist/client/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
  40. package/dist/client/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
  41. package/dist/client/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
  42. package/dist/client/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
  43. package/dist/client/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
  44. package/dist/client/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
  45. package/dist/client/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
  46. package/dist/client/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
  47. package/dist/client/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
  48. package/dist/client/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
  49. package/dist/client/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
  50. package/dist/client/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
  51. package/dist/client/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
  52. package/dist/client/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
  53. package/dist/client/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
  54. package/dist/client/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
  55. package/dist/client/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
  56. package/dist/client/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
  57. package/dist/client/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
  58. package/dist/client/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
  59. package/dist/client/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
  60. package/dist/client/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
  61. package/dist/client/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
  62. package/dist/client/assets/{arc-Ezd9GmKE.js → arc-Cfd4SbZO.js} +1 -1
  63. package/dist/client/assets/architecture-YZFGNWBL-JQr-LRCU.js +1 -0
  64. package/dist/client/assets/{architectureDiagram-Q4EWVU46-BmLJotd1.js → architectureDiagram-Q4EWVU46-BeqmHum1.js} +1 -1
  65. package/dist/client/assets/{blockDiagram-DXYQGD6D-ZqrNO8HM.js → blockDiagram-DXYQGD6D-C6mFvuR9.js} +1 -1
  66. package/dist/client/assets/{c4Diagram-AHTNJAMY-BJWyymhT.js → c4Diagram-AHTNJAMY-3QHalniG.js} +1 -1
  67. package/dist/client/assets/channel-CfwX1uxS.js +1 -0
  68. package/dist/client/assets/{chunk-2KRD3SAO-B1G2AY6H.js → chunk-2KRD3SAO-DEZgX0kq.js} +1 -1
  69. package/dist/client/assets/{chunk-4BX2VUAB-mLNpdiNK.js → chunk-4BX2VUAB-B-IIpBIh.js} +1 -1
  70. package/dist/client/assets/{chunk-4TB4RGXK-BsRi3qra.js → chunk-4TB4RGXK-DfEoy8Ay.js} +1 -1
  71. package/dist/client/assets/{chunk-55IACEB6-BkCqG_Mc.js → chunk-55IACEB6-PysYNOHs.js} +1 -1
  72. package/dist/client/assets/{chunk-67CJDMHE-Cz-mqdi4.js → chunk-67CJDMHE-BSH7xzV-.js} +1 -1
  73. package/dist/client/assets/{chunk-7N4EOEYR-BFd0Oy6w.js → chunk-7N4EOEYR-dGEKS-in.js} +1 -1
  74. package/dist/client/assets/{chunk-AA7GKIK3-D77gJjH7.js → chunk-AA7GKIK3-DcGuE9QA.js} +1 -1
  75. package/dist/client/assets/{chunk-CIAEETIT-DxQTGSBH.js → chunk-CIAEETIT-CMsUoQw3.js} +1 -1
  76. package/dist/client/assets/{chunk-EDXVE4YY-DglU8MxC.js → chunk-EDXVE4YY-WmRYDrtL.js} +1 -1
  77. package/dist/client/assets/{chunk-FMBD7UC4-B_1_v8GP.js → chunk-FMBD7UC4-DISAPuiS.js} +1 -1
  78. package/dist/client/assets/{chunk-FOC6F5B3-CEMl5H_U.js → chunk-FOC6F5B3-DTx76V9z.js} +1 -1
  79. package/dist/client/assets/{chunk-K5T4RW27-Dzh5Xx8O.js → chunk-K5T4RW27-CotjwHJi.js} +1 -1
  80. package/dist/client/assets/{chunk-KGLVRYIC-Be2dMs_W.js → chunk-KGLVRYIC-By1aVycf.js} +1 -1
  81. package/dist/client/assets/{chunk-LIHQZDEY-BGBWPKdn.js → chunk-LIHQZDEY-BmVkeM5J.js} +1 -1
  82. package/dist/client/assets/{chunk-ORNJ4GCN-W_NT507t.js → chunk-ORNJ4GCN-Bg0na3g8.js} +1 -1
  83. package/dist/client/assets/{chunk-OYMX7WX6-BV6RCL_j.js → chunk-OYMX7WX6-cPTOvCa_.js} +1 -1
  84. package/dist/client/assets/chunk-QZHKN3VN-CCYHXnlF.js +1 -0
  85. package/dist/client/assets/{chunk-YZCP3GAM-CDitFgw3.js → chunk-YZCP3GAM-BAWe-UnP.js} +1 -1
  86. package/dist/client/assets/classDiagram-6PBFFD2Q-C9nGWDxz.js +1 -0
  87. package/dist/client/assets/classDiagram-v2-HSJHXN6E-Bdp8Ug-c.js +1 -0
  88. package/dist/client/assets/clone-CW_uR94-.js +1 -0
  89. package/dist/client/assets/{cose-bilkent-S5V4N54A-YQtZwRYb.js → cose-bilkent-S5V4N54A-Deuf4KAm.js} +1 -1
  90. package/dist/client/assets/{dagre-KV5264BT-DvMqAy8J.js → dagre-KV5264BT-nG9TTm78.js} +1 -1
  91. package/dist/client/assets/{dagre-Cs_hK0RA.js → dagre-W4DtI2Bt.js} +1 -1
  92. package/dist/client/assets/{diagram-5BDNPKRD-BwrN8bUG.js → diagram-5BDNPKRD-Z3z0bkkZ.js} +1 -1
  93. package/dist/client/assets/{diagram-G4DWMVQ6-Cqaj-jnn.js → diagram-G4DWMVQ6-BWZk-Dzi.js} +1 -1
  94. package/dist/client/assets/{diagram-MMDJMWI5-DNA312HK.js → diagram-MMDJMWI5-D8YzV7n0.js} +1 -1
  95. package/dist/client/assets/{diagram-TYMM5635-BujcYOHW.js → diagram-TYMM5635-Cet49nMs.js} +1 -1
  96. package/dist/client/assets/{erDiagram-SMLLAGMA-ZjZZH-zN.js → erDiagram-SMLLAGMA-BU4o7Ng0.js} +1 -1
  97. package/dist/client/assets/{flatten-DA7ZzNkq.js → flatten-BLNEVnFs.js} +1 -1
  98. package/dist/client/assets/{flowDiagram-DWJPFMVM-CeIGHswO.js → flowDiagram-DWJPFMVM-BUlg_QHh.js} +1 -1
  99. package/dist/client/assets/{ganttDiagram-T4ZO3ILL-BeGMFmHq.js → ganttDiagram-T4ZO3ILL-CIekHjty.js} +1 -1
  100. package/dist/client/assets/gitGraph-7Q5UKJZL-B7LBo8ik.js +1 -0
  101. package/dist/client/assets/{gitGraphDiagram-UUTBAWPF-2fnUKQRp.js → gitGraphDiagram-UUTBAWPF-CcXDVFFW.js} +1 -1
  102. package/dist/client/assets/{graphlib-DRri47Ms.js → graphlib-DslsTNkb.js} +1 -1
  103. package/dist/client/assets/index-8OyQcuL3.css +1 -0
  104. package/dist/client/assets/{index-Ts5WhtRB.js → index-BHzfnLEq.js} +169 -167
  105. package/dist/client/assets/info-OMHHGYJF-Byz23eVe.js +1 -0
  106. package/dist/client/assets/{infoDiagram-42DDH7IO-KL_uq6JQ.js → infoDiagram-42DDH7IO-CG39ZQAP.js} +1 -1
  107. package/dist/client/assets/{ishikawaDiagram-UXIWVN3A-DYWG2VdA.js → ishikawaDiagram-UXIWVN3A-DmHSjiv4.js} +1 -1
  108. package/dist/client/assets/{journeyDiagram-VCZTEJTY-DT7IVz7z.js → journeyDiagram-VCZTEJTY-wBimGeCp.js} +1 -1
  109. package/dist/client/assets/{kanban-definition-6JOO6SKY-CHPPLj8n.js → kanban-definition-6JOO6SKY-NBMm0ywV.js} +1 -1
  110. package/dist/client/assets/katex-BAACGBI_.js +257 -0
  111. package/dist/client/assets/{linear-CizMozZt.js → linear-BXZrFICP.js} +1 -1
  112. package/dist/client/assets/mermaid-parser.core-QAzr86yR.js +4 -0
  113. package/dist/client/assets/{mindmap-definition-QFDTVHPH-Dov77gi8.js → mindmap-definition-QFDTVHPH-BpLYpQwH.js} +1 -1
  114. package/dist/client/assets/packet-4T2RLAQJ-D-Vbzz73.js +1 -0
  115. package/dist/client/assets/pie-ZZUOXDRM-B3dxwnth.js +1 -0
  116. package/dist/client/assets/{pieDiagram-DEJITSTG-DwmqzTu7.js → pieDiagram-DEJITSTG-ByjqVj37.js} +1 -1
  117. package/dist/client/assets/{quadrantDiagram-34T5L4WZ-CdCBXbvb.js → quadrantDiagram-34T5L4WZ-DJvkuG2H.js} +1 -1
  118. package/dist/client/assets/radar-PYXPWWZC-CoBzIZ3M.js +1 -0
  119. package/dist/client/assets/{reduce-DV5GRzs4.js → reduce-CaxPZCKG.js} +1 -1
  120. package/dist/client/assets/{requirementDiagram-MS252O5E-32eCbPFl.js → requirementDiagram-MS252O5E-1LgNqJTN.js} +1 -1
  121. package/dist/client/assets/{sankeyDiagram-XADWPNL6-BBDL_wPZ.js → sankeyDiagram-XADWPNL6-Bai06q-A.js} +1 -1
  122. package/dist/client/assets/{sequenceDiagram-FGHM5R23-Ck7ukfb7.js → sequenceDiagram-FGHM5R23-BMUxo7kL.js} +1 -1
  123. package/dist/client/assets/{stateDiagram-FHFEXIEX-BKJrixhp.js → stateDiagram-FHFEXIEX-C9zZKiGl.js} +1 -1
  124. package/dist/client/assets/stateDiagram-v2-QKLJ7IA2-C1FwJZFq.js +1 -0
  125. package/dist/client/assets/{timeline-definition-GMOUNBTQ-B_D-q7Kc.js → timeline-definition-GMOUNBTQ-CsFaOPai.js} +1 -1
  126. package/dist/client/assets/treeView-SZITEDCU-BqbD8tOA.js +1 -0
  127. package/dist/client/assets/treemap-W4RFUUIX-Bdt6eQ6L.js +1 -0
  128. package/dist/client/assets/{vennDiagram-DHZGUBPP-CvHqv3h2.js → vennDiagram-DHZGUBPP-DRNxa7ir.js} +1 -1
  129. package/dist/client/assets/wardley-RL74JXVD-aLo7_R58.js +1 -0
  130. package/dist/client/assets/{wardleyDiagram-NUSXRM2D-CYRpN4xk.js → wardleyDiagram-NUSXRM2D-BbBUtKUr.js} +1 -1
  131. package/dist/client/assets/{xychartDiagram-5P7HB3ND-Dh0MaaMp.js → xychartDiagram-5P7HB3ND-DRc4IQTw.js} +1 -1
  132. package/dist/client/index.html +3 -2
  133. package/dist/server/api.js +63 -6
  134. package/package.json +2 -1
  135. package/dist/client/assets/architecture-YZFGNWBL-Dns9u0e5.js +0 -1
  136. package/dist/client/assets/channel-C-zEXS3V.js +0 -1
  137. package/dist/client/assets/chunk-QZHKN3VN-B0CMV9NG.js +0 -1
  138. package/dist/client/assets/classDiagram-6PBFFD2Q-XeqY_hie.js +0 -1
  139. package/dist/client/assets/classDiagram-v2-HSJHXN6E-D5yY32qd.js +0 -1
  140. package/dist/client/assets/clone-AnN0418d.js +0 -1
  141. package/dist/client/assets/gitGraph-7Q5UKJZL-Dib3-KZp.js +0 -1
  142. package/dist/client/assets/index-DKyd5iCm.css +0 -2
  143. package/dist/client/assets/info-OMHHGYJF-oQ5--hGK.js +0 -1
  144. package/dist/client/assets/katex-HOUACuRw.js +0 -257
  145. package/dist/client/assets/mermaid-parser.core-Bpqvb2jv.js +0 -4
  146. package/dist/client/assets/packet-4T2RLAQJ-Cuyyn0tM.js +0 -1
  147. package/dist/client/assets/pie-ZZUOXDRM-DajTPYmY.js +0 -1
  148. package/dist/client/assets/radar-PYXPWWZC-DWe78GFc.js +0 -1
  149. package/dist/client/assets/stateDiagram-v2-QKLJ7IA2-Bio1QBYF.js +0 -1
  150. package/dist/client/assets/treeView-SZITEDCU-BQ27_5HI.js +0 -1
  151. package/dist/client/assets/treemap-W4RFUUIX-D2TpEq--.js +0 -1
  152. package/dist/client/assets/wardley-RL74JXVD-DoAmhKVb.js +0 -1
package/README.md CHANGED
@@ -1,120 +1,163 @@
1
+ <img src="public/logo.png" alt="ColonyNote" width="120">
2
+
1
3
  # ColonyNote
2
4
 
3
- [简体中文](./README.zh.md) | English
5
+ **A modern Markdown online editor with real-time preview.**
4
6
 
5
- A modern Markdown online editor with real-time preview, Mermaid diagrams, and LaTeX support.
7
+ Edit server-side Markdown files directly in your browser — no upload, no download, just open and write.
6
8
 
7
- > **Edit server-side Markdown files** - No upload needed, edit directly in your browser!
9
+ [简体中文](README.zh.md) · English
8
10
 
9
- ## Features
11
+ ---
10
12
 
11
- - **Server-side Editing** - Edit markdown files on server directly in browser
12
- - **Real-time Preview** - Live rendering as you type
13
- - **Mermaid Support** - Render flowcharts, sequence diagrams, Gantt charts, and more
14
- - **LaTeX Formulas** - Full support for mathematical expressions
15
- - **Code Highlighting** - Syntax highlighting for various programming languages
16
- - **Dark Theme** - Follow system preference or manual toggle
17
- - **Mobile Friendly** - Responsive design optimized for mobile devices
18
- - **Real-time Sync** - WebSocket-based file change notifications
13
+ ## Screenshots
19
14
 
20
- ## Installation
15
+ <table style="min-width: 50px;">
16
+ <colgroup><col style="min-width: 25px;"><col style="min-width: 25px;"></colgroup><tbody><tr><td colspan="1" rowspan="1"><img src="screenshots/light-editor.png" alt="Light Theme Editor" width="100%"></td><td colspan="1" rowspan="1"><img src="screenshots/dark-editor.png" alt="Dark Theme Editor" width="100%"></td></tr><tr><td colspan="1" rowspan="1" style="text-align: center;"><p>Light Theme</p></td><td colspan="1" rowspan="1" style="text-align: center;"><p>Dark Theme</p></td></tr><tr><td colspan="1" rowspan="1"><img src="screenshots/search.png" alt="Full-text Search" width="100%"></td><td colspan="1" rowspan="1"><img src="screenshots/mobile-editor.png" alt="Mobile Editor" width="100%"></td></tr><tr><td colspan="1" rowspan="1" style="text-align: center;"><p>Full-text Search</p></td><td colspan="1" rowspan="1" style="text-align: center;"><p>Mobile Editor</p></td></tr></tbody>
17
+ </table>
21
18
 
22
- ```bash
23
- npm install -g colonynote
24
- ```
19
+ ## Features
20
+
21
+ - **Server-side Editing** — Edit Markdown files on your server directly in the browser. No file upload or download needed.
22
+ - **WYSIWYG + Source Mode** — Switch between rich text editing and raw Markdown source with one click.
23
+ - **Real-time Preview** — Live rendering as you type, powered by TipTap 3.
24
+ - **Mermaid Diagrams** — Render flowcharts, sequence diagrams, class diagrams, state diagrams, ER diagrams, Gantt charts, pie charts, and user journey maps.
25
+ - **LaTeX Math** — Full support for mathematical expressions via KaTeX.
26
+ - **Code Highlighting** — Syntax highlighting for 15+ programming languages with copy-to-clipboard.
27
+ - **Full-text Search** — Search across all your documents with ripgrep-powered fuzzy matching.
28
+ - **Multi-directory Support** — Manage multiple document directories simultaneously, each with its own file tree.
29
+ - **Multi-tab** — Open multiple files in tabs, with dirty-state indicators and auto-save.
30
+ - **Real-time Sync** — WebSocket-based file change notifications keep all connected clients in sync.
31
+ - **External Change Detection** — Automatically detect and handle file changes from outside the editor.
32
+ - **Dark / Light / System Theme** — Choose your preferred theme or follow the system setting.
33
+ - **Mobile-first Design** — Optimized for mobile devices with responsive layout and touch-friendly interactions.
25
34
 
26
- ## Usage
35
+ ## Quick Start
27
36
 
28
- ### Start the server
37
+ ### Install
29
38
 
30
39
  ```bash
31
- colonynote [options]
40
+ npm install -g colonynote
32
41
  ```
33
42
 
34
- ### Options
35
-
36
- | Option | Alias | Description | Default |
37
- |--------|-------|-------------|---------|
38
- | `--dir` | `-d` | Directory for documents | Current directory |
39
- | `--port` | `-p` | Server port | `5787` |
40
- | `--host` | | Server host | `0.0.0.0` |
41
- | `--config` | `-c` | Config file path | `colonynote.config.js` |
42
- | `--help` | `-h` | Show help | |
43
- | `--version` | | Show version | |
44
-
45
- ### Examples
43
+ ### Start
46
44
 
47
45
  ```bash
48
- # Start with default settings
46
+ # Start with current directory
49
47
  colonynote
50
48
 
51
- # Specify directory
49
+ # Specify a directory
52
50
  colonynote -d /path/to/docs
53
51
 
52
+ # Specify multiple directories
53
+ colonynote -d ./docs -d ./notes
54
+
54
55
  # Specify port
55
56
  colonynote -p 3000
56
57
 
57
- # Use config file
58
- colonynote -c ./my-config.js
59
-
60
- # Combine options
61
- colonynote -d ./docs -p 8080
58
+ # Specify host
59
+ colonynote --host 127.0.0.1
62
60
  ```
63
61
 
62
+ Then open `http://localhost:5787` in your browser.
63
+
64
+ ### CLI Options
65
+
66
+ | Option | Alias | Description | Default |
67
+ | --- | --- | --- | --- |
68
+ | `--dir` | `-d` | Root directory (can be specified multiple times) | Current directory |
69
+ | `--port` | `-p` | Server port | `5787` |
70
+ | `--host` | | Server host | `0.0.0.0` |
71
+
64
72
  ## Configuration
65
73
 
66
- Create a `colonynote.config.js` file in your project directory:
74
+ ColonyNote reads configuration from `~/.colonynote/config.json` (production) or `~/.colonynote/config.dev.json` (development).
67
75
 
68
- ```javascript
69
- export default {
70
- dirs: ['./docs'], // Directories for documents
71
- port: 5787, // Server port
72
- host: '0.0.0.0', // Server host
73
- allowedExtensions: ['.md', '.markdown'], // Supported file extensions
74
- theme: {
75
- default: 'system', // Theme: light | dark | system
76
+ Create the config file manually:
77
+
78
+ ```json
79
+ {
80
+ "dirs": [
81
+ { "path": "/path/to/docs", "name": "Docs" }
82
+ ],
83
+ "allowedExtensions": [".md", ".markdown", ".mdown", ".mkdn"],
84
+ "showHiddenFiles": false,
85
+ "theme": {
86
+ "default": "system"
76
87
  },
77
- editor: {
78
- autosave: true, // Auto save
79
- debounceMs: 300, // Save debounce delay
88
+ "editor": {
89
+ "autosave": true,
90
+ "debounceMs": 300
80
91
  },
92
+ "ignore": {
93
+ "patterns": [
94
+ "node_modules",
95
+ ".git",
96
+ ".next",
97
+ "dist",
98
+ "build"
99
+ ]
100
+ }
81
101
  }
82
102
  ```
83
103
 
104
+ The configuration is automatically reloaded when the file changes — no server restart needed.
105
+
106
+ ### Configuration Fields
107
+
108
+ | Field | Type | Description |
109
+ | --- | --- | --- |
110
+ | `dirs` | `Array<{path, name?, exclude?}>` | Document directories to serve |
111
+ | `allowedExtensions` | `string[]` | File extensions to show in the file tree |
112
+ | `showHiddenFiles` | `boolean` | Whether to show dotfiles |
113
+ | `theme.default` | \`"light" | "dark" |
114
+ | `editor.autosave` | `boolean` | Enable auto-save |
115
+ | `editor.debounceMs` | `number` | Auto-save debounce delay in milliseconds |
116
+ | `ignore.patterns` | `string[]` | Global ignore patterns (glob syntax) |
117
+
84
118
  ## Development
85
119
 
86
120
  ```bash
87
121
  # Clone the repository
88
122
  git clone https://github.com/opencolony/note.git
123
+ cd note
89
124
 
90
125
  # Install dependencies
91
- npm install
126
+ pnpm install
92
127
 
93
- # Start development server (backend + frontend with hot reload)
94
- npm run dev
128
+ # Start development server (backend + frontend hot reload)
129
+ pnpm dev
95
130
 
96
131
  # Frontend only (Vite dev server, port 5787)
97
- npm run dev:frontend
132
+ pnpm dev:frontend
98
133
 
99
134
  # Backend only (Hono server, port 5788)
100
- npm run dev:backend
135
+ pnpm dev:backend
101
136
 
102
137
  # Build for production
103
- npm run build
138
+ pnpm build
104
139
 
105
140
  # Run production build
106
- npm start
141
+ pnpm start
142
+
143
+ # Type check
144
+ pnpm typecheck
145
+
146
+ # Run tests
147
+ pnpm test
107
148
  ```
108
149
 
109
150
  ## Tech Stack
110
151
 
111
- - **Backend**: Hono, @hono/node-server, ws (WebSocket)
112
- - **Frontend**: React 18, Vite, Tailwind CSS v4
113
- - **UI Components**: shadcn/ui (Radix UI)
114
- - **Editor**: TipTap 3, tiptap-markdown
115
- - **Diagrams**: Mermaid
116
- - **LaTeX**: KaTeX
117
- - **Icons**: lucide-react
152
+ - **Backend**: [Hono](https://hono.dev) + [@hono/node-server](https://github.com/honojs/node-server) + [ws](https://github.com/websockets/ws)
153
+ - **Frontend**: [React 18](https://react.dev) + [Vite](https://vitejs.dev) + [Tailwind CSS v4](https://tailwindcss.com)
154
+ - **UI Components**: [shadcn/ui](https://ui.shadcn.com) (based on [Radix UI](https://www.radix-ui.com))
155
+ - **Editor**: [TipTap 3](https://tiptap.dev) + [tiptap-markdown](https://github.com/aguingand/tiptap-markdown)
156
+ - **Diagrams**: [Mermaid](https://mermaid.js.org)
157
+ - **Math**: [KaTeX](https://katex.org)
158
+ - **Search**: ripgrep (server-side) + FlexSearch (client-side index)
159
+ - **Code Highlighting**: [lowlight](https://github.com/wooorm/lowlight)
160
+ - **Icons**: [lucide-react](https://lucide.dev)
118
161
 
119
162
  ## License
120
163
 
@@ -122,4 +165,4 @@ MIT
122
165
 
123
166
  ## Author
124
167
 
125
- 岳晓亮 <hi@yuexiaoliang.com>
168
+ 岳晓亮 [hi@yuexiaoliang.com](mailto:hi@yuexiaoliang.com)
package/README.zh.md CHANGED
@@ -1,120 +1,163 @@
1
+ <img src="public/logo.png" alt="ColonyNote" width="120">
2
+
1
3
  # ColonyNote
2
4
 
3
- [English](./README.md) | 简体中文
5
+ **支持实时预览的现代 Markdown 在线编辑器。**
4
6
 
5
- 一个支持实时预览、Mermaid 图表和 LaTeX 公式的 Markdown 在线编辑器。
7
+ 直接在浏览器中编辑服务器上的 Markdown 文件 —— 无需上传下载,打开即写。
6
8
 
7
- > **在线编辑服务端 Markdown 文件** - 无需上传下载,直接在浏览器中编辑!
9
+ [English](README.md) · 简体中文
8
10
 
9
- ## 功能特性
11
+ ---
10
12
 
11
- - **服务端编辑** - 在浏览器中直接编辑服务器上的 Markdown 文件
12
- - **实时预览** - 实时渲染输入内容
13
- - **Mermaid 支持** - 渲染流程图、时序图、甘特图等
14
- - **LaTeX 公式** - 完整支持数学公式
15
- - **代码高亮** - 支持多种编程语言的语法高亮
16
- - **深色主题** - 跟随系统偏好或手动切换
17
- - **移动端适配** - 响应式设计,适配移动设备
18
- - **实时同步** - 基于 WebSocket 的文件变更通知
13
+ ## 界面预览
19
14
 
20
- ## 安装
15
+ <table style="min-width: 50px;">
16
+ <colgroup><col style="min-width: 25px;"><col style="min-width: 25px;"></colgroup><tbody><tr><td colspan="1" rowspan="1"><img src="screenshots/light-editor.png" alt="浅色主题编辑器" width="100%"></td><td colspan="1" rowspan="1"><img src="screenshots/dark-editor.png" alt="深色主题编辑器" width="100%"></td></tr><tr><td colspan="1" rowspan="1" style="text-align: center;"><p>浅色主题</p></td><td colspan="1" rowspan="1" style="text-align: center;"><p>深色主题</p></td></tr><tr><td colspan="1" rowspan="1"><img src="screenshots/search.png" alt="全文搜索" width="100%"></td><td colspan="1" rowspan="1"><img src="screenshots/mobile-editor.png" alt="移动端编辑器" width="100%"></td></tr><tr><td colspan="1" rowspan="1" style="text-align: center;"><p>全文搜索</p></td><td colspan="1" rowspan="1" style="text-align: center;"><p>移动端编辑器</p></td></tr></tbody>
17
+ </table>
21
18
 
22
- ```bash
23
- npm install -g colonynote
24
- ```
19
+ ## 功能特性
20
+
21
+ - **服务端文件编辑** — 直接在浏览器中编辑服务器上的 Markdown 文件,无需上传下载。
22
+ - **所见即所得 + 源码模式** — 一键切换富文本编辑和原始 Markdown 源码。
23
+ - **实时预览** — 基于 TipTap 3,输入内容实时渲染。
24
+ - **Mermaid 图表** — 支持流程图、时序图、类图、状态图、ER 图、甘特图、饼图和用户旅程图。
25
+ - **LaTeX 数学公式** — 通过 KaTeX 完整支持数学公式渲染。
26
+ - **代码高亮** — 支持 15+ 编程语言的语法高亮,带一键复制功能。
27
+ - **全文搜索** — 基于 ripgrep 的模糊匹配搜索,快速定位文档内容。
28
+ - **多目录管理** — 同时管理多个文档目录,每个目录独立文件树。
29
+ - **多标签页** — 支持多文件标签页打开,带脏状态提示和自动保存。
30
+ - **实时同步** — 基于 WebSocket 的文件变更通知,多端保持同步。
31
+ - **外部变更检测** — 自动检测并处理编辑器外的文件修改。
32
+ - **深色 / 浅色 / 跟随系统** — 自由选择主题或跟随系统设置。
33
+ - **移动端优先** — 针对移动设备优化的响应式布局和触摸交互。
25
34
 
26
- ## 使用方法
35
+ ## 快速开始
27
36
 
28
- ### 启动服务器
37
+ ### 安装
29
38
 
30
39
  ```bash
31
- colonynote [选项]
40
+ npm install -g colonynote
32
41
  ```
33
42
 
34
- ### 选项
35
-
36
- | 选项 | 别名 | 描述 | 默认值 |
37
- |------|------|------|--------|
38
- | `--dir` | `-d` | 目录 | 当前目录 |
39
- | `--port` | `-p` | 服务器端口 | `5787` |
40
- | `--host` | | 服务器地址 | `0.0.0.0` |
41
- | `--config` | `-c` | 配置文件路径 | `colonynote.config.js` |
42
- | `--help` | `-h` | 显示帮助 | |
43
- | `--version` | | 显示版本 | |
44
-
45
- ### 示例
43
+ ### 启动
46
44
 
47
45
  ```bash
48
- # 使用默认设置启动
46
+ # 使用当前目录启动
49
47
  colonynote
50
48
 
51
49
  # 指定目录
52
50
  colonynote -d /path/to/docs
53
51
 
52
+ # 指定多个目录
53
+ colonynote -d ./docs -d ./notes
54
+
54
55
  # 指定端口
55
56
  colonynote -p 3000
56
57
 
57
- # 使用配置文件
58
- colonynote -c ./my-config.js
59
-
60
- # 组合选项
61
- colonynote -d ./docs -p 8080
58
+ # 指定监听地址
59
+ colonynote --host 127.0.0.1
62
60
  ```
63
61
 
62
+ 然后在浏览器中打开 `http://localhost:5787`。
63
+
64
+ ### CLI 选项
65
+
66
+ | 选项 | 别名 | 描述 | 默认值 |
67
+ | --- | --- | --- | --- |
68
+ | `--dir` | `-d` | 文档根目录(可多次指定) | 当前目录 |
69
+ | `--port` | `-p` | 服务器端口 | `5787` |
70
+ | `--host` | | 服务器监听地址 | `0.0.0.0` |
71
+
64
72
  ## 配置
65
73
 
66
- 在项目目录创建 `colonynote.config.js` 文件:
74
+ ColonyNote 从 `~/.colonynote/config.json`(生产环境)或 `~/.colonynote/config.dev.json`(开发环境)读取配置。
67
75
 
68
- ```javascript
69
- export default {
70
- dirs: ['./docs'], // 文档目录
71
- port: 5787, // 服务器端口
72
- host: '0.0.0.0', // 服务器地址
73
- allowedExtensions: ['.md', '.markdown'], // 支持的文件扩展名
74
- theme: {
75
- default: 'system', // 主题:light | dark | system
76
+ 手动创建配置文件:
77
+
78
+ ```json
79
+ {
80
+ "dirs": [
81
+ { "path": "/path/to/docs", "name": "文档" }
82
+ ],
83
+ "allowedExtensions": [".md", ".markdown", ".mdown", ".mkdn"],
84
+ "showHiddenFiles": false,
85
+ "theme": {
86
+ "default": "system"
76
87
  },
77
- editor: {
78
- autosave: true, // 自动保存
79
- debounceMs: 300, // 保存防抖延迟
88
+ "editor": {
89
+ "autosave": true,
90
+ "debounceMs": 300
80
91
  },
92
+ "ignore": {
93
+ "patterns": [
94
+ "node_modules",
95
+ ".git",
96
+ ".next",
97
+ "dist",
98
+ "build"
99
+ ]
100
+ }
81
101
  }
82
102
  ```
83
103
 
104
+ 配置文件修改后会自动重新加载 —— 无需重启服务器。
105
+
106
+ ### 配置字段说明
107
+
108
+ | 字段 | 类型 | 说明 |
109
+ | --- | --- | --- |
110
+ | `dirs` | `Array<{path, name?, exclude?}>` | 要服务的文档目录 |
111
+ | `allowedExtensions` | `string[]` | 文件树中显示的文件扩展名 |
112
+ | `showHiddenFiles` | `boolean` | 是否显示隐藏文件(以点开头的文件) |
113
+ | `theme.default` | \`"light" | "dark" |
114
+ | `editor.autosave` | `boolean` | 是否启用自动保存 |
115
+ | `editor.debounceMs` | `number` | 自动保存防抖延迟(毫秒) |
116
+ | `ignore.patterns` | `string[]` | 全局忽略模式(支持 glob 语法) |
117
+
84
118
  ## 开发
85
119
 
86
120
  ```bash
87
121
  # 克隆仓库
88
122
  git clone https://github.com/opencolony/note.git
123
+ cd note
89
124
 
90
125
  # 安装依赖
91
- npm install
126
+ pnpm install
92
127
 
93
128
  # 启动开发服务器(后端 + 前端热更新)
94
- npm run dev
129
+ pnpm dev
95
130
 
96
131
  # 仅前端开发(Vite 开发服务器,端口 5787)
97
- npm run dev:frontend
132
+ pnpm dev:frontend
98
133
 
99
134
  # 仅后端开发(Hono 服务器,端口 5788)
100
- npm run dev:backend
135
+ pnpm dev:backend
101
136
 
102
137
  # 构建生产版本
103
- npm run build
138
+ pnpm build
104
139
 
105
140
  # 运行生产版本
106
- npm start
141
+ pnpm start
142
+
143
+ # 类型检查
144
+ pnpm typecheck
145
+
146
+ # 运行测试
147
+ pnpm test
107
148
  ```
108
149
 
109
150
  ## 技术栈
110
151
 
111
- - **后端**: Hono, @hono/node-server, ws (WebSocket)
112
- - **前端**: React 18, Vite, Tailwind CSS v4
113
- - **UI 组件**: shadcn/ui (Radix UI)
114
- - **编辑器**: TipTap 3, tiptap-markdown
115
- - **图表**: Mermaid
116
- - **LaTeX 公式**: KaTeX
117
- - **图标**: lucide-react
152
+ - **后端**: [Hono](https://hono.dev) + [@hono/node-server](https://github.com/honojs/node-server) + [ws](https://github.com/websockets/ws)
153
+ - **前端**: [React 18](https://react.dev) + [Vite](https://vitejs.dev) + [Tailwind CSS v4](https://tailwindcss.com)
154
+ - **UI 组件**: [shadcn/ui](https://ui.shadcn.com)(基于 [Radix UI](https://www.radix-ui.com)
155
+ - **编辑器**: [TipTap 3](https://tiptap.dev) + [tiptap-markdown](https://github.com/aguingand/tiptap-markdown)
156
+ - **图表**: [Mermaid](https://mermaid.js.org)
157
+ - **数学公式**: [KaTeX](https://katex.org)
158
+ - **搜索**: ripgrep(服务端)+ FlexSearch(客户端索引)
159
+ - **代码高亮**: [lowlight](https://github.com/wooorm/lowlight)
160
+ - **图标**: [lucide-react](https://lucide.dev)
118
161
 
119
162
  ## 许可证
120
163
 
@@ -122,4 +165,4 @@ MIT
122
165
 
123
166
  ## 作者
124
167
 
125
- 岳晓亮 <hi@yuexiaoliang.com>
168
+ 岳晓亮 [hi@yuexiaoliang.com](mailto:hi@yuexiaoliang.com)
@@ -1 +1 @@
1
- import{n as e,t}from"./path-yo4Xej8w.js";import{Ct as n,St as r,_t as i,bt as a,dt as o,ft as s,ht as c,mt as l,pt as u,vt as d,xt as f,yt as p}from"./index-Ts5WhtRB.js";function m(e){return e.innerRadius}function h(e){return e.outerRadius}function g(e){return e.startAngle}function _(e){return e.endAngle}function v(e){return e&&e.padAngle}function y(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=d*c-u*l;if(!(f*f<1e-12))return f=(u*(t-a)-d*(e-i))/f,[e+f*c,t+f*l]}function b(e,t,n,i,a,o,s){var c=e-n,l=t-i,u=(s?o:-o)/r(c*c+l*l),f=u*l,p=-u*c,m=e+f,h=t+p,g=n+f,_=i+p,v=(m+g)/2,y=(h+_)/2,b=g-m,x=_-h,S=b*b+x*x,C=a-o,w=m*_-g*h,T=(x<0?-1:1)*r(d(0,C*C*S-w*w)),E=(w*x-b*T)/S,D=(-w*b-x*T)/S,O=(w*x+b*T)/S,k=(-w*b+x*T)/S,A=E-v,j=D-y,M=O-v,N=k-y;return A*A+j*j>M*M+N*N&&(E=O,D=k),{cx:E,cy:D,x01:-f,y01:-p,x11:E*(a/C-1),y11:D*(a/C-1)}}function x(){var d=m,x=h,S=e(0),C=null,w=g,T=_,E=v,D=null,O=t(k);function k(){var e,t,m=+d.apply(this,arguments),h=+x.apply(this,arguments),g=w.apply(this,arguments)-i,_=T.apply(this,arguments)-i,v=o(_-g),k=_>g;if(D||=e=O(),h<m&&(t=h,h=m,m=t),!(h>1e-12))D.moveTo(0,0);else if(v>n-1e-12)D.moveTo(h*c(g),h*f(g)),D.arc(0,0,h,g,_,!k),m>1e-12&&(D.moveTo(m*c(_),m*f(_)),D.arc(0,0,m,_,g,k));else{var A=g,j=_,M=g,N=_,P=v,F=v,I=E.apply(this,arguments)/2,L=I>1e-12&&(C?+C.apply(this,arguments):r(m*m+h*h)),R=p(o(h-m)/2,+S.apply(this,arguments)),z=R,B=R,V,H;if(L>1e-12){var U=u(L/m*f(I)),W=u(L/h*f(I));(P-=U*2)>1e-12?(U*=k?1:-1,M+=U,N-=U):(P=0,M=N=(g+_)/2),(F-=W*2)>1e-12?(W*=k?1:-1,A+=W,j-=W):(F=0,A=j=(g+_)/2)}var G=h*c(A),K=h*f(A),q=m*c(N),J=m*f(N);if(R>1e-12){var Y=h*c(j),X=h*f(j),Z=m*c(M),Q=m*f(M),$;if(v<a)if($=y(G,K,Z,Q,Y,X,q,J)){var ee=G-$[0],te=K-$[1],ne=Y-$[0],re=X-$[1],ie=1/f(s((ee*ne+te*re)/(r(ee*ee+te*te)*r(ne*ne+re*re)))/2),ae=r($[0]*$[0]+$[1]*$[1]);z=p(R,(m-ae)/(ie-1)),B=p(R,(h-ae)/(ie+1))}else z=B=0}F>1e-12?B>1e-12?(V=b(Z,Q,G,K,h,B,k),H=b(Y,X,q,J,h,B,k),D.moveTo(V.cx+V.x01,V.cy+V.y01),B<R?D.arc(V.cx,V.cy,B,l(V.y01,V.x01),l(H.y01,H.x01),!k):(D.arc(V.cx,V.cy,B,l(V.y01,V.x01),l(V.y11,V.x11),!k),D.arc(0,0,h,l(V.cy+V.y11,V.cx+V.x11),l(H.cy+H.y11,H.cx+H.x11),!k),D.arc(H.cx,H.cy,B,l(H.y11,H.x11),l(H.y01,H.x01),!k))):(D.moveTo(G,K),D.arc(0,0,h,A,j,!k)):D.moveTo(G,K),!(m>1e-12)||!(P>1e-12)?D.lineTo(q,J):z>1e-12?(V=b(q,J,Y,X,m,-z,k),H=b(G,K,Z,Q,m,-z,k),D.lineTo(V.cx+V.x01,V.cy+V.y01),z<R?D.arc(V.cx,V.cy,z,l(V.y01,V.x01),l(H.y01,H.x01),!k):(D.arc(V.cx,V.cy,z,l(V.y01,V.x01),l(V.y11,V.x11),!k),D.arc(0,0,m,l(V.cy+V.y11,V.cx+V.x11),l(H.cy+H.y11,H.cx+H.x11),k),D.arc(H.cx,H.cy,z,l(H.y11,H.x11),l(H.y01,H.x01),!k))):D.arc(0,0,m,N,M,k)}if(D.closePath(),e)return D=null,e+``||null}return k.centroid=function(){var e=(+d.apply(this,arguments)+ +x.apply(this,arguments))/2,t=(+w.apply(this,arguments)+ +T.apply(this,arguments))/2-a/2;return[c(t)*e,f(t)*e]},k.innerRadius=function(t){return arguments.length?(d=typeof t==`function`?t:e(+t),k):d},k.outerRadius=function(t){return arguments.length?(x=typeof t==`function`?t:e(+t),k):x},k.cornerRadius=function(t){return arguments.length?(S=typeof t==`function`?t:e(+t),k):S},k.padRadius=function(t){return arguments.length?(C=t==null?null:typeof t==`function`?t:e(+t),k):C},k.startAngle=function(t){return arguments.length?(w=typeof t==`function`?t:e(+t),k):w},k.endAngle=function(t){return arguments.length?(T=typeof t==`function`?t:e(+t),k):T},k.padAngle=function(t){return arguments.length?(E=typeof t==`function`?t:e(+t),k):E},k.context=function(e){return arguments.length?(D=e??null,k):D},k}export{x as t};
1
+ import{n as e,t}from"./path-yo4Xej8w.js";import{Ct as n,St as r,_t as i,bt as a,dt as o,ft as s,ht as c,mt as l,pt as u,vt as d,xt as f,yt as p}from"./index-BHzfnLEq.js";function m(e){return e.innerRadius}function h(e){return e.outerRadius}function g(e){return e.startAngle}function _(e){return e.endAngle}function v(e){return e&&e.padAngle}function y(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=d*c-u*l;if(!(f*f<1e-12))return f=(u*(t-a)-d*(e-i))/f,[e+f*c,t+f*l]}function b(e,t,n,i,a,o,s){var c=e-n,l=t-i,u=(s?o:-o)/r(c*c+l*l),f=u*l,p=-u*c,m=e+f,h=t+p,g=n+f,_=i+p,v=(m+g)/2,y=(h+_)/2,b=g-m,x=_-h,S=b*b+x*x,C=a-o,w=m*_-g*h,T=(x<0?-1:1)*r(d(0,C*C*S-w*w)),E=(w*x-b*T)/S,D=(-w*b-x*T)/S,O=(w*x+b*T)/S,k=(-w*b+x*T)/S,A=E-v,j=D-y,M=O-v,N=k-y;return A*A+j*j>M*M+N*N&&(E=O,D=k),{cx:E,cy:D,x01:-f,y01:-p,x11:E*(a/C-1),y11:D*(a/C-1)}}function x(){var d=m,x=h,S=e(0),C=null,w=g,T=_,E=v,D=null,O=t(k);function k(){var e,t,m=+d.apply(this,arguments),h=+x.apply(this,arguments),g=w.apply(this,arguments)-i,_=T.apply(this,arguments)-i,v=o(_-g),k=_>g;if(D||=e=O(),h<m&&(t=h,h=m,m=t),!(h>1e-12))D.moveTo(0,0);else if(v>n-1e-12)D.moveTo(h*c(g),h*f(g)),D.arc(0,0,h,g,_,!k),m>1e-12&&(D.moveTo(m*c(_),m*f(_)),D.arc(0,0,m,_,g,k));else{var A=g,j=_,M=g,N=_,P=v,F=v,I=E.apply(this,arguments)/2,L=I>1e-12&&(C?+C.apply(this,arguments):r(m*m+h*h)),R=p(o(h-m)/2,+S.apply(this,arguments)),z=R,B=R,V,H;if(L>1e-12){var U=u(L/m*f(I)),W=u(L/h*f(I));(P-=U*2)>1e-12?(U*=k?1:-1,M+=U,N-=U):(P=0,M=N=(g+_)/2),(F-=W*2)>1e-12?(W*=k?1:-1,A+=W,j-=W):(F=0,A=j=(g+_)/2)}var G=h*c(A),K=h*f(A),q=m*c(N),J=m*f(N);if(R>1e-12){var Y=h*c(j),X=h*f(j),Z=m*c(M),Q=m*f(M),$;if(v<a)if($=y(G,K,Z,Q,Y,X,q,J)){var ee=G-$[0],te=K-$[1],ne=Y-$[0],re=X-$[1],ie=1/f(s((ee*ne+te*re)/(r(ee*ee+te*te)*r(ne*ne+re*re)))/2),ae=r($[0]*$[0]+$[1]*$[1]);z=p(R,(m-ae)/(ie-1)),B=p(R,(h-ae)/(ie+1))}else z=B=0}F>1e-12?B>1e-12?(V=b(Z,Q,G,K,h,B,k),H=b(Y,X,q,J,h,B,k),D.moveTo(V.cx+V.x01,V.cy+V.y01),B<R?D.arc(V.cx,V.cy,B,l(V.y01,V.x01),l(H.y01,H.x01),!k):(D.arc(V.cx,V.cy,B,l(V.y01,V.x01),l(V.y11,V.x11),!k),D.arc(0,0,h,l(V.cy+V.y11,V.cx+V.x11),l(H.cy+H.y11,H.cx+H.x11),!k),D.arc(H.cx,H.cy,B,l(H.y11,H.x11),l(H.y01,H.x01),!k))):(D.moveTo(G,K),D.arc(0,0,h,A,j,!k)):D.moveTo(G,K),!(m>1e-12)||!(P>1e-12)?D.lineTo(q,J):z>1e-12?(V=b(q,J,Y,X,m,-z,k),H=b(G,K,Z,Q,m,-z,k),D.lineTo(V.cx+V.x01,V.cy+V.y01),z<R?D.arc(V.cx,V.cy,z,l(V.y01,V.x01),l(H.y01,H.x01),!k):(D.arc(V.cx,V.cy,z,l(V.y01,V.x01),l(V.y11,V.x11),!k),D.arc(0,0,m,l(V.cy+V.y11,V.cx+V.x11),l(H.cy+H.y11,H.cx+H.x11),k),D.arc(H.cx,H.cy,z,l(H.y11,H.x11),l(H.y01,H.x01),!k))):D.arc(0,0,m,N,M,k)}if(D.closePath(),e)return D=null,e+``||null}return k.centroid=function(){var e=(+d.apply(this,arguments)+ +x.apply(this,arguments))/2,t=(+w.apply(this,arguments)+ +T.apply(this,arguments))/2-a/2;return[c(t)*e,f(t)*e]},k.innerRadius=function(t){return arguments.length?(d=typeof t==`function`?t:e(+t),k):d},k.outerRadius=function(t){return arguments.length?(x=typeof t==`function`?t:e(+t),k):x},k.cornerRadius=function(t){return arguments.length?(S=typeof t==`function`?t:e(+t),k):S},k.padRadius=function(t){return arguments.length?(C=t==null?null:typeof t==`function`?t:e(+t),k):C},k.startAngle=function(t){return arguments.length?(w=typeof t==`function`?t:e(+t),k):w},k.endAngle=function(t){return arguments.length?(T=typeof t==`function`?t:e(+t),k):T},k.padAngle=function(t){return arguments.length?(E=typeof t==`function`?t:e(+t),k):E},k.context=function(e){return arguments.length?(D=e??null,k):D},k}export{x as t};
@@ -0,0 +1 @@
1
+ import"./chunk-K5T4RW27-CotjwHJi.js";import{n as e}from"./chunk-7N4EOEYR-dGEKS-in.js";export{e as createArchitectureServices};