@dooc-dev/dooc 0.0.6 → 0.0.8

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 (395) hide show
  1. package/dist/client.global.js +1 -0
  2. package/dist/code-worker.global.js +11 -11
  3. package/dist/code.global.js +75 -75
  4. package/dist/edit.global.js +234 -231
  5. package/dist/{compiler → engine/compiler}/bundle-urls.js +1 -4
  6. package/dist/{compiler → engine/compiler}/check-prose.d.ts +1 -1
  7. package/dist/{compiler → engine/compiler}/check-prose.js +1 -1
  8. package/dist/{compiler → engine/compiler}/check.js +15 -27
  9. package/dist/{compiler → engine/compiler}/code-blocks.js +3 -1
  10. package/dist/{compiler → engine/compiler}/code-languages.js +1 -2
  11. package/dist/{compiler → engine/compiler}/compile.d.ts +5 -4
  12. package/dist/{compiler → engine/compiler}/compile.js +91 -32
  13. package/dist/{compiler → engine/compiler}/config.js +1 -3
  14. package/dist/{compiler → engine/compiler}/dialect.d.ts +1 -3
  15. package/dist/{compiler → engine/compiler}/dialect.js +8 -52
  16. package/dist/{compiler → engine/compiler}/dxf.js +1 -1
  17. package/dist/{compiler → engine/compiler}/export.js +15 -8
  18. package/dist/{compiler → engine/compiler}/figures.js +26 -22
  19. package/dist/{compiler → engine/compiler}/file-cache.d.ts +1 -2
  20. package/dist/{compiler → engine/compiler}/file-cache.js +8 -15
  21. package/dist/{compiler → engine/compiler}/files.js +49 -38
  22. package/dist/{compiler → engine/compiler}/fonts.js +1 -3
  23. package/dist/{compiler → engine/compiler}/from-mdast.js +1 -1
  24. package/dist/engine/compiler/host.d.ts +10 -0
  25. package/dist/engine/compiler/host.js +16 -0
  26. package/dist/{compiler → engine/compiler}/icons.d.ts +3 -0
  27. package/dist/{compiler → engine/compiler}/icons.js +28 -10
  28. package/dist/{compiler → engine/compiler}/ignored-files.d.ts +2 -0
  29. package/dist/{compiler → engine/compiler}/ignored-files.js +12 -3
  30. package/dist/{compiler → engine/compiler}/locales.js +2 -8
  31. package/dist/{compiler → engine/compiler}/manifest.d.ts +3 -2
  32. package/dist/engine/compiler/manifest.js +46 -0
  33. package/dist/{compiler → engine/compiler}/ops.d.ts +4 -1
  34. package/dist/{compiler → engine/compiler}/ops.js +36 -21
  35. package/dist/engine/compiler/schema-file-references.d.ts +2 -0
  36. package/dist/engine/compiler/schema-file-references.js +82 -0
  37. package/dist/engine/compiler/serialize.d.ts +2 -0
  38. package/dist/engine/compiler/serialize.js +5 -0
  39. package/dist/{compiler → engine/compiler}/subformat-schema.js +1 -3
  40. package/dist/{compiler → engine/compiler}/subformats.d.ts +10 -0
  41. package/dist/{compiler → engine/compiler}/subformats.js +122 -18
  42. package/dist/{compiler → engine/compiler}/textfile-remote.js +1 -2
  43. package/dist/{compiler → engine/compiler}/textfile.js +4 -6
  44. package/dist/{compiler → engine/compiler}/theme-variants.js +1 -1
  45. package/dist/{compiler → engine/compiler}/zip.js +1 -1
  46. package/dist/{core → engine/core}/blocks.d.ts +6 -4
  47. package/dist/{core → engine/core}/content-metadata.d.ts +6 -1
  48. package/dist/{core → engine/core}/content-metadata.js +84 -18
  49. package/dist/{core → engine/core}/content-types.d.ts +4 -2
  50. package/dist/{core → engine/core}/html.d.ts +7 -0
  51. package/dist/{core → engine/core}/html.js +44 -3
  52. package/dist/{core → engine/core}/icons.d.ts +3 -0
  53. package/dist/engine/core/icons.js +20 -0
  54. package/dist/{core → engine/core}/routing.d.ts +2 -0
  55. package/dist/{core → engine/core}/routing.js +9 -0
  56. package/dist/{core → engine/core}/schema-refs.d.ts +1 -1
  57. package/dist/{core → engine/core}/schema-refs.js +3 -1
  58. package/dist/engine/core/subformat-references.d.ts +5 -0
  59. package/dist/engine/core/subformat-references.js +33 -0
  60. package/dist/{core → engine/core}/subformats.d.ts +7 -0
  61. package/dist/{core → engine/core}/subformats.js +5 -1
  62. package/dist/{core → engine/core}/taxonomy.d.ts +2 -3
  63. package/dist/{core → engine/core}/taxonomy.js +1 -5
  64. package/dist/flow.global.js +1031 -1057
  65. package/dist/frontend/application-request.d.ts +14 -0
  66. package/dist/frontend/application-request.js +36 -0
  67. package/dist/frontend/document-application.d.ts +200 -0
  68. package/dist/{viewer/serve.js → frontend/document-application.js} +1611 -1670
  69. package/dist/frontend/figure-preview.d.ts +4 -0
  70. package/dist/{viewer → frontend}/figure-preview.js +4 -4
  71. package/dist/{viewer → frontend}/file-references.d.ts +1 -1
  72. package/dist/{viewer → frontend}/file-references.js +3 -3
  73. package/dist/{viewer → frontend}/font-picker.d.ts +1 -1
  74. package/dist/{viewer → frontend}/font-settings.d.ts +1 -1
  75. package/dist/{viewer → frontend}/language-picker.js +112 -18
  76. package/dist/{viewer → frontend}/locales/eng.json +16 -2
  77. package/dist/{viewer → frontend}/locales/jpn.json +16 -2
  78. package/dist/{viewer → frontend}/locales/zho.json +16 -2
  79. package/dist/{viewer → frontend}/nav-focus.js +2 -0
  80. package/dist/{viewer → frontend}/plugin-blocks.js +2 -2
  81. package/dist/{viewer → frontend}/resize.js +14 -2
  82. package/dist/frontend/resource-download.d.ts +2 -0
  83. package/dist/frontend/resource-download.js +43 -0
  84. package/dist/{viewer → frontend}/resource-library.d.ts +9 -2
  85. package/dist/{viewer → frontend}/resource-library.js +133 -37
  86. package/dist/{core → frontend}/schema-graph-flow.d.ts +1 -1
  87. package/dist/{core → frontend}/schema-graph-flow.js +1 -1
  88. package/dist/{viewer → frontend}/search.d.ts +2 -2
  89. package/dist/{viewer → frontend}/search.js +26 -8
  90. package/dist/graph/{abnfDiagram-S7VZAUFO-ASBULSKE.js → abnfDiagram-S7VZAUFO-GAGCW2J5.js} +1 -1
  91. package/dist/graph/{architecture-WOLXFQ4H-V57EDXXY.js → architecture-WOLXFQ4H-AWAC3VBS.js} +1 -1
  92. package/dist/graph/{architectureDiagram-YGSQEFNW-GIMP347N.js → architectureDiagram-YGSQEFNW-WQ7QKSUJ.js} +1 -1
  93. package/dist/graph/{blockDiagram-APKKGZFW-RDL2T4JW.js → blockDiagram-APKKGZFW-H7ZNJMOM.js} +1 -1
  94. package/dist/graph/{bpmnIcons-APHXDYXF-TWOSQNUQ.js → bpmnIcons-APHXDYXF-EAVPNTFE.js} +1 -1
  95. package/dist/graph/{c4Diagram-KJ2TOQU5-75LIUC4F.js → c4Diagram-KJ2TOQU5-3IYS34YL.js} +1 -1
  96. package/dist/graph/{chunk-KU6GTEMS.js → chunk-3CJU2RDX.js} +1 -1
  97. package/dist/graph/{chunk-ISO77HML.js → chunk-5N2X2DXU.js} +1 -1
  98. package/dist/graph/{chunk-YCRLJT2S.js → chunk-67BPVAXC.js} +1 -1
  99. package/dist/graph/{chunk-26TUJSYJ.js → chunk-6CDZONCA.js} +1 -1
  100. package/dist/graph/{chunk-I3DMZIHV.js → chunk-7ASYMKN2.js} +1 -1
  101. package/dist/graph/{chunk-K2KLZU7M.js → chunk-7JQUFVT4.js} +2 -2
  102. package/dist/graph/{chunk-BBD5CEDC.js → chunk-7LSMJ4VU.js} +1 -1
  103. package/dist/graph/{chunk-EG5UVNOC.js → chunk-7UKJADAE.js} +1 -1
  104. package/dist/graph/{chunk-BZAMCJ6B.js → chunk-AARGNXTW.js} +1 -1
  105. package/dist/graph/{chunk-HOPPTA6H.js → chunk-BOXAA5AP.js} +2 -2
  106. package/dist/graph/{chunk-N3OHKGRZ.js → chunk-BTMPKSGF.js} +1 -1
  107. package/dist/graph/{chunk-QCJUF4YA.js → chunk-DIDARDST.js} +1 -1
  108. package/dist/graph/{chunk-R63JUMUK.js → chunk-EWYECPNJ.js} +1 -1
  109. package/dist/graph/{chunk-3YJHMOOA.js → chunk-FD7ZFC7R.js} +1 -1
  110. package/dist/graph/chunk-GWYODWCE.js +1 -0
  111. package/dist/graph/{chunk-IC23EEF6.js → chunk-HKRJKXEE.js} +1 -1
  112. package/dist/graph/{chunk-PW2RGZ3O.js → chunk-I5LEUF24.js} +1 -1
  113. package/dist/graph/{chunk-OFZLK5G4.js → chunk-ICJPOOXG.js} +1 -1
  114. package/dist/graph/{chunk-KT4VPQD5.js → chunk-IVZHB6RS.js} +2 -2
  115. package/dist/graph/{chunk-VM2H7G2R.js → chunk-JZGXHT3J.js} +1 -1
  116. package/dist/graph/{chunk-HJG2HUYJ.js → chunk-LSRL537V.js} +1 -1
  117. package/dist/graph/{chunk-C6J4A356.js → chunk-N44XPVUD.js} +1 -1
  118. package/dist/graph/{chunk-JD7ZBJD2.js → chunk-NDAMZVXQ.js} +1 -1
  119. package/dist/graph/{chunk-QEEA3KYY.js → chunk-QLS7NIYR.js} +1 -1
  120. package/dist/graph/{chunk-JRSH5GNS.js → chunk-QQIGL7OP.js} +1 -1
  121. package/dist/graph/chunk-SQE76S5B.js +1 -0
  122. package/dist/graph/{chunk-ZMCB7VP2.js → chunk-WQHTQAFY.js} +1 -1
  123. package/dist/graph/{classDiagram-v2-L25IHNXF-JL7LVDZH.js → classDiagram-v2-L25IHNXF-HNTCDTNK.js} +1 -1
  124. package/dist/graph/{cose-bilkent-JH36ORCC-PNM3EYPB.js → cose-bilkent-JH36ORCC-2GVA7XKO.js} +1 -1
  125. package/dist/graph/{cynefin-EF2NZ3EQ-PSXP3DXL.js → cynefin-EF2NZ3EQ-TCI65RAQ.js} +1 -1
  126. package/dist/graph/{cynefinDiagram-L36ESFBY-QVY54CXO.js → cynefinDiagram-L36ESFBY-OKQ5BLVF.js} +1 -1
  127. package/dist/graph/{dagre-SPEB5RXH-HPGQXBZJ.js → dagre-SPEB5RXH-KZEBD52K.js} +1 -1
  128. package/dist/graph/{diagram-3B7GL73J-DWH5WS2P.js → diagram-3B7GL73J-ESCBJM3O.js} +1 -1
  129. package/dist/graph/{diagram-DNEMPZML-TEGH2U5I.js → diagram-DNEMPZML-ZIBUSQZI.js} +1 -1
  130. package/dist/graph/{diagram-L3MUGCDN-X4MREUWR.js → diagram-L3MUGCDN-IGK62IPN.js} +1 -1
  131. package/dist/graph/{diagram-LA4NIPWU-NXT746HG.js → diagram-LA4NIPWU-2KZCOFJ5.js} +1 -1
  132. package/dist/graph/{diagram-MHCOC4E2-JGHXSAGS.js → diagram-MHCOC4E2-EYAAB236.js} +1 -1
  133. package/dist/graph/{diagram-XPFHEONP-ZHZPBLT4.js → diagram-XPFHEONP-OZ5ARGMG.js} +1 -1
  134. package/dist/graph/{ebnfDiagram-UZSYDL2S-SMF6KJ43.js → ebnfDiagram-UZSYDL2S-M3XJHARD.js} +1 -1
  135. package/dist/graph/{erDiagram-EYBAPDEH-B3JNJ357.js → erDiagram-EYBAPDEH-Y7KUBH7A.js} +1 -1
  136. package/dist/graph/{eventmodeling-K75KTNOO-WG6DDYMC.js → eventmodeling-K75KTNOO-ROLYRDEP.js} +1 -1
  137. package/dist/graph/flowDiagram-MALGAFMO-AAUEIPCR.js +1 -0
  138. package/dist/graph/{ganttDiagram-23REXITY-YXBYWFOJ.js → ganttDiagram-23REXITY-JSBTFSSJ.js} +1 -1
  139. package/dist/graph/{gitGraph-VSP46ZUC-VBFWJBBT.js → gitGraph-VSP46ZUC-ZCBCDVNF.js} +1 -1
  140. package/dist/graph/{gitGraphDiagram-STJD7YCW-4FZDCFGV.js → gitGraphDiagram-STJD7YCW-3ZA5FT3G.js} +1 -1
  141. package/dist/graph/{info-OHQRW6UA-ALVDUVYV.js → info-OHQRW6UA-JKJGOQNY.js} +1 -1
  142. package/dist/graph/infoDiagram-KBXO4MBG-6LFMPP2O.js +2 -0
  143. package/dist/graph/{ishikawaDiagram-M35NCXHK-FRZD2PWQ.js → ishikawaDiagram-M35NCXHK-YLEU44DY.js} +1 -1
  144. package/dist/graph/{journeyDiagram-OPLOXDXO-7Z66JCPR.js → journeyDiagram-OPLOXDXO-ZHJV66ZT.js} +1 -1
  145. package/dist/graph/{kanban-definition-BZKZHSQY-NN5AIKTE.js → kanban-definition-BZKZHSQY-SDU25WUM.js} +1 -1
  146. package/dist/graph/{katex-DXDNVO6V.js → katex-WSLZOTY7.js} +1 -1
  147. package/dist/graph/{mindmap-definition-I2QAS2VK-HDPCABN2.js → mindmap-definition-I2QAS2VK-XQNBCYHN.js} +1 -1
  148. package/dist/graph/{packet-JDAUHWVQ-5MQIBWAH.js → packet-JDAUHWVQ-Y3H77ERD.js} +1 -1
  149. package/dist/graph/{pegDiagram-FD4XPPHP-H2BFNCKT.js → pegDiagram-FD4XPPHP-YO4VWH6V.js} +1 -1
  150. package/dist/graph/{pie-XZMESJXO-T5VRKHVT.js → pie-XZMESJXO-PRER4XL5.js} +1 -1
  151. package/dist/graph/{pieDiagram-J4AKIIQI-O3NJSVD3.js → pieDiagram-J4AKIIQI-TJ5WOOSV.js} +1 -1
  152. package/dist/graph/{quadrantDiagram-XTYBLID2-TMTZJI3P.js → quadrantDiagram-XTYBLID2-G6MSSZLW.js} +1 -1
  153. package/dist/graph/{radar-ABXABTNO-C6FXIBYW.js → radar-ABXABTNO-M6MV34GM.js} +1 -1
  154. package/dist/graph/{railroad-I3PHUGI6-ZSO5JXB3.js → railroad-I3PHUGI6-YIWPGN6Q.js} +1 -1
  155. package/dist/graph/{railroad-abnf-LNEFI6M7-CI4GQRHB.js → railroad-abnf-LNEFI6M7-7JHLZ2R7.js} +1 -1
  156. package/dist/graph/{railroad-ebnf-DWYD2UWJ-MUENNCGK.js → railroad-ebnf-DWYD2UWJ-V55BXEWY.js} +1 -1
  157. package/dist/graph/{railroad-peg-JR7BVNR7-N3X5GGIX.js → railroad-peg-JR7BVNR7-XCGKDRMK.js} +1 -1
  158. package/dist/graph/{railroadDiagram-MRQ6NCDL-JHWS23UO.js → railroadDiagram-MRQ6NCDL-RACSFXC4.js} +1 -1
  159. package/dist/graph/{requirementDiagram-Y7LWUY3S-7DVLPO4B.js → requirementDiagram-Y7LWUY3S-4LQIQWHQ.js} +1 -1
  160. package/dist/graph/{sankeyDiagram-WGJFYUXA-Z5L4R5TR.js → sankeyDiagram-WGJFYUXA-K3RXG5FB.js} +1 -1
  161. package/dist/graph/schema-graph-global.js +17 -17
  162. package/dist/graph/{sequenceDiagram-5NDRBG5M-RCTU25NT.js → sequenceDiagram-5NDRBG5M-Y6RBHRS3.js} +1 -1
  163. package/dist/graph/{sizeCapture-INFHLROL-RROY32P5.js → sizeCapture-INFHLROL-TJW3VUGH.js} +1 -1
  164. package/dist/graph/{stateDiagram-v2-FJ4FJNEA-BXUSPWDK.js → stateDiagram-v2-FJ4FJNEA-4M5WZORG.js} +1 -1
  165. package/dist/graph/swimlanes-UMQ2AFYF-O4W6U4RO.js +1 -0
  166. package/dist/graph/swimlanesDiagram-OMPLPG4O-HZAKM45N.js +8 -0
  167. package/dist/graph/{timeline-definition-SEUHKTQE-ZQSMIVAS.js → timeline-definition-SEUHKTQE-IHISQ4Q7.js} +1 -1
  168. package/dist/graph/{treeView-D4JQ5SDB-42S7U73N.js → treeView-D4JQ5SDB-EVGY4VYS.js} +1 -1
  169. package/dist/graph/{treemap-SAJKECNS-RUBYQ7XF.js → treemap-SAJKECNS-LN3SMFRX.js} +1 -1
  170. package/dist/graph/{usecaseDiagram-AFA6YXN4-57RDRYXF.js → usecaseDiagram-AFA6YXN4-B645A3J6.js} +1 -1
  171. package/dist/graph/{vennDiagram-NNMJR3RB-5C3LVAV6.js → vennDiagram-NNMJR3RB-K3HWMON6.js} +1 -1
  172. package/dist/graph/{wardley-7MLQ67FV-NV5HXTTC.js → wardley-7MLQ67FV-RRWOELC6.js} +1 -1
  173. package/dist/graph/{wardleyDiagram-S7YFUSEH-6D5BKXHM.js → wardleyDiagram-S7YFUSEH-DMMWKJEK.js} +1 -1
  174. package/dist/graph/{xychartDiagram-GGNKY7IX-6ET3ZM67.js → xychartDiagram-GGNKY7IX-K6MUQVXR.js} +1 -1
  175. package/dist/install.sh +68 -0
  176. package/dist/plugins.global.js +62 -62
  177. package/dist/{viewer → server}/assets.d.ts +2 -0
  178. package/dist/server/assets.js +7 -0
  179. package/dist/{viewer → server}/build-plugins.js +4 -4
  180. package/dist/{viewer → server}/build.d.ts +2 -1
  181. package/dist/{viewer → server}/build.js +31 -15
  182. package/dist/{cli.js → server/cli.js} +223 -56
  183. package/dist/server/editor-tools.d.ts +1 -0
  184. package/dist/server/editor-tools.js +1 -0
  185. package/dist/{viewer → server}/extension-pack.js +2 -2
  186. package/dist/{viewer → server}/extensions.d.ts +1 -1
  187. package/dist/{viewer → server}/extensions.js +3 -3
  188. package/dist/server/git-diff.d.ts +10 -0
  189. package/dist/{viewer → server}/git-diff.js +45 -10
  190. package/dist/server/git-origin.d.ts +4 -0
  191. package/dist/server/git-origin.js +103 -0
  192. package/dist/server/git.d.ts +9 -0
  193. package/dist/{viewer → server}/git.js +50 -6
  194. package/dist/server/history.d.ts +14 -0
  195. package/dist/server/history.js +205 -0
  196. package/dist/{viewer → server}/hmr.d.ts +0 -22
  197. package/dist/server/hmr.js +168 -0
  198. package/dist/server/index.d.ts +17 -0
  199. package/dist/{index.js → server/index.js} +16 -16
  200. package/dist/{viewer → server}/ja-lint.d.ts +1 -1
  201. package/dist/{viewer → server}/languages.d.ts +1 -1
  202. package/dist/{viewer → server}/languages.js +3 -3
  203. package/dist/{mcp.d.ts → server/mcp.d.ts} +2 -2
  204. package/dist/{mcp.js → server/mcp.js} +60 -21
  205. package/dist/{viewer → server}/plugin-config.d.ts +2 -2
  206. package/dist/{viewer → server}/plugin-config.js +2 -2
  207. package/dist/{plugins → server/plugins}/local-storage.d.ts +1 -1
  208. package/dist/{plugins → server/plugins}/local-storage.js +1 -1
  209. package/dist/{plugins → server/plugins}/runtime.d.ts +4 -4
  210. package/dist/{plugins → server/plugins}/runtime.js +4 -4
  211. package/dist/{viewer → server}/plugins.d.ts +3 -3
  212. package/dist/{viewer → server}/plugins.js +14 -13
  213. package/dist/server/resource-library.d.ts +1 -0
  214. package/dist/server/resource-library.js +1 -0
  215. package/dist/server/self.d.ts +5 -0
  216. package/dist/server/self.js +98 -0
  217. package/dist/server/serve.d.ts +61 -0
  218. package/dist/server/serve.js +503 -0
  219. package/dist/server/static-client.d.ts +4 -0
  220. package/dist/server/static-client.js +117 -0
  221. package/dist/server/workspace-server.d.ts +16 -0
  222. package/dist/server/workspace-server.js +266 -0
  223. package/dist/{viewer → server}/workspace.d.ts +6 -1
  224. package/dist/{viewer → server}/workspace.js +46 -0
  225. package/dist/subformats.global.js +92 -6
  226. package/dist/ui.global.js +85 -72
  227. package/dist/workspace/client.d.ts +13 -0
  228. package/dist/workspace/client.js +114 -0
  229. package/dist/{viewer → workspace}/code-file.d.ts +1 -1
  230. package/dist/{viewer → workspace}/code-file.js +7 -7
  231. package/dist/workspace/connection.d.ts +27 -0
  232. package/dist/workspace/connection.js +38 -0
  233. package/dist/{viewer → workspace}/editor-tools.d.ts +7 -1
  234. package/dist/{viewer → workspace}/editor-tools.js +12 -9
  235. package/dist/{viewer → workspace}/git-types.d.ts +7 -0
  236. package/dist/workspace/github.d.ts +4 -0
  237. package/dist/workspace/github.js +99 -0
  238. package/dist/workspace/history.d.ts +46 -0
  239. package/dist/workspace/history.js +86 -0
  240. package/dist/workspace/protocol.d.ts +38 -0
  241. package/dist/workspace/protocol.js +20 -0
  242. package/dist/workspace/resource-download.d.ts +1 -0
  243. package/dist/workspace/resource-download.js +8 -0
  244. package/dist/workspace/server.d.ts +9 -0
  245. package/dist/workspace/server.js +48 -0
  246. package/dist/{viewer → workspace}/site-icon.js +9 -10
  247. package/dist/{viewer → workspace}/site-title.js +6 -7
  248. package/dist/{viewer → workspace}/textfile.d.ts +1 -1
  249. package/dist/{viewer → workspace}/textfile.js +5 -5
  250. package/dist/workspace-worker.global.js +2859 -0
  251. package/package.json +43 -21
  252. package/dist/compiler/manifest.js +0 -37
  253. package/dist/compiler/serialize.d.ts +0 -3
  254. package/dist/compiler/serialize.js +0 -16
  255. package/dist/core/icons.js +0 -5
  256. package/dist/graph/chunk-3RNHDNP5.js +0 -1
  257. package/dist/graph/chunk-5UUEAHTN.js +0 -1
  258. package/dist/graph/chunk-6T55RVVR.js +0 -1
  259. package/dist/graph/elk-XV6XMXQE-AZ4HLCWI.js +0 -27
  260. package/dist/graph/flowDiagram-MALGAFMO-2R7EYAQI.js +0 -1
  261. package/dist/graph/infoDiagram-KBXO4MBG-7EHX2GQG.js +0 -2
  262. package/dist/graph/swimlanes-UMQ2AFYF-LDD74Q2S.js +0 -1
  263. package/dist/graph/swimlanesDiagram-OMPLPG4O-ZYULLJSU.js +0 -8
  264. package/dist/index.d.ts +0 -17
  265. package/dist/viewer/assets.js +0 -3
  266. package/dist/viewer/figure-preview.d.ts +0 -4
  267. package/dist/viewer/git-diff.d.ts +0 -6
  268. package/dist/viewer/git.d.ts +0 -5
  269. package/dist/viewer/hmr.js +0 -341
  270. package/dist/viewer/serve.d.ts +0 -216
  271. /package/dist/{compiler → engine/compiler}/asset-references.d.ts +0 -0
  272. /package/dist/{compiler → engine/compiler}/asset-references.js +0 -0
  273. /package/dist/{compiler → engine/compiler}/bundle-urls.d.ts +0 -0
  274. /package/dist/{compiler → engine/compiler}/check-types.d.ts +0 -0
  275. /package/dist/{compiler → engine/compiler}/check-types.js +0 -0
  276. /package/dist/{compiler → engine/compiler}/check.d.ts +0 -0
  277. /package/dist/{compiler → engine/compiler}/code-blocks.d.ts +0 -0
  278. /package/dist/{compiler → engine/compiler}/code-languages.d.ts +0 -0
  279. /package/dist/{compiler → engine/compiler}/config.d.ts +0 -0
  280. /package/dist/{compiler → engine/compiler}/drawio.d.ts +0 -0
  281. /package/dist/{compiler → engine/compiler}/drawio.js +0 -0
  282. /package/dist/{compiler → engine/compiler}/dxf.d.ts +0 -0
  283. /package/dist/{compiler → engine/compiler}/export.d.ts +0 -0
  284. /package/dist/{compiler → engine/compiler}/figures.d.ts +0 -0
  285. /package/dist/{compiler → engine/compiler}/files.d.ts +0 -0
  286. /package/dist/{compiler → engine/compiler}/fonts.d.ts +0 -0
  287. /package/dist/{compiler → engine/compiler}/format.d.ts +0 -0
  288. /package/dist/{compiler → engine/compiler}/format.js +0 -0
  289. /package/dist/{compiler → engine/compiler}/from-mdast.d.ts +0 -0
  290. /package/dist/{compiler → engine/compiler}/language-codes.d.ts +0 -0
  291. /package/dist/{compiler → engine/compiler}/language-codes.js +0 -0
  292. /package/dist/{compiler → engine/compiler}/locales.d.ts +0 -0
  293. /package/dist/{compiler → engine/compiler}/public-file.d.ts +0 -0
  294. /package/dist/{compiler → engine/compiler}/public-file.js +0 -0
  295. /package/dist/{compiler → engine/compiler}/subformat-schema.d.ts +0 -0
  296. /package/dist/{compiler → engine/compiler}/terms.d.ts +0 -0
  297. /package/dist/{compiler → engine/compiler}/terms.js +0 -0
  298. /package/dist/{compiler → engine/compiler}/textfile-remote.d.ts +0 -0
  299. /package/dist/{compiler → engine/compiler}/textfile.d.ts +0 -0
  300. /package/dist/{compiler → engine/compiler}/theme-variants.d.ts +0 -0
  301. /package/dist/{compiler → engine/compiler}/zip.d.ts +0 -0
  302. /package/dist/{core → engine/core}/blocks.js +0 -0
  303. /package/dist/{core → engine/core}/code-file.d.ts +0 -0
  304. /package/dist/{core → engine/core}/code-file.js +0 -0
  305. /package/dist/{core → engine/core}/code-grammars.d.ts +0 -0
  306. /package/dist/{core → engine/core}/code-grammars.js +0 -0
  307. /package/dist/{core → engine/core}/content-types.js +0 -0
  308. /package/dist/{core → engine/core}/escape-html.d.ts +0 -0
  309. /package/dist/{core → engine/core}/escape-html.js +0 -0
  310. /package/dist/{core → engine/core}/extension-package.d.ts +0 -0
  311. /package/dist/{core → engine/core}/extension-package.js +0 -0
  312. /package/dist/{core → engine/core}/figure-frame.d.ts +0 -0
  313. /package/dist/{core → engine/core}/figure-frame.js +0 -0
  314. /package/dist/{core → engine/core}/file-embed.d.ts +0 -0
  315. /package/dist/{core → engine/core}/file-embed.js +0 -0
  316. /package/dist/{core → engine/core}/files.d.ts +0 -0
  317. /package/dist/{core → engine/core}/files.js +0 -0
  318. /package/dist/{core → engine/core}/graph-common.d.ts +0 -0
  319. /package/dist/{core → engine/core}/graph-common.js +0 -0
  320. /package/dist/{core → engine/core}/graph.d.ts +0 -0
  321. /package/dist/{core → engine/core}/graph.js +0 -0
  322. /package/dist/{core → engine/core}/inline.d.ts +0 -0
  323. /package/dist/{core → engine/core}/inline.js +0 -0
  324. /package/dist/{core → engine/core}/json-tools.d.ts +0 -0
  325. /package/dist/{core → engine/core}/json-tools.js +0 -0
  326. /package/dist/{core → engine/core}/language.d.ts +0 -0
  327. /package/dist/{core → engine/core}/language.js +0 -0
  328. /package/dist/{core → engine/core}/languages/ja.d.ts +0 -0
  329. /package/dist/{core → engine/core}/languages/ja.js +0 -0
  330. /package/dist/{core → engine/core}/markdown.d.ts +0 -0
  331. /package/dist/{core → engine/core}/markdown.js +0 -0
  332. /package/dist/{core → engine/core}/previewers.d.ts +0 -0
  333. /package/dist/{core → engine/core}/previewers.js +0 -0
  334. /package/dist/{core → engine/core}/schema-comments.d.ts +0 -0
  335. /package/dist/{core → engine/core}/schema-comments.js +0 -0
  336. /package/dist/{core → engine/core}/schema-fields.d.ts +0 -0
  337. /package/dist/{core → engine/core}/schema-fields.js +0 -0
  338. /package/dist/{core → engine/core}/schema-graph.d.ts +0 -0
  339. /package/dist/{core → engine/core}/schema-graph.js +0 -0
  340. /package/dist/{core → engine/core}/subformat-record.d.ts +0 -0
  341. /package/dist/{core → engine/core}/subformat-record.js +0 -0
  342. /package/dist/{core → engine/core}/term-reference.d.ts +0 -0
  343. /package/dist/{core → engine/core}/term-reference.js +0 -0
  344. /package/dist/{core → engine/core}/textfile.d.ts +0 -0
  345. /package/dist/{core → engine/core}/textfile.js +0 -0
  346. /package/dist/{core → engine/core}/theme-variants.d.ts +0 -0
  347. /package/dist/{core → engine/core}/theme-variants.js +0 -0
  348. /package/dist/{core → engine/core}/workspace.d.ts +0 -0
  349. /package/dist/{core → engine/core}/workspace.js +0 -0
  350. /package/dist/{viewer → frontend}/bundle-network.d.ts +0 -0
  351. /package/dist/{viewer → frontend}/bundle-network.js +0 -0
  352. /package/dist/{core → frontend}/flow-base-css.generated.d.ts +0 -0
  353. /package/dist/{core → frontend}/flow-base-css.generated.js +0 -0
  354. /package/dist/{core → frontend}/flow-css.d.ts +0 -0
  355. /package/dist/{core → frontend}/flow-css.js +0 -0
  356. /package/dist/{viewer → frontend}/font-picker.js +0 -0
  357. /package/dist/{viewer → frontend}/font-settings.js +0 -0
  358. /package/dist/{viewer → frontend}/i18n.d.ts +0 -0
  359. /package/dist/{viewer → frontend}/i18n.js +0 -0
  360. /package/dist/{viewer → frontend}/language-picker.d.ts +0 -0
  361. /package/dist/{viewer → frontend}/lazy-preview.d.ts +0 -0
  362. /package/dist/{viewer → frontend}/lazy-preview.js +0 -0
  363. /package/dist/{viewer → frontend}/nav-focus.d.ts +0 -0
  364. /package/dist/{viewer → frontend}/nav-update.d.ts +0 -0
  365. /package/dist/{viewer → frontend}/nav-update.js +0 -0
  366. /package/dist/{viewer → frontend}/plugin-blocks.d.ts +0 -0
  367. /package/dist/{viewer → frontend}/plugin-style.d.ts +0 -0
  368. /package/dist/{viewer → frontend}/plugin-style.js +0 -0
  369. /package/dist/{viewer → frontend}/plugin-view.d.ts +0 -0
  370. /package/dist/{viewer → frontend}/plugin-view.js +0 -0
  371. /package/dist/{viewer → frontend}/resize.d.ts +0 -0
  372. /package/dist/{core → frontend}/schema-graph-mount.d.ts +0 -0
  373. /package/dist/{core → frontend}/schema-graph-mount.js +0 -0
  374. /package/dist/{core → frontend}/table-ui.d.ts +0 -0
  375. /package/dist/{core → frontend}/table-ui.js +0 -0
  376. /package/dist/{core → frontend}/terms-ui.d.ts +0 -0
  377. /package/dist/{core → frontend}/terms-ui.js +0 -0
  378. /package/dist/{viewer → frontend}/theme-picker.d.ts +0 -0
  379. /package/dist/{viewer → frontend}/theme-picker.js +0 -0
  380. /package/dist/{core → frontend}/toc-ui.d.ts +0 -0
  381. /package/dist/{core → frontend}/toc-ui.js +0 -0
  382. /package/dist/{core → frontend}/video-ui.d.ts +0 -0
  383. /package/dist/{core → frontend}/video-ui.js +0 -0
  384. /package/dist/graph/{chunk-GYT4IYBZ.js → chunk-RJFVWYCA.js} +0 -0
  385. /package/dist/{viewer → server}/build-plugins.d.ts +0 -0
  386. /package/dist/{cli.d.ts → server/cli.d.ts} +0 -0
  387. /package/dist/{viewer → server}/extension-pack.d.ts +0 -0
  388. /package/dist/{viewer → server}/fonts/LICENSE.txt +0 -0
  389. /package/dist/{viewer → server}/fonts/udev-gothic-regular.woff2 +0 -0
  390. /package/dist/{viewer → server}/fonts.d.ts +0 -0
  391. /package/dist/{viewer → server}/fonts.js +0 -0
  392. /package/dist/{viewer → server}/ja-lint.js +0 -0
  393. /package/dist/{viewer → workspace}/git-types.js +0 -0
  394. /package/dist/{viewer → workspace}/site-icon.d.ts +0 -0
  395. /package/dist/{viewer → workspace}/site-title.d.ts +0 -0
