@xpack/doxygen2docusaurus 2.0.0 → 2.1.0

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 (350) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +2 -1
  3. package/bin/doxygen2docusaurus.js +1 -1
  4. package/dist/cli/main.d.ts +0 -14
  5. package/dist/cli/main.d.ts.map +1 -1
  6. package/dist/cli/main.js +0 -34
  7. package/dist/cli/main.js.map +1 -1
  8. package/dist/docusaurus/cli-options.d.ts +3 -292
  9. package/dist/docusaurus/cli-options.d.ts.map +1 -1
  10. package/dist/docusaurus/cli-options.js +6 -290
  11. package/dist/docusaurus/cli-options.js.map +1 -1
  12. package/dist/docusaurus/generator.d.ts +0 -172
  13. package/dist/docusaurus/generator.d.ts.map +1 -1
  14. package/dist/docusaurus/generator.js +20 -280
  15. package/dist/docusaurus/generator.js.map +1 -1
  16. package/dist/docusaurus/renderers/descriptiontype.d.ts +0 -417
  17. package/dist/docusaurus/renderers/descriptiontype.d.ts.map +1 -1
  18. package/dist/docusaurus/renderers/descriptiontype.js +11 -555
  19. package/dist/docusaurus/renderers/descriptiontype.js.map +1 -1
  20. package/dist/docusaurus/renderers/docinternalstype.d.ts +0 -132
  21. package/dist/docusaurus/renderers/docinternalstype.d.ts.map +1 -1
  22. package/dist/docusaurus/renderers/docinternalstype.js +0 -156
  23. package/dist/docusaurus/renderers/docinternalstype.js.map +1 -1
  24. package/dist/docusaurus/renderers/doclisttype.d.ts +0 -22
  25. package/dist/docusaurus/renderers/doclisttype.d.ts.map +1 -1
  26. package/dist/docusaurus/renderers/doclisttype.js +0 -42
  27. package/dist/docusaurus/renderers/doclisttype.js.map +1 -1
  28. package/dist/docusaurus/renderers/doctabletype.d.ts +0 -88
  29. package/dist/docusaurus/renderers/doctabletype.d.ts.map +1 -1
  30. package/dist/docusaurus/renderers/doctabletype.js +1 -113
  31. package/dist/docusaurus/renderers/doctabletype.js.map +1 -1
  32. package/dist/docusaurus/renderers/doctitletype.d.ts +0 -22
  33. package/dist/docusaurus/renderers/doctitletype.d.ts.map +1 -1
  34. package/dist/docusaurus/renderers/doctitletype.js +0 -42
  35. package/dist/docusaurus/renderers/doctitletype.js.map +1 -1
  36. package/dist/docusaurus/renderers/docvariablelisttype.d.ts +0 -44
  37. package/dist/docusaurus/renderers/docvariablelisttype.d.ts.map +1 -1
  38. package/dist/docusaurus/renderers/docvariablelisttype.js +1 -69
  39. package/dist/docusaurus/renderers/docvariablelisttype.js.map +1 -1
  40. package/dist/docusaurus/renderers/docxrefsecttype.d.ts +0 -22
  41. package/dist/docusaurus/renderers/docxrefsecttype.d.ts.map +1 -1
  42. package/dist/docusaurus/renderers/docxrefsecttype.js +0 -38
  43. package/dist/docusaurus/renderers/docxrefsecttype.js.map +1 -1
  44. package/dist/docusaurus/renderers/element-renderer-base.d.ts +0 -74
  45. package/dist/docusaurus/renderers/element-renderer-base.d.ts.map +1 -1
  46. package/dist/docusaurus/renderers/element-renderer-base.js +0 -64
  47. package/dist/docusaurus/renderers/element-renderer-base.js.map +1 -1
  48. package/dist/docusaurus/renderers/inctype.d.ts +0 -23
  49. package/dist/docusaurus/renderers/inctype.d.ts.map +1 -1
  50. package/dist/docusaurus/renderers/inctype.js +0 -41
  51. package/dist/docusaurus/renderers/inctype.js.map +1 -1
  52. package/dist/docusaurus/renderers/linkedtexttype.d.ts +0 -22
  53. package/dist/docusaurus/renderers/linkedtexttype.d.ts.map +1 -1
  54. package/dist/docusaurus/renderers/linkedtexttype.js +0 -45
  55. package/dist/docusaurus/renderers/linkedtexttype.js.map +1 -1
  56. package/dist/docusaurus/renderers/listingtype.d.ts +0 -52
  57. package/dist/docusaurus/renderers/listingtype.d.ts.map +1 -1
  58. package/dist/docusaurus/renderers/listingtype.js +1 -88
  59. package/dist/docusaurus/renderers/listingtype.js.map +1 -1
  60. package/dist/docusaurus/renderers/paramtype.d.ts +0 -22
  61. package/dist/docusaurus/renderers/paramtype.d.ts.map +1 -1
  62. package/dist/docusaurus/renderers/paramtype.js +2 -51
  63. package/dist/docusaurus/renderers/paramtype.js.map +1 -1
  64. package/dist/docusaurus/renderers/referencetype.d.ts +0 -23
  65. package/dist/docusaurus/renderers/referencetype.d.ts.map +1 -1
  66. package/dist/docusaurus/renderers/referencetype.js +0 -38
  67. package/dist/docusaurus/renderers/referencetype.js.map +1 -1
  68. package/dist/docusaurus/renderers/reftexttype.d.ts +0 -22
  69. package/dist/docusaurus/renderers/reftexttype.d.ts.map +1 -1
  70. package/dist/docusaurus/renderers/reftexttype.js +0 -38
  71. package/dist/docusaurus/renderers/reftexttype.js.map +1 -1
  72. package/dist/docusaurus/renderers/reftype.d.ts +0 -22
  73. package/dist/docusaurus/renderers/reftype.d.ts.map +1 -1
  74. package/dist/docusaurus/renderers/reftype.js +0 -38
  75. package/dist/docusaurus/renderers/reftype.js.map +1 -1
  76. package/dist/docusaurus/renderers/renderers.d.ts +0 -151
  77. package/dist/docusaurus/renderers/renderers.d.ts.map +1 -1
  78. package/dist/docusaurus/renderers/renderers.js +4 -184
  79. package/dist/docusaurus/renderers/renderers.js.map +1 -1
  80. package/dist/docusaurus/renderers/substringtype.d.ts +0 -22
  81. package/dist/docusaurus/renderers/substringtype.d.ts.map +1 -1
  82. package/dist/docusaurus/renderers/substringtype.js +0 -39
  83. package/dist/docusaurus/renderers/substringtype.js.map +1 -1
  84. package/dist/docusaurus/renderers/tableofcontentstype.d.ts +0 -22
  85. package/dist/docusaurus/renderers/tableofcontentstype.d.ts.map +1 -1
  86. package/dist/docusaurus/renderers/tableofcontentstype.js +0 -39
  87. package/dist/docusaurus/renderers/tableofcontentstype.js.map +1 -1
  88. package/dist/docusaurus/types.d.ts +0 -110
  89. package/dist/docusaurus/types.d.ts.map +1 -1
  90. package/dist/docusaurus/types.js +0 -11
  91. package/dist/docusaurus/types.js.map +1 -1
  92. package/dist/docusaurus/utils.d.ts +0 -214
  93. package/dist/docusaurus/utils.d.ts.map +1 -1
  94. package/dist/docusaurus/utils.js +0 -296
  95. package/dist/docusaurus/utils.js.map +1 -1
  96. package/dist/docusaurus/view-model/classes-vm.d.ts +0 -137
  97. package/dist/docusaurus/view-model/classes-vm.d.ts.map +1 -1
  98. package/dist/docusaurus/view-model/classes-vm.js +9 -225
  99. package/dist/docusaurus/view-model/classes-vm.js.map +1 -1
  100. package/dist/docusaurus/view-model/collection-base.d.ts +0 -120
  101. package/dist/docusaurus/view-model/collection-base.d.ts.map +1 -1
  102. package/dist/docusaurus/view-model/collection-base.js +11 -101
  103. package/dist/docusaurus/view-model/collection-base.js.map +1 -1
  104. package/dist/docusaurus/view-model/compound-base-vm.d.ts +2 -147
  105. package/dist/docusaurus/view-model/compound-base-vm.d.ts.map +1 -1
  106. package/dist/docusaurus/view-model/compound-base-vm.js +47 -225
  107. package/dist/docusaurus/view-model/compound-base-vm.js.map +1 -1
  108. package/dist/docusaurus/view-model/concepts-vm.d.ts +26 -0
  109. package/dist/docusaurus/view-model/concepts-vm.d.ts.map +1 -0
  110. package/dist/docusaurus/view-model/concepts-vm.js +329 -0
  111. package/dist/docusaurus/view-model/concepts-vm.js.map +1 -0
  112. package/dist/docusaurus/view-model/description-anchors.d.ts +0 -58
  113. package/dist/docusaurus/view-model/description-anchors.d.ts.map +1 -1
  114. package/dist/docusaurus/view-model/description-anchors.js +0 -71
  115. package/dist/docusaurus/view-model/description-anchors.js.map +1 -1
  116. package/dist/docusaurus/view-model/files-and-folders-vm.d.ts +0 -247
  117. package/dist/docusaurus/view-model/files-and-folders-vm.d.ts.map +1 -1
  118. package/dist/docusaurus/view-model/files-and-folders-vm.js +61 -353
  119. package/dist/docusaurus/view-model/files-and-folders-vm.js.map +1 -1
  120. package/dist/docusaurus/view-model/groups-vm.d.ts +0 -148
  121. package/dist/docusaurus/view-model/groups-vm.d.ts.map +1 -1
  122. package/dist/docusaurus/view-model/groups-vm.js +2 -223
  123. package/dist/docusaurus/view-model/groups-vm.js.map +1 -1
  124. package/dist/docusaurus/view-model/members-vm.d.ts +0 -552
  125. package/dist/docusaurus/view-model/members-vm.d.ts.map +1 -1
  126. package/dist/docusaurus/view-model/members-vm.js +17 -702
  127. package/dist/docusaurus/view-model/members-vm.js.map +1 -1
  128. package/dist/docusaurus/view-model/namespaces-vm.d.ts +4 -199
  129. package/dist/docusaurus/view-model/namespaces-vm.d.ts.map +1 -1
  130. package/dist/docusaurus/view-model/namespaces-vm.js +79 -284
  131. package/dist/docusaurus/view-model/namespaces-vm.js.map +1 -1
  132. package/dist/docusaurus/view-model/options.d.ts +0 -43
  133. package/dist/docusaurus/view-model/options.d.ts.map +1 -1
  134. package/dist/docusaurus/view-model/options.js +0 -57
  135. package/dist/docusaurus/view-model/options.js.map +1 -1
  136. package/dist/docusaurus/view-model/pages-vm.d.ts +0 -115
  137. package/dist/docusaurus/view-model/pages-vm.d.ts.map +1 -1
  138. package/dist/docusaurus/view-model/pages-vm.js +0 -162
  139. package/dist/docusaurus/view-model/pages-vm.js.map +1 -1
  140. package/dist/docusaurus/view-model/tree-entries-vm.d.ts +8 -142
  141. package/dist/docusaurus/view-model/tree-entries-vm.d.ts.map +1 -1
  142. package/dist/docusaurus/view-model/tree-entries-vm.js +54 -174
  143. package/dist/docusaurus/view-model/tree-entries-vm.js.map +1 -1
  144. package/dist/docusaurus/view-model/view-model.d.ts +0 -125
  145. package/dist/docusaurus/view-model/view-model.d.ts.map +1 -1
  146. package/dist/docusaurus/view-model/view-model.js +20 -182
  147. package/dist/docusaurus/view-model/view-model.js.map +1 -1
  148. package/dist/docusaurus/workspace.d.ts +1 -126
  149. package/dist/docusaurus/workspace.d.ts.map +1 -1
  150. package/dist/docusaurus/workspace.js +8 -221
  151. package/dist/docusaurus/workspace.js.map +1 -1
  152. package/dist/doxygen/data-model/compounds/compounddef-dm.d.ts +5 -492
  153. package/dist/doxygen/data-model/compounds/compounddef-dm.d.ts.map +1 -1
  154. package/dist/doxygen/data-model/compounds/compounddef-dm.js +23 -672
  155. package/dist/doxygen/data-model/compounds/compounddef-dm.js.map +1 -1
  156. package/dist/doxygen/data-model/compounds/compoundreftype-dm.d.ts +0 -129
  157. package/dist/doxygen/data-model/compounds/compoundreftype-dm.d.ts.map +1 -1
  158. package/dist/doxygen/data-model/compounds/compoundreftype-dm.js +1 -145
  159. package/dist/doxygen/data-model/compounds/compoundreftype-dm.js.map +1 -1
  160. package/dist/doxygen/data-model/compounds/descriptiontype-dm.d.ts +104 -2848
  161. package/dist/doxygen/data-model/compounds/descriptiontype-dm.d.ts.map +1 -1
  162. package/dist/doxygen/data-model/compounds/descriptiontype-dm.js +73 -3975
  163. package/dist/doxygen/data-model/compounds/descriptiontype-dm.js.map +1 -1
  164. package/dist/doxygen/data-model/compounds/docvarlistentrytype-dm.d.ts +0 -165
  165. package/dist/doxygen/data-model/compounds/docvarlistentrytype-dm.d.ts.map +1 -1
  166. package/dist/doxygen/data-model/compounds/docvarlistentrytype-dm.js +0 -229
  167. package/dist/doxygen/data-model/compounds/docvarlistentrytype-dm.js.map +1 -1
  168. package/dist/doxygen/data-model/compounds/doxygentype-dm.d.ts +0 -70
  169. package/dist/doxygen/data-model/compounds/doxygentype-dm.d.ts.map +1 -1
  170. package/dist/doxygen/data-model/compounds/doxygentype-dm.js +0 -105
  171. package/dist/doxygen/data-model/compounds/doxygentype-dm.js.map +1 -1
  172. package/dist/doxygen/data-model/compounds/enumvaluetype-dm.d.ts +0 -84
  173. package/dist/doxygen/data-model/compounds/enumvaluetype-dm.d.ts.map +1 -1
  174. package/dist/doxygen/data-model/compounds/enumvaluetype-dm.js +1 -122
  175. package/dist/doxygen/data-model/compounds/enumvaluetype-dm.js.map +1 -1
  176. package/dist/doxygen/data-model/compounds/inctype-dm.d.ts +0 -116
  177. package/dist/doxygen/data-model/compounds/inctype-dm.d.ts.map +1 -1
  178. package/dist/doxygen/data-model/compounds/inctype-dm.js +3 -155
  179. package/dist/doxygen/data-model/compounds/inctype-dm.js.map +1 -1
  180. package/dist/doxygen/data-model/compounds/linkedtexttype-dm.d.ts +3 -138
  181. package/dist/doxygen/data-model/compounds/linkedtexttype-dm.d.ts.map +1 -1
  182. package/dist/doxygen/data-model/compounds/linkedtexttype-dm.js +5 -180
  183. package/dist/doxygen/data-model/compounds/linkedtexttype-dm.js.map +1 -1
  184. package/dist/doxygen/data-model/compounds/listofallmemberstype-dm.d.ts +0 -76
  185. package/dist/doxygen/data-model/compounds/listofallmemberstype-dm.d.ts.map +1 -1
  186. package/dist/doxygen/data-model/compounds/listofallmemberstype-dm.js +0 -107
  187. package/dist/doxygen/data-model/compounds/listofallmemberstype-dm.js.map +1 -1
  188. package/dist/doxygen/data-model/compounds/locationtype-dm.d.ts +0 -162
  189. package/dist/doxygen/data-model/compounds/locationtype-dm.d.ts.map +1 -1
  190. package/dist/doxygen/data-model/compounds/locationtype-dm.js +4 -203
  191. package/dist/doxygen/data-model/compounds/locationtype-dm.js.map +1 -1
  192. package/dist/doxygen/data-model/compounds/memberdeftype-dm.d.ts +2 -443
  193. package/dist/doxygen/data-model/compounds/memberdeftype-dm.d.ts.map +1 -1
  194. package/dist/doxygen/data-model/compounds/memberdeftype-dm.js +19 -475
  195. package/dist/doxygen/data-model/compounds/memberdeftype-dm.js.map +1 -1
  196. package/dist/doxygen/data-model/compounds/memberreftype-dm.d.ts +0 -141
  197. package/dist/doxygen/data-model/compounds/memberreftype-dm.d.ts.map +1 -1
  198. package/dist/doxygen/data-model/compounds/memberreftype-dm.js +0 -176
  199. package/dist/doxygen/data-model/compounds/memberreftype-dm.js.map +1 -1
  200. package/dist/doxygen/data-model/compounds/membertype-dm.d.ts +0 -101
  201. package/dist/doxygen/data-model/compounds/membertype-dm.d.ts.map +1 -1
  202. package/dist/doxygen/data-model/compounds/membertype-dm.js +0 -115
  203. package/dist/doxygen/data-model/compounds/membertype-dm.js.map +1 -1
  204. package/dist/doxygen/data-model/compounds/paramtype-dm.d.ts +0 -164
  205. package/dist/doxygen/data-model/compounds/paramtype-dm.d.ts.map +1 -1
  206. package/dist/doxygen/data-model/compounds/paramtype-dm.js +0 -208
  207. package/dist/doxygen/data-model/compounds/paramtype-dm.js.map +1 -1
  208. package/dist/doxygen/data-model/compounds/referencetype-dm.d.ts +0 -139
  209. package/dist/doxygen/data-model/compounds/referencetype-dm.d.ts.map +1 -1
  210. package/dist/doxygen/data-model/compounds/referencetype-dm.js +2 -175
  211. package/dist/doxygen/data-model/compounds/referencetype-dm.js.map +1 -1
  212. package/dist/doxygen/data-model/compounds/reftexttype-dm.d.ts +0 -120
  213. package/dist/doxygen/data-model/compounds/reftexttype-dm.d.ts.map +1 -1
  214. package/dist/doxygen/data-model/compounds/reftexttype-dm.js +2 -141
  215. package/dist/doxygen/data-model/compounds/reftexttype-dm.js.map +1 -1
  216. package/dist/doxygen/data-model/compounds/reftype-dm.d.ts +0 -268
  217. package/dist/doxygen/data-model/compounds/reftype-dm.d.ts.map +1 -1
  218. package/dist/doxygen/data-model/compounds/reftype-dm.js +4 -326
  219. package/dist/doxygen/data-model/compounds/reftype-dm.js.map +1 -1
  220. package/dist/doxygen/data-model/compounds/reimplementtype-dm.d.ts +0 -105
  221. package/dist/doxygen/data-model/compounds/reimplementtype-dm.d.ts.map +1 -1
  222. package/dist/doxygen/data-model/compounds/reimplementtype-dm.js +1 -139
  223. package/dist/doxygen/data-model/compounds/reimplementtype-dm.js.map +1 -1
  224. package/dist/doxygen/data-model/compounds/sectiondeftype-dm.d.ts +0 -168
  225. package/dist/doxygen/data-model/compounds/sectiondeftype-dm.d.ts.map +1 -1
  226. package/dist/doxygen/data-model/compounds/sectiondeftype-dm.js +0 -209
  227. package/dist/doxygen/data-model/compounds/sectiondeftype-dm.js.map +1 -1
  228. package/dist/doxygen/data-model/compounds/tableofcontentstype-dm.d.ts +0 -267
  229. package/dist/doxygen/data-model/compounds/tableofcontentstype-dm.d.ts.map +1 -1
  230. package/dist/doxygen/data-model/compounds/tableofcontentstype-dm.js +0 -354
  231. package/dist/doxygen/data-model/compounds/tableofcontentstype-dm.js.map +1 -1
  232. package/dist/doxygen/data-model/compounds/templateparamlisttype-dm.d.ts +0 -66
  233. package/dist/doxygen/data-model/compounds/templateparamlisttype-dm.d.ts.map +1 -1
  234. package/dist/doxygen/data-model/compounds/templateparamlisttype-dm.js +0 -97
  235. package/dist/doxygen/data-model/compounds/templateparamlisttype-dm.js.map +1 -1
  236. package/dist/doxygen/data-model/data-model.d.ts +0 -149
  237. package/dist/doxygen/data-model/data-model.d.ts.map +1 -1
  238. package/dist/doxygen/data-model/data-model.js +4 -197
  239. package/dist/doxygen/data-model/data-model.js.map +1 -1
  240. package/dist/doxygen/data-model/doxyfile/doxyfileoptiontype-dm.d.ts +0 -115
  241. package/dist/doxygen/data-model/doxyfile/doxyfileoptiontype-dm.d.ts.map +1 -1
  242. package/dist/doxygen/data-model/doxyfile/doxyfileoptiontype-dm.js +4 -129
  243. package/dist/doxygen/data-model/doxyfile/doxyfileoptiontype-dm.js.map +1 -1
  244. package/dist/doxygen/data-model/doxyfile/doxyfiletype-dm.d.ts +0 -87
  245. package/dist/doxygen/data-model/doxyfile/doxyfiletype-dm.d.ts.map +1 -1
  246. package/dist/doxygen/data-model/doxyfile/doxyfiletype-dm.js +0 -118
  247. package/dist/doxygen/data-model/doxyfile/doxyfiletype-dm.js.map +1 -1
  248. package/dist/doxygen/data-model/doxygen-xml-parser.d.ts +0 -253
  249. package/dist/doxygen/data-model/doxygen-xml-parser.d.ts.map +1 -1
  250. package/dist/doxygen/data-model/doxygen-xml-parser.js +0 -291
  251. package/dist/doxygen/data-model/doxygen-xml-parser.js.map +1 -1
  252. package/dist/doxygen/data-model/index/indexcompoundtype-dm.d.ts +0 -98
  253. package/dist/doxygen/data-model/index/indexcompoundtype-dm.d.ts.map +1 -1
  254. package/dist/doxygen/data-model/index/indexcompoundtype-dm.js +2 -122
  255. package/dist/doxygen/data-model/index/indexcompoundtype-dm.js.map +1 -1
  256. package/dist/doxygen/data-model/index/indexdoxygentype-dm.d.ts +0 -82
  257. package/dist/doxygen/data-model/index/indexdoxygentype-dm.d.ts.map +1 -1
  258. package/dist/doxygen/data-model/index/indexdoxygentype-dm.js +0 -114
  259. package/dist/doxygen/data-model/index/indexdoxygentype-dm.js.map +1 -1
  260. package/dist/doxygen/data-model/index/indexmembertype-dm.d.ts +0 -85
  261. package/dist/doxygen/data-model/index/indexmembertype-dm.d.ts.map +1 -1
  262. package/dist/doxygen/data-model/index/indexmembertype-dm.js +1 -107
  263. package/dist/doxygen/data-model/index/indexmembertype-dm.js.map +1 -1
  264. package/dist/doxygen/data-model/types.d.ts +0 -104
  265. package/dist/doxygen/data-model/types.d.ts.map +1 -1
  266. package/dist/doxygen/data-model/types.js +0 -52
  267. package/dist/doxygen/data-model/types.js.map +1 -1
  268. package/dist/index.d.ts +4 -16
  269. package/dist/index.d.ts.map +1 -1
  270. package/dist/index.js +4 -42
  271. package/dist/index.js.map +1 -1
  272. package/package.json +45 -51
  273. package/src/cli/main.ts +122 -0
  274. package/src/docusaurus/cli-options.ts +560 -0
  275. package/src/docusaurus/generator.ts +788 -0
  276. package/src/docusaurus/renderers/descriptiontype.ts +1299 -0
  277. package/src/docusaurus/renderers/docinternalstype.ts +354 -0
  278. package/src/docusaurus/renderers/doclisttype.ts +134 -0
  279. package/src/docusaurus/renderers/doctabletype.ts +220 -0
  280. package/src/docusaurus/renderers/doctitletype.ts +77 -0
  281. package/src/docusaurus/renderers/docvariablelisttype.ts +123 -0
  282. package/src/docusaurus/renderers/docxrefsecttype.ts +84 -0
  283. package/src/docusaurus/renderers/element-renderer-base.ts +112 -0
  284. package/src/docusaurus/renderers/inctype.ts +75 -0
  285. package/src/docusaurus/renderers/linkedtexttype.ts +64 -0
  286. package/src/docusaurus/renderers/listingtype.ts +235 -0
  287. package/src/docusaurus/renderers/paramtype.ts +116 -0
  288. package/src/docusaurus/renderers/referencetype.ts +83 -0
  289. package/src/docusaurus/renderers/reftexttype.ts +81 -0
  290. package/src/docusaurus/renderers/reftype.ts +77 -0
  291. package/src/docusaurus/renderers/renderers.ts +756 -0
  292. package/src/docusaurus/renderers/substringtype.ts +53 -0
  293. package/src/docusaurus/renderers/tableofcontentstype.ts +74 -0
  294. package/src/docusaurus/types.ts +187 -0
  295. package/src/docusaurus/utils.ts +409 -0
  296. package/src/docusaurus/view-model/README.md +12 -0
  297. package/src/docusaurus/view-model/classes-vm.ts +1088 -0
  298. package/src/docusaurus/view-model/collection-base.ts +352 -0
  299. package/src/docusaurus/view-model/compound-base-vm.ts +1340 -0
  300. package/src/docusaurus/view-model/concepts-vm.ts +719 -0
  301. package/src/docusaurus/view-model/description-anchors.ts +107 -0
  302. package/src/docusaurus/view-model/files-and-folders-vm.ts +1293 -0
  303. package/src/docusaurus/view-model/groups-vm.ts +548 -0
  304. package/src/docusaurus/view-model/members-vm.ts +1943 -0
  305. package/src/docusaurus/view-model/namespaces-vm.ts +1018 -0
  306. package/src/docusaurus/view-model/options.ts +95 -0
  307. package/src/docusaurus/view-model/pages-vm.ts +342 -0
  308. package/src/docusaurus/view-model/tree-entries-vm.ts +376 -0
  309. package/src/docusaurus/view-model/view-model.ts +513 -0
  310. package/src/docusaurus/workspace.ts +588 -0
  311. package/src/doxygen/data-model/README.md +13 -0
  312. package/src/doxygen/data-model/compounds/compounddef-dm.ts +1156 -0
  313. package/src/doxygen/data-model/compounds/compoundreftype-dm.ts +266 -0
  314. package/src/doxygen/data-model/compounds/descriptiontype-dm.ts +10107 -0
  315. package/src/doxygen/data-model/compounds/docvarlistentrytype-dm.ts +354 -0
  316. package/src/doxygen/data-model/compounds/doxygentype-dm.ts +187 -0
  317. package/src/doxygen/data-model/compounds/enumvaluetype-dm.ts +218 -0
  318. package/src/doxygen/data-model/compounds/inctype-dm.ts +217 -0
  319. package/src/doxygen/data-model/compounds/linkedtexttype-dm.ts +288 -0
  320. package/src/doxygen/data-model/compounds/listofallmemberstype-dm.ts +160 -0
  321. package/src/doxygen/data-model/compounds/locationtype-dm.ts +284 -0
  322. package/src/doxygen/data-model/compounds/memberdeftype-dm.ts +874 -0
  323. package/src/doxygen/data-model/compounds/memberreftype-dm.ts +270 -0
  324. package/src/doxygen/data-model/compounds/membertype-dm.ts +239 -0
  325. package/src/doxygen/data-model/compounds/paramtype-dm.ts +302 -0
  326. package/src/doxygen/data-model/compounds/referencetype-dm.ts +248 -0
  327. package/src/doxygen/data-model/compounds/reftexttype-dm.ts +234 -0
  328. package/src/doxygen/data-model/compounds/reftype-dm.ts +430 -0
  329. package/src/doxygen/data-model/compounds/reimplementtype-dm.ts +201 -0
  330. package/src/doxygen/data-model/compounds/sectiondeftype-dm.ts +330 -0
  331. package/src/doxygen/data-model/compounds/tableofcontentstype-dm.ts +563 -0
  332. package/src/doxygen/data-model/compounds/templateparamlisttype-dm.ts +150 -0
  333. package/src/doxygen/data-model/data-model.ts +377 -0
  334. package/src/doxygen/data-model/doxyfile/doxyfileoptiontype-dm.ts +271 -0
  335. package/src/doxygen/data-model/doxyfile/doxyfiletype-dm.ts +200 -0
  336. package/src/doxygen/data-model/doxygen-xml-parser.ts +522 -0
  337. package/src/doxygen/data-model/index/indexcompoundtype-dm.ts +256 -0
  338. package/src/doxygen/data-model/index/indexdoxygentype-dm.ts +196 -0
  339. package/src/doxygen/data-model/index/indexmembertype-dm.ts +230 -0
  340. package/src/doxygen/data-model/types.ts +175 -0
  341. package/src/doxygen/data-model/xsds/README.md +6 -0
  342. package/src/doxygen/data-model/xsds/compound.xsd +1699 -0
  343. package/src/doxygen/data-model/xsds/doxyfile.xsd +355 -0
  344. package/src/doxygen/data-model/xsds/index.xsd +72 -0
  345. package/src/doxygen/data-model/xsds/xml.xsd +23 -0
  346. package/src/index.ts +261 -0
  347. package/src/tsconfig.json +10 -0
  348. package/dist/doxygen2docusaurus.d.ts +0 -4774
  349. package/dist/tsconfig.tsbuildinfo +0 -1
  350. package/dist/tsdoc-metadata.json +0 -11
