@xpack/doxygen2docusaurus 1.1.0 → 2.0.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 (266) hide show
  1. package/README.md +3 -3
  2. package/dist/cli/main.d.ts +6 -0
  3. package/dist/cli/main.d.ts.map +1 -1
  4. package/dist/cli/main.js +7 -1
  5. package/dist/cli/main.js.map +1 -1
  6. package/dist/docusaurus/cli-options.d.ts +266 -38
  7. package/dist/docusaurus/cli-options.d.ts.map +1 -1
  8. package/dist/docusaurus/cli-options.js +252 -43
  9. package/dist/docusaurus/cli-options.js.map +1 -1
  10. package/dist/docusaurus/generator.d.ts +179 -4
  11. package/dist/docusaurus/generator.d.ts.map +1 -1
  12. package/dist/docusaurus/generator.js +215 -45
  13. package/dist/docusaurus/generator.js.map +1 -1
  14. package/dist/docusaurus/renderers/descriptiontype.d.ts +417 -0
  15. package/dist/docusaurus/renderers/descriptiontype.d.ts.map +1 -1
  16. package/dist/docusaurus/renderers/descriptiontype.js +417 -0
  17. package/dist/docusaurus/renderers/descriptiontype.js.map +1 -1
  18. package/dist/docusaurus/renderers/docinternalstype.d.ts +132 -0
  19. package/dist/docusaurus/renderers/docinternalstype.d.ts.map +1 -1
  20. package/dist/docusaurus/renderers/docinternalstype.js +132 -0
  21. package/dist/docusaurus/renderers/docinternalstype.js.map +1 -1
  22. package/dist/docusaurus/renderers/doclisttype.d.ts +22 -0
  23. package/dist/docusaurus/renderers/doclisttype.d.ts.map +1 -1
  24. package/dist/docusaurus/renderers/doclisttype.js +22 -2
  25. package/dist/docusaurus/renderers/doclisttype.js.map +1 -1
  26. package/dist/docusaurus/renderers/doctabletype.d.ts +88 -0
  27. package/dist/docusaurus/renderers/doctabletype.d.ts.map +1 -1
  28. package/dist/docusaurus/renderers/doctabletype.js +88 -0
  29. package/dist/docusaurus/renderers/doctabletype.js.map +1 -1
  30. package/dist/docusaurus/renderers/doctitletype.d.ts +22 -0
  31. package/dist/docusaurus/renderers/doctitletype.d.ts.map +1 -1
  32. package/dist/docusaurus/renderers/doctitletype.js +22 -0
  33. package/dist/docusaurus/renderers/doctitletype.js.map +1 -1
  34. package/dist/docusaurus/renderers/docvariablelisttype.d.ts +44 -0
  35. package/dist/docusaurus/renderers/docvariablelisttype.d.ts.map +1 -1
  36. package/dist/docusaurus/renderers/docvariablelisttype.js +44 -0
  37. package/dist/docusaurus/renderers/docvariablelisttype.js.map +1 -1
  38. package/dist/docusaurus/renderers/docxrefsecttype.d.ts +22 -0
  39. package/dist/docusaurus/renderers/docxrefsecttype.d.ts.map +1 -1
  40. package/dist/docusaurus/renderers/docxrefsecttype.js +22 -0
  41. package/dist/docusaurus/renderers/docxrefsecttype.js.map +1 -1
  42. package/dist/docusaurus/renderers/element-renderer-base.d.ts +74 -0
  43. package/dist/docusaurus/renderers/element-renderer-base.d.ts.map +1 -1
  44. package/dist/docusaurus/renderers/element-renderer-base.js +52 -0
  45. package/dist/docusaurus/renderers/element-renderer-base.js.map +1 -1
  46. package/dist/docusaurus/renderers/inctype.d.ts +23 -0
  47. package/dist/docusaurus/renderers/inctype.d.ts.map +1 -1
  48. package/dist/docusaurus/renderers/inctype.js +23 -0
  49. package/dist/docusaurus/renderers/inctype.js.map +1 -1
  50. package/dist/docusaurus/renderers/linkedtexttype.d.ts +22 -0
  51. package/dist/docusaurus/renderers/linkedtexttype.d.ts.map +1 -1
  52. package/dist/docusaurus/renderers/linkedtexttype.js +22 -0
  53. package/dist/docusaurus/renderers/linkedtexttype.js.map +1 -1
  54. package/dist/docusaurus/renderers/listingtype.d.ts +52 -0
  55. package/dist/docusaurus/renderers/listingtype.d.ts.map +1 -1
  56. package/dist/docusaurus/renderers/listingtype.js +66 -2
  57. package/dist/docusaurus/renderers/listingtype.js.map +1 -1
  58. package/dist/docusaurus/renderers/paramtype.d.ts +22 -0
  59. package/dist/docusaurus/renderers/paramtype.d.ts.map +1 -1
  60. package/dist/docusaurus/renderers/paramtype.js +22 -0
  61. package/dist/docusaurus/renderers/paramtype.js.map +1 -1
  62. package/dist/docusaurus/renderers/referencetype.d.ts +23 -0
  63. package/dist/docusaurus/renderers/referencetype.d.ts.map +1 -1
  64. package/dist/docusaurus/renderers/referencetype.js +23 -2
  65. package/dist/docusaurus/renderers/referencetype.js.map +1 -1
  66. package/dist/docusaurus/renderers/reftexttype.d.ts +22 -0
  67. package/dist/docusaurus/renderers/reftexttype.d.ts.map +1 -1
  68. package/dist/docusaurus/renderers/reftexttype.js +22 -0
  69. package/dist/docusaurus/renderers/reftexttype.js.map +1 -1
  70. package/dist/docusaurus/renderers/reftype.d.ts +22 -0
  71. package/dist/docusaurus/renderers/reftype.d.ts.map +1 -1
  72. package/dist/docusaurus/renderers/reftype.js +22 -0
  73. package/dist/docusaurus/renderers/reftype.js.map +1 -1
  74. package/dist/docusaurus/renderers/renderers.d.ts +151 -0
  75. package/dist/docusaurus/renderers/renderers.d.ts.map +1 -1
  76. package/dist/docusaurus/renderers/renderers.js +151 -0
  77. package/dist/docusaurus/renderers/renderers.js.map +1 -1
  78. package/dist/docusaurus/renderers/substringtype.d.ts +22 -0
  79. package/dist/docusaurus/renderers/substringtype.d.ts.map +1 -1
  80. package/dist/docusaurus/renderers/substringtype.js +22 -0
  81. package/dist/docusaurus/renderers/substringtype.js.map +1 -1
  82. package/dist/docusaurus/renderers/tableofcontentstype.d.ts +22 -0
  83. package/dist/docusaurus/renderers/tableofcontentstype.d.ts.map +1 -1
  84. package/dist/docusaurus/renderers/tableofcontentstype.js +22 -0
  85. package/dist/docusaurus/renderers/tableofcontentstype.js.map +1 -1
  86. package/dist/docusaurus/types.d.ts +114 -8
  87. package/dist/docusaurus/types.d.ts.map +1 -1
  88. package/dist/docusaurus/types.js.map +1 -1
  89. package/dist/docusaurus/utils.d.ts +214 -0
  90. package/dist/docusaurus/utils.d.ts.map +1 -1
  91. package/dist/docusaurus/utils.js +214 -0
  92. package/dist/docusaurus/utils.js.map +1 -1
  93. package/dist/docusaurus/view-model/classes-vm.d.ts +139 -2
  94. package/dist/docusaurus/view-model/classes-vm.d.ts.map +1 -1
  95. package/dist/docusaurus/view-model/classes-vm.js +147 -6
  96. package/dist/docusaurus/view-model/classes-vm.js.map +1 -1
  97. package/dist/docusaurus/view-model/collection-base.d.ts +122 -2
  98. package/dist/docusaurus/view-model/collection-base.d.ts.map +1 -1
  99. package/dist/docusaurus/view-model/collection-base.js +78 -0
  100. package/dist/docusaurus/view-model/collection-base.js.map +1 -1
  101. package/dist/docusaurus/view-model/compound-base-vm.d.ts +134 -19
  102. package/dist/docusaurus/view-model/compound-base-vm.d.ts.map +1 -1
  103. package/dist/docusaurus/view-model/compound-base-vm.js +122 -26
  104. package/dist/docusaurus/view-model/compound-base-vm.js.map +1 -1
  105. package/dist/docusaurus/view-model/description-anchors.d.ts +58 -0
  106. package/dist/docusaurus/view-model/description-anchors.d.ts.map +1 -1
  107. package/dist/docusaurus/view-model/description-anchors.js +58 -0
  108. package/dist/docusaurus/view-model/description-anchors.js.map +1 -1
  109. package/dist/docusaurus/view-model/files-and-folders-vm.d.ts +249 -2
  110. package/dist/docusaurus/view-model/files-and-folders-vm.d.ts.map +1 -1
  111. package/dist/docusaurus/view-model/files-and-folders-vm.js +250 -4
  112. package/dist/docusaurus/view-model/files-and-folders-vm.js.map +1 -1
  113. package/dist/docusaurus/view-model/groups-vm.d.ts +150 -2
  114. package/dist/docusaurus/view-model/groups-vm.d.ts.map +1 -1
  115. package/dist/docusaurus/view-model/groups-vm.js +153 -5
  116. package/dist/docusaurus/view-model/groups-vm.js.map +1 -1
  117. package/dist/docusaurus/view-model/members-vm.d.ts +552 -0
  118. package/dist/docusaurus/view-model/members-vm.d.ts.map +1 -1
  119. package/dist/docusaurus/view-model/members-vm.js +552 -4
  120. package/dist/docusaurus/view-model/members-vm.js.map +1 -1
  121. package/dist/docusaurus/view-model/namespaces-vm.d.ts +201 -2
  122. package/dist/docusaurus/view-model/namespaces-vm.d.ts.map +1 -1
  123. package/dist/docusaurus/view-model/namespaces-vm.js +202 -4
  124. package/dist/docusaurus/view-model/namespaces-vm.js.map +1 -1
  125. package/dist/docusaurus/view-model/options.d.ts +43 -0
  126. package/dist/docusaurus/view-model/options.d.ts.map +1 -1
  127. package/dist/docusaurus/view-model/options.js +43 -0
  128. package/dist/docusaurus/view-model/options.js.map +1 -1
  129. package/dist/docusaurus/view-model/pages-vm.d.ts +117 -2
  130. package/dist/docusaurus/view-model/pages-vm.d.ts.map +1 -1
  131. package/dist/docusaurus/view-model/pages-vm.js +119 -4
  132. package/dist/docusaurus/view-model/pages-vm.js.map +1 -1
  133. package/dist/docusaurus/view-model/tree-entries-vm.d.ts +135 -15
  134. package/dist/docusaurus/view-model/tree-entries-vm.d.ts.map +1 -1
  135. package/dist/docusaurus/view-model/tree-entries-vm.js +136 -16
  136. package/dist/docusaurus/view-model/tree-entries-vm.js.map +1 -1
  137. package/dist/docusaurus/view-model/view-model.d.ts +119 -0
  138. package/dist/docusaurus/view-model/view-model.d.ts.map +1 -1
  139. package/dist/docusaurus/view-model/view-model.js +119 -0
  140. package/dist/docusaurus/view-model/view-model.js.map +1 -1
  141. package/dist/docusaurus/workspace.d.ts +106 -0
  142. package/dist/docusaurus/workspace.d.ts.map +1 -1
  143. package/dist/docusaurus/workspace.js +107 -1
  144. package/dist/docusaurus/workspace.js.map +1 -1
  145. package/dist/doxygen/data-model/compounds/compounddef-dm.d.ts +485 -0
  146. package/dist/doxygen/data-model/compounds/compounddef-dm.d.ts.map +1 -1
  147. package/dist/doxygen/data-model/compounds/compounddef-dm.js +485 -0
  148. package/dist/doxygen/data-model/compounds/compounddef-dm.js.map +1 -1
  149. package/dist/doxygen/data-model/compounds/compoundreftype-dm.d.ts +120 -0
  150. package/dist/doxygen/data-model/compounds/compoundreftype-dm.d.ts.map +1 -1
  151. package/dist/doxygen/data-model/compounds/compoundreftype-dm.js +98 -0
  152. package/dist/doxygen/data-model/compounds/compoundreftype-dm.js.map +1 -1
  153. package/dist/doxygen/data-model/compounds/descriptiontype-dm.d.ts +2705 -0
  154. package/dist/doxygen/data-model/compounds/descriptiontype-dm.d.ts.map +1 -1
  155. package/dist/doxygen/data-model/compounds/descriptiontype-dm.js +2677 -47
  156. package/dist/doxygen/data-model/compounds/descriptiontype-dm.js.map +1 -1
  157. package/dist/doxygen/data-model/compounds/docvarlistentrytype-dm.d.ts +165 -0
  158. package/dist/doxygen/data-model/compounds/docvarlistentrytype-dm.d.ts.map +1 -1
  159. package/dist/doxygen/data-model/compounds/docvarlistentrytype-dm.js +165 -0
  160. package/dist/doxygen/data-model/compounds/docvarlistentrytype-dm.js.map +1 -1
  161. package/dist/doxygen/data-model/compounds/doxygentype-dm.d.ts +70 -0
  162. package/dist/doxygen/data-model/compounds/doxygentype-dm.d.ts.map +1 -1
  163. package/dist/doxygen/data-model/compounds/doxygentype-dm.js +70 -0
  164. package/dist/doxygen/data-model/compounds/doxygentype-dm.js.map +1 -1
  165. package/dist/doxygen/data-model/compounds/enumvaluetype-dm.d.ts +78 -0
  166. package/dist/doxygen/data-model/compounds/enumvaluetype-dm.d.ts.map +1 -1
  167. package/dist/doxygen/data-model/compounds/enumvaluetype-dm.js +78 -0
  168. package/dist/doxygen/data-model/compounds/enumvaluetype-dm.js.map +1 -1
  169. package/dist/doxygen/data-model/compounds/inctype-dm.d.ts +107 -0
  170. package/dist/doxygen/data-model/compounds/inctype-dm.d.ts.map +1 -1
  171. package/dist/doxygen/data-model/compounds/inctype-dm.js +107 -0
  172. package/dist/doxygen/data-model/compounds/inctype-dm.js.map +1 -1
  173. package/dist/doxygen/data-model/compounds/linkedtexttype-dm.d.ts +123 -0
  174. package/dist/doxygen/data-model/compounds/linkedtexttype-dm.d.ts.map +1 -1
  175. package/dist/doxygen/data-model/compounds/linkedtexttype-dm.js +123 -0
  176. package/dist/doxygen/data-model/compounds/linkedtexttype-dm.js.map +1 -1
  177. package/dist/doxygen/data-model/compounds/listofallmemberstype-dm.d.ts +70 -0
  178. package/dist/doxygen/data-model/compounds/listofallmemberstype-dm.d.ts.map +1 -1
  179. package/dist/doxygen/data-model/compounds/listofallmemberstype-dm.js +70 -1
  180. package/dist/doxygen/data-model/compounds/listofallmemberstype-dm.js.map +1 -1
  181. package/dist/doxygen/data-model/compounds/locationtype-dm.d.ts +156 -0
  182. package/dist/doxygen/data-model/compounds/locationtype-dm.d.ts.map +1 -1
  183. package/dist/doxygen/data-model/compounds/locationtype-dm.js +156 -5
  184. package/dist/doxygen/data-model/compounds/locationtype-dm.js.map +1 -1
  185. package/dist/doxygen/data-model/compounds/memberdeftype-dm.d.ts +433 -0
  186. package/dist/doxygen/data-model/compounds/memberdeftype-dm.d.ts.map +1 -1
  187. package/dist/doxygen/data-model/compounds/memberdeftype-dm.js +417 -6
  188. package/dist/doxygen/data-model/compounds/memberdeftype-dm.js.map +1 -1
  189. package/dist/doxygen/data-model/compounds/memberreftype-dm.d.ts +135 -0
  190. package/dist/doxygen/data-model/compounds/memberreftype-dm.d.ts.map +1 -1
  191. package/dist/doxygen/data-model/compounds/memberreftype-dm.js +136 -4
  192. package/dist/doxygen/data-model/compounds/memberreftype-dm.js.map +1 -1
  193. package/dist/doxygen/data-model/compounds/membertype-dm.d.ts +95 -0
  194. package/dist/doxygen/data-model/compounds/membertype-dm.d.ts.map +1 -1
  195. package/dist/doxygen/data-model/compounds/membertype-dm.js +76 -4
  196. package/dist/doxygen/data-model/compounds/membertype-dm.js.map +1 -1
  197. package/dist/doxygen/data-model/compounds/paramtype-dm.d.ts +158 -0
  198. package/dist/doxygen/data-model/compounds/paramtype-dm.d.ts.map +1 -1
  199. package/dist/doxygen/data-model/compounds/paramtype-dm.js +158 -1
  200. package/dist/doxygen/data-model/compounds/paramtype-dm.js.map +1 -1
  201. package/dist/doxygen/data-model/compounds/referencetype-dm.d.ts +130 -0
  202. package/dist/doxygen/data-model/compounds/referencetype-dm.d.ts.map +1 -1
  203. package/dist/doxygen/data-model/compounds/referencetype-dm.js +130 -2
  204. package/dist/doxygen/data-model/compounds/referencetype-dm.js.map +1 -1
  205. package/dist/doxygen/data-model/compounds/reftexttype-dm.d.ts +120 -0
  206. package/dist/doxygen/data-model/compounds/reftexttype-dm.d.ts.map +1 -1
  207. package/dist/doxygen/data-model/compounds/reftexttype-dm.js +106 -3
  208. package/dist/doxygen/data-model/compounds/reftexttype-dm.js.map +1 -1
  209. package/dist/doxygen/data-model/compounds/reftype-dm.d.ts +247 -0
  210. package/dist/doxygen/data-model/compounds/reftype-dm.d.ts.map +1 -1
  211. package/dist/doxygen/data-model/compounds/reftype-dm.js +247 -3
  212. package/dist/doxygen/data-model/compounds/reftype-dm.js.map +1 -1
  213. package/dist/doxygen/data-model/compounds/reimplementtype-dm.d.ts +99 -0
  214. package/dist/doxygen/data-model/compounds/reimplementtype-dm.d.ts.map +1 -1
  215. package/dist/doxygen/data-model/compounds/reimplementtype-dm.js +99 -2
  216. package/dist/doxygen/data-model/compounds/reimplementtype-dm.js.map +1 -1
  217. package/dist/doxygen/data-model/compounds/sectiondeftype-dm.d.ts +159 -0
  218. package/dist/doxygen/data-model/compounds/sectiondeftype-dm.d.ts.map +1 -1
  219. package/dist/doxygen/data-model/compounds/sectiondeftype-dm.js +159 -3
  220. package/dist/doxygen/data-model/compounds/sectiondeftype-dm.js.map +1 -1
  221. package/dist/doxygen/data-model/compounds/tableofcontentstype-dm.d.ts +255 -0
  222. package/dist/doxygen/data-model/compounds/tableofcontentstype-dm.d.ts.map +1 -1
  223. package/dist/doxygen/data-model/compounds/tableofcontentstype-dm.js +255 -6
  224. package/dist/doxygen/data-model/compounds/tableofcontentstype-dm.js.map +1 -1
  225. package/dist/doxygen/data-model/compounds/templateparamlisttype-dm.d.ts +60 -0
  226. package/dist/doxygen/data-model/compounds/templateparamlisttype-dm.d.ts.map +1 -1
  227. package/dist/doxygen/data-model/compounds/templateparamlisttype-dm.js +60 -1
  228. package/dist/doxygen/data-model/compounds/templateparamlisttype-dm.js.map +1 -1
  229. package/dist/doxygen/data-model/data-model.d.ts +86 -2
  230. package/dist/doxygen/data-model/data-model.d.ts.map +1 -1
  231. package/dist/doxygen/data-model/data-model.js +86 -4
  232. package/dist/doxygen/data-model/data-model.js.map +1 -1
  233. package/dist/doxygen/data-model/doxyfile/doxyfileoptiontype-dm.d.ts +109 -0
  234. package/dist/doxygen/data-model/doxyfile/doxyfileoptiontype-dm.d.ts.map +1 -1
  235. package/dist/doxygen/data-model/doxyfile/doxyfileoptiontype-dm.js +84 -2
  236. package/dist/doxygen/data-model/doxyfile/doxyfileoptiontype-dm.js.map +1 -1
  237. package/dist/doxygen/data-model/doxyfile/doxyfiletype-dm.d.ts +81 -0
  238. package/dist/doxygen/data-model/doxyfile/doxyfiletype-dm.d.ts.map +1 -1
  239. package/dist/doxygen/data-model/doxyfile/doxyfiletype-dm.js +81 -3
  240. package/dist/doxygen/data-model/doxyfile/doxyfiletype-dm.js.map +1 -1
  241. package/dist/doxygen/data-model/doxygen-xml-parser.d.ts +24 -7
  242. package/dist/doxygen/data-model/doxygen-xml-parser.d.ts.map +1 -1
  243. package/dist/doxygen/data-model/doxygen-xml-parser.js +24 -22
  244. package/dist/doxygen/data-model/doxygen-xml-parser.js.map +1 -1
  245. package/dist/doxygen/data-model/index/indexcompoundtype-dm.d.ts +92 -0
  246. package/dist/doxygen/data-model/index/indexcompoundtype-dm.d.ts.map +1 -1
  247. package/dist/doxygen/data-model/index/indexcompoundtype-dm.js +79 -2
  248. package/dist/doxygen/data-model/index/indexcompoundtype-dm.js.map +1 -1
  249. package/dist/doxygen/data-model/index/indexdoxygentype-dm.d.ts +76 -0
  250. package/dist/doxygen/data-model/index/indexdoxygentype-dm.d.ts.map +1 -1
  251. package/dist/doxygen/data-model/index/indexdoxygentype-dm.js +76 -3
  252. package/dist/doxygen/data-model/index/indexdoxygentype-dm.js.map +1 -1
  253. package/dist/doxygen/data-model/index/indexmembertype-dm.d.ts +79 -0
  254. package/dist/doxygen/data-model/index/indexmembertype-dm.d.ts.map +1 -1
  255. package/dist/doxygen/data-model/index/indexmembertype-dm.js +66 -2
  256. package/dist/doxygen/data-model/index/indexmembertype-dm.js.map +1 -1
  257. package/dist/doxygen/data-model/types.d.ts +96 -1
  258. package/dist/doxygen/data-model/types.d.ts.map +1 -1
  259. package/dist/doxygen/data-model/types.js +37 -0
  260. package/dist/doxygen/data-model/types.js.map +1 -1
  261. package/dist/doxygen2docusaurus.d.ts +3675 -48
  262. package/package.json +9 -6
  263. /package/{template → templates}/css/custom.css +0 -0
  264. /package/{template → templates}/img/README.md +0 -0
  265. /package/{template → templates}/img/document-svgrepo-com.svg +0 -0
  266. /package/{template → templates}/img/folder-svgrepo-com.svg +0 -0