package/package.json CHANGED
@@ -1,43 +1,43 @@
1
1
  {
2
2
  "name": "@dooc-dev/dooc",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "description": "View and edit source files with dooc.yaml configuration, and share them as source ZIPs or standalone HTML.",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist"
8
8
  ],
9
9
  "bin": {
10
- "dooc": "./dist/cli.js"
10
+ "dooc": "./dist/server/cli.js"
11
11
  },
12
12
  "exports": {
13
13
  "./check": {
14
- "types": "./dist/compiler/check.d.ts",
15
- "default": "./dist/compiler/check.js"
14
+ "types": "./dist/engine/compiler/check.d.ts",
15
+ "default": "./dist/engine/compiler/check.js"
16
16
  },
17
17
  "./viewer-plugins": {
18
- "types": "./dist/viewer/plugins.d.ts",
19
- "default": "./dist/viewer/plugins.js"
18
+ "types": "./dist/server/plugins.d.ts",
19
+ "default": "./dist/server/plugins.js"
20
20
  },
21
21
  "./plugins": {
22
22
  "types": "./dist/plugins/index.d.ts",
23
23
  "default": "./dist/plugins/index.js"
24
24
  },
25
25
  ".": {
26
- "types": "./dist/index.d.ts",
27
- "default": "./dist/index.js"
26
+ "types": "./dist/server/index.d.ts",
27
+ "default": "./dist/server/index.js"
28
28
  },
29
29
  "./flow": {
30
- "types": "./dist/core/schema-graph-mount.d.ts",
31
- "default": "./dist/core/schema-graph-mount.js"
30
+ "types": "./dist/frontend/schema-graph-mount.d.ts",
31
+ "default": "./dist/frontend/schema-graph-mount.js"
32
32
  },
33
33
  "./flow.global.js": "./dist/flow.global.js",
34
34
  "./build": {
35
- "types": "./dist/viewer/build.d.ts",
36
- "default": "./dist/viewer/build.js"
35
+ "types": "./dist/server/build.d.ts",
36
+ "default": "./dist/server/build.js"
37
37
  },
38
38
  "./export": {
39
- "types": "./dist/compiler/export.d.ts",
40
- "default": "./dist/compiler/export.js"
39
+ "types": "./dist/engine/compiler/export.d.ts",
40
+ "default": "./dist/engine/compiler/export.js"
41
41
  }
42
42
  },
