@xpack/doxygen2docusaurus 1.1.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 (329) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +4 -3
  3. package/bin/doxygen2docusaurus.js +1 -1
  4. package/dist/cli/main.d.ts +0 -8
  5. package/dist/cli/main.d.ts.map +1 -1
  6. package/dist/cli/main.js +1 -29
  7. package/dist/cli/main.js.map +1 -1
  8. package/dist/docusaurus/cli-options.d.ts +4 -65
  9. package/dist/docusaurus/cli-options.d.ts.map +1 -1
  10. package/dist/docusaurus/cli-options.js +16 -91
  11. package/dist/docusaurus/cli-options.js.map +1 -1
  12. package/dist/docusaurus/generator.d.ts +7 -4
  13. package/dist/docusaurus/generator.d.ts.map +1 -1
  14. package/dist/docusaurus/generator.js +50 -140
  15. package/dist/docusaurus/generator.js.map +1 -1
  16. package/dist/docusaurus/renderers/descriptiontype.d.ts.map +1 -1
  17. package/dist/docusaurus/renderers/descriptiontype.js +11 -138
  18. package/dist/docusaurus/renderers/descriptiontype.js.map +1 -1
  19. package/dist/docusaurus/renderers/docinternalstype.d.ts.map +1 -1
  20. package/dist/docusaurus/renderers/docinternalstype.js +0 -24
  21. package/dist/docusaurus/renderers/docinternalstype.js.map +1 -1
  22. package/dist/docusaurus/renderers/doclisttype.d.ts.map +1 -1
  23. package/dist/docusaurus/renderers/doclisttype.js +0 -22
  24. package/dist/docusaurus/renderers/doclisttype.js.map +1 -1
  25. package/dist/docusaurus/renderers/doctabletype.d.ts.map +1 -1
  26. package/dist/docusaurus/renderers/doctabletype.js +1 -25
  27. package/dist/docusaurus/renderers/doctabletype.js.map +1 -1
  28. package/dist/docusaurus/renderers/doctitletype.d.ts.map +1 -1
  29. package/dist/docusaurus/renderers/doctitletype.js +0 -20
  30. package/dist/docusaurus/renderers/doctitletype.js.map +1 -1
  31. package/dist/docusaurus/renderers/docvariablelisttype.d.ts.map +1 -1
  32. package/dist/docusaurus/renderers/docvariablelisttype.js +1 -25
  33. package/dist/docusaurus/renderers/docvariablelisttype.js.map +1 -1
  34. package/dist/docusaurus/renderers/docxrefsecttype.d.ts.map +1 -1
  35. package/dist/docusaurus/renderers/docxrefsecttype.js +0 -16
  36. package/dist/docusaurus/renderers/docxrefsecttype.js.map +1 -1
  37. package/dist/docusaurus/renderers/element-renderer-base.d.ts.map +1 -1
  38. package/dist/docusaurus/renderers/element-renderer-base.js +0 -12
  39. package/dist/docusaurus/renderers/element-renderer-base.js.map +1 -1
  40. package/dist/docusaurus/renderers/inctype.d.ts.map +1 -1
  41. package/dist/docusaurus/renderers/inctype.js +0 -18
  42. package/dist/docusaurus/renderers/inctype.js.map +1 -1
  43. package/dist/docusaurus/renderers/linkedtexttype.d.ts.map +1 -1
  44. package/dist/docusaurus/renderers/linkedtexttype.js +0 -23
  45. package/dist/docusaurus/renderers/linkedtexttype.js.map +1 -1
  46. package/dist/docusaurus/renderers/listingtype.d.ts.map +1 -1
  47. package/dist/docusaurus/renderers/listingtype.js +1 -24
  48. package/dist/docusaurus/renderers/listingtype.js.map +1 -1
  49. package/dist/docusaurus/renderers/paramtype.d.ts.map +1 -1
  50. package/dist/docusaurus/renderers/paramtype.js +2 -29
  51. package/dist/docusaurus/renderers/paramtype.js.map +1 -1
  52. package/dist/docusaurus/renderers/referencetype.d.ts.map +1 -1
  53. package/dist/docusaurus/renderers/referencetype.js +0 -17
  54. package/dist/docusaurus/renderers/referencetype.js.map +1 -1
  55. package/dist/docusaurus/renderers/reftexttype.d.ts.map +1 -1
  56. package/dist/docusaurus/renderers/reftexttype.js +0 -16
  57. package/dist/docusaurus/renderers/reftexttype.js.map +1 -1
  58. package/dist/docusaurus/renderers/reftype.d.ts.map +1 -1
  59. package/dist/docusaurus/renderers/reftype.js +0 -16
  60. package/dist/docusaurus/renderers/reftype.js.map +1 -1
  61. package/dist/docusaurus/renderers/renderers.d.ts.map +1 -1
  62. package/dist/docusaurus/renderers/renderers.js +4 -33
  63. package/dist/docusaurus/renderers/renderers.js.map +1 -1
  64. package/dist/docusaurus/renderers/substringtype.d.ts.map +1 -1
  65. package/dist/docusaurus/renderers/substringtype.js +0 -17
  66. package/dist/docusaurus/renderers/substringtype.js.map +1 -1
  67. package/dist/docusaurus/renderers/tableofcontentstype.d.ts.map +1 -1
  68. package/dist/docusaurus/renderers/tableofcontentstype.js +0 -17
  69. package/dist/docusaurus/renderers/tableofcontentstype.js.map +1 -1
  70. package/dist/docusaurus/types.d.ts +4 -8
  71. package/dist/docusaurus/types.d.ts.map +1 -1
  72. package/dist/docusaurus/types.js +0 -11
  73. package/dist/docusaurus/types.js.map +1 -1
  74. package/dist/docusaurus/utils.d.ts.map +1 -1
  75. package/dist/docusaurus/utils.js +0 -82
  76. package/dist/docusaurus/utils.js.map +1 -1
  77. package/dist/docusaurus/view-model/classes-vm.d.ts +2 -2
  78. package/dist/docusaurus/view-model/classes-vm.d.ts.map +1 -1
  79. package/dist/docusaurus/view-model/classes-vm.js +12 -87
  80. package/dist/docusaurus/view-model/classes-vm.js.map +1 -1
  81. package/dist/docusaurus/view-model/collection-base.d.ts +2 -2
  82. package/dist/docusaurus/view-model/collection-base.d.ts.map +1 -1
  83. package/dist/docusaurus/view-model/collection-base.js +11 -23
  84. package/dist/docusaurus/view-model/collection-base.js.map +1 -1
  85. package/dist/docusaurus/view-model/compound-base-vm.d.ts +2 -32
  86. package/dist/docusaurus/view-model/compound-base-vm.d.ts.map +1 -1
  87. package/dist/docusaurus/view-model/compound-base-vm.js +47 -129
  88. package/dist/docusaurus/view-model/compound-base-vm.js.map +1 -1
  89. package/dist/docusaurus/view-model/concepts-vm.d.ts +26 -0
  90. package/dist/docusaurus/view-model/concepts-vm.d.ts.map +1 -0
  91. package/dist/docusaurus/view-model/concepts-vm.js +329 -0
  92. package/dist/docusaurus/view-model/concepts-vm.js.map +1 -0
  93. package/dist/docusaurus/view-model/description-anchors.d.ts.map +1 -1
  94. package/dist/docusaurus/view-model/description-anchors.js +0 -13
  95. package/dist/docusaurus/view-model/description-anchors.js.map +1 -1
  96. package/dist/docusaurus/view-model/files-and-folders-vm.d.ts +2 -2
  97. package/dist/docusaurus/view-model/files-and-folders-vm.d.ts.map +1 -1
  98. package/dist/docusaurus/view-model/files-and-folders-vm.js +64 -110
  99. package/dist/docusaurus/view-model/files-and-folders-vm.js.map +1 -1
  100. package/dist/docusaurus/view-model/groups-vm.d.ts +2 -2
  101. package/dist/docusaurus/view-model/groups-vm.d.ts.map +1 -1
  102. package/dist/docusaurus/view-model/groups-vm.js +7 -80
  103. package/dist/docusaurus/view-model/groups-vm.js.map +1 -1
  104. package/dist/docusaurus/view-model/members-vm.d.ts.map +1 -1
  105. package/dist/docusaurus/view-model/members-vm.js +17 -154
  106. package/dist/docusaurus/view-model/members-vm.js.map +1 -1
  107. package/dist/docusaurus/view-model/namespaces-vm.d.ts +6 -2
  108. package/dist/docusaurus/view-model/namespaces-vm.d.ts.map +1 -1
  109. package/dist/docusaurus/view-model/namespaces-vm.js +82 -89
  110. package/dist/docusaurus/view-model/namespaces-vm.js.map +1 -1
  111. package/dist/docusaurus/view-model/options.d.ts.map +1 -1
  112. package/dist/docusaurus/view-model/options.js +0 -14
  113. package/dist/docusaurus/view-model/options.js.map +1 -1
  114. package/dist/docusaurus/view-model/pages-vm.d.ts +2 -2
  115. package/dist/docusaurus/view-model/pages-vm.d.ts.map +1 -1
  116. package/dist/docusaurus/view-model/pages-vm.js +3 -50
  117. package/dist/docusaurus/view-model/pages-vm.js.map +1 -1
  118. package/dist/docusaurus/view-model/tree-entries-vm.d.ts +8 -22
  119. package/dist/docusaurus/view-model/tree-entries-vm.d.ts.map +1 -1
  120. package/dist/docusaurus/view-model/tree-entries-vm.js +54 -54
  121. package/dist/docusaurus/view-model/tree-entries-vm.js.map +1 -1
  122. package/dist/docusaurus/view-model/view-model.d.ts +0 -6
  123. package/dist/docusaurus/view-model/view-model.d.ts.map +1 -1
  124. package/dist/docusaurus/view-model/view-model.js +20 -63
  125. package/dist/docusaurus/view-model/view-model.js.map +1 -1
  126. package/dist/docusaurus/workspace.d.ts +1 -20
  127. package/dist/docusaurus/workspace.d.ts.map +1 -1
  128. package/dist/docusaurus/workspace.js +9 -116
  129. package/dist/docusaurus/workspace.js.map +1 -1
  130. package/dist/doxygen/data-model/compounds/compounddef-dm.d.ts +5 -7
  131. package/dist/doxygen/data-model/compounds/compounddef-dm.d.ts.map +1 -1
  132. package/dist/doxygen/data-model/compounds/compounddef-dm.js +23 -187
  133. package/dist/doxygen/data-model/compounds/compounddef-dm.js.map +1 -1
  134. package/dist/doxygen/data-model/compounds/compoundreftype-dm.d.ts +0 -9
  135. package/dist/doxygen/data-model/compounds/compoundreftype-dm.d.ts.map +1 -1
  136. package/dist/doxygen/data-model/compounds/compoundreftype-dm.js +1 -47
  137. package/dist/doxygen/data-model/compounds/compoundreftype-dm.js.map +1 -1
  138. package/dist/doxygen/data-model/compounds/descriptiontype-dm.d.ts +0 -39
  139. package/dist/doxygen/data-model/compounds/descriptiontype-dm.d.ts.map +1 -1
  140. package/dist/doxygen/data-model/compounds/descriptiontype-dm.js +36 -1308
  141. package/dist/doxygen/data-model/compounds/descriptiontype-dm.js.map +1 -1
  142. package/dist/doxygen/data-model/compounds/docvarlistentrytype-dm.d.ts.map +1 -1
  143. package/dist/doxygen/data-model/compounds/docvarlistentrytype-dm.js +0 -64
  144. package/dist/doxygen/data-model/compounds/docvarlistentrytype-dm.js.map +1 -1
  145. package/dist/doxygen/data-model/compounds/doxygentype-dm.d.ts.map +1 -1
  146. package/dist/doxygen/data-model/compounds/doxygentype-dm.js +0 -35
  147. package/dist/doxygen/data-model/compounds/doxygentype-dm.js.map +1 -1
  148. package/dist/doxygen/data-model/compounds/enumvaluetype-dm.d.ts +0 -6
  149. package/dist/doxygen/data-model/compounds/enumvaluetype-dm.d.ts.map +1 -1
  150. package/dist/doxygen/data-model/compounds/enumvaluetype-dm.js +1 -44
  151. package/dist/doxygen/data-model/compounds/enumvaluetype-dm.js.map +1 -1
  152. package/dist/doxygen/data-model/compounds/inctype-dm.d.ts +0 -9
  153. package/dist/doxygen/data-model/compounds/inctype-dm.d.ts.map +1 -1
  154. package/dist/doxygen/data-model/compounds/inctype-dm.js +3 -48
  155. package/dist/doxygen/data-model/compounds/inctype-dm.js.map +1 -1
  156. package/dist/doxygen/data-model/compounds/linkedtexttype-dm.d.ts +3 -15
  157. package/dist/doxygen/data-model/compounds/linkedtexttype-dm.d.ts.map +1 -1
  158. package/dist/doxygen/data-model/compounds/linkedtexttype-dm.js +5 -57
  159. package/dist/doxygen/data-model/compounds/linkedtexttype-dm.js.map +1 -1
  160. package/dist/doxygen/data-model/compounds/listofallmemberstype-dm.d.ts +0 -6
  161. package/dist/doxygen/data-model/compounds/listofallmemberstype-dm.d.ts.map +1 -1
  162. package/dist/doxygen/data-model/compounds/listofallmemberstype-dm.js +0 -38
  163. package/dist/doxygen/data-model/compounds/listofallmemberstype-dm.js.map +1 -1
  164. package/dist/doxygen/data-model/compounds/locationtype-dm.d.ts +0 -6
  165. package/dist/doxygen/data-model/compounds/locationtype-dm.d.ts.map +1 -1
  166. package/dist/doxygen/data-model/compounds/locationtype-dm.js +4 -52
  167. package/dist/doxygen/data-model/compounds/locationtype-dm.js.map +1 -1
  168. package/dist/doxygen/data-model/compounds/memberdeftype-dm.d.ts +2 -10
  169. package/dist/doxygen/data-model/compounds/memberdeftype-dm.d.ts.map +1 -1
  170. package/dist/doxygen/data-model/compounds/memberdeftype-dm.js +19 -64
  171. package/dist/doxygen/data-model/compounds/memberdeftype-dm.js.map +1 -1
  172. package/dist/doxygen/data-model/compounds/memberreftype-dm.d.ts +0 -6
  173. package/dist/doxygen/data-model/compounds/memberreftype-dm.d.ts.map +1 -1
  174. package/dist/doxygen/data-model/compounds/memberreftype-dm.js +1 -45
  175. package/dist/doxygen/data-model/compounds/memberreftype-dm.js.map +1 -1
  176. package/dist/doxygen/data-model/compounds/membertype-dm.d.ts +0 -6
  177. package/dist/doxygen/data-model/compounds/membertype-dm.d.ts.map +1 -1
  178. package/dist/doxygen/data-model/compounds/membertype-dm.js +0 -43
  179. package/dist/doxygen/data-model/compounds/membertype-dm.js.map +1 -1
  180. package/dist/doxygen/data-model/compounds/paramtype-dm.d.ts +0 -6
  181. package/dist/doxygen/data-model/compounds/paramtype-dm.d.ts.map +1 -1
  182. package/dist/doxygen/data-model/compounds/paramtype-dm.js +0 -51
  183. package/dist/doxygen/data-model/compounds/paramtype-dm.js.map +1 -1
  184. package/dist/doxygen/data-model/compounds/referencetype-dm.d.ts +0 -9
  185. package/dist/doxygen/data-model/compounds/referencetype-dm.d.ts.map +1 -1
  186. package/dist/doxygen/data-model/compounds/referencetype-dm.js +2 -47
  187. package/dist/doxygen/data-model/compounds/referencetype-dm.js.map +1 -1
  188. package/dist/doxygen/data-model/compounds/reftexttype-dm.d.ts.map +1 -1
  189. package/dist/doxygen/data-model/compounds/reftexttype-dm.js +2 -38
  190. package/dist/doxygen/data-model/compounds/reftexttype-dm.js.map +1 -1
  191. package/dist/doxygen/data-model/compounds/reftype-dm.d.ts +0 -21
  192. package/dist/doxygen/data-model/compounds/reftype-dm.d.ts.map +1 -1
  193. package/dist/doxygen/data-model/compounds/reftype-dm.js +4 -82
  194. package/dist/doxygen/data-model/compounds/reftype-dm.js.map +1 -1
  195. package/dist/doxygen/data-model/compounds/reimplementtype-dm.d.ts +0 -6
  196. package/dist/doxygen/data-model/compounds/reimplementtype-dm.d.ts.map +1 -1
  197. package/dist/doxygen/data-model/compounds/reimplementtype-dm.js +1 -42
  198. package/dist/doxygen/data-model/compounds/reimplementtype-dm.js.map +1 -1
  199. package/dist/doxygen/data-model/compounds/sectiondeftype-dm.d.ts +0 -9
  200. package/dist/doxygen/data-model/compounds/sectiondeftype-dm.d.ts.map +1 -1
  201. package/dist/doxygen/data-model/compounds/sectiondeftype-dm.js +0 -53
  202. package/dist/doxygen/data-model/compounds/sectiondeftype-dm.js.map +1 -1
  203. package/dist/doxygen/data-model/compounds/tableofcontentstype-dm.d.ts +0 -12
  204. package/dist/doxygen/data-model/compounds/tableofcontentstype-dm.d.ts.map +1 -1
  205. package/dist/doxygen/data-model/compounds/tableofcontentstype-dm.js +0 -105
  206. package/dist/doxygen/data-model/compounds/tableofcontentstype-dm.js.map +1 -1
  207. package/dist/doxygen/data-model/compounds/templateparamlisttype-dm.d.ts +0 -6
  208. package/dist/doxygen/data-model/compounds/templateparamlisttype-dm.d.ts.map +1 -1
  209. package/dist/doxygen/data-model/compounds/templateparamlisttype-dm.js +0 -38
  210. package/dist/doxygen/data-model/compounds/templateparamlisttype-dm.js.map +1 -1
  211. package/dist/doxygen/data-model/data-model.d.ts +0 -65
  212. package/dist/doxygen/data-model/data-model.d.ts.map +1 -1
  213. package/dist/doxygen/data-model/data-model.js +4 -115
  214. package/dist/doxygen/data-model/data-model.js.map +1 -1
  215. package/dist/doxygen/data-model/doxyfile/doxyfileoptiontype-dm.d.ts +0 -6
  216. package/dist/doxygen/data-model/doxyfile/doxyfileoptiontype-dm.d.ts.map +1 -1
  217. package/dist/doxygen/data-model/doxyfile/doxyfileoptiontype-dm.js +4 -47
  218. package/dist/doxygen/data-model/doxyfile/doxyfileoptiontype-dm.js.map +1 -1
  219. package/dist/doxygen/data-model/doxyfile/doxyfiletype-dm.d.ts +0 -6
  220. package/dist/doxygen/data-model/doxyfile/doxyfiletype-dm.d.ts.map +1 -1
  221. package/dist/doxygen/data-model/doxyfile/doxyfiletype-dm.js +0 -40
  222. package/dist/doxygen/data-model/doxyfile/doxyfiletype-dm.js.map +1 -1
  223. package/dist/doxygen/data-model/doxygen-xml-parser.d.ts +0 -236
  224. package/dist/doxygen/data-model/doxygen-xml-parser.d.ts.map +1 -1
  225. package/dist/doxygen/data-model/doxygen-xml-parser.js +0 -289
  226. package/dist/doxygen/data-model/doxygen-xml-parser.js.map +1 -1
  227. package/dist/doxygen/data-model/index/indexcompoundtype-dm.d.ts +0 -6
  228. package/dist/doxygen/data-model/index/indexcompoundtype-dm.d.ts.map +1 -1
  229. package/dist/doxygen/data-model/index/indexcompoundtype-dm.js +2 -45
  230. package/dist/doxygen/data-model/index/indexcompoundtype-dm.js.map +1 -1
  231. package/dist/doxygen/data-model/index/indexdoxygentype-dm.d.ts +0 -6
  232. package/dist/doxygen/data-model/index/indexdoxygentype-dm.d.ts.map +1 -1
  233. package/dist/doxygen/data-model/index/indexdoxygentype-dm.js +0 -41
  234. package/dist/doxygen/data-model/index/indexdoxygentype-dm.js.map +1 -1
  235. package/dist/doxygen/data-model/index/indexmembertype-dm.d.ts +0 -6
  236. package/dist/doxygen/data-model/index/indexmembertype-dm.d.ts.map +1 -1
  237. package/dist/doxygen/data-model/index/indexmembertype-dm.js +1 -43
  238. package/dist/doxygen/data-model/index/indexmembertype-dm.js.map +1 -1
  239. package/dist/doxygen/data-model/types.d.ts +1 -10
  240. package/dist/doxygen/data-model/types.d.ts.map +1 -1
  241. package/dist/doxygen/data-model/types.js +0 -15
  242. package/dist/doxygen/data-model/types.js.map +1 -1
  243. package/dist/index.d.ts +4 -16
  244. package/dist/index.d.ts.map +1 -1
  245. package/dist/index.js +4 -42
  246. package/dist/index.js.map +1 -1
  247. package/package.json +53 -56
  248. package/src/cli/main.ts +122 -0
  249. package/src/docusaurus/cli-options.ts +560 -0
  250. package/src/docusaurus/generator.ts +788 -0
  251. package/src/docusaurus/renderers/descriptiontype.ts +1299 -0
  252. package/src/docusaurus/renderers/docinternalstype.ts +354 -0
  253. package/src/docusaurus/renderers/doclisttype.ts +134 -0
  254. package/src/docusaurus/renderers/doctabletype.ts +220 -0
  255. package/src/docusaurus/renderers/doctitletype.ts +77 -0
  256. package/src/docusaurus/renderers/docvariablelisttype.ts +123 -0
  257. package/src/docusaurus/renderers/docxrefsecttype.ts +84 -0
  258. package/src/docusaurus/renderers/element-renderer-base.ts +112 -0
  259. package/src/docusaurus/renderers/inctype.ts +75 -0
  260. package/src/docusaurus/renderers/linkedtexttype.ts +64 -0
  261. package/src/docusaurus/renderers/listingtype.ts +235 -0
  262. package/src/docusaurus/renderers/paramtype.ts +116 -0
  263. package/src/docusaurus/renderers/referencetype.ts +83 -0
  264. package/src/docusaurus/renderers/reftexttype.ts +81 -0
  265. package/src/docusaurus/renderers/reftype.ts +77 -0
  266. package/src/docusaurus/renderers/renderers.ts +756 -0
  267. package/src/docusaurus/renderers/substringtype.ts +53 -0
  268. package/src/docusaurus/renderers/tableofcontentstype.ts +74 -0
  269. package/src/docusaurus/types.ts +187 -0
  270. package/src/docusaurus/utils.ts +409 -0
  271. package/src/docusaurus/view-model/README.md +12 -0
  272. package/src/docusaurus/view-model/classes-vm.ts +1088 -0
  273. package/src/docusaurus/view-model/collection-base.ts +352 -0
  274. package/src/docusaurus/view-model/compound-base-vm.ts +1340 -0
  275. package/src/docusaurus/view-model/concepts-vm.ts +719 -0
  276. package/src/docusaurus/view-model/description-anchors.ts +107 -0
  277. package/src/docusaurus/view-model/files-and-folders-vm.ts +1293 -0
  278. package/src/docusaurus/view-model/groups-vm.ts +548 -0
  279. package/src/docusaurus/view-model/members-vm.ts +1943 -0
  280. package/src/docusaurus/view-model/namespaces-vm.ts +1018 -0
  281. package/src/docusaurus/view-model/options.ts +95 -0
  282. package/src/docusaurus/view-model/pages-vm.ts +342 -0
  283. package/src/docusaurus/view-model/tree-entries-vm.ts +376 -0
  284. package/src/docusaurus/view-model/view-model.ts +513 -0
  285. package/src/docusaurus/workspace.ts +588 -0
  286. package/src/doxygen/data-model/README.md +13 -0
  287. package/src/doxygen/data-model/compounds/compounddef-dm.ts +1156 -0
  288. package/src/doxygen/data-model/compounds/compoundreftype-dm.ts +266 -0
  289. package/src/doxygen/data-model/compounds/descriptiontype-dm.ts +10107 -0
  290. package/src/doxygen/data-model/compounds/docvarlistentrytype-dm.ts +354 -0
  291. package/src/doxygen/data-model/compounds/doxygentype-dm.ts +187 -0
  292. package/src/doxygen/data-model/compounds/enumvaluetype-dm.ts +218 -0
  293. package/src/doxygen/data-model/compounds/inctype-dm.ts +217 -0
  294. package/src/doxygen/data-model/compounds/linkedtexttype-dm.ts +288 -0
  295. package/src/doxygen/data-model/compounds/listofallmemberstype-dm.ts +160 -0
  296. package/src/doxygen/data-model/compounds/locationtype-dm.ts +284 -0
  297. package/src/doxygen/data-model/compounds/memberdeftype-dm.ts +874 -0
  298. package/src/doxygen/data-model/compounds/memberreftype-dm.ts +270 -0
  299. package/src/doxygen/data-model/compounds/membertype-dm.ts +239 -0
  300. package/src/doxygen/data-model/compounds/paramtype-dm.ts +302 -0
  301. package/src/doxygen/data-model/compounds/referencetype-dm.ts +248 -0
  302. package/src/doxygen/data-model/compounds/reftexttype-dm.ts +234 -0
  303. package/src/doxygen/data-model/compounds/reftype-dm.ts +430 -0
  304. package/src/doxygen/data-model/compounds/reimplementtype-dm.ts +201 -0
  305. package/src/doxygen/data-model/compounds/sectiondeftype-dm.ts +330 -0
  306. package/src/doxygen/data-model/compounds/tableofcontentstype-dm.ts +563 -0
  307. package/src/doxygen/data-model/compounds/templateparamlisttype-dm.ts +150 -0
  308. package/src/doxygen/data-model/data-model.ts +377 -0
  309. package/src/doxygen/data-model/doxyfile/doxyfileoptiontype-dm.ts +271 -0
  310. package/src/doxygen/data-model/doxyfile/doxyfiletype-dm.ts +200 -0
  311. package/src/doxygen/data-model/doxygen-xml-parser.ts +522 -0
  312. package/src/doxygen/data-model/index/indexcompoundtype-dm.ts +256 -0
  313. package/src/doxygen/data-model/index/indexdoxygentype-dm.ts +196 -0
  314. package/src/doxygen/data-model/index/indexmembertype-dm.ts +230 -0
  315. package/src/doxygen/data-model/types.ts +175 -0
  316. package/src/doxygen/data-model/xsds/README.md +6 -0
  317. package/src/doxygen/data-model/xsds/compound.xsd +1699 -0
  318. package/src/doxygen/data-model/xsds/doxyfile.xsd +355 -0
  319. package/src/doxygen/data-model/xsds/index.xsd +72 -0
  320. package/src/doxygen/data-model/xsds/xml.xsd +23 -0
  321. package/src/index.ts +261 -0
  322. package/src/tsconfig.json +10 -0
  323. package/dist/doxygen2docusaurus.d.ts +0 -1147
  324. package/dist/tsconfig.tsbuildinfo +0 -1
  325. package/dist/tsdoc-metadata.json +0 -11
  326. /package/{template → templates}/css/custom.css +0 -0
  327. /package/{template → templates}/img/README.md +0 -0
  328. /package/{template → templates}/img/document-svgrepo-com.svg +0 -0
  329. /package/{template → templates}/img/folder-svgrepo-com.svg +0 -0