@@ -0,0 +1,1018 @@
1
+ /*
2
+ * This file is part of the xPack project (http://xpack.github.io).
3
+ * Copyright (c) 2025-2026 Liviu Ionescu. All rights reserved.
4
+ *
5
+ * Permission to use, copy, modify, and/or distribute this software
6
+ * for any purpose is hereby granted, under the terms of the MIT license.
7
+ *
8
+ * If a copy of the license was not distributed with this file, it can
9
+ * be obtained from https://opensource.org/licenses/MIT.
10
+ */
11
+
12
+ // ----------------------------------------------------------------------------
13
+
14
+ // import * as util from 'node:util'
15
+ import assert from 'node:assert'
16
+ import path from 'node:path'
17
+
18
+ import { CompoundBase } from './compound-base-vm.js'
19
+ import type { CompoundDefDataModel } from '../../doxygen/data-model/compounds/compounddef-dm.js'
20
+ import { CollectionBase } from './collection-base.js'
21
+ import type {
22
+ NavbarItem,
23
+ SidebarCategory,
24
+ SidebarCategoryItem,
25
+ SidebarDocItem,
26
+ SidebarItem,
27
+ FrontMatter,
28
+ } from '../types.js'
29
+ import {
30
+ flattenPath,
31
+ sanitizeAnonymousNamespace,
32
+ sanitizeHierarchicalPath,
33
+ } from '../utils.js'
34
+ import type { TreeEntryBase } from './tree-entries-vm.js'
35
+ import { NamespaceTreeEntry } from './tree-entries-vm.js'
36
+ import { Class } from './classes-vm.js'
37
+ import { Concept } from './concepts-vm.js'
38
+
39
+ // ----------------------------------------------------------------------------
40
+
41
+ /**
42
+ * Manages the collection of namespace documentation compounds.
43
+ *
44
+ * @remarks
45
+ * Handles the organisation and generation of namespace-based documentation,
46
+ * including nested namespace hierarchies, sidebar generation, and comprehensive
47
+ * index file creation. Namespaces provide logical code organisation beyond
48
+ * file boundaries, supporting complex software architectures.
49
+ *
50
+ * @public
51
+ */
52
+ export class Namespaces extends CollectionBase {
53
+ /**
54
+ * Array of top-level namespaces without parent namespaces.
55
+ *
56
+ * @remarks
57
+ * Contains namespaces that are not nested within other namespaces,
58
+ * used for organising hierarchical displays and namespace trees.
59
+ */
60
+ topLevelNamespaces: Namespace[] = []
61
+
62
+ // --------------------------------------------------------------------------
63
+
64
+ // constructor (workspace: Workspace) {
65
+ // super(workspace)
66
+
67
+ // // this.compoundsById = new Map()
68
+ // }
69
+
70
+ // --------------------------------------------------------------------------
71
+
72
+ /**
73
+ * Adds a namespace compound to the collection.
74
+ *
75
+ * @remarks
76
+ * Creates a new Namespace instance from the compound definition and registers
77
+ * it in the collection for later processing. Anonymous namespaces with empty
78
+ * names are skipped unless they contain child namespaces.
79
+ *
80
+ * @param compoundDef - The compound definition for the namespace
81
+ * @returns The created Namespace instance
82
+ *
83
+ * @public
84
+ */
85
+ override addChild(compoundDef: CompoundDefDataModel): CompoundBase {
86
+ const namespace = new Namespace(this, compoundDef)
87
+ // Skip
88
+ if (namespace.compoundName.length === 0) {
89
+ if (namespace.children.length > 0) {
90
+ console.error('Anonymous namespace', namespace.id, ' with children?')
91
+ }
92
+ } else {
93
+ this.collectionCompoundsById.set(namespace.id, namespace)
94
+ }
95
+
96
+ return namespace
97
+ }
98
+
99
+ // --------------------------------------------------------------------------
100
+
101
+ /**
102
+ * Creates hierarchical relationships between namespace compounds.
103
+ *
104
+ * @remarks
105
+ * Establishes parent-child relationships based on namespace nesting data,
106
+ * building the namespace hierarchy tree and identifying top-level namespaces
107
+ * that have no parent. This enables proper nested namespace navigation
108
+ * and documentation organisation.
109
+ *
110
+ * @public
111
+ */
112
+ override createCompoundsHierarchies(): void {
113
+ // Recreate namespaces hierarchies.
114
+ for (const [, namespace] of this.collectionCompoundsById) {
115
+ for (const childNamespaceId of namespace.childrenIds) {
116
+ const childNamespace =
117
+ this.collectionCompoundsById.get(childNamespaceId)
118
+ assert(childNamespace !== undefined)
119
+ if (this.workspace.options.debug) {
120
+ console.log(
121
+ 'namespaceId:',
122
+ childNamespaceId,
123
+ childNamespace.compoundName,
124
+ 'has parent',
125
+ namespace.compoundName
126
+ )
127
+ }
128
+ childNamespace.parent = namespace
129
+ namespace.children.push(childNamespace)
130
+ }
131
+ }
132
+
133
+ // Create the top level namespace list.
134
+ for (const [namespaceId, namespace] of this.collectionCompoundsById) {
135
+ if (namespace.parent === undefined) {
136
+ if (namespace instanceof Namespace) {
137
+ if (this.workspace.options.debug) {
138
+ console.log(
139
+ 'topLevelNamespaceId:',
140
+ namespaceId,
141
+ namespace.compoundName
142
+ )
143
+ }
144
+ this.topLevelNamespaces.push(namespace)
145
+ }
146
+ }
147
+ }
148
+ }
149
+
150
+ /**
151
+ * Finds a namespace compound by its fully qualified compound name.
152
+ *
153
+ * @remarks
154
+ * Iterates over the collection and returns the first namespace whose
155
+ * `compoundName` matches the supplied string exactly. Used to resolve
156
+ * parent namespace references when building cross-collection hierarchies.
157
+ *
158
+ * @param compoundName - The fully qualified name to search for
159
+ * @returns The matching {@link Namespace}, or `undefined` if not found
160
+ *
161
+ * @public
162
+ */
163
+ findNamespaceByCompoundName(compoundName: string): Namespace | undefined {
164
+ for (const namespace of this.collectionCompoundsById.values()) {
165
+ assert(namespace instanceof Namespace)
166
+ if (namespace.compoundName === compoundName) {
167
+ return namespace
168
+ }
169
+ }
170
+ return undefined
171
+ }
172
+
173
+ // --------------------------------------------------------------------------
174
+
175
+ /**
176
+ * Adds namespace sidebar items to the provided sidebar category.
177
+ *
178
+ * @remarks
179
+ * Creates comprehensive namespace navigation including hierarchical namespace
180
+ * trees and specialised indices for classes, functions, variables, typedefs,
181
+ * enums, and enum values. The structure provides multiple access paths to
182
+ * namespace content for improved user navigation.
183
+ *
184
+ * @param sidebarCategory - The sidebar category to populate with namespace
185
+ * items
186
+ *
187
+ * @public
188
+ */
189
+ override addSidebarItems(sidebarCategory: SidebarCategory): void {
190
+ const indicesSet = this.workspace.indicesMaps.get('namespaces')
191
+ if (indicesSet === undefined) {
192
+ return
193
+ }
194
+
195
+ // Add namespaces to the sidebar.
196
+ // Top level namespaces are added below a Namespaces category.
197
+ const namespacesCategory: SidebarCategoryItem = {
198
+ type: 'category',
199
+ label: 'Namespaces',
200
+ link: {
201
+ type: 'doc',
202
+ id: `${this.workspace.sidebarBaseId}indices/namespaces/index`,
203
+ },
204
+ collapsed: true,
205
+ items: [
206
+ {
207
+ type: 'category',
208
+ label: 'Hierarchy',
209
+ link: {
210
+ type: 'doc',
211
+ id: `${this.workspace.sidebarBaseId}indices/namespaces/index`,
212
+ },
213
+ collapsed: true,
214
+ items: [],
215
+ },
216
+ ],
217
+ }
218
+
219
+ for (const namespace of this.topLevelNamespaces) {
220
+ const item = this.createNamespaceItemRecursively(namespace)
221
+ if (item !== undefined) {
222
+ ;(namespacesCategory.items[0] as SidebarCategoryItem).items.push(item)
223
+ }
224
+ }
225
+
226
+ if (indicesSet.has('all')) {
227
+ namespacesCategory.items.push({
228
+ type: 'doc',
229
+ label: 'All',
230
+ id: `${this.workspace.sidebarBaseId}indices/namespaces/all`,
231
+ })
232
+ }
233
+
234
+ if (indicesSet.has('concepts')) {
235
+ namespacesCategory.items.push({
236
+ type: 'doc',
237
+ label: 'Concepts',
238
+ id: `${this.workspace.sidebarBaseId}indices/namespaces/concepts`,
239
+ })
240
+ }
241
+
242
+ if (indicesSet.has('classes')) {
243
+ namespacesCategory.items.push({
244
+ type: 'doc',
245
+ label: 'Classes',
246
+ id: `${this.workspace.sidebarBaseId}indices/namespaces/classes`,
247
+ })
248
+ }
249
+
250
+ if (indicesSet.has('functions')) {
251
+ namespacesCategory.items.push({
252
+ type: 'doc',
253
+ label: 'Functions',
254
+ id: `${this.workspace.sidebarBaseId}indices/namespaces/functions`,
255
+ })
256
+ }
257
+
258
+ if (indicesSet.has('variables')) {
259
+ namespacesCategory.items.push({
260
+ type: 'doc',
261
+ label: 'Variables',
262
+ id: `${this.workspace.sidebarBaseId}indices/namespaces/variables`,
263
+ })
264
+ }
265
+
266
+ if (indicesSet.has('typedefs')) {
267
+ namespacesCategory.items.push({
268
+ type: 'doc',
269
+ label: 'Typedefs',
270
+ id: `${this.workspace.sidebarBaseId}indices/namespaces/typedefs`,
271
+ })
272
+ }
273
+
274
+ if (indicesSet.has('enums')) {
275
+ namespacesCategory.items.push({
276
+ type: 'doc',
277
+ label: 'Enums',
278
+ id: `${this.workspace.sidebarBaseId}indices/namespaces/enums`,
279
+ })
280
+ }
281
+
282
+ if (indicesSet.has('enumvalues')) {
283
+ namespacesCategory.items.push({
284
+ type: 'doc',
285
+ label: 'Enum Values',
286
+ id: `${this.workspace.sidebarBaseId}indices/namespaces/enumvalues`,
287
+ })
288
+ }
289
+
290
+ sidebarCategory.items.push(namespacesCategory)
291
+ }
292
+
293
+ /**
294
+ * Creates sidebar items recursively for namespace hierarchies.
295
+ *
296
+ * @remarks
297
+ * Generates appropriate sidebar structure based on namespace nesting,
298
+ * creating document items for leaf namespaces and category items for
299
+ * namespaces with children. This method builds the hierarchical navigation
300
+ * structure with proper ellipsis styling for nested content.
301
+ *
302
+ * @param namespace - The namespace to create a sidebar item for
303
+ * @returns The created sidebar item, or undefined if the namespace is not
304
+ * displayable
305
+ *
306
+ * @private
307
+ */
308
+ private createNamespaceItemRecursively(
309
+ namespace: Namespace
310
+ ): SidebarItem | undefined {
311
+ if (
312
+ namespace.sidebarLabel === undefined ||
313
+ namespace.sidebarId === undefined
314
+ ) {
315
+ return undefined
316
+ }
317
+
318
+ if (namespace.children.length === 0) {
319
+ const docItem: SidebarDocItem = {
320
+ type: 'doc',
321
+ label: namespace.sidebarLabel,
322
+ id: `${this.workspace.sidebarBaseId}${namespace.sidebarId}`,
323
+ }
324
+ return docItem
325
+ } else {
326
+ const categoryItem: SidebarCategoryItem = {
327
+ type: 'category',
328
+ label: namespace.sidebarLabel,
329
+ link: {
330
+ type: 'doc',
331
+ id: `${this.workspace.sidebarBaseId}${namespace.sidebarId}`,
332
+ },
333
+ className: 'doxyEllipsis',
334
+ collapsed: true,
335
+ items: [],
336
+ }
337
+
338
+ for (const childNamespace of namespace.children) {
339
+ if (childNamespace instanceof Namespace) {
340
+ const item = this.createNamespaceItemRecursively(childNamespace)
341
+ if (item !== undefined) {
342
+ categoryItem.items.push(item)
343
+ }
344
+ }
345
+ }
346
+
347
+ return categoryItem
348
+ }
349
+ }
350
+
351
+ // --------------------------------------------------------------------------
352
+
353
+ /**
354
+ * Creates navbar items for namespace navigation.
355
+ *
356
+ * @remarks
357
+ * Generates a navigation bar item that provides access to the main
358
+ * namespaces index page, enabling users to explore namespace hierarchies
359
+ * and specialised namespace indices from the top-level navigation.
360
+ *
361
+ * @returns Array containing the namespaces navbar item
362
+ *
363
+ * @public
364
+ */
365
+ override createNavbarItems(): NavbarItem[] {
366
+ const navbarItem: NavbarItem = {
367
+ label: 'Namespaces',
368
+ to: `${this.workspace.menuBaseUrl}namespaces/`,
369
+ }
370
+ return [navbarItem]
371
+ }
372
+
373
+ // --------------------------------------------------------------------------
374
+
375
+ /**
376
+ * Generates the main namespaces index Markdown file.
377
+ *
378
+ * @remarks
379
+ * Creates a comprehensive index file for namespaces when top-level namespaces
380
+ * exist. The index includes a hierarchical tree table showing all namespaces
381
+ * with their descriptions and navigation links, providing a complete overview
382
+ * of the project's namespace organisation.
383
+ *
384
+ * @public
385
+ */
386
+ override async generateIndexDotMdFile(): Promise<void> {
387
+ if (this.topLevelNamespaces.length === 0) {
388
+ return
389
+ }
390
+
391
+ const filePath =
392
+ this.workspace.outputFolderPath + 'indices/namespaces/index.md'
393
+ const permalink = 'namespaces'
394
+
395
+ const frontMatter: FrontMatter = {
396
+ title: 'Namespaces',
397
+ slug: `${this.workspace.slugBaseUrl}${permalink}`,
398
+ description: 'The namespaces used by this project',
399
+ custom_edit_url: null,
400
+ keywords: ['doxygen', 'namespaces', 'reference'],
401
+ }
402
+
403
+ const contentLines: string[] = []
404
+
405
+ for (const namespace of this.topLevelNamespaces) {
406
+ contentLines.push(...this.generateIndexMdFileRecursively(namespace, 1))
407
+ }
408
+
409
+ if (contentLines.length === 0) {
410
+ return
411
+ }
412
+
413
+ const lines: string[] = []
414
+
415
+ lines.push('The namespaces used by this project are:')
416
+
417
+ lines.push(...this.workspace.renderTreeTableToHtmlLines({ contentLines }))
418
+
419
+ if (this.workspace.options.verbose) {
420
+ console.log(`Writing namespaces index file '${filePath}'...`)
421
+ }
422
+
423
+ await this.workspace.writeOutputMdFile({
424
+ filePath,
425
+ frontMatter,
426
+ bodyLines: lines,
427
+ })
428
+ }
429
+
430
+ /**
431
+ * Recursively generates index content for namespace hierarchies.
432
+ *
433
+ * @remarks
434
+ * Creates hierarchical HTML tree table rows for namespaces and their
435
+ * children, including appropriate indentation, icons, and navigation links.
436
+ * This method builds the complete nested structure for namespace
437
+ * documentation indices with proper depth handling.
438
+ *
439
+ * @param namespace - The namespace to generate index content for
440
+ * @param depth - The current nesting depth for indentation
441
+ * @returns Array of HTML lines representing the namespace hierarchy
442
+ *
443
+ * @private
444
+ */
445
+ private generateIndexMdFileRecursively(
446
+ namespace: Namespace,
447
+ depth: number
448
+ ): string[] {
449
+ // console.log(util.inspect(namespace, { compact: false, depth: 999 }))
450
+
451
+ const lines: string[] = []
452
+
453
+ const label = this.workspace.renderString(namespace.treeEntryName, 'html')
454
+
455
+ const permalink = this.workspace.getPagePermalink(namespace.id)
456
+ if (permalink === undefined || permalink.length === 0) {
457
+ // console.log(namespace)
458
+ return []
459
+ }
460
+ // assert(permalink !== undefined && permalink.length > 1)
461
+
462
+ let description = ''
463
+ if (
464
+ namespace.briefDescriptionHtmlString !== undefined &&
465
+ namespace.briefDescriptionHtmlString.length > 0
466
+ ) {
467
+ description = namespace.briefDescriptionHtmlString.replace(/[.]$/, '')
468
+ }
469
+
470
+ lines.push('')
471
+ lines.push(
472
+ ...this.workspace.renderTreeTableRowToHtmlLines({
473
+ itemIconLetter: 'N',
474
+ itemLabel: label,
475
+ itemLink: permalink,
476
+ depth,
477
+ description,
478
+ })
479
+ )
480
+
481
+ if (namespace.children.length > 0) {
482
+ for (const childNamespace of namespace.children) {
483
+ if (childNamespace instanceof Namespace) {
484
+ lines.push(
485
+ ...this.generateIndexMdFileRecursively(childNamespace, depth + 1)
486
+ )
487
+ }
488
+ }
489
+ }
490
+
491
+ return lines
492
+ }
493
+
494
+ // --------------------------------------------------------------------------
495
+
496
+ /**
497
+ * Generates specialised namespace index files by content type.
498
+ *
499
+ * @remarks
500
+ * Creates comprehensive index files for different types of namespace content
501
+ * including all definitions, classes, functions, variables, typedefs, enums,
502
+ * and enum values. Each index provides filtered views of namespace content
503
+ * for targeted exploration and documentation access.
504
+ *
505
+ * @public
506
+ */
507
+ override async generatePerInitialsIndexMdFiles(): Promise<void> {
508
+ if (this.topLevelNamespaces.length === 0) {
509
+ return
510
+ }
511
+
512
+ const allUnorderedEntriesMap = new Map<string, TreeEntryBase>()
513
+
514
+ for (const [, compound] of this.collectionCompoundsById) {
515
+ if (!(compound instanceof Namespace)) {
516
+ continue
517
+ }
518
+
519
+ const compoundEntry = new NamespaceTreeEntry(compound, compound)
520
+ allUnorderedEntriesMap.set(compoundEntry.id, compoundEntry)
521
+
522
+ // console.log(compound.indexName)
523
+ if (compound.innerCompounds !== undefined) {
524
+ if (this.workspace.options.debug) {
525
+ console.log(
526
+ compound.indexName,
527
+ Array.from(compound.innerCompounds.keys())
528
+ )
529
+ }
530
+ const conceptCompoundDef = compound.innerCompounds.get('innerConcepts')
531
+ if (conceptCompoundDef?.innerConcepts !== undefined) {
532
+ for (const innerConcept of conceptCompoundDef.innerConcepts) {
533
+ // console.log(innerConcept.refid)
534
+ const compoundConcept = this.workspace.viewModel.compoundsById.get(
535
+ innerConcept.refid
536
+ )
537
+ if (compoundConcept instanceof Concept) {
538
+ const conceptEntry = new NamespaceTreeEntry(
539
+ compoundConcept,
540
+ compound
541
+ )
542
+ allUnorderedEntriesMap.set(conceptEntry.id, conceptEntry)
543
+ }
544
+ }
545
+ }
546
+ const classCompoundDef = compound.innerCompounds.get('innerClasses')
547
+ if (classCompoundDef?.innerClasses !== undefined) {
548
+ for (const innerClass of classCompoundDef.innerClasses) {
549
+ // console.log(innerClass.refid)
550
+ const compoundClass = this.workspace.viewModel.compoundsById.get(
551
+ innerClass.refid
552
+ )
553
+ if (compoundClass instanceof Class) {
554
+ const classEntry = new NamespaceTreeEntry(compoundClass, compound)
555
+ allUnorderedEntriesMap.set(classEntry.id, classEntry)
556
+ }
557
+ }
558
+ }
559
+ }
560
+
561
+ for (const section of compound.sections) {
562
+ for (const member of section.definitionMembers) {
563
+ const memberEntry = new NamespaceTreeEntry(member, compound)
564
+ allUnorderedEntriesMap.set(memberEntry.id, memberEntry)
565
+ if (member.enumValues !== undefined) {
566
+ for (const enumValue of member.enumValues) {
567
+ const enumValueEntry = new NamespaceTreeEntry(enumValue, compound)
568
+ allUnorderedEntriesMap.set(enumValueEntry.id, enumValueEntry)
569
+ }
570
+ }
571
+ }
572
+ }
573
+ }
574
+
575
+ // ------------------------------------------------------------------------
576
+
577
+ await this.generateIndexFile({
578
+ group: 'namespaces',
579
+ fileKind: 'all',
580
+ title: 'Namespaces Definitions Index',
581
+ description: 'The definitions part of the namespaces are:',
582
+ map: allUnorderedEntriesMap,
583
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
584
+ filter: (kind) => true,
585
+ })
586
+
587
+ await this.generateIndexFile({
588
+ group: 'namespaces',
589
+ fileKind: 'concepts',
590
+ title: 'Namespaces Concepts Index',
591
+ description: 'The concepts defined in the namespaces are:',
592
+ map: allUnorderedEntriesMap,
593
+ filter: (kind) => kind === 'concept',
594
+ })
595
+
596
+ await this.generateIndexFile({
597
+ group: 'namespaces',
598
+ fileKind: 'classes',
599
+ title: 'Namespaces Classes Index',
600
+ description:
601
+ 'The classes, structs, unions defined in the namespaces are:',
602
+ map: allUnorderedEntriesMap,
603
+ filter: (kind) =>
604
+ kind === 'class' || kind === 'struct' || kind === 'union',
605
+ })
606
+
607
+ await this.generateIndexFile({
608
+ group: 'namespaces',
609
+ fileKind: 'functions',
610
+ title: 'Namespaces Functions Index',
611
+ description: 'The functions defined in the namespaces are:',
612
+ map: allUnorderedEntriesMap,
613
+ filter: (kind) => kind === 'function',
614
+ })
615
+
616
+ await this.generateIndexFile({
617
+ group: 'namespaces',
618
+ fileKind: 'variables',
619
+ title: 'Namespaces Variables Index',
620
+ description: 'The variables defined in the namespaces are:',
621
+ map: allUnorderedEntriesMap,
622
+ filter: (kind) => kind === 'variable',
623
+ })
624
+
625
+ await this.generateIndexFile({
626
+ group: 'namespaces',
627
+ fileKind: 'typedefs',
628
+ title: 'Namespaces Type Definitions Index',
629
+ description: 'The typedefs defined in the namespaces are:',
630
+ map: allUnorderedEntriesMap,
631
+ filter: (kind) => kind === 'typedef',
632
+ })
633
+
634
+ await this.generateIndexFile({
635
+ group: 'namespaces',
636
+ fileKind: 'enums',
637
+ title: 'Namespaces Enums Index',
638
+ description: 'The enums defined in the namespaces are:',
639
+ map: allUnorderedEntriesMap,
640
+ filter: (kind) => kind === 'enum',
641
+ })
642
+
643
+ await this.generateIndexFile({
644
+ group: 'namespaces',
645
+ fileKind: 'enumvalues',
646
+ title: 'Namespaces Enum Values Index',
647
+ description: 'The enum values defined in the namespaces are:',
648
+ map: allUnorderedEntriesMap,
649
+ filter: (kind) => kind === 'enumvalue',
650
+ })
651
+
652
+ // ------------------------------------------------------------------------
653
+ }
654
+ }
655
+
656
+ // ============================================================================
657
+
658
+ /**
659
+ * Represents a namespace compound for code organisation documentation.
660
+ *
661
+ * @remarks
662
+ * Namespaces provide logical code organisation beyond file boundaries,
663
+ * supporting complex software architectures with hierarchical structure.
664
+ * Handles both named and anonymous namespaces with appropriate documentation
665
+ * generation, including special handling for compiler-generated anonymous
666
+ * namespaces.
667
+ *
668
+ * @public
669
+ */
670
+ export class Namespace extends CompoundBase {
671
+ /**
672
+ * The unqualified namespace name without scope.
673
+ *
674
+ * @remarks
675
+ * Contains the simple name of the namespace without parent scope
676
+ * qualifiers, used for display and navigation purposes.
677
+ */
678
+ unqualifiedName = '???'
679
+
680
+ /**
681
+ * Indicates if this is an anonymous namespace.
682
+ *
683
+ * @remarks
684
+ * True for anonymous namespaces that don't have explicit names,
685
+ * affecting how the namespace is displayed and documented.
686
+ */
687
+ isAnonymous = false
688
+
689
+ /**
690
+ * Array of concept compounds defined within this namespace.
691
+ *
692
+ * @remarks
693
+ * Contains all C++20 concept compounds whose fully qualified names are
694
+ * scoped to this namespace, populated during cross-collection hierarchy
695
+ * construction.
696
+ */
697
+ concepts: Concept[] = []
698
+
699
+ /**
700
+ * Initialises a new Namespace instance from compound definition data.
701
+ *
702
+ * @remarks
703
+ * Processes namespace metadata including nested namespace relationships,
704
+ * name extraction, and permalink generation. Handles special cases for
705
+ * anonymous namespaces and compiler-generated namespace structures.
706
+ * Sets up the namespace for integration into the documentation hierarchy.
707
+ *
708
+ * @param collection - The parent Namespaces collection
709
+ * @param compoundDef - The compound definition containing namespace metadata
710
+ *
711
+ * @public
712
+ */
713
+ constructor(collection: Namespaces, compoundDef: CompoundDefDataModel) {
714
+ super(collection, compoundDef)
715
+
716
+ // console.log('Namespace.constructor', util.inspect(compoundDef))
717
+
718
+ if (Array.isArray(compoundDef.innerNamespaces)) {
719
+ for (const ref of compoundDef.innerNamespaces) {
720
+ // console.log('component', compoundDef.id, 'has child', ref.refid)
721
+ this.childrenIds.push(ref.refid)
722
+ }
723
+ }
724
+
725
+ // Tricky case: namespace { namespace CU { ... }}
726
+ // id: "namespace_0d341223050020306256025223146376054302122106363020_1_1CU"
727
+ // compoundname: "::CU"
728
+ // location: "[generated]"
729
+
730
+ if (/^namespace.*_0d\d{48}/.test(this.id)) {
731
+ let fileName = ''
732
+ if (compoundDef.location?.file !== undefined) {
733
+ fileName = path.basename(compoundDef.location.file)
734
+ }
735
+
736
+ if (this.compoundName.startsWith('::')) {
737
+ this.unqualifiedName = compoundDef.compoundName.replace(/.*::/, '')
738
+
739
+ this.indexName = `anonymous{${fileName}}${this.compoundName}`
740
+
741
+ const sanitizedPath = sanitizeHierarchicalPath(
742
+ this.indexName.replaceAll('::', '/')
743
+ )
744
+
745
+ this.pageTitle = `\`${this.indexName}\` Namespace`
746
+
747
+ this.relativePermalink = `namespaces/${sanitizedPath}`
748
+ this.sidebarId = `namespaces/${flattenPath(sanitizedPath)}`
749
+ const { unqualifiedName } = this
750
+ this.sidebarLabel = unqualifiedName
751
+ } else {
752
+ this.unqualifiedName = `anonymous{${fileName}}`
753
+ this.isAnonymous = true
754
+
755
+ if (this.compoundName.length > 0) {
756
+ this.indexName = `${this.compoundName}::${this.unqualifiedName}`
757
+ } else {
758
+ const { unqualifiedName } = this
759
+ this.indexName = unqualifiedName
760
+ }
761
+
762
+ const sanitizedPath = sanitizeHierarchicalPath(
763
+ this.indexName.replaceAll('::', '/')
764
+ )
765
+
766
+ // if (compoundDef.location?.file !== undefined) {
767
+ // sanitizedPath +=
768
+ // `-${crypto.hash('md5', compoundDef.location?.file)}`
769
+ // }
770
+
771
+ this.pageTitle = `\`${this.indexName}\` Namespace`
772
+
773
+ this.relativePermalink = `namespaces/${sanitizedPath}`
774
+ this.sidebarId = `namespaces/${flattenPath(sanitizedPath)}`
775
+ const { unqualifiedName } = this
776
+ this.sidebarLabel = unqualifiedName
777
+ }
778
+ } else {
779
+ // The compoundName is the fully qualified namespace name.
780
+ // Keep only the last name.
781
+ this.unqualifiedName = sanitizeAnonymousNamespace(
782
+ compoundDef.compoundName.replace(/.*::/, '')
783
+ )
784
+
785
+ this.indexName = sanitizeAnonymousNamespace(
786
+ this.compoundName.replace(/.*::/, '')
787
+ )
788
+
789
+ this.pageTitle = `\`${this.unqualifiedName}\` Namespace`
790
+
791
+ const sanitizedPath: string = sanitizeHierarchicalPath(
792
+ sanitizeAnonymousNamespace(this.compoundName.replaceAll('::', '/'))
793
+ )
794
+
795
+ if (compoundDef.compoundName.length > 0) {
796
+ // Skip un-named namespaces, and generated ones,
797
+ // since they can be duplicate.
798
+ this.relativePermalink = `namespaces/${sanitizedPath}`
799
+ this.sidebarId = `namespaces/${flattenPath(sanitizedPath)}`
800
+ const { unqualifiedName } = this
801
+ this.sidebarLabel = unqualifiedName
802
+ } else {
803
+ console.warn(
804
+ 'Skipping unnamed namespace',
805
+ compoundDef.id,
806
+ compoundDef.location?.file
807
+ )
808
+ }
809
+ }
810
+
811
+ const { indexName } = this
812
+ this.treeEntryName = indexName
813
+
814
+ this.createSections()
815
+
816
+ // console.log('0 id', this.id)
817
+ // console.log('1 nm', this.compoundName)
818
+ // console.log('2 pl', this.relativePermalink)
819
+ // console.log('3 di', this.docusaurusId)
820
+ // console.log('4 sb', this.sidebarLabel)
821
+ // console.log('5 ix', this.indexName)
822
+ // console.log()
823
+ }
824
+
825
+ /**
826
+ * Performs late initialisation for namespaces with content validation.
827
+ *
828
+ * @remarks
829
+ * Validates namespace content and conditionally disables sidebar generation
830
+ * for empty namespaces. This ensures that namespaces without meaningful
831
+ * documentation do not appear in the generated sidebar navigation.
832
+ *
833
+ * @public
834
+ */
835
+ override initializeLate(): void {
836
+ super.initializeLate()
837
+
838
+ const { workspace } = this.collection
839
+
840
+ // console.log(this)
841
+ if (!this.hasAnyContent()) {
842
+ if (!workspace.options.suggestToDoDescriptions) {
843
+ console.log(this.kind, this.compoundName, 'has no content, not shown')
844
+
845
+ this.sidebarId = undefined
846
+ this.sidebarLabel = undefined
847
+ this.relativePermalink = undefined
848
+
849
+ return
850
+ } else {
851
+ if (workspace.options.verbose) {
852
+ console.log(
853
+ this.kind,
854
+ this.compoundName,
855
+ 'has no content, see the TODO description'
856
+ )
857
+ }
858
+ }
859
+ }
860
+ }
861
+
862
+ /**
863
+ * Determines if the namespace has any documentable content.
864
+ *
865
+ * @remarks
866
+ * Checks for child namespaces with content, inner compounds beyond just
867
+ * nested namespaces, and base class content to determine if the namespace
868
+ * should be included in documentation. This method helps filter empty
869
+ * namespaces from the generated output.
870
+ *
871
+ * @returns True if the namespace contains documentable content, false
872
+ * otherwise
873
+ *
874
+ * @public
875
+ */
876
+ override hasAnyContent(): boolean {
877
+ // console.log('checking', this.compoundName)
878
+ for (const childNamespace of this.children) {
879
+ if (childNamespace.hasAnyContent()) {
880
+ // console.log('has content', this)
881
+ return true
882
+ }
883
+ }
884
+
885
+ if (this.innerCompounds !== undefined) {
886
+ if (this.innerCompounds.has('innerNamespaces')) {
887
+ if (this.innerCompounds.size > 1) {
888
+ // console.log('has content innerCompounds 1', this)
889
+ return true
890
+ }
891
+ } else {
892
+ if (this.innerCompounds.size > 0) {
893
+ // console.log('has content innerCompounds 2', this)
894
+ return true
895
+ }
896
+ }
897
+ }
898
+
899
+ // if (!super.hasAnyContent()) {
900
+ // console.log('has no content', this)
901
+ // }
902
+ return super.hasAnyContent()
903
+ }
904
+
905
+ /**
906
+ * Determines whether this namespace or any of its descendants contain
907
+ * C++20 concept compounds.
908
+ *
909
+ * @remarks
910
+ * Checks the namespace's own `concepts` array first, then recurses into
911
+ * child namespaces. Used to conditionally include concept index sections
912
+ * in namespace documentation pages.
913
+ *
914
+ * @returns `true` if at least one concept is present in this namespace
915
+ * or any nested namespace, `false` otherwise
916
+ *
917
+ * @public
918
+ */
919
+ hasConcepts(): boolean {
920
+ if (this.concepts.length > 0) {
921
+ return true
922
+ }
923
+
924
+ for (const child of this.children) {
925
+ assert(child instanceof Namespace)
926
+ if (child.hasConcepts()) {
927
+ return true
928
+ }
929
+ }
930
+ return false
931
+ }
932
+
933
+ // --------------------------------------------------------------------------
934
+
935
+ /**
936
+ * Renders the namespace documentation to Markdown lines.
937
+ *
938
+ * @remarks
939
+ * Generates comprehensive namespace documentation including brief
940
+ * description, namespace definition syntax, inner compound indices, section
941
+ * indices, detailed description, and sections. The output follows Docusaurus
942
+ * conventions for namespace pages with proper navigation and content
943
+ * organisation.
944
+ *
945
+ * @param frontMatter - The front matter configuration for the page
946
+ * @returns Array of Markdown lines representing the namespace documentation
947
+ *
948
+ * @public
949
+ */
950
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
951
+ override renderToLines(frontMatter: FrontMatter): string[] {
952
+ const lines: string[] = []
953
+
954
+ const { workspace } = this.collection
955
+
956
+ const descriptionTodo = `@namespace ${workspace.renderString(
957
+ this.compoundName,
958
+ 'html'
959
+ )}`
960
+
961
+ const morePermalink =
962
+ this.detailedDescriptionHtmlLines !== undefined ? '#details' : undefined
963
+
964
+ lines.push(
965
+ this.renderBriefDescriptionToHtmlString({
966
+ briefDescriptionHtmlString: this.briefDescriptionHtmlString,
967
+ todo: descriptionTodo,
968
+ morePermalink,
969
+ })
970
+ )
971
+
972
+ lines.push('')
973
+ lines.push('## Definition')
974
+
975
+ lines.push('')
976
+ lines.push('<div class="doxyDefinition">')
977
+ const dots = workspace.renderString('{ ... }', 'html')
978
+ if (this.compoundName.startsWith('anonymous_namespace{')) {
979
+ lines.push(`namespace ${dots}`)
980
+ } else {
981
+ const compoundName = workspace.renderString(this.compoundName, 'html')
982
+ lines.push(`namespace ${compoundName} ${dots}`)
983
+ }
984
+ lines.push('</div>')
985
+
986
+ lines.push(
987
+ ...this.renderInnerIndicesToLines({
988
+ suffixes: ['Namespaces', 'Classes', 'Concepts'],
989
+ })
990
+ )
991
+
992
+ // This is a compatibility check for older Doxygen versions (pre 1.15)
993
+ // that don't have innerConcepts.
994
+ if (this.hasConcepts() && !this.innerCompounds?.has('innerConcepts')) {
995
+ lines.push(...this.renderConceptsIndexToLines(this.concepts))
996
+ }
997
+
998
+ lines.push(...this.renderSectionIndicesToLines())
999
+
1000
+ lines.push(
1001
+ ...this.renderDetailedDescriptionToHtmlLines({
1002
+ briefDescriptionHtmlString: this.briefDescriptionHtmlString,
1003
+ detailedDescriptionHtmlLines: this.detailedDescriptionHtmlLines,
1004
+ todo: descriptionTodo,
1005
+ showHeader: true,
1006
+ showBrief: !this.hasSect1InDescription,
1007
+ })
1008
+ )
1009
+
1010
+ lines.push(...this.renderSectionsToLines())
1011
+
1012
+ lines.push(...this.renderGeneratedFromToLines())
1013
+
1014
+ return lines
1015
+ }
1016
+ }
1017
+
1018
+ // ----------------------------------------------------------------------------