43
43
  "peerDependencies": {
@@ -61,20 +61,23 @@
61
61
  "node": ">=22"
62
62
  },
63
63
  "scripts": {
64
- "build:plugin": "node -e \"require('node:fs').rmSync('packages/dooc-plugin/dist', {recursive:true, force:true})\" && tsc -p tsconfig.plugin.json",
64
+ "build:plugin": "pnpm --dir plugins run build",
65
65
  "test:plugin-package": "node --import tsx scripts/test/plugin-package.mjs",
66
- "build": "node -e \"require('node:fs').rmSync('dist', {recursive:true, force:true})\" && pnpm run build:css && pnpm run build:fonts && tsc -p tsconfig.build.json && pnpm run build:flow && pnpm run build:edit",
66
+ "build": "node -e \"require('node:fs').rmSync('dist', {recursive:true, force:true})\" && pnpm run build:css && tsc -p tsconfig.build.json && node scripts/build/flatten-dist.mjs && node scripts/build/self-assets.mjs && pnpm run build:fonts && pnpm run build:flow && pnpm run build:edit && pnpm run build:client",
67
67
  "build:binary": "bun scripts/build/binary.mjs",
68
68
  "build:css": "node --import tsx scripts/build/flow-css.ts",
69
- "build:flow": "esbuild src/core/schema-graph-global.tsx --bundle --format=iife --target=es2022 --minify --outfile=dist/flow.global.js && esbuild src/core/schema-graph-global.tsx --bundle --splitting --format=esm --target=es2022 --minify --outdir=dist/graph",
70
- "build:edit": "esbuild src/viewer/edit-client.ts --bundle --format=iife --target=es2022 --minify --outfile=dist/edit.global.js && esbuild src/viewer/ui-client.ts --bundle --format=iife --target=es2022 --minify --outfile=dist/ui.global.js && esbuild src/viewer/code-highlight.ts --bundle --format=iife --target=es2022 --minify --outfile=dist/code.global.js && esbuild src/viewer/code-worker.ts --bundle --format=iife --target=es2022 --minify --outfile=dist/code-worker.global.js && esbuild src/viewer/published-plugins.ts --bundle --format=iife --target=es2022 --minify --outfile=dist/plugins.global.js && esbuild src/viewer/published-subformats.ts --bundle --format=iife --target=es2022 --minify --outfile=dist/subformats.global.js",
69
+ "build:flow": "esbuild packages/frontend/src/schema-graph-global.tsx --bundle --format=iife --target=es2022 --minify --outfile=dist/flow.global.js && esbuild packages/frontend/src/schema-graph-global.tsx --bundle --splitting --format=esm --target=es2022 --minify --outdir=dist/graph",
70
+ "build:edit": "esbuild packages/frontend/src/edit-client.ts --bundle --format=iife --target=es2022 --minify --outfile=dist/edit.global.js && esbuild packages/frontend/src/ui-client.ts --bundle --format=iife --target=es2022 --minify --outfile=dist/ui.global.js && esbuild packages/frontend/src/code-highlight.ts --bundle --format=iife --target=es2022 --minify --outfile=dist/code.global.js && esbuild packages/frontend/src/code-worker.ts --bundle --format=iife --target=es2022 --minify --outfile=dist/code-worker.global.js && esbuild packages/frontend/src/published-plugins.ts --bundle --format=iife --target=es2022 --minify --outfile=dist/plugins.global.js && esbuild packages/frontend/src/published-subformats.ts --bundle --format=iife --target=es2022 --minify --outfile=dist/subformats.global.js",
71
+ "dooc": "cd \"$INIT_CWD\" && node --import tsx \"$PNPM_SCRIPT_SRC_DIR/packages/server/src/cli.ts\"",
72
+ "dev": "tsx watch --clear-screen=false packages/server/src/cli.ts",
71
73
  "test": "vitest run",
72
74
  "test:binary": "node scripts/test/binary.mjs",
73
75
  "test:install": "node scripts/test/install.mjs",
74
76
  "check": "biome check . && tsc --noEmit && pnpm run build && vitest run && pnpm run test:install && pnpm run test:plugin-package",
75
77
  "fix": "biome check --write .",
76
- "build:fonts": "node -e \"require('node:fs').cpSync('src/viewer/fonts', 'dist/viewer/fonts', {recursive:true})\"",
77
- "build:sample-extension": "node --import tsx scripts/build/sample-extension.mjs"
78
+ "build:fonts": "node -e \"require('node:fs').cpSync('packages/server/src/fonts', 'dist/server/fonts', {recursive:true})\"",
79
+ "build:sample-extension": "node --import tsx scripts/build/sample-extension.mjs",
80
+ "build:client": "node scripts/build/client.mjs"
78
81
  },