@@ -2,260 +2,24 @@ import { XMLParser } from 'fast-xml-parser';
2
2
  import { XmlElement } from './types.js';
3
3
  import { CliOptions } from '../../docusaurus/cli-options.js';
4
4
  import { AbstractDocImageType } from './compounds/descriptiontype-dm.js';
5
- /**
6
- * The DoxygenXmlParser class is responsible for parsing
7
- * Doxygen-generated XML files and constructing the internal data model.
8
- *
9
- * @remarks
10
- * This class initialises the XML parser with options that preserve the order
11
- * and structure of the original XML content, ensuring accurate conversion
12
- * for documentation purposes. It maintains a counter for the number of files
13
- * parsed and stores the resulting data model.
14
- *
15
- * @example
16
- * ```typescript
17
- * const parser = new DoxygenXmlParser({ options });
18
- * const dataModel = await parser.parse();
19
- * ```
20
- *
21
- * @public
22
- */
23
5
  export declare class DoxygenXmlParser {
24
- /**
25
- * The global configuration options.
26
- */
27
6
  options: CliOptions;
28
- /**
29
- * The XML parser instance configured for Doxygen XML.
30
- */
31
7
  xmlParser: XMLParser;
32
8
  images: AbstractDocImageType[];
33
- /**
34
- * Constructs a new instance of the DoxygenXmlParser class.
35
- *
36
- * @param options - The global configuration options
37
- *
38
- * @remarks
39
- * This constructor initialises the XML parser with settings that preserve the
40
- * order and structure of the original XML content, remove namespace prefixes,
41
- * and ensure that both tag and attribute values are parsed. The values are
42
- * not
43
- * trimmed, maintaining fidelity to the source XML. The provided options are
44
- * stored for use throughout the parsing process.
45
- */
46
9
  constructor(options: CliOptions);
47
- /**
48
- * Determines whether the specified XML element has any attributes.
49
- *
50
- * @param element - The XML element to inspect for attributes
51
- * @returns True if the element has attributes; otherwise, false
52
- *
53
- * @remarks
54
- * This method checks for the presence of the ':\@' property on the XML
55
- * element, which is the convention used by the XML parser for storing
56
- * attributes. If this property exists, the element has attributes; if not,
57
- * the element has no attributes. This is a prerequisite check before calling
58
- * {@link DoxygenXmlParser.getAttributesNames} or other attribute-related
59
- * methods.
60
- */
61
10
  hasAttributes(element: object): boolean;
62
- /**
63
- * Retrieves the names of all attributes present on the specified XML element.
64
- *
65
- * @param element - The XML element to inspect for attribute names
66
- * @returns An array of strings containing the names of all attributes
67
- *
68
- * @remarks
69
- * This method accesses the ':\@' property of the XML element, which is the
70
- * convention used by the XML parser for storing attributes, and returns the
71
- * keys of this object as an array of attribute names. The method assumes the
72
- * element has attributes and does not perform validation - use
73
- * {@link DoxygenXmlParser.hasAttributes} to check for attribute presence
74
- * first.
75
- */
76
11
  getAttributesNames(element: object): string[];
77
- /**
78
- * Determines whether the specified attribute exists on the given XML element.
79
- *
80
- * @param element - The XML element to inspect
81
- * @param name - The name of the attribute to check for
82
- * @returns True if the attribute exists; otherwise, false
83
- *
84
- * @remarks
85
- * This method checks for the presence of an attribute within the ':\@'
86
- * property of the XML element, which is the convention used by the XML
87
- * parser for storing attributes. It returns true if the attribute is found,
88
- * otherwise false.
89
- */
90
12
  hasAttribute(element: object, name: string): boolean;
91
- /**
92
- * Retrieves the value of a named attribute as a string.
93
- *
94
- * @param element - The XML element containing the attribute
95
- * @param name - The name of the attribute to retrieve
96
- * @returns The attribute value as a string
97
- * @throws If the attribute does not exist
98
- *
99
- * @remarks
100
- * This method checks whether the specified attribute exists on the XML
101
- * element and returns its value as a string. If the attribute value is
102
- * originally a number (as the XML parser may return numeric strings as
103
- * numbers), it is converted to a string to maintain consistency with the
104
- * DTD specification. If the attribute is missing, an error is thrown to
105
- * indicate the absence.
106
- */
107
13
  getAttributeStringValue(element: object, name: string): string;
108
- /**
109
- * Retrieves the value of a named attribute as a number.
110
- *
111
- * @param element - The XML element containing the attribute
112
- * @param name - The name of the attribute to retrieve
113
- * @returns The attribute value as a number
114
- * @throws If the attribute does not exist or is not a number
115
- *
116
- * @remarks
117
- * This method checks whether the specified attribute exists on the XML
118
- * element and returns its value as a number. If the attribute is missing
119
- * or its value is not a number, an error is thrown to indicate the absence
120
- * or incorrect type.
121
- */
122
14
  getAttributeNumberValue(element: object, name: string): number;
123
- /**
124
- * Retrieves the value of a named attribute as a boolean.
125
- *
126
- * @param element - The XML element containing the attribute
127
- * @param name - The name of the attribute to retrieve
128
- * @returns True if the attribute value is 'yes' (case-insensitive);
129
- * otherwise, false
130
- * @throws If the attribute does not exist or is not a string
131
- *
132
- * @remarks
133
- * This method checks whether the specified attribute exists on the XML
134
- * element, and returns true if its value is the string 'yes'
135
- * (case-insensitive). If the attribute is missing or its value is not a
136
- * string, an error is thrown.
137
- */
138
15
  getAttributeBooleanValue(element: object, name: string): boolean;
139
- /**
140
- * Determines whether the specified inner element exists on the given XML
141
- * element.
142
- *
143
- * @param element - The XML element to inspect
144
- * @param name - The name of the inner element to check for
145
- * @returns True if the inner element exists; otherwise, false
146
- *
147
- * @remarks
148
- * This method checks for the presence of a named property on the XML element.
149
- * For text nodes ('#text'), it verifies the value is a string, number, or
150
- * boolean. For other elements, it confirms the property is an array, as
151
- * per the XML parser's convention.
152
- */
153
16
  hasInnerElement(element: object, name: string): boolean;
154
- /**
155
- * Determines whether a named inner element contains text.
156
- *
157
- * @param element - The XML element to inspect
158
- * @param name - The name of the inner element
159
- * @returns True if the inner element contains text or is empty;
160
- * otherwise, false
161
- *
162
- * @remarks
163
- * This method checks if the specified inner element exists and contains a
164
- * single text node, or is an empty array (representing an empty string).
165
- * It asserts the expected structure and type of the value for robustness.
166
- */
167
17
  isInnerElementText(element: object, name: string): boolean;
168
- /**
169
- * Determines whether the XML element contains a text node.
170
- *
171
- * @param element - The XML element to inspect
172
- * @returns True if the element contains a text node; otherwise, false
173
- *
174
- * @remarks
175
- * This method checks for the presence of a '#text' property on the XML
176
- * element, and verifies that its value is a string, number, or boolean.
177
- */
178
18
  hasInnerText(element: object): boolean;
179
- /**
180
- * Retrieves an array of named child elements from the given XML element.
181
- *
182
- * @typeParam T - The expected type of the child elements array
183
- * (defaults to XmlElement[])
184
- * @param element - The XML element containing the child elements
185
- * @param name - The name of the child elements to retrieve
186
- * @returns The array of child elements
187
- * @throws If the child elements do not exist
188
- *
189
- * @remarks
190
- * This method accesses the specified property on the XML element and
191
- * returns it as an array of child elements. If the property is undefined,
192
- * an error is thrown indicating the absence of the expected child element.
193
- */
194
19
  getInnerElements<T = XmlElement[]>(element: object, name: string): T;
195
- /**
196
- * Retrieves the text content of a named child element.
197
- *
198
- * @param element - The XML element containing the child element
199
- * @param name - The name of the child element
200
- * @returns The text content of the child element
201
- * @throws If the child element does not exist or contains more than one
202
- * element
203
- *
204
- * @remarks
205
- * This method accesses the specified child element and returns its text
206
- * content. If the child element is missing, an error is thrown. If the
207
- * child element is empty, an empty string is returned. If there is more
208
- * than one child element, an error is thrown to indicate unexpected
209
- * structure.
210
- */
211
20
  getInnerElementText(element: object, name: string): string;
212
- /**
213
- * Retrieves the numeric value of a named child element.
214
- *
215
- * @param element - The XML element containing the child element
216
- * @param name - The name of the child element
217
- * @returns The numeric value of the child element
218
- * @throws If the child element does not exist or contains more than one
219
- * element
220
- *
221
- * @remarks
222
- * This method accesses the specified child element and returns its value
223
- * as a number. If the child element is missing, an error is thrown. If the
224
- * child element is empty, NaN is returned. If there is more than one child
225
- * element, an error is thrown to indicate unexpected structure.
226
- */
227
21
  getInnerElementNumber(element: object, name: string): number;
228
- /**
229
- * Retrieves the boolean value of a named child element.
230
- *
231
- * @param element - The XML element containing the child element
232
- * @param name - The name of the child element
233
- * @returns True if the child element's text is 'true'
234
- * (case-insensitive); otherwise, false
235
- * @throws If the child element does not exist or contains more than one
236
- * element
237
- *
238
- * @remarks
239
- * This method accesses the specified child element and returns its value
240
- * as a boolean. If the child element is missing, an error is thrown. If
241
- * the child element is empty, false is returned. If there is more than one
242
- * child element, an error is thrown to indicate unexpected structure.
243
- */
244
22
  getInnerElementBoolean(element: object, name: string): boolean;
245
- /**
246
- * Retrieves the text content of the XML element.
247
- *
248
- * @param element - The XML element to retrieve text from
249
- * @returns The text content of the element
250
- * @throws If the element does not contain a valid text node
251
- *
252
- * @remarks
253
- * This method accesses the '#text' property of the XML element and
254
- * returns its value as a string. It asserts that the value is of type
255
- * string, number, or boolean before converting it to a string. If the
256
- * property is missing or the value is of an unexpected type, an error is
257
- * thrown.
258
- */
259
23
  getInnerText(element: object): string;
260
24
  }