@@ -11,6 +11,20 @@
11
11
  // ----------------------------------------------------------------------------
12
12
  import * as fs from 'node:fs/promises';
13
13
  // ----------------------------------------------------------------------------
14
+ /**
15
+ * Formats a Date object into a standardised UTC string representation.
16
+ *
17
+ * @remarks
18
+ * Produces a timestamp in the format "YYYY-MM-DD HH:mm:ss +0000" using
19
+ * UTC timezone for consistent date formatting across different environments.
20
+ * This format ensures reproducible timestamps regardless of the local
21
+ * system timezone, which is essential for documentation generation consistency.
22
+ *
23
+ * @param date - The Date object to format.
24
+ * @returns A formatted date string in UTC with timezone offset.
25
+ *
26
+ * @public
27
+ */
14
28
  export function formatDate(date) {
15
29
  // Custom format: YYYY-MM-DD HH:mm:ss
16
30
  const year = date.getUTCFullYear();
@@ -23,6 +37,20 @@ export function formatDate(date) {
23
37
  return (`${year.toString()}-${month}-${day} ${hours}:${minutes}:${seconds} ` +
24
38
  '+0000');
25
39
  }
40
+ /**
41
+ * Formats a duration value into a human-readable string representation.
42
+ *
43
+ * @remarks
44
+ * Converts millisecond values into appropriate units (milliseconds, seconds,
45
+ * or minutes) with appropriate precision for display purposes. The function
46
+ * automatically selects the most suitable unit based on the magnitude of
47
+ * the duration value to ensure optimal readability for performance reporting.
48
+ *
49
+ * @param n - The duration in milliseconds.
50
+ * @returns A formatted duration string with appropriate units.
51
+ *
52
+ * @public
53
+ */
26
54
  export function formatDuration(n) {
27
55
  if (n < 1000) {
28
56
  return `${n.toString()} ms`;
@@ -100,9 +128,38 @@ export function formatDuration(n) {
100
128
  // .replaceAll(/{/g, '&#123;') // MD
101
129
  // .replaceAll(/}/g, '&#125;') // MD
102
130
  // }
131
+ /**
132
+ * Removes empty lines from a text string.
133
+ *
134
+ * @remarks
135
+ * Eliminates lines that contain only whitespace characters, helping to
136
+ * clean up text content for documentation processing. This function is
137
+ * particularly useful for normalising content extracted from XML sources
138
+ * where formatting artefacts may introduce unwanted empty lines.
139
+ *
140
+ * @param text - The input text to process.
141
+ * @returns The text with empty lines removed.
142
+ *
143
+ * @public
144
+ */
103
145
  export function removeEmptyLines(text) {
104
146
  return text.replace(/^\s*$(?:\r\n?|\n)/gm, '');
105
147
  }
148
+ /**
149
+ * Sanitises text for use in hierarchical URL paths.
150
+ *
151
+ * @remarks
152
+ * Transforms text into a URL-safe format suitable for hierarchical paths
153
+ * by converting to lowercase, removing spaces, encoding special characters,
154
+ * and preserving forward slashes for path structure. This function ensures
155
+ * that generated URLs are compatible with web standards whilst maintaining
156
+ * the hierarchical nature of documentation structures.
157
+ *
158
+ * @param text - The input text to sanitise.
159
+ * @returns A URL-safe hierarchical path string.
160
+ *
161
+ * @public
162
+ */
106
163
  // Preserve '/' too.
107
164
  export function sanitizeHierarchicalPath(text) {
108
165
  return text
@@ -116,30 +173,156 @@ export function sanitizeHierarchicalPath(text) {
116
173
  .replaceAll(/\)/g, '29')
117
174
  .replaceAll(/[^a-zA-Z0-9/-]/g, '-');
118
175
  }
176
+ /**
177
+ * Sanitises anonymous namespace identifiers for better readability.
178
+ *
179
+ * @remarks
180
+ * Simplifies the representation of anonymous namespaces by removing
181
+ * redundant text whilst preserving the essential identifying information.
182
+ * This transformation improves the readability of documentation by reducing
183
+ * verbose namespace representations commonly generated by Doxygen.
184
+ *
185
+ * @param text - The namespace identifier to sanitise.
186
+ * @returns A cleaner namespace identifier.
187
+ *
188
+ * @public
189
+ */
119
190
  export function sanitizeAnonymousNamespace(text) {
120
191
  return text.replaceAll(/anonymous_namespace\{/g, 'anonymous{');
121
192
  }
193
+ /**
194
+ * Flattens a hierarchical path by replacing separators with hyphens.
195
+ *
196
+ * @remarks
197
+ * Converts forward slashes to hyphens to create a flat string suitable
198
+ * for use in contexts where hierarchical separators are not appropriate.
199
+ * This is particularly useful for creating file names or identifiers
200
+ * that must not contain path separators whilst preserving readability.
201
+ *
202
+ * @param text - The hierarchical path to flatten.
203
+ * @returns A flattened path string with hyphens instead of slashes.
204
+ *
205
+ * @public
206
+ */
122
207
  export function flattenPath(text) {
123
208
  return text.replaceAll('/', '-');
124
209
  }
210
+ /**
211
+ * Removes hexadecimal anchor suffixes from reference identifiers.
212
+ *
213
+ * @remarks
214
+ * Strips trailing hexadecimal anchor patterns from Doxygen reference
215
+ * identifiers to obtain the base reference without anchor information.
216
+ * This is essential for creating clean reference links whilst preserving
217
+ * the ability to extract anchor information separately when needed.
218
+ *
219
+ * @param refid - The reference identifier to process.
220
+ * @returns The reference identifier with hexadecimal anchor removed.
221
+ *
222
+ * @public
223
+ */
125
224
  export function stripPermalinkHexAnchor(refid) {
126
225
  return refid.replace(/_1[0-9a-fg]*$/, '');
127
226
  }
227
+ /**
228
+ * Removes text anchor suffixes from reference identifiers.
229
+ *
230
+ * @remarks
231
+ * Strips trailing text-based anchor patterns from Doxygen reference
232
+ * identifiers to obtain the base reference without anchor information.
233
+ * This complements the hexadecimal anchor removal function by handling
234
+ * text-based anchor patterns that may appear in certain Doxygen outputs.
235
+ *
236
+ * @param refid - The reference identifier to process.
237
+ * @returns The reference identifier with text anchor removed.
238
+ *
239
+ * @public
240
+ */
128
241
  export function stripPermalinkTextAnchor(refid) {
129
242
  return refid.replace(/_1_[0-9a-z]*$/, '');
130
243
  }
244
+ /**
245
+ * Removes leading newline characters from text.
246
+ *
247
+ * @remarks
248
+ * Strips newline characters from the beginning of a text string whilst
249
+ * preserving the remainder of the content. This function is useful for
250
+ * cleaning up text content that may have unwanted leading whitespace
251
+ * from XML parsing or template processing operations.
252
+ *
253
+ * @param text - The input text to process.
254
+ * @returns The text with leading newlines removed.
255
+ *
256
+ * @public
257
+ */
131
258
  export function stripLeadingNewLines(text) {
132
259
  return text.replace(/^[\r\n]+/, '');
133
260
  }
261
+ /**
262
+ * Removes trailing whitespace and newline characters from text.
263
+ *
264
+ * @remarks
265
+ * Strips trailing spaces, carriage returns, and newlines from the end
266
+ * of a text string whilst preserving the main content. This function
267
+ * ensures clean text output by removing formatting artefacts that may
268
+ * interfere with proper Markdown rendering or display.
269
+ *
270
+ * @param text - The input text to process.
271
+ * @returns The text with trailing whitespace and newlines removed.
272
+ *
273
+ * @public
274
+ */
134
275
  export function stripTrailingNewLines(text) {
135
276
  return text.replace(/[ \r\n]+$/, '');
136
277
  }
278
+ /**
279
+ * Removes both leading and trailing newline characters from text.
280
+ *
281
+ * @remarks
282
+ * Combines the functionality of stripping both leading and trailing
283
+ * newlines to clean up text content for processing. This comprehensive
284
+ * cleaning function is particularly useful for normalising content
285
+ * extracted from various sources that may have inconsistent whitespace.
286
+ *
287
+ * @param text - The input text to process.
288
+ * @returns The text with leading and trailing newlines removed.
289
+ *
290
+ * @public
291
+ */
137
292
  export function stripLeadingAndTrailingNewLines(text) {
138
293
  return text.replace(/^[\r\n]+/, '').replace(/[ \r\n]+$/, '');
139
294
  }
295
+ /**
296
+ * Extracts the anchor portion from a reference identifier.
297
+ *
298
+ * @remarks
299
+ * Retrieves the anchor part of a Doxygen reference identifier by removing
300
+ * the base reference portion and returning only the anchor suffix. This
301
+ * function is essential for creating proper internal links within
302
+ * documentation pages where anchor-based navigation is required.
303
+ *
304
+ * @param refid - The reference identifier to process.
305
+ * @returns The anchor portion of the reference identifier.
306
+ *
307
+ * @public
308
+ */
140
309
  export function getPermalinkAnchor(refid) {
141
310
  return refid.replace(/^.*_1/, '');
142
311
  }
312
+ /**
313
+ * Checks whether a folder exists at the specified path.
314
+ *
315
+ * @remarks
316
+ * Asynchronously verifies the existence of a directory at the given path
317
+ * and confirms that it is indeed a directory rather than a file. This
318
+ * function provides safe filesystem access with proper error handling
319
+ * for cases where the path does not exist or is inaccessible.
320
+ *
321
+ * @param folderPath - The path to check for folder existence.
322
+ * @returns A promise that resolves to true if the folder exists.
323
+ *
324
+ * @public
325
+ */
143
326
  export async function folderExists(folderPath) {
144
327
  try {
145
328
  const stat = await fs.stat(folderPath);
@@ -149,6 +332,23 @@ export async function folderExists(folderPath) {
149
332
  return false;
150
333
  }
151
334
  }
335
+ /**
336
+ * Joins an array of strings with different delimiters for the final item.
337
+ *
338
+ * @remarks
339
+ * Concatenates array elements using a standard delimiter between most items
340
+ * and a special delimiter before the last item, useful for creating
341
+ * grammatically correct lists (e.g., "A, B, and C"). This function ensures
342
+ * proper English grammar in generated text whilst handling edge cases
343
+ * such as empty arrays and single-item arrays appropriately.
344
+ *
345
+ * @param arr - The array of strings to join.
346
+ * @param delimiter - The standard delimiter between items.
347
+ * @param lastDelimiter - The special delimiter before the last item.
348
+ * @returns The joined string with appropriate delimiters.
349
+ *
350
+ * @public
351
+ */
152
352
  export function joinWithLast(arr, delimiter, lastDelimiter) {
153
353
  if (arr.length === 0)
154
354
  return '';
@@ -156,6 +356,20 @@ export function joinWithLast(arr, delimiter, lastDelimiter) {
156
356
  return arr[0];
157
357
  return arr.slice(0, -1).join(delimiter) + lastDelimiter + arr[arr.length - 1];
158
358
  }
359
+ /**
360
+ * Validates whether a string represents a valid URL.
361
+ *
362
+ * @remarks
363
+ * Attempts to construct a URL object from the input string to determine
364
+ * if it represents a valid, well-formed URL. This validation method
365
+ * leverages the native URL constructor's built-in validation capabilities
366
+ * to provide robust URL checking without implementing custom parsing logic.
367
+ *
368
+ * @param str - The string to validate as a URL.
369
+ * @returns True if the string is a valid URL, false otherwise.
370
+ *
371
+ * @public
372
+ */
159
373
  export function isUrl(str) {
160
374
  try {
161
375
  new URL(str);
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/docusaurus/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A+E"}
@@ -1,35 +1,172 @@
1
1
  import { CompoundBase } from './compound-base-vm.js';
2
2
  import type { CompoundDefDataModel } from '../../doxygen/data-model/compounds/compounddef-dm.js';
3
3
  import { CollectionBase } from './collection-base.js';
4
- import type { MenuItem, SidebarCategory, FrontMatter } from '../types.js';
4
+ import type { SidebarCategory, FrontMatter, NavbarItem } from '../types.js';
5
5
  import type { BaseCompoundRefDataModel, DerivedCompoundRefDataModel } from '../../doxygen/data-model/compounds/compoundreftype-dm.js';
6
6
  import type { TemplateParamListDataModel } from '../../doxygen/data-model/compounds/templateparamlisttype-dm.js';
7
+ /**
8
+ * Manages the collection of class, struct, and union documentation.
9
+ *
10
+ * @remarks
11
+ * Handles the organisation and generation of class-type compound
12
+ * documentation, including hierarchy creation, sidebar generation,
13
+ * and index file creation. Supports inheritance relationships and
14
+ * alphabetical organisation.
15
+ *
16
+ * @public
17
+ */
7
18
  export declare class Classes extends CollectionBase {
19
+ /**
20
+ * Array of top-level classes without parent classes.
21
+ *
22
+ * @remarks
23
+ * Contains classes that are not derived from other documented classes,
24
+ * used for organising hierarchical displays and inheritance trees.
25
+ */
8
26
  topLevelClasses: Class[];
27
+ /**
28
+ * Adds a class compound to the collection.
29
+ *
30
+ * @remarks
31
+ * Creates a new Class instance from the compound definition and registers
32
+ * it in the collection for later processing and hierarchy creation.
33
+ *
34
+ * @param compoundDef - The compound definition for the class
35
+ * @returns The created Class instance
36
+ */
9
37
  addChild(compoundDef: CompoundDefDataModel): CompoundBase;
38
+ /**
39
+ * Creates hierarchical relationships between class compounds.
40
+ *
41
+ * @remarks
42
+ * Establishes parent-child relationships based on inheritance data,
43
+ * building the class hierarchy tree and identifying top-level classes
44
+ * that have no documented parent classes.
45
+ */
10
46
  createCompoundsHierarchies(): void;
11
47
  addSidebarItems(sidebarCategory: SidebarCategory): void;
48
+ /**
49
+ * Creates sidebar item for class hierarchy recursively.
50
+ *
51
+ * @remarks
52
+ * Generates hierarchical sidebar structures for class inheritance
53
+ * trees, creating category items for classes with children and
54
+ * document items for leaf classes. Handles sidebar label and ID
55
+ * generation with proper CSS classes.
56
+ *
57
+ * @param classs - The class to create sidebar item for
58
+ * @returns The sidebar item or undefined if class lacks required data
59
+ */
12
60
  private createSidebarItemRecursively;
13
- createMenuItems(): MenuItem[];
61
+ createNavbarItems(): NavbarItem[];
14
62
  generateIndexDotMdFile(): Promise<void>;
63
+ /**
64
+ * Generates hierarchical index content for class documentation recursively.
65
+ *
66
+ * @remarks
67
+ * Creates HTML tree table rows for class hierarchies with proper
68
+ * indentation, icons, and descriptions. Processes inheritance
69
+ * relationships and generates nested table structures for parent-child
70
+ * class relationships.
71
+ *
72
+ * @param classs - The class to generate index content for
73
+ * @param depth - The current depth level in the hierarchy (1-based)
74
+ * @returns Array of HTML strings representing the tree table rows
75
+ */
15
76
  private generateIndexMdFileRecursively;
16
77
  generatePerInitialsIndexMdFiles(): Promise<void>;
17
78
  }
79
+ /**
80
+ * Represents a single class, struct, or union compound for documentation.
81
+ *
82
+ * @remarks
83
+ * Manages individual class compound data including inheritance relationships,
84
+ * template parameters, member organisation, and documentation generation.
85
+ * Supports multiple inheritance, template specialisation, and hierarchical
86
+ * naming conventions for comprehensive class documentation.
87
+ *
88
+ * @public
89
+ */
18
90
  export declare class Class extends CompoundBase {
91
+ /** Set of base class IDs for inheritance tracking (multiple inheritance). */
19
92
  baseClassIds: Set<string>;
93
+ /** Array of resolved base class instances. */
20
94
  baseClasses: Class[];
95
+ /** Fully qualified class name including namespace hierarchy. */
21
96
  fullyQualifiedName: string;
97
+ /** Simple class name without namespace qualifiers. */
22
98
  unqualifiedName: string;
99
+ /** Template parameter specification string. */
23
100
  templateParameters: string;
101
+ /** Complete class name with rendered template parameters. */
24
102
  classFullName: string;
103
+ /** Rendered template declaration for display purposes. */
25
104
  template: string | undefined;
105
+ /** Direct reference to base compound data model objects. */
26
106
  baseCompoundRefs: BaseCompoundRefDataModel[] | undefined;
107
+ /** Direct reference to derived compound data model objects. */
27
108
  derivedCompoundRefs: DerivedCompoundRefDataModel[] | undefined;
109
+ /** Template parameter list from the compound definition. */
28
110
  templateParamList: TemplateParamListDataModel | undefined;
111
+ /**
112
+ * Creates a new Class instance from compound definition data.
113
+ *
114
+ * @remarks
115
+ * Initialises class metadata including inheritance relationships,
116
+ * template parameters, naming conventions, and URL structures.
117
+ * Processes fully qualified names, sidebar labels, and creates
118
+ * hierarchical path structures for documentation generation.
119
+ *
120
+ * @param collection - The parent Classes collection managing this class
121
+ * @param compoundDef - The Doxygen compound definition containing class data
122
+ */
29
123
  constructor(collection: Classes, compoundDef: CompoundDefDataModel);
124
+ /**
125
+ * Performs late-stage initialisation after all classes are loaded.
126
+ *
127
+ * @remarks
128
+ * Completes class setup by rendering template parameters to HTML,
129
+ * building full class names with template information, and storing
130
+ * references to compound definition objects for inheritance processing.
131
+ * Called after all compounds are registered.
132
+ */
30
133
  initializeLate(): void;
134
+ /**
135
+ * Determines whether the class has any content to display.
136
+ *
137
+ * @remarks
138
+ * Checks for the presence of child classes, inner compounds,
139
+ * member sections, include directives, or base class content
140
+ * to determine if the class documentation page should be
141
+ * generated and displayed.
142
+ *
143
+ * @returns True if the class has displayable content, false otherwise
144
+ */
31
145
  hasAnyContent(): boolean;
146
+ /**
147
+ * Renders the complete class documentation to markdown lines.
148
+ *
149
+ * @remarks
150
+ * Generates the full documentation page including class declaration,
151
+ * inheritance relationships, member indices, detailed descriptions,
152
+ * and location information. Handles base and derived class listings
153
+ * with proper HTML table formatting.
154
+ *
155
+ * @param frontMatter - The frontmatter configuration for the page
156
+ * @returns Array of markdown strings representing the complete documentation
157
+ */
32
158
  renderToLines(frontMatter: FrontMatter): string[];
159
+ /**
160
+ * Renders the class as an index entry for member listings.
161
+ *
162
+ * @remarks
163
+ * Creates HTML table rows suitable for inclusion in member indices,
164
+ * with links to the class documentation page and brief descriptions.
165
+ * Generates formatted entries with appropriate CSS classes and
166
+ * structure for index displays.
167
+ *
168
+ * @returns Array of HTML strings representing the index entry
169
+ */
33
170
  renderIndexToLines(): string[];
34
171
  }
35
172
  //# sourceMappingURL=classes-vm.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"classes-vm.d.ts","sourceRoot":"","sources":["../../../src/docusaurus/view-model/classes-vm.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sDAAsD,CAAA;AAChG,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAMrD,OAAO,KAAK,EACV,QAAQ,EACR,eAAe,EAIf,WAAW,EACZ,MAAM,aAAa,CAAA;AACpB,OAAO,KAAK,EACV,wBAAwB,EACxB,2BAA2B,EAC5B,MAAM,0DAA0D,CAAA;AACjE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gEAAgE,CAAA;AAahH,qBAAa,OAAQ,SAAQ,cAAc;IAEzC,eAAe,EAAE,KAAK,EAAE,CAAK;IAYpB,QAAQ,CAAC,WAAW,EAAE,oBAAoB,GAAG,YAAY;IASzD,0BAA0B,IAAI,IAAI;IAwClC,eAAe,CAAC,eAAe,EAAE,eAAe,GAAG,IAAI;IA8FhE,OAAO,CAAC,4BAA4B;IAyC3B,eAAe,IAAI,QAAQ,EAAE;IAUvB,sBAAsB,IAAI,OAAO,CAAC,IAAI,CAAC;IA6CtD,OAAO,CAAC,8BAA8B;IA8DvB,+BAA+B,IAAI,OAAO,CAAC,IAAI,CAAC;CAiGhE;AAID,qBAAa,KAAM,SAAQ,YAAY;IAErC,YAAY,cAAoB;IAChC,WAAW,EAAE,KAAK,EAAE,CAAK;IAEzB,kBAAkB,SAAQ;IAC1B,eAAe,SAAQ;IACvB,kBAAkB,SAAK;IAEvB,aAAa,SAAQ;IACrB,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAA;IAI5B,gBAAgB,EAAE,wBAAwB,EAAE,GAAG,SAAS,CAAA;IACxD,mBAAmB,EAAE,2BAA2B,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