79
82
  "devDependencies": {
80
83
  "@biomejs/biome": "2.4.15",
@@ -88,17 +91,27 @@
88
91
  "@codemirror/view": "^6.43.15",
89
92
  "@lezer/common": "^1.5.4",
90
93
  "@lezer/highlight": "^1.2.5",
94
+ "@noble/hashes": "^2.4.0",
91
95
  "@shikijs/themes": "^4.5.0",
92
96
  "@types/dxf": "4.6.10",
93
97
  "@types/mdast": "^4.0.4",
94
98
  "@types/node": "^22.10.0",
99
+ "@types/path-browserify": "^1.0.3",
95
100
  "@types/react": "^19.2.17",
96
101
  "@types/react-dom": "^19.2.3",
102
+ "@types/ws": "^8.18.2",
97
103
  "@xyflow/react": "^12.11.2",
104
+ "buffer": "^6.0.3",
98
105
  "diff": "8.0.4",
99
106
  "esbuild": "^0.28.1",
107
+ "events": "^3.3.0",
108
+ "isomorphic-git": "^1.44.13",
109
+ "memfs": "^4.80.0",
110
+ "mermaid": "12.3.0",
111
+ "path-browserify": "^1.0.1",
100
112
  "react": "^19.2.8",
101
113
  "react-dom": "^19.2.8",
114
+ "readable-stream": "^4.8.0",
102
115
  "textlint": "^15.8.0",
103
116
  "tsx": "^4.19.2",
104
117
  "typescript": "^5.8.3",
@@ -113,10 +126,10 @@
113
126
  "ajv": "8.20.0",
114
127
  "ajv-formats": "3.0.1",
115
128
  "dxf": "5.3.1",
129
+ "fflate": "^0.8.3",
116
130
  "franc": "^6.2.0",
117
131
  "ignore": "^7.0.14",
118
132
  "iso-639-3": "^3.0.1",
119
- "mermaid": "^12.3.0",
120
133
  "parse5": "8.0.0",
121
134
  "postcss": "8.5.32",
122
135
  "postcss-value-parser": "4.2.0",
@@ -133,8 +146,17 @@
133
146
  "unist-util-visit": "^5.0.0",
134
147
  "vscode-json-languageservice": "5.7.2",
135
148
  "vscode-languageserver-textdocument": "1.0.16",
149
+ "ws": "^8.22.2",
136
150
  "yaml": "^2.7.0"
137
151
  },