261
25
  //# sourceMappingURL=doxygen-xml-parser.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"doxygen-xml-parser.d.ts","sourceRoot":"","sources":["../../../src/doxygen/data-model/doxygen-xml-parser.ts"],"names":[],"mappings":"AAgCA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAA;AAIxE;;;;;;;;;;;;;;;;;GAiBG;AAEH,qBAAa,gBAAgB;IAC3B;;OAEG;IACH,OAAO,EAAE,UAAU,CAAA;IAEnB;;OAEG;IACH,SAAS,EAAE,SAAS,CAAA;IAEpB,MAAM,EAAE,oBAAoB,EAAE,CAAK;IAEnC;;;;;;;;;;;;OAYG;gBACS,OAAO,EAAE,UAAU;IAe/B;;;;;;;;;;;;;OAaG;IACH,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO;IAIvC;;;;;;;;;;;;;OAaG;IACH,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE;IAK7C;;;;;;;;;;;;OAYG;IACH,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO;IAUpD;;;;;;;;;;;;;;;OAeG;IACH,uBAAuB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM;IAoB9D;;;;;;;;;;;;;OAaG;IACH,uBAAuB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM;IAgB9D;;;;;;;;;;;;;;OAcG;IACH,wBAAwB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO;IAgBhE;;;;;;;;;;;;;OAaG;IACH,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO;IAoBvD;;;;;;;;;;;;OAYG;IACH,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO;IA6B1D;;;;;;;;;OASG;IACH,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO;IAetC;;;;;;;;;;;;;;OAcG;IAEH,gBAAgB,CAAC,CAAC,GAAG,UAAU,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC;IAapE;;;;;;;;;;;;;;;OAeG;IACH,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM;IAoB1D;;;;;;;;;;;;;;OAcG;IACH,qBAAqB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM;IAoB5D;;;;;;;;;;;;;;;OAeG;IACH,sBAAsB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO;IAqB9D;;;;;;;;;;;;;OAaG;IACH,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;CAUtC"}