152
+ "pnpm": {
153
+ "overrides": {
154
+ "mermaid@12.3.0>elkjs": "-"
155
+ },
156
+ "patchedDependencies": {
157
+ "mermaid@12.3.0": "patches/mermaid@12.3.0.patch"
158
+ }
159
+ },
138
160
  "repository": {
139
161
  "type": "git",
140
162
  "url": "git+https://github.com/dooc-dev/dooc.git"
@@ -1,37 +0,0 @@
1
- // Reads/writes dooc.yaml (node-dependent). Tree validation and manipulation live in
2
- // core/content-metadata.ts.
3
- import { existsSync, readFileSync, statSync, writeFileSync } from "node:fs";
4
- import { basename, dirname, join, resolve } from "node:path";
5
- import { parse } from "yaml";
6
- import { MANIFEST_FILE, parseManifest, serializeManifest, } from "../core/content-metadata.js";
7
- /** CLI paths select a manifest; every project path is relative to its parent. */
8
- export const projectRoot = (input = MANIFEST_FILE) => {
9
- const file = resolve(input);
10
- if (basename(file) !== MANIFEST_FILE || !existsSync(file) || !statSync(file).isFile())
11
- throw new Error(`Specify an existing dooc.yaml file: ${file}`);
12
- return dirname(file);
13
- };
14
- export const parseManifestText = (raw) => {
15
- let value;
16
- try {
17
- value = parse(raw);
18
- }
19
- catch (e) {
20
- return {
21
- tree: [],
22
- errors: [`${MANIFEST_FILE}: invalid YAML (${e instanceof Error ? e.message : e})`],
23
- };
24
- }
25
- return parseManifest(value);
26
- };
27
- /** Empty tree if missing (a new docs root with zero docs). */
28
- export const readManifest = (root) => {
29
- const path = join(root, MANIFEST_FILE);
30
- return existsSync(path)
31
- ? parseManifestText(readFileSync(path, "utf8"))
32
- : { tree: [], errors: [] };
33
- };
34
- export const writeManifest = (root, tree, metadata = {}) => {
35
- writeFileSync(join(root, MANIFEST_FILE), serializeManifest(tree, metadata));
36
- };
37
- export { docFile } from "../core/files.js";
@@ -1,3 +0,0 @@
1
- import type { Frontmatter } from "../core/taxonomy.js";
2
- /** Form frontmatter + body md → full file text (normalized to one trailing newline). */
3
- export declare const assembleDoc: (fm: Frontmatter, body: string) => string;
@@ -1,16 +0,0 @@
1
- // Serializes front-matter in hand-written style (double-quoted scalars / flow sequences). A
2
- // generic YAML stringify isn't used because it changes quote/sequence style and pollutes git
3
- // diffs against existing files. Key order is title / lang. The key set is
4
- // taxonomy's closed set, and a JSON string is a valid YAML double-quoted scalar.
5
- const serializeFrontmatter = (fm) => {
6
- const lines = [`title: ${JSON.stringify(fm.title)}`];
7
- if (fm.lang) {
8
- lines.push(`lang: ${JSON.stringify(fm.lang)}`);
9
- }
10
- return `---\n${lines.join("\n")}\n---\n`;
11
- };
12
- /** Form frontmatter + body md → full file text (normalized to one trailing newline). */
13
- export const assembleDoc = (fm, body) => {
14
- const b = body.replace(/\n+$/, "");
15
- return serializeFrontmatter(fm) + (b === "" ? "" : `\n${b}\n`);
16
- };
@@ -1,5 +0,0 @@
1
- export const FOLDER_ICON_PATH = "M2 5h6l2 2h8v10H2Z";
2
- export const RELOAD_ICON_PATH = "M17 8a7 7 0 1 0 0 5M17 3v5h-5";
3
- export const SEARCH_ICON_PATH = "M14 14l4 4M15 9a6 6 0 1 1-12 0 6 6 0 0 1 12 0";
4
- export const CHECK_ICON = '<svg class="ic-ok" viewBox="0 0 20 20" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m4 10 4 4 8-8"/></svg>';
5
- export const PLUGINS_ICON = '<svg class="nav-icon" viewBox="0 0 20 20" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m10 2 4 2v5l-4 2-4-2V4Zm-4 2 4 2 4-2m-4 2v5M6 9l-4 2v5l4 2 4-2v-5m-8 0 4 2 4-2m-4 2v5m8-9 4 2v5l-4 2-4-2m0-5 4 2 4-2m-4 2v5"/></svg>';
@@ -1 +0,0 @@
1
- var g=Object.create;var f=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var m=(a=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(a,{get:(b,c)=>(typeof require<"u"?require:b)[c]}):a)(function(a){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var n=(a,b)=>()=>{try{return b||a((b={exports:{}}).exports,b),b.exports}catch(c){throw b=0,c}};var l=(a,b,c,e)=>{if(b&&typeof b=="object"||typeof b=="function")for(let d of i(b))!k.call(a,d)&&d!==c&&f(a,d,{get:()=>b[d],enumerable:!(e=h(b,d))||e.enumerable});return a};var o=(a,b,c)=>(c=a!=null?g(j(a)):{},l(b||!a||!a.__esModule?f(c,"default",{value:a,enumerable:!0}):c,a));export{m as a,n as b,o as c};
@@ -1 +0,0 @@
1
- import{a as P}from"./chunk-K2KLZU7M.js";import{a as y}from"./chunk-GYT4IYBZ.js";var w=5,O=1e-5,X=2,Y=.6,R=1e-6;function N(t){let e=[];for(let s=0;s<t.length-1;s++)e.push({a:t[s],b:t[s+1]});return e}y(N,"buildSegmentList");function T(t,e,s,i){let r=e.x-t.x,o=e.y-t.y,a=i.x-s.x,d=i.y-s.y,u=r*d-o*a;if(u===0)return null;let n=s.x-t.x,c=s.y-t.y,p=(n*d-c*a)/u,l=(n*o-c*r)/u;return p<=R||p>=1-R||l<=R||l>=1-R?null:{point:{x:t.x+p*r,y:t.y+p*o},tA:p,tB:l}}y(T,"segmentIntersection");function v(t){return Math.abs(t.b.x-t.a.x)>=Math.abs(t.b.y-t.a.y)}y(v,"isHorizontalSeg");function B(t,e,s){if(t.curve!=="rounded")return!1;let i=t.points,r=i[e],o=i[e+1];if(!r||!o)return!1;let a=Math.hypot(o.x-r.x,o.y-r.y),d=s*a,u=e>0?L(i[e-1],r,o,w):null;if(u&&d<u.cutLen)return!0;let n=e+2<i.length?L(r,o,i[e+2],w):null;return n!==null&&a-d<n.cutLen}y(B,"crossingSitsInRoundedCorner");function C(t){let e=[];for(let s=0;s<t.length;s++){let i=t[s],r=N(i.points);for(let o=s+1;o<t.length;o++){let a=t[o],d=N(a.points);for(let[u,n]of r.entries())for(let[c,p]of d.entries()){let l=T(n.a,n.b,p.a,p.b);if(!l||B(i,u,l.tA)||B(a,c,l.tB))continue;let g=v(n),S=v(p);(g!==S?g:!1)?e.push({jumpEdgeId:i.id,otherEdgeId:a.id,segIndex:u,t:l.tA,point:l.point}):e.push({jumpEdgeId:a.id,otherEdgeId:i.id,segIndex:c,t:l.tB,point:l.point})}}}return e}y(C,"findEdgeIntersections");function M(t){let e=Math.round(t*1e3)/1e3;return Number.isInteger(e)?`${e}`:`${e}`}y(M,"fmt");function A(t){return`${M(t.x)},${M(t.y)}`}y(A,"pointToString");function D(t){let e=t.b.x-t.a.x,s=t.b.y-t.a.y;return Math.abs(e)>=Math.abs(s)?e>=0?1:0:s>=0?1:0}y(D,"getArcSweepFlag");function _(t,e){if(t.length<2)return t.map(o=>({...o}));let s=t.map(o=>({...o})),i=e.arrowTypeStart&&P[e.arrowTypeStart];if(i){let o=t[0],a=t[1],d=Math.atan2(a.y-o.y,a.x-o.x);s[0].x=o.x+i*Math.cos(d),s[0].y=o.y+i*Math.sin(d)}let r=e.arrowTypeEnd&&P[e.arrowTypeEnd];if(r){let o=t.length,a=t[o-2],d=t[o-1],u=Math.atan2(d.y-a.y,d.x-a.x);s[o-1].x=d.x-r*Math.cos(u),s[o-1].y=d.y-r*Math.sin(u)}return s}y(_,"applyMarkerOffsets");function k(t,e,s,i,r){let o=t.point.x,a=t.point.y,d={x:o-e*t.r,y:a-s*t.r},u={x:o+e*t.r,y:a+s*t.r},n=[`L${A(d)}`];return r==="arc"?n.push(`A${M(t.r)},${M(t.r)} 0 0 ${i} ${A(u)}`):n.push(`M${A(u)}`),n}y(k,"emitJump");function L(t,e,s,i){let r=e.x-t.x,o=e.y-t.y,a=s.x-e.x,d=s.y-e.y,u=Math.hypot(r,o),n=Math.hypot(a,d);if(u<O||n<O)return null;let c=r/u,p=o/u,l=a/n,g=d/n,S=c*l+p*g,b=Math.max(-1,Math.min(1,S)),x=Math.acos(b);if(x<O||Math.abs(Math.PI-x)<O)return null;let h=Math.min(i/Math.sin(x/2),u/2,n/2);return{startX:e.x-c*h,startY:e.y-p*h,endX:e.x+l*h,endY:e.y+g*h,ctrlX:e.x,ctrlY:e.y,cutLen:h}}y(L,"computeRoundedCorner");function H(t,e,s){let i=t.points;if(i.length<2)return"";let r=_(i,t),o=t.curve==="rounded",a=N(r),d=new Map;for(let n of e){let c=a[n.segIndex];if(!c)continue;let p=Math.hypot(c.b.x-c.a.x,c.b.y-c.a.y),l=d.get(n.segIndex)??[];l.push({t:n.t,point:n.point,d:n.t*p,r:s.jumpRadius}),d.set(n.segIndex,l)}let u=[`M${A(r[0])}`];for(let n=0;n<a.length;n++){let c=a[n],p=Math.hypot(c.b.x-c.a.x,c.b.y-c.a.y),l=p===0?0:(c.b.x-c.a.x)/p,g=p===0?0:(c.b.y-c.a.y)/p,S=D(c),b=0;if(o&&n>0){let f=L(r[n-1],r[n],r[n+1]??r[n],w);f&&(b=f.cutLen)}let x=p,h=null;o&&n<a.length-1&&(h=L(r[n],r[n+1],r[n+2]??r[n+1],w),h&&(x=p-h.cutLen));let $=s.jumpRadius*Y,m=[...d.get(n)??[]].sort((f,E)=>f.t-E.t).filter(f=>{let E=Math.min(f.d-b,x-f.d)-X;return f.r=Math.min(f.r,E),f.r>=$});for(let f=0;f<m.length-1;f++){let E=m[f+1].d-m[f].d;if(m[f].r+m[f+1].r>E){let I=E/2;m[f].r=Math.min(m[f].r,I),m[f+1].r=Math.min(m[f+1].r,I)}}for(let f of m)f.r<$||u.push(...k(f,l,g,S,s.jumpStyle));o&&h?(u.push(`L${M(h.startX)},${M(h.startY)}`),u.push(`Q${M(h.ctrlX)},${M(h.ctrlY)} ${M(h.endX)},${M(h.endY)}`)):u.push(`L${A(c.b)}`)}return u.join(" ")}y(H,"rewriteEdgePath");function J(t){return/^[\d\s+,.LMelm-]*$/.test(t)}y(J,"isStraightPath");function U(t){return t?t==="linear"||t==="rounded"||t==="step"||t==="stepBefore"||t==="stepAfter":!0}y(U,"curveSupportsLineHops");function j(t){if(!t)return null;try{let e=typeof atob=="function"?atob(t):Buffer.from(t,"base64").toString(),s=JSON.parse(e);if(!Array.isArray(s))return null;let i=[];for(let r of s)r&&typeof r.x=="number"&&typeof r.y=="number"&&i.push({x:r.x,y:r.y});return i.length>=2?i:null}catch{return null}}y(j,"decodeDataPoints");function F(t,e,s){if(!s.enabled)return;let i=t.node();if(!i)return;let r=new Map;for(let n of e)r.set(n.id,n);let o=new Map;for(let n of i.querySelectorAll("path[data-id]")){let c=n.getAttribute("data-id");c!==null&&!o.has(c)&&o.set(c,n)}let a=[];for(let n of e){let c=o.get(n.id);if(!c)continue;let l=j(c.getAttribute("data-points"))??n.points;a.push({...n,points:l})}let d=C(a);if(d.length===0)return;let u=new Map;for(let n of d){let c=u.get(n.jumpEdgeId)??[];c.push(n),u.set(n.jumpEdgeId,c)}for(let n of a){let c=u.get(n.id);if(!c||c.length===0)continue;let l=r.get(n.id)?.curve;if(l!==void 0&&!U(l))continue;let g=o.get(n.id);if(!g)continue;if(l===void 0){let m=g.getAttribute("d")??"";if(!J(m))continue}let S=g.getAttribute("style")??"",b=/stroke-dasharray\s*:\s*0\s+([\d.]+)\s+[\d.]+\s+([\d.]+)/.exec(S),x=b?Number.parseFloat(b[1]):null,h=b?Number.parseFloat(b[2]):null,$=H(n,c,s);if(g.setAttribute("d",$),x!==null&&h!==null&&typeof g.getTotalLength=="function"){let m=g.getTotalLength(),f=Math.max(0,m-x-h),E=`0 ${x} ${f} ${h}`,I=S.replace(/stroke-dasharray\s*:[^;]*;?/g,`stroke-dasharray: ${E};`).replace(/;\s*;+/g,";");g.setAttribute("style",I)}}}y(F,"applyLineJumpsToSvg");export{F as a};
@@ -1 +0,0 @@
1
- import{a as s}from"./chunk-ZMCB7VP2.js";import{b as u}from"./chunk-R63JUMUK.js";import{e as p,j as k,l as w,m as y,n as L}from"./chunk-K2KLZU7M.js";import{b as c}from"./chunk-JD7ZBJD2.js";import{a as f}from"./chunk-HOPPTA6H.js";import{e as g}from"./chunk-QEEA3KYY.js";import{C as m,O as d}from"./chunk-KT4VPQD5.js";import{b as n}from"./chunk-JRSH5GNS.js";import{a as o}from"./chunk-GYT4IYBZ.js";var v={common:d,getConfig:m,insertCluster:u,insertEdge:y,insertEdgeLabel:k,insertMarkers:L,insertNode:c,interpolateToCurve:g,labelHelper:f,log:n,positionEdgeLabel:w},A=["elk.stress","elk.force","elk.mrtree","elk.sporeOverlap","elk.box","elk.rectpacking"],a=Object.create(null),$=o(e=>{for(let r of e)a[r.name]=r},"registerLayoutLoaders"),E=o(()=>{let e=o(async()=>await import("./elk-XV6XMXQE-AZ4HLCWI.js"),"loader");return[{name:"elk",loader:e,algorithm:"elk.layered"},...A.map(r=>({name:r,loader:e,algorithm:r}))]},"elkLayoutLoaders"),_=o(()=>{$([{name:"dagre",loader:o(async()=>await import("./dagre-SPEB5RXH-HPGQXBZJ.js"),"loader")},{name:"swimlane",loader:o(async()=>await import("./swimlanes-UMQ2AFYF-LDD74Q2S.js"),"loader")},{name:"cose-bilkent",loader:o(async()=>await import("./cose-bilkent-JH36ORCC-PNM3EYPB.js"),"loader")},...E()])},"registerDefaultLayoutLoaders");_();var x=o(async(e,r)=>{if(!Object.hasOwn(a,e.layoutAlgorithm))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(let i of e.nodes){let b=i.domId||i.id;i.domId=`${e.diagramId}-${b}`}let t=a[e.layoutAlgorithm],h=await t.loader();s(r,e.config);let O=await h.render(e,r,v,{algorithm:t.algorithm});return p(r.node()),O},"render"),l="dagre",M=o((e="",{fallback:r=l}={})=>{if(Object.hasOwn(a,e))return e;for(let t of[r,l])if(Object.hasOwn(a,t))return n.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Neither layout algorithm ${e}, ${r}, nor ${l} is registered.`)},"getRegisteredLayoutAlgorithm");export{$ as a,x as b,M as c};