1
+ {"version":3,"file":"doxygen-xml-parser.d.ts","sourceRoot":"","sources":["../../../src/doxygen/data-model/doxygen-xml-parser.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAA;AAyBxE,qBAAa,gBAAgB;IAQ3B,OAAO,EAAE,UAAU,CAAA;IAUnB,SAAS,EAAE,SAAS,CAAA;IASpB,MAAM,EAAE,oBAAoB,EAAE,CAAK;gBAcvB,OAAO,EAAE,UAAU;IA6B/B,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO;IAkBvC,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE;IAkB7C,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO;IA0BpD,uBAAuB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM;IAkC9D,uBAAuB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM;IA+B9D,wBAAwB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO;IA8BhE,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO;IAiCvD,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO;IAuC1D,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO;IA+BtC,gBAAgB,CAAC,CAAC,GAAG,UAAU,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC;IA6BpE,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM;IAmC1D,qBAAqB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM;IAoC5D,sBAAsB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO;IAmC9D,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;CAUtC"}
@@ -1,74 +1,10 @@
1
- /*
2
- * This file is part of the xPack project (http://xpack.github.io).
3
- * Copyright (c) 2025 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
- * @file doxygen-xml-parser.ts
14
- * @brief Provides the DoxygenXmlParser class for parsing Doxygen-generated
15
- * XML files.
16
- *
17
- * This module defines the {@link DoxygenXmlParser} class, which is responsible
18
- * for parsing XML output produced by Doxygen and constructing the internal
19
- * data model used by doxygen2docusaurus. It supports parsing the main index,
20
- * compound files, and configuration files, and provides utility methods for
21
- * extracting attributes and inner elements from the XML structure.
22
- *
23
- * The parser is designed to preserve the original XML content and element
24
- * order, ensuring accurate conversion to the documentation model. It is
25
- * intended for use within the xPack doxygen2docusaurus CLI tool.
26
- */
27
1
  import assert from 'node:assert';
28
2
  import * as util from 'node:util';
29
3
  import { XMLParser } from 'fast-xml-parser';
30
- // ----------------------------------------------------------------------------
31
- /**
32
- * The DoxygenXmlParser class is responsible for parsing
33
- * Doxygen-generated XML files and constructing the internal data model.
34
- *
35
- * @remarks
36
- * This class initialises the XML parser with options that preserve the order
37
- * and structure of the original XML content, ensuring accurate conversion
38
- * for documentation purposes. It maintains a counter for the number of files
39
- * parsed and stores the resulting data model.
40
- *
41
- * @example
42
- * ```typescript
43
- * const parser = new DoxygenXmlParser({ options });
44
- * const dataModel = await parser.parse();
45
- * ```
46
- *
47
- * @public
48
- */
49
4
  export class DoxygenXmlParser {
50
- /**
51
- * The global configuration options.
52
- */
53
5
  options;
54
- /**
55
- * The XML parser instance configured for Doxygen XML.
56
- */
57
6
  xmlParser;
58
7
  images = [];
59
- /**
60
- * Constructs a new instance of the DoxygenXmlParser class.
61
- *
62
- * @param options - The global configuration options
63
- *
64
- * @remarks
65
- * This constructor initialises the XML parser with settings that preserve the
66
- * order and structure of the original XML content, remove namespace prefixes,
67
- * and ensure that both tag and attribute values are parsed. The values are
68
- * not
69
- * trimmed, maintaining fidelity to the source XML. The provided options are
70
- * stored for use throughout the parsing process.
71
- */
72
8
  constructor(options) {
73
9
  this.options = options;
74
10
  this.xmlParser = new XMLParser({
@@ -80,58 +16,14 @@ export class DoxygenXmlParser {
80
16
  trimValues: false,
81
17
  });
82
18
  }
83
- // --------------------------------------------------------------------------
84
- /**
85
- * Determines whether the specified XML element has any attributes.
86
- *
87
- * @param element - The XML element to inspect for attributes
88
- * @returns True if the element has attributes; otherwise, false
89
- *
90
- * @remarks
91
- * This method checks for the presence of the ':\@' property on the XML
92
- * element, which is the convention used by the XML parser for storing
93
- * attributes. If this property exists, the element has attributes; if not,
94
- * the element has no attributes. This is a prerequisite check before calling
95
- * {@link DoxygenXmlParser.getAttributesNames} or other attribute-related
96
- * methods.
97
- */
98
19
  hasAttributes(element) {
99
20
  return Object.hasOwn(element, ':@');
100
21
  }
101
- /**
102
- * Retrieves the names of all attributes present on the specified XML element.
103
- *
104
- * @param element - The XML element to inspect for attribute names
105
- * @returns An array of strings containing the names of all attributes
106
- *
107
- * @remarks
108
- * This method accesses the ':\@' property of the XML element, which is the
109
- * convention used by the XML parser for storing attributes, and returns the
110
- * keys of this object as an array of attribute names. The method assumes the
111
- * element has attributes and does not perform validation - use
112
- * {@link DoxygenXmlParser.hasAttributes} to check for attribute presence
113
- * first.
114
- */
115
22
  getAttributesNames(element) {
116
- // eslint-disable-next-line @typescript-eslint/no-empty-object-type
117
23
  return Object.keys(element[':@']);
118
24
  }
119
- /**
120
- * Determines whether the specified attribute exists on the given XML element.
121
- *
122
- * @param element - The XML element to inspect
123
- * @param name - The name of the attribute to check for
124
- * @returns True if the attribute exists; otherwise, false
125
- *
126
- * @remarks
127
- * This method checks for the presence of an attribute within the ':\@'
128
- * property of the XML element, which is the convention used by the XML
129
- * parser for storing attributes. It returns true if the attribute is found,
130
- * otherwise false.
131
- */
132
25
  hasAttribute(element, name) {
133
26
  if (Object.hasOwn(element, ':@')) {
134
- // eslint-disable-next-line @typescript-eslint/no-empty-object-type
135
27
  const elementWithAttributes = element;
136
28
  return Object.hasOwn(elementWithAttributes[':@'], name);
137
29
  }
@@ -139,22 +31,6 @@ export class DoxygenXmlParser {
139
31
  return false;
140
32
  }
141
33
  }
142
- /**
143
- * Retrieves the value of a named attribute as a string.
144
- *
145
- * @param element - The XML element containing the attribute
146
- * @param name - The name of the attribute to retrieve
147
- * @returns The attribute value as a string
148
- * @throws If the attribute does not exist
149
- *
150
- * @remarks
151
- * This method checks whether the specified attribute exists on the XML
152
- * element and returns its value as a string. If the attribute value is
153
- * originally a number (as the XML parser may return numeric strings as
154
- * numbers), it is converted to a string to maintain consistency with the
155
- * DTD specification. If the attribute is missing, an error is thrown to
156
- * indicate the absence.
157
- */
158
34
  getAttributeStringValue(element, name) {
159
35
  if (this.hasAttribute(element, name)) {
160
36
  const elementWithNamedAttribute = element[':@'];
@@ -163,28 +39,11 @@ export class DoxygenXmlParser {
163
39
  return attributeValue;
164
40
  }
165
41
  else if (typeof attributeValue === 'number') {
166
- // The xml parser returns attributes like `refid="21"` as numbers,
167
- // but the DTD defines them as strings and the applications expects
168
- // strings.
169
42
  return String(attributeValue);
170
43
  }
171
44
  }
172
45
  throw new Error(`Element ${util.inspect(element)} does not have the ${name} attribute`);
173
46
  }
174
- /**
175
- * Retrieves the value of a named attribute as a number.
176
- *
177
- * @param element - The XML element containing the attribute
178
- * @param name - The name of the attribute to retrieve
179
- * @returns The attribute value as a number
180
- * @throws If the attribute does not exist or is not a number
181
- *
182
- * @remarks
183
- * This method checks whether the specified attribute exists on the XML
184
- * element and returns its value as a number. If the attribute is missing
185
- * or its value is not a number, an error is thrown to indicate the absence
186
- * or incorrect type.
187
- */
188
47
  getAttributeNumberValue(element, name) {
189
48
  if (this.hasAttribute(element, name)) {
190
49
  const elementWithNamedAttribute = element[':@'];
@@ -196,21 +55,6 @@ export class DoxygenXmlParser {
196
55
  throw new Error(`Element ${util.inspect(element)} does not have the ${name} number ` +
197
56
  'attribute');
198
57
  }
199
- /**
200
- * Retrieves the value of a named attribute as a boolean.
201
- *
202
- * @param element - The XML element containing the attribute
203
- * @param name - The name of the attribute to retrieve
204
- * @returns True if the attribute value is 'yes' (case-insensitive);
205
- * otherwise, false
206
- * @throws If the attribute does not exist or is not a string
207
- *
208
- * @remarks
209
- * This method checks whether the specified attribute exists on the XML
210
- * element, and returns true if its value is the string 'yes'
211
- * (case-insensitive). If the attribute is missing or its value is not a
212
- * string, an error is thrown.
213
- */
214
58
  getAttributeBooleanValue(element, name) {
215
59
  if (this.hasAttribute(element, name)) {
216
60
  const elementWithNamedAttribute = element[':@'];
@@ -222,20 +66,6 @@ export class DoxygenXmlParser {
222
66
  throw new Error(`Element ${util.inspect(element)} does not have the ${name} ` +
223
67
  'boolean attribute');
224
68
  }
225
- /**
226
- * Determines whether the specified inner element exists on the given XML
227
- * element.
228
- *
229
- * @param element - The XML element to inspect
230
- * @param name - The name of the inner element to check for
231
- * @returns True if the inner element exists; otherwise, false
232
- *
233
- * @remarks
234
- * This method checks for the presence of a named property on the XML element.
235
- * For text nodes ('#text'), it verifies the value is a string, number, or
236
- * boolean. For other elements, it confirms the property is an array, as
237
- * per the XML parser's convention.
238
- */
239
69
  hasInnerElement(element, name) {
240
70
  if (Object.hasOwn(element, name)) {
241
71
  if (name === '#text') {
@@ -245,7 +75,6 @@ export class DoxygenXmlParser {
245
75
  typeof value === 'boolean');
246
76
  }
247
77
  else {
248
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
249
78
  return Array.isArray(element[name]);
250
79
  }
251
80
  }
@@ -253,27 +82,10 @@ export class DoxygenXmlParser {
253
82
  return false;
254
83
  }
255
84
  }
256
- /**
257
- * Determines whether a named inner element contains text.
258
- *
259
- * @param element - The XML element to inspect
260
- * @param name - The name of the inner element
261
- * @returns True if the inner element contains text or is empty;
262
- * otherwise, false
263
- *
264
- * @remarks
265
- * This method checks if the specified inner element exists and contains a
266
- * single text node, or is an empty array (representing an empty string).
267
- * It asserts the expected structure and type of the value for robustness.
268
- */
269
85
  isInnerElementText(element, name) {
270
86
  if (Object.hasOwn(element, name)) {
271
87
  const innerElements = element[name];
272
- // console.log('isInnerElementText', util.inspect(element,
273
- // { compact: false, depth: 999 })
274
- // assert(innerElements !== undefined)
275
88
  if (innerElements.length === 1) {
276
- // assert(innerElements[0] !== undefined)
277
89
  if (Object.hasOwn(innerElements[0], '#text')) {
278
90
  const value = innerElements[0]['#text'];
279
91
  assert(typeof value === 'string' ||
@@ -283,22 +95,11 @@ export class DoxygenXmlParser {
283
95
  }
284
96
  }
285
97
  else if (innerElements.length === 0) {
286
- // Empty string.
287
98
  return true;
288
99
  }
289
100
  }
290
101
  return false;
291
102
  }
292
- /**
293
- * Determines whether the XML element contains a text node.
294
- *
295
- * @param element - The XML element to inspect
296
- * @returns True if the element contains a text node; otherwise, false
297
- *
298
- * @remarks
299
- * This method checks for the presence of a '#text' property on the XML
300
- * element, and verifies that its value is a string, number, or boolean.
301
- */
302
103
  hasInnerText(element) {
303
104
  if (Object.hasOwn(element, '#text')) {
304
105
  const value = element['#text'];
@@ -310,25 +111,7 @@ export class DoxygenXmlParser {
310
111
  return false;
311
112
  }
312
113
  }
313
- /**
314
- * Retrieves an array of named child elements from the given XML element.
315
- *
316
- * @typeParam T - The expected type of the child elements array
317
- * (defaults to XmlElement[])
318
- * @param element - The XML element containing the child elements
319
- * @param name - The name of the child elements to retrieve
320
- * @returns The array of child elements
321
- * @throws If the child elements do not exist
322
- *
323
- * @remarks
324
- * This method accesses the specified property on the XML element and
325
- * returns it as an array of child elements. If the property is undefined,
326
- * an error is thrown indicating the absence of the expected child element.
327
- */
328
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
329
114
  getInnerElements(element, name) {
330
- // assert(Object.hasOwn(element, name) === true &&
331
- // Array.isArray((element as { [name]: T })[name]))
332
115
  const innerElements = element[name];
333
116
  if (innerElements !== undefined) {
334
117
  return innerElements;
@@ -336,27 +119,8 @@ export class DoxygenXmlParser {
336
119
  throw new Error(`Element ${util.inspect(element, { compact: false, depth: 999 })} ` +
337
120
  `does not have the ${name} child element`);
338
121
  }
339
- /**
340
- * Retrieves the text content of a named child element.
341
- *
342
- * @param element - The XML element containing the child element
343
- * @param name - The name of the child element
344
- * @returns The text content of the child element
345
- * @throws If the child element does not exist or contains more than one
346
- * element
347
- *
348
- * @remarks
349
- * This method accesses the specified child element and returns its text
350
- * content. If the child element is missing, an error is thrown. If the
351
- * child element is empty, an empty string is returned. If there is more
352
- * than one child element, an error is thrown to indicate unexpected
353
- * structure.
354
- */
355
122
  getInnerElementText(element, name) {
356
123
  const innerElements = element[name];
357
- // if (innerElements === undefined) {
358
- // throw new Error('No inner elements')
359
- // }
360
124
  if (innerElements.length === 1) {
361
125
  const value = innerElements[0]['#text'];
362
126
  return value.toString();
@@ -368,26 +132,8 @@ export class DoxygenXmlParser {
368
132
  throw new Error('Too many elements');
369
133
  }
370
134
  }
371
- /**
372
- * Retrieves the numeric value of a named child element.
373
- *
374
- * @param element - The XML element containing the child element
375
- * @param name - The name of the child element
376
- * @returns The numeric value of the child element
377
- * @throws If the child element does not exist or contains more than one
378
- * element
379
- *
380
- * @remarks
381
- * This method accesses the specified child element and returns its value
382
- * as a number. If the child element is missing, an error is thrown. If the
383
- * child element is empty, NaN is returned. If there is more than one child
384
- * element, an error is thrown to indicate unexpected structure.
385
- */
386
135
  getInnerElementNumber(element, name) {
387
136
  const innerElements = element[name];
388
- // if (innerElements === undefined) {
389
- // throw new Error('No inner elements')
390
- // }
391
137
  if (innerElements.length === 1) {
392
138
  const value = innerElements[0]['#text'];
393
139
  return parseInt(value.toString());
@@ -399,27 +145,8 @@ export class DoxygenXmlParser {
399
145
  throw new Error('Too many elements');
400
146
  }
401
147
  }
402
- /**
403
- * Retrieves the boolean value of a named child element.
404
- *
405
- * @param element - The XML element containing the child element
406
- * @param name - The name of the child element
407
- * @returns True if the child element's text is 'true'
408
- * (case-insensitive); otherwise, false
409
- * @throws If the child element does not exist or contains more than one
410
- * element
411
- *
412
- * @remarks
413
- * This method accesses the specified child element and returns its value
414
- * as a boolean. If the child element is missing, an error is thrown. If
415
- * the child element is empty, false is returned. If there is more than one
416
- * child element, an error is thrown to indicate unexpected structure.
417
- */
418
148
  getInnerElementBoolean(element, name) {
419
149
  const innerElements = element[name];
420
- // if (innerElements === undefined) {
421
- // throw new Error('No inner elements')
422
- // }
423
150
  if (innerElements.length === 1) {
424
151
  const textValue = innerElements[0]['#text'];
425
152
  const value = textValue.toString().trim().toLowerCase();
@@ -432,22 +159,7 @@ export class DoxygenXmlParser {
432
159
  throw new Error('Too many elements');
433
160
  }
434
161
  }
435
- /**
436
- * Retrieves the text content of the XML element.
437
- *
438
- * @param element - The XML element to retrieve text from
439
- * @returns The text content of the element
440
- * @throws If the element does not contain a valid text node
441
- *
442
- * @remarks
443
- * This method accesses the '#text' property of the XML element and
444
- * returns its value as a string. It asserts that the value is of type
445
- * string, number, or boolean before converting it to a string. If the
446
- * property is missing or the value is of an unexpected type, an error is
447
- * thrown.
448
- */
449
162
  getInnerText(element) {
450
- // assert(Object.hasOwn(element, '#text') === true)
451
163
  const value = element['#text'];
452
164
  assert(typeof value === 'string' ||
453
165
  typeof value === 'number' ||
@@ -455,5 +167,4 @@ export class DoxygenXmlParser {
455
167
  return value.toString();
456
168
  }
457
169
  }
458
- // ----------------------------------------------------------------------------
459
170
  //# sourceMappingURL=doxygen-xml-parser.js.map