@xpack/doxygen2docusaurus 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +2 -1
- package/bin/doxygen2docusaurus.js +1 -1
- package/dist/cli/main.d.ts +0 -14
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +0 -34
- package/dist/cli/main.js.map +1 -1
- package/dist/docusaurus/cli-options.d.ts +3 -292
- package/dist/docusaurus/cli-options.d.ts.map +1 -1
- package/dist/docusaurus/cli-options.js +6 -290
- package/dist/docusaurus/cli-options.js.map +1 -1
- package/dist/docusaurus/generator.d.ts +0 -172
- package/dist/docusaurus/generator.d.ts.map +1 -1
- package/dist/docusaurus/generator.js +20 -280
- package/dist/docusaurus/generator.js.map +1 -1
- package/dist/docusaurus/renderers/descriptiontype.d.ts +0 -417
- package/dist/docusaurus/renderers/descriptiontype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/descriptiontype.js +11 -555
- package/dist/docusaurus/renderers/descriptiontype.js.map +1 -1
- package/dist/docusaurus/renderers/docinternalstype.d.ts +0 -132
- package/dist/docusaurus/renderers/docinternalstype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/docinternalstype.js +0 -156
- package/dist/docusaurus/renderers/docinternalstype.js.map +1 -1
- package/dist/docusaurus/renderers/doclisttype.d.ts +0 -22
- package/dist/docusaurus/renderers/doclisttype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/doclisttype.js +0 -42
- package/dist/docusaurus/renderers/doclisttype.js.map +1 -1
- package/dist/docusaurus/renderers/doctabletype.d.ts +0 -88
- package/dist/docusaurus/renderers/doctabletype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/doctabletype.js +1 -113
- package/dist/docusaurus/renderers/doctabletype.js.map +1 -1
- package/dist/docusaurus/renderers/doctitletype.d.ts +0 -22
- package/dist/docusaurus/renderers/doctitletype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/doctitletype.js +0 -42
- package/dist/docusaurus/renderers/doctitletype.js.map +1 -1
- package/dist/docusaurus/renderers/docvariablelisttype.d.ts +0 -44
- package/dist/docusaurus/renderers/docvariablelisttype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/docvariablelisttype.js +1 -69
- package/dist/docusaurus/renderers/docvariablelisttype.js.map +1 -1
- package/dist/docusaurus/renderers/docxrefsecttype.d.ts +0 -22
- package/dist/docusaurus/renderers/docxrefsecttype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/docxrefsecttype.js +0 -38
- package/dist/docusaurus/renderers/docxrefsecttype.js.map +1 -1
- package/dist/docusaurus/renderers/element-renderer-base.d.ts +0 -74
- package/dist/docusaurus/renderers/element-renderer-base.d.ts.map +1 -1
- package/dist/docusaurus/renderers/element-renderer-base.js +0 -64
- package/dist/docusaurus/renderers/element-renderer-base.js.map +1 -1
- package/dist/docusaurus/renderers/inctype.d.ts +0 -23
- package/dist/docusaurus/renderers/inctype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/inctype.js +0 -41
- package/dist/docusaurus/renderers/inctype.js.map +1 -1
- package/dist/docusaurus/renderers/linkedtexttype.d.ts +0 -22
- package/dist/docusaurus/renderers/linkedtexttype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/linkedtexttype.js +0 -45
- package/dist/docusaurus/renderers/linkedtexttype.js.map +1 -1
- package/dist/docusaurus/renderers/listingtype.d.ts +0 -52
- package/dist/docusaurus/renderers/listingtype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/listingtype.js +1 -88
- package/dist/docusaurus/renderers/listingtype.js.map +1 -1
- package/dist/docusaurus/renderers/paramtype.d.ts +0 -22
- package/dist/docusaurus/renderers/paramtype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/paramtype.js +2 -51
- package/dist/docusaurus/renderers/paramtype.js.map +1 -1
- package/dist/docusaurus/renderers/referencetype.d.ts +0 -23
- package/dist/docusaurus/renderers/referencetype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/referencetype.js +0 -38
- package/dist/docusaurus/renderers/referencetype.js.map +1 -1
- package/dist/docusaurus/renderers/reftexttype.d.ts +0 -22
- package/dist/docusaurus/renderers/reftexttype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/reftexttype.js +0 -38
- package/dist/docusaurus/renderers/reftexttype.js.map +1 -1
- package/dist/docusaurus/renderers/reftype.d.ts +0 -22
- package/dist/docusaurus/renderers/reftype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/reftype.js +0 -38
- package/dist/docusaurus/renderers/reftype.js.map +1 -1
- package/dist/docusaurus/renderers/renderers.d.ts +0 -151
- package/dist/docusaurus/renderers/renderers.d.ts.map +1 -1
- package/dist/docusaurus/renderers/renderers.js +4 -184
- package/dist/docusaurus/renderers/renderers.js.map +1 -1
- package/dist/docusaurus/renderers/substringtype.d.ts +0 -22
- package/dist/docusaurus/renderers/substringtype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/substringtype.js +0 -39
- package/dist/docusaurus/renderers/substringtype.js.map +1 -1
- package/dist/docusaurus/renderers/tableofcontentstype.d.ts +0 -22
- package/dist/docusaurus/renderers/tableofcontentstype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/tableofcontentstype.js +0 -39
- package/dist/docusaurus/renderers/tableofcontentstype.js.map +1 -1
- package/dist/docusaurus/types.d.ts +0 -110
- package/dist/docusaurus/types.d.ts.map +1 -1
- package/dist/docusaurus/types.js +0 -11
- package/dist/docusaurus/types.js.map +1 -1
- package/dist/docusaurus/utils.d.ts +0 -214
- package/dist/docusaurus/utils.d.ts.map +1 -1
- package/dist/docusaurus/utils.js +0 -296
- package/dist/docusaurus/utils.js.map +1 -1
- package/dist/docusaurus/view-model/classes-vm.d.ts +0 -137
- package/dist/docusaurus/view-model/classes-vm.d.ts.map +1 -1
- package/dist/docusaurus/view-model/classes-vm.js +9 -225
- package/dist/docusaurus/view-model/classes-vm.js.map +1 -1
- package/dist/docusaurus/view-model/collection-base.d.ts +0 -120
- package/dist/docusaurus/view-model/collection-base.d.ts.map +1 -1
- package/dist/docusaurus/view-model/collection-base.js +11 -101
- package/dist/docusaurus/view-model/collection-base.js.map +1 -1
- package/dist/docusaurus/view-model/compound-base-vm.d.ts +2 -147
- package/dist/docusaurus/view-model/compound-base-vm.d.ts.map +1 -1
- package/dist/docusaurus/view-model/compound-base-vm.js +47 -225
- package/dist/docusaurus/view-model/compound-base-vm.js.map +1 -1
- package/dist/docusaurus/view-model/concepts-vm.d.ts +26 -0
- package/dist/docusaurus/view-model/concepts-vm.d.ts.map +1 -0
- package/dist/docusaurus/view-model/concepts-vm.js +329 -0
- package/dist/docusaurus/view-model/concepts-vm.js.map +1 -0
- package/dist/docusaurus/view-model/description-anchors.d.ts +0 -58
- package/dist/docusaurus/view-model/description-anchors.d.ts.map +1 -1
- package/dist/docusaurus/view-model/description-anchors.js +0 -71
- package/dist/docusaurus/view-model/description-anchors.js.map +1 -1
- package/dist/docusaurus/view-model/files-and-folders-vm.d.ts +0 -247
- package/dist/docusaurus/view-model/files-and-folders-vm.d.ts.map +1 -1
- package/dist/docusaurus/view-model/files-and-folders-vm.js +61 -353
- package/dist/docusaurus/view-model/files-and-folders-vm.js.map +1 -1
- package/dist/docusaurus/view-model/groups-vm.d.ts +0 -148
- package/dist/docusaurus/view-model/groups-vm.d.ts.map +1 -1
- package/dist/docusaurus/view-model/groups-vm.js +2 -223
- package/dist/docusaurus/view-model/groups-vm.js.map +1 -1
- package/dist/docusaurus/view-model/members-vm.d.ts +0 -552
- package/dist/docusaurus/view-model/members-vm.d.ts.map +1 -1
- package/dist/docusaurus/view-model/members-vm.js +17 -702
- package/dist/docusaurus/view-model/members-vm.js.map +1 -1
- package/dist/docusaurus/view-model/namespaces-vm.d.ts +4 -199
- package/dist/docusaurus/view-model/namespaces-vm.d.ts.map +1 -1
- package/dist/docusaurus/view-model/namespaces-vm.js +79 -284
- package/dist/docusaurus/view-model/namespaces-vm.js.map +1 -1
- package/dist/docusaurus/view-model/options.d.ts +0 -43
- package/dist/docusaurus/view-model/options.d.ts.map +1 -1
- package/dist/docusaurus/view-model/options.js +0 -57
- package/dist/docusaurus/view-model/options.js.map +1 -1
- package/dist/docusaurus/view-model/pages-vm.d.ts +0 -115
- package/dist/docusaurus/view-model/pages-vm.d.ts.map +1 -1
- package/dist/docusaurus/view-model/pages-vm.js +0 -162
- package/dist/docusaurus/view-model/pages-vm.js.map +1 -1
- package/dist/docusaurus/view-model/tree-entries-vm.d.ts +8 -142
- package/dist/docusaurus/view-model/tree-entries-vm.d.ts.map +1 -1
- package/dist/docusaurus/view-model/tree-entries-vm.js +54 -174
- package/dist/docusaurus/view-model/tree-entries-vm.js.map +1 -1
- package/dist/docusaurus/view-model/view-model.d.ts +0 -125
- package/dist/docusaurus/view-model/view-model.d.ts.map +1 -1
- package/dist/docusaurus/view-model/view-model.js +20 -182
- package/dist/docusaurus/view-model/view-model.js.map +1 -1
- package/dist/docusaurus/workspace.d.ts +1 -126
- package/dist/docusaurus/workspace.d.ts.map +1 -1
- package/dist/docusaurus/workspace.js +8 -221
- package/dist/docusaurus/workspace.js.map +1 -1
- package/dist/doxygen/data-model/compounds/compounddef-dm.d.ts +5 -492
- package/dist/doxygen/data-model/compounds/compounddef-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/compounddef-dm.js +23 -672
- package/dist/doxygen/data-model/compounds/compounddef-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/compoundreftype-dm.d.ts +0 -129
- package/dist/doxygen/data-model/compounds/compoundreftype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/compoundreftype-dm.js +1 -145
- package/dist/doxygen/data-model/compounds/compoundreftype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/descriptiontype-dm.d.ts +104 -2848
- package/dist/doxygen/data-model/compounds/descriptiontype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/descriptiontype-dm.js +73 -3975
- package/dist/doxygen/data-model/compounds/descriptiontype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/docvarlistentrytype-dm.d.ts +0 -165
- package/dist/doxygen/data-model/compounds/docvarlistentrytype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/docvarlistentrytype-dm.js +0 -229
- package/dist/doxygen/data-model/compounds/docvarlistentrytype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/doxygentype-dm.d.ts +0 -70
- package/dist/doxygen/data-model/compounds/doxygentype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/doxygentype-dm.js +0 -105
- package/dist/doxygen/data-model/compounds/doxygentype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/enumvaluetype-dm.d.ts +0 -84
- package/dist/doxygen/data-model/compounds/enumvaluetype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/enumvaluetype-dm.js +1 -122
- package/dist/doxygen/data-model/compounds/enumvaluetype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/inctype-dm.d.ts +0 -116
- package/dist/doxygen/data-model/compounds/inctype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/inctype-dm.js +3 -155
- package/dist/doxygen/data-model/compounds/inctype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/linkedtexttype-dm.d.ts +3 -138
- package/dist/doxygen/data-model/compounds/linkedtexttype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/linkedtexttype-dm.js +5 -180
- package/dist/doxygen/data-model/compounds/linkedtexttype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/listofallmemberstype-dm.d.ts +0 -76
- package/dist/doxygen/data-model/compounds/listofallmemberstype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/listofallmemberstype-dm.js +0 -107
- package/dist/doxygen/data-model/compounds/listofallmemberstype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/locationtype-dm.d.ts +0 -162
- package/dist/doxygen/data-model/compounds/locationtype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/locationtype-dm.js +4 -203
- package/dist/doxygen/data-model/compounds/locationtype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/memberdeftype-dm.d.ts +2 -443
- package/dist/doxygen/data-model/compounds/memberdeftype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/memberdeftype-dm.js +19 -475
- package/dist/doxygen/data-model/compounds/memberdeftype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/memberreftype-dm.d.ts +0 -141
- package/dist/doxygen/data-model/compounds/memberreftype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/memberreftype-dm.js +0 -176
- package/dist/doxygen/data-model/compounds/memberreftype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/membertype-dm.d.ts +0 -101
- package/dist/doxygen/data-model/compounds/membertype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/membertype-dm.js +0 -115
- package/dist/doxygen/data-model/compounds/membertype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/paramtype-dm.d.ts +0 -164
- package/dist/doxygen/data-model/compounds/paramtype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/paramtype-dm.js +0 -208
- package/dist/doxygen/data-model/compounds/paramtype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/referencetype-dm.d.ts +0 -139
- package/dist/doxygen/data-model/compounds/referencetype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/referencetype-dm.js +2 -175
- package/dist/doxygen/data-model/compounds/referencetype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/reftexttype-dm.d.ts +0 -120
- package/dist/doxygen/data-model/compounds/reftexttype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/reftexttype-dm.js +2 -141
- package/dist/doxygen/data-model/compounds/reftexttype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/reftype-dm.d.ts +0 -268
- package/dist/doxygen/data-model/compounds/reftype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/reftype-dm.js +4 -326
- package/dist/doxygen/data-model/compounds/reftype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/reimplementtype-dm.d.ts +0 -105
- package/dist/doxygen/data-model/compounds/reimplementtype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/reimplementtype-dm.js +1 -139
- package/dist/doxygen/data-model/compounds/reimplementtype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/sectiondeftype-dm.d.ts +0 -168
- package/dist/doxygen/data-model/compounds/sectiondeftype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/sectiondeftype-dm.js +0 -209
- package/dist/doxygen/data-model/compounds/sectiondeftype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/tableofcontentstype-dm.d.ts +0 -267
- package/dist/doxygen/data-model/compounds/tableofcontentstype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/tableofcontentstype-dm.js +0 -354
- package/dist/doxygen/data-model/compounds/tableofcontentstype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/templateparamlisttype-dm.d.ts +0 -66
- package/dist/doxygen/data-model/compounds/templateparamlisttype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/templateparamlisttype-dm.js +0 -97
- package/dist/doxygen/data-model/compounds/templateparamlisttype-dm.js.map +1 -1
- package/dist/doxygen/data-model/data-model.d.ts +0 -149
- package/dist/doxygen/data-model/data-model.d.ts.map +1 -1
- package/dist/doxygen/data-model/data-model.js +4 -197
- package/dist/doxygen/data-model/data-model.js.map +1 -1
- package/dist/doxygen/data-model/doxyfile/doxyfileoptiontype-dm.d.ts +0 -115
- package/dist/doxygen/data-model/doxyfile/doxyfileoptiontype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/doxyfile/doxyfileoptiontype-dm.js +4 -129
- package/dist/doxygen/data-model/doxyfile/doxyfileoptiontype-dm.js.map +1 -1
- package/dist/doxygen/data-model/doxyfile/doxyfiletype-dm.d.ts +0 -87
- package/dist/doxygen/data-model/doxyfile/doxyfiletype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/doxyfile/doxyfiletype-dm.js +0 -118
- package/dist/doxygen/data-model/doxyfile/doxyfiletype-dm.js.map +1 -1
- package/dist/doxygen/data-model/doxygen-xml-parser.d.ts +0 -253
- package/dist/doxygen/data-model/doxygen-xml-parser.d.ts.map +1 -1
- package/dist/doxygen/data-model/doxygen-xml-parser.js +0 -291
- package/dist/doxygen/data-model/doxygen-xml-parser.js.map +1 -1
- package/dist/doxygen/data-model/index/indexcompoundtype-dm.d.ts +0 -98
- package/dist/doxygen/data-model/index/indexcompoundtype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/index/indexcompoundtype-dm.js +2 -122
- package/dist/doxygen/data-model/index/indexcompoundtype-dm.js.map +1 -1
- package/dist/doxygen/data-model/index/indexdoxygentype-dm.d.ts +0 -82
- package/dist/doxygen/data-model/index/indexdoxygentype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/index/indexdoxygentype-dm.js +0 -114
- package/dist/doxygen/data-model/index/indexdoxygentype-dm.js.map +1 -1
- package/dist/doxygen/data-model/index/indexmembertype-dm.d.ts +0 -85
- package/dist/doxygen/data-model/index/indexmembertype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/index/indexmembertype-dm.js +1 -107
- package/dist/doxygen/data-model/index/indexmembertype-dm.js.map +1 -1
- package/dist/doxygen/data-model/types.d.ts +0 -104
- package/dist/doxygen/data-model/types.d.ts.map +1 -1
- package/dist/doxygen/data-model/types.js +0 -52
- package/dist/doxygen/data-model/types.js.map +1 -1
- package/dist/index.d.ts +4 -16
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -42
- package/dist/index.js.map +1 -1
- package/package.json +45 -51
- package/src/cli/main.ts +122 -0
- package/src/docusaurus/cli-options.ts +560 -0
- package/src/docusaurus/generator.ts +788 -0
- package/src/docusaurus/renderers/descriptiontype.ts +1299 -0
- package/src/docusaurus/renderers/docinternalstype.ts +354 -0
- package/src/docusaurus/renderers/doclisttype.ts +134 -0
- package/src/docusaurus/renderers/doctabletype.ts +220 -0
- package/src/docusaurus/renderers/doctitletype.ts +77 -0
- package/src/docusaurus/renderers/docvariablelisttype.ts +123 -0
- package/src/docusaurus/renderers/docxrefsecttype.ts +84 -0
- package/src/docusaurus/renderers/element-renderer-base.ts +112 -0
- package/src/docusaurus/renderers/inctype.ts +75 -0
- package/src/docusaurus/renderers/linkedtexttype.ts +64 -0
- package/src/docusaurus/renderers/listingtype.ts +235 -0
- package/src/docusaurus/renderers/paramtype.ts +116 -0
- package/src/docusaurus/renderers/referencetype.ts +83 -0
- package/src/docusaurus/renderers/reftexttype.ts +81 -0
- package/src/docusaurus/renderers/reftype.ts +77 -0
- package/src/docusaurus/renderers/renderers.ts +756 -0
- package/src/docusaurus/renderers/substringtype.ts +53 -0
- package/src/docusaurus/renderers/tableofcontentstype.ts +74 -0
- package/src/docusaurus/types.ts +187 -0
- package/src/docusaurus/utils.ts +409 -0
- package/src/docusaurus/view-model/README.md +12 -0
- package/src/docusaurus/view-model/classes-vm.ts +1088 -0
- package/src/docusaurus/view-model/collection-base.ts +352 -0
- package/src/docusaurus/view-model/compound-base-vm.ts +1340 -0
- package/src/docusaurus/view-model/concepts-vm.ts +719 -0
- package/src/docusaurus/view-model/description-anchors.ts +107 -0
- package/src/docusaurus/view-model/files-and-folders-vm.ts +1293 -0
- package/src/docusaurus/view-model/groups-vm.ts +548 -0
- package/src/docusaurus/view-model/members-vm.ts +1943 -0
- package/src/docusaurus/view-model/namespaces-vm.ts +1018 -0
- package/src/docusaurus/view-model/options.ts +95 -0
- package/src/docusaurus/view-model/pages-vm.ts +342 -0
- package/src/docusaurus/view-model/tree-entries-vm.ts +376 -0
- package/src/docusaurus/view-model/view-model.ts +513 -0
- package/src/docusaurus/workspace.ts +588 -0
- package/src/doxygen/data-model/README.md +13 -0
- package/src/doxygen/data-model/compounds/compounddef-dm.ts +1156 -0
- package/src/doxygen/data-model/compounds/compoundreftype-dm.ts +266 -0
- package/src/doxygen/data-model/compounds/descriptiontype-dm.ts +10107 -0
- package/src/doxygen/data-model/compounds/docvarlistentrytype-dm.ts +354 -0
- package/src/doxygen/data-model/compounds/doxygentype-dm.ts +187 -0
- package/src/doxygen/data-model/compounds/enumvaluetype-dm.ts +218 -0
- package/src/doxygen/data-model/compounds/inctype-dm.ts +217 -0
- package/src/doxygen/data-model/compounds/linkedtexttype-dm.ts +288 -0
- package/src/doxygen/data-model/compounds/listofallmemberstype-dm.ts +160 -0
- package/src/doxygen/data-model/compounds/locationtype-dm.ts +284 -0
- package/src/doxygen/data-model/compounds/memberdeftype-dm.ts +874 -0
- package/src/doxygen/data-model/compounds/memberreftype-dm.ts +270 -0
- package/src/doxygen/data-model/compounds/membertype-dm.ts +239 -0
- package/src/doxygen/data-model/compounds/paramtype-dm.ts +302 -0
- package/src/doxygen/data-model/compounds/referencetype-dm.ts +248 -0
- package/src/doxygen/data-model/compounds/reftexttype-dm.ts +234 -0
- package/src/doxygen/data-model/compounds/reftype-dm.ts +430 -0
- package/src/doxygen/data-model/compounds/reimplementtype-dm.ts +201 -0
- package/src/doxygen/data-model/compounds/sectiondeftype-dm.ts +330 -0
- package/src/doxygen/data-model/compounds/tableofcontentstype-dm.ts +563 -0
- package/src/doxygen/data-model/compounds/templateparamlisttype-dm.ts +150 -0
- package/src/doxygen/data-model/data-model.ts +377 -0
- package/src/doxygen/data-model/doxyfile/doxyfileoptiontype-dm.ts +271 -0
- package/src/doxygen/data-model/doxyfile/doxyfiletype-dm.ts +200 -0
- package/src/doxygen/data-model/doxygen-xml-parser.ts +522 -0
- package/src/doxygen/data-model/index/indexcompoundtype-dm.ts +256 -0
- package/src/doxygen/data-model/index/indexdoxygentype-dm.ts +196 -0
- package/src/doxygen/data-model/index/indexmembertype-dm.ts +230 -0
- package/src/doxygen/data-model/types.ts +175 -0
- package/src/doxygen/data-model/xsds/README.md +6 -0
- package/src/doxygen/data-model/xsds/compound.xsd +1699 -0
- package/src/doxygen/data-model/xsds/doxyfile.xsd +355 -0
- package/src/doxygen/data-model/xsds/index.xsd +72 -0
- package/src/doxygen/data-model/xsds/xml.xsd +23 -0
- package/src/index.ts +261 -0
- package/src/tsconfig.json +10 -0
- package/dist/doxygen2docusaurus.d.ts +0 -4774
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/dist/tsdoc-metadata.json +0 -11
|
@@ -0,0 +1,513 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* This file is part of the xPack project (http://xpack.github.io).
|
|
3
|
+
* Copyright (c) 2025-2026 Liviu Ionescu. All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
* Permission to use, copy, modify, and/or distribute this software
|
|
6
|
+
* for any purpose is hereby granted, under the terms of the MIT license.
|
|
7
|
+
*
|
|
8
|
+
* If a copy of the license was not distributed with this file, it can
|
|
9
|
+
* be obtained from https://opensource.org/licenses/MIT.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
// ----------------------------------------------------------------------------
|
|
13
|
+
|
|
14
|
+
import assert from 'node:assert'
|
|
15
|
+
|
|
16
|
+
import { AbstractCompoundDefType } from '../../doxygen/data-model/compounds/compounddef-dm.js'
|
|
17
|
+
import {
|
|
18
|
+
TocItemDataModel,
|
|
19
|
+
TocListDataModel,
|
|
20
|
+
} from '../../doxygen/data-model/compounds/tableofcontentstype-dm.js'
|
|
21
|
+
import { AbstractDataModelBase } from '../../doxygen/data-model/types.js'
|
|
22
|
+
import { Workspace } from '../workspace.js'
|
|
23
|
+
import { Classes } from './classes-vm.js'
|
|
24
|
+
import { CollectionBase } from './collection-base.js'
|
|
25
|
+
import { CompoundBase } from './compound-base-vm.js'
|
|
26
|
+
import {
|
|
27
|
+
DescriptionAnchor,
|
|
28
|
+
DescriptionTocItem,
|
|
29
|
+
DescriptionTocList,
|
|
30
|
+
} from './description-anchors.js'
|
|
31
|
+
import { FilesAndFolders } from './files-and-folders-vm.js'
|
|
32
|
+
import { Groups } from './groups-vm.js'
|
|
33
|
+
import { Member } from './members-vm.js'
|
|
34
|
+
import { Namespaces } from './namespaces-vm.js'
|
|
35
|
+
import { Pages } from './pages-vm.js'
|
|
36
|
+
import {
|
|
37
|
+
AbstractDocAnchorType,
|
|
38
|
+
AbstractDocSectType,
|
|
39
|
+
} from '../../doxygen/data-model/compounds/descriptiontype-dm.js'
|
|
40
|
+
import { stripPermalinkHexAnchor } from '../utils.js'
|
|
41
|
+
import { CliOptions } from '../cli-options.js'
|
|
42
|
+
import { Concepts } from './concepts-vm.js'
|
|
43
|
+
|
|
44
|
+
// ----------------------------------------------------------------------------
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* View model that organises data for documentation generation.
|
|
48
|
+
*
|
|
49
|
+
* @remarks
|
|
50
|
+
* The ViewModel class transforms the raw Doxygen data model into structured
|
|
51
|
+
* collections suitable for generating Docusaurus documentation, including
|
|
52
|
+
* classes, files, namespaces, and other compound types. It coordinates the
|
|
53
|
+
* entire view model creation process, from object instantiation through
|
|
54
|
+
* hierarchy establishment to cross-reference resolution.
|
|
55
|
+
*
|
|
56
|
+
* @public
|
|
57
|
+
*/
|
|
58
|
+
export class ViewModel {
|
|
59
|
+
/** Configuration options controlling the view model behaviour. */
|
|
60
|
+
options: CliOptions
|
|
61
|
+
|
|
62
|
+
/** Reference to the parent workspace containing the data model. */
|
|
63
|
+
workspace: Workspace
|
|
64
|
+
|
|
65
|
+
/** Map of collection names to their corresponding collection objects. */
|
|
66
|
+
// The key is one of the above collection names.
|
|
67
|
+
// groups, classes, namespaces, files, pages.
|
|
68
|
+
collections: Map<string, CollectionBase>
|
|
69
|
+
|
|
70
|
+
/** Map of compound identifiers to their view model objects. */
|
|
71
|
+
// View model objects.
|
|
72
|
+
compoundsById = new Map<string, CompoundBase>()
|
|
73
|
+
|
|
74
|
+
/** Map of member identifiers to their view model objects. */
|
|
75
|
+
membersById = new Map<string, Member>()
|
|
76
|
+
|
|
77
|
+
/** Array of description table of contents lists for navigation. */
|
|
78
|
+
descriptionTocLists: DescriptionTocList[] = []
|
|
79
|
+
|
|
80
|
+
/** Map of TOC item identifiers to their corresponding objects. */
|
|
81
|
+
descriptionTocItemsById = new Map<string, DescriptionTocItem>()
|
|
82
|
+
|
|
83
|
+
/** Map of description anchor identifiers to their objects. */
|
|
84
|
+
descriptionAnchorsById = new Map<string, DescriptionAnchor>()
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Constructs a new ViewModel instance.
|
|
88
|
+
*
|
|
89
|
+
* @remarks
|
|
90
|
+
* Initialises the view model with a reference to the parent workspace
|
|
91
|
+
* and sets up the collection mapping structure. This constructor prepares
|
|
92
|
+
* the foundation for transforming raw Doxygen data into organised
|
|
93
|
+
* documentation structures suitable for Docusaurus generation.
|
|
94
|
+
*
|
|
95
|
+
* @param workspace - The parent workspace containing the data model.
|
|
96
|
+
*/
|
|
97
|
+
constructor(workspace: Workspace) {
|
|
98
|
+
this.workspace = workspace
|
|
99
|
+
this.options = workspace.options
|
|
100
|
+
|
|
101
|
+
this.collections = new Map()
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Creates and populates all view model collections and objects.
|
|
106
|
+
*
|
|
107
|
+
* @remarks
|
|
108
|
+
* Orchestrates the complete view model creation process including
|
|
109
|
+
* collection instantiation, object creation, and hierarchy establishment.
|
|
110
|
+
* This method coordinates all phases of view model construction to ensure
|
|
111
|
+
* proper dependencies and cross-references are established between
|
|
112
|
+
* documentation elements.
|
|
113
|
+
*/
|
|
114
|
+
create() {
|
|
115
|
+
this.collections.set('groups', new Groups(this.workspace))
|
|
116
|
+
this.collections.set('namespaces', new Namespaces(this.workspace))
|
|
117
|
+
this.collections.set('concepts', new Concepts(this.workspace))
|
|
118
|
+
this.collections.set('classes', new Classes(this.workspace))
|
|
119
|
+
this.collections.set('files', new FilesAndFolders(this.workspace))
|
|
120
|
+
this.collections.set('pages', new Pages(this.workspace))
|
|
121
|
+
|
|
122
|
+
this.createVieModelObjects()
|
|
123
|
+
this.createCompoundsHierarchies()
|
|
124
|
+
|
|
125
|
+
this.createMembersMap()
|
|
126
|
+
|
|
127
|
+
this.initializeCompoundsLate()
|
|
128
|
+
this.initializeMemberLate()
|
|
129
|
+
|
|
130
|
+
this.validatePermalinks()
|
|
131
|
+
|
|
132
|
+
this.cleanups()
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
// --------------------------------------------------------------------------
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Creates view model objects from the parsed Doxygen compound definitions.
|
|
139
|
+
*
|
|
140
|
+
* @remarks
|
|
141
|
+
* Iterates through all compound definitions from the data model and creates
|
|
142
|
+
* corresponding view model objects, organising them into appropriate
|
|
143
|
+
* collections and establishing identifier mappings. This method also
|
|
144
|
+
* processes detailed descriptions to extract navigation elements and
|
|
145
|
+
* cross-reference anchors for comprehensive documentation structure.
|
|
146
|
+
*/
|
|
147
|
+
createVieModelObjects(): void {
|
|
148
|
+
console.log('Creating view model objects...')
|
|
149
|
+
for (const compoundDefDataModel of this.workspace.dataModel.compoundDefs) {
|
|
150
|
+
let compound: CompoundBase | undefined = undefined
|
|
151
|
+
const { kind } = compoundDefDataModel
|
|
152
|
+
|
|
153
|
+
const collectionName: string | undefined =
|
|
154
|
+
this.workspace.collectionNamesByKind[kind]
|
|
155
|
+
const collection = this.collections.get(collectionName)
|
|
156
|
+
if (collection !== undefined) {
|
|
157
|
+
// Create the compound object and add it to the parent collection.
|
|
158
|
+
if (this.options.debug) {
|
|
159
|
+
console.log(
|
|
160
|
+
compoundDefDataModel.kind,
|
|
161
|
+
compoundDefDataModel.compoundName
|
|
162
|
+
)
|
|
163
|
+
}
|
|
164
|
+
compound = collection.addChild(compoundDefDataModel)
|
|
165
|
+
// Also add it to the global compounds map.
|
|
166
|
+
this.compoundsById.set(compound.id, compound)
|
|
167
|
+
// if (this.options.debug) {
|
|
168
|
+
// console.log('compoundsById.set', compound.kind, compound.id)
|
|
169
|
+
// }
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
if (compound !== undefined) {
|
|
173
|
+
if (
|
|
174
|
+
compoundDefDataModel instanceof AbstractCompoundDefType &&
|
|
175
|
+
compoundDefDataModel.detailedDescription !== undefined
|
|
176
|
+
) {
|
|
177
|
+
this.findDescriptionIdsRecursively(
|
|
178
|
+
compound,
|
|
179
|
+
compoundDefDataModel.detailedDescription
|
|
180
|
+
)
|
|
181
|
+
}
|
|
182
|
+
} else {
|
|
183
|
+
// console.error(
|
|
184
|
+
// util.inspect(compoundDefDataModel, { compact: false, depth: 999 })
|
|
185
|
+
// )
|
|
186
|
+
console.error(
|
|
187
|
+
'compoundDefDataModel',
|
|
188
|
+
compoundDefDataModel.kind,
|
|
189
|
+
'not implemented yet in',
|
|
190
|
+
this.constructor.name,
|
|
191
|
+
'createVieModelObjects'
|
|
192
|
+
)
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
if (this.options.verbose) {
|
|
196
|
+
console.log(this.compoundsById.size, 'compound definitions')
|
|
197
|
+
}
|
|
198
|
+
// console.log(this.descriptionTocLists)
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Recursively finds and processes description identifiers within elements.
|
|
203
|
+
*
|
|
204
|
+
* @remarks
|
|
205
|
+
* Traverses the element hierarchy to locate table of contents items,
|
|
206
|
+
* document sections, and anchors, creating appropriate view model
|
|
207
|
+
* structures for navigation and cross-referencing. This recursive processing
|
|
208
|
+
* ensures comprehensive extraction of all navigational elements from
|
|
209
|
+
* complex documentation structures.
|
|
210
|
+
*
|
|
211
|
+
* @param compound - The compound containing the description elements.
|
|
212
|
+
* @param element - The data model element to process recursively.
|
|
213
|
+
*/
|
|
214
|
+
findDescriptionIdsRecursively(
|
|
215
|
+
compound: CompoundBase,
|
|
216
|
+
element: AbstractDataModelBase
|
|
217
|
+
): void {
|
|
218
|
+
// console.log(compound.id, typeof element)
|
|
219
|
+
if (element.children === undefined) {
|
|
220
|
+
return
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
for (const childDataModel of element.children) {
|
|
224
|
+
if (childDataModel instanceof TocListDataModel) {
|
|
225
|
+
const tocList = new DescriptionTocList(compound)
|
|
226
|
+
// console.log(elementChild)
|
|
227
|
+
assert(childDataModel.tocItems !== undefined)
|
|
228
|
+
for (const tocItemDataModel of childDataModel.tocItems) {
|
|
229
|
+
if (tocItemDataModel instanceof TocItemDataModel) {
|
|
230
|
+
const tocItem = new DescriptionTocItem(tocItemDataModel.id, tocList)
|
|
231
|
+
tocList.tocItems.push(tocItem)
|
|
232
|
+
this.descriptionTocItemsById.set(tocItem.id, tocItem)
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
this.descriptionTocLists.push(tocList)
|
|
236
|
+
} else if (childDataModel instanceof AbstractDocSectType) {
|
|
237
|
+
if (childDataModel.id !== undefined) {
|
|
238
|
+
const anchor = new DescriptionAnchor(compound, childDataModel.id)
|
|
239
|
+
this.descriptionAnchorsById.set(anchor.id, anchor)
|
|
240
|
+
}
|
|
241
|
+
this.findDescriptionIdsRecursively(compound, childDataModel)
|
|
242
|
+
} else if (childDataModel instanceof AbstractDocAnchorType) {
|
|
243
|
+
// console.log(childDataModel)
|
|
244
|
+
if (childDataModel.id.length > 0) {
|
|
245
|
+
const section = new DescriptionAnchor(compound, childDataModel.id)
|
|
246
|
+
this.descriptionAnchorsById.set(section.id, section)
|
|
247
|
+
}
|
|
248
|
+
} else if (childDataModel instanceof AbstractDataModelBase) {
|
|
249
|
+
// if (childDataModel instanceof AbstractDocEntryType) {
|
|
250
|
+
// console.log(childDataModel)
|
|
251
|
+
// }
|
|
252
|
+
this.findDescriptionIdsRecursively(compound, childDataModel)
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
// --------------------------------------------------------------------------
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Establishes hierarchical relationships between compound objects.
|
|
261
|
+
*
|
|
262
|
+
* @remarks
|
|
263
|
+
* Delegates to each collection to create parent-child relationships
|
|
264
|
+
* and other hierarchical structures within the compound objects. This
|
|
265
|
+
* phase is essential for building proper navigation trees and inheritance
|
|
266
|
+
* relationships that reflect the original code structure.
|
|
267
|
+
*/
|
|
268
|
+
createCompoundsHierarchies(): void {
|
|
269
|
+
if (this.options.verbose) {
|
|
270
|
+
console.log()
|
|
271
|
+
}
|
|
272
|
+
console.log('Creating compounds hierarchies...')
|
|
273
|
+
|
|
274
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
275
|
+
for (const [collectionName, collection] of this.collections) {
|
|
276
|
+
// console.log('createHierarchies:', collectionName)
|
|
277
|
+
collection.createCompoundsHierarchies()
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
// --------------------------------------------------------------------------
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* Performs late initialisation of compound objects.
|
|
285
|
+
*
|
|
286
|
+
* @remarks
|
|
287
|
+
* Executes initialisation tasks that require all objects to be created
|
|
288
|
+
* first, allowing for proper cross-reference resolution and relationship
|
|
289
|
+
* establishment between compounds. This phase ensures that complex
|
|
290
|
+
* inter-compound dependencies are properly resolved after the initial
|
|
291
|
+
* object creation phase.
|
|
292
|
+
*/
|
|
293
|
+
// Required since references can be resolved only after all objects are in.
|
|
294
|
+
initializeCompoundsLate(): void {
|
|
295
|
+
if (this.options.verbose) {
|
|
296
|
+
console.log()
|
|
297
|
+
}
|
|
298
|
+
console.log('Performing compounds late initializations...')
|
|
299
|
+
|
|
300
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
301
|
+
for (const [collectionName, collection] of this.collections) {
|
|
302
|
+
// console.log('createHierarchies:', collectionName)
|
|
303
|
+
for (const [, compound] of collection.collectionCompoundsById) {
|
|
304
|
+
if (this.options.debug) {
|
|
305
|
+
console.log(compound.kind, compound.compoundName)
|
|
306
|
+
}
|
|
307
|
+
compound.initializeLate()
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
// --------------------------------------------------------------------------
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* Creates a comprehensive map of all member definitions.
|
|
316
|
+
*
|
|
317
|
+
* @remarks
|
|
318
|
+
* Iterates through all compounds and their sections to build a complete
|
|
319
|
+
* mapping of member identifiers to their objects, enabling efficient
|
|
320
|
+
* member lookup and cross-referencing. This method handles member
|
|
321
|
+
* deduplication and ensures that members are properly associated with
|
|
322
|
+
* their containing compounds.
|
|
323
|
+
*/
|
|
324
|
+
createMembersMap(): void {
|
|
325
|
+
if (this.options.verbose) {
|
|
326
|
+
console.log()
|
|
327
|
+
}
|
|
328
|
+
console.log('Creating member definitions map...')
|
|
329
|
+
for (const [, compound] of this.compoundsById) {
|
|
330
|
+
// console.log(compound.kind, compound.compoundName, compound.id)
|
|
331
|
+
for (const section of compound.sections) {
|
|
332
|
+
// console.log(' ', sectionDef.kind)
|
|
333
|
+
for (const member of section.indexMembers) {
|
|
334
|
+
if (member instanceof Member) {
|
|
335
|
+
const memberCompoundId = stripPermalinkHexAnchor(member.id)
|
|
336
|
+
if (memberCompoundId !== compound.id) {
|
|
337
|
+
// Skip member definitions from different compounds.
|
|
338
|
+
// Hopefully they are defined properly there.
|
|
339
|
+
// console.log(
|
|
340
|
+
// 'member from another compound', compoundId, 'skipped'
|
|
341
|
+
// )
|
|
342
|
+
} else {
|
|
343
|
+
// console.log(' ', memberDef.kind, memberDef.id)
|
|
344
|
+
|
|
345
|
+
if (this.membersById.has(member.id)) {
|
|
346
|
+
if (this.options.verbose) {
|
|
347
|
+
console.warn(
|
|
348
|
+
'member already in map',
|
|
349
|
+
member.id,
|
|
350
|
+
'in',
|
|
351
|
+
this.membersById.get(member.id)?.name
|
|
352
|
+
)
|
|
353
|
+
}
|
|
354
|
+
} else {
|
|
355
|
+
this.membersById.set(member.id, member)
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
if (this.options.verbose) {
|
|
363
|
+
console.log(this.membersById.size, 'member definitions')
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
// --------------------------------------------------------------------------
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* Performs late initialisation of member objects.
|
|
371
|
+
*
|
|
372
|
+
* @remarks
|
|
373
|
+
* Executes member initialisation tasks that depend on all objects being
|
|
374
|
+
* created, ensuring proper cross-references and relationships are
|
|
375
|
+
* established between members and their containing compounds. This phase
|
|
376
|
+
* completes the member setup process after all structural relationships
|
|
377
|
+
* have been established.
|
|
378
|
+
*/
|
|
379
|
+
// Required since references can be resolved only after all objects are in.
|
|
380
|
+
initializeMemberLate(): void {
|
|
381
|
+
if (this.options.verbose) {
|
|
382
|
+
console.log()
|
|
383
|
+
}
|
|
384
|
+
console.log('Performing members late initializations...')
|
|
385
|
+
for (const [, compound] of this.compoundsById) {
|
|
386
|
+
if (this.options.debug) {
|
|
387
|
+
console.log(compound.kind, compound.compoundName, compound.id)
|
|
388
|
+
}
|
|
389
|
+
for (const section of compound.sections) {
|
|
390
|
+
section.initializeLate()
|
|
391
|
+
|
|
392
|
+
if (this.options.debug) {
|
|
393
|
+
console.log(' ', section.kind)
|
|
394
|
+
}
|
|
395
|
+
for (const member of section.indexMembers) {
|
|
396
|
+
if (member instanceof Member) {
|
|
397
|
+
if (this.options.debug) {
|
|
398
|
+
console.log(' ', member.kind, member.id)
|
|
399
|
+
}
|
|
400
|
+
member.initializeLate()
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
// --------------------------------------------------------------------------
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* Validates and resolves permalink uniqueness across all compounds.
|
|
411
|
+
*
|
|
412
|
+
* @remarks
|
|
413
|
+
* Ensures that all generated permalinks are unique by detecting conflicts
|
|
414
|
+
* and automatically appending suffixes to duplicate permalinks, maintaining
|
|
415
|
+
* proper navigation and linking functionality. This validation process is
|
|
416
|
+
* crucial for preventing URL conflicts in the generated documentation site.
|
|
417
|
+
*/
|
|
418
|
+
/**
|
|
419
|
+
* @brief Validate the uniqueness of permalinks.
|
|
420
|
+
*/
|
|
421
|
+
validatePermalinks(): void {
|
|
422
|
+
if (this.options.verbose) {
|
|
423
|
+
console.log()
|
|
424
|
+
}
|
|
425
|
+
console.log('Validating permalinks...')
|
|
426
|
+
|
|
427
|
+
const pagePermalinksById = new Map<string, string>()
|
|
428
|
+
const compoundsByPermalink = new Map<string, Map<string, CompoundBase>>()
|
|
429
|
+
|
|
430
|
+
for (const compoundDefDataModel of this.workspace.dataModel.compoundDefs) {
|
|
431
|
+
// console.log(
|
|
432
|
+
// compoundDefDataModel.kind, compoundDefDataModel.compoundName
|
|
433
|
+
// )
|
|
434
|
+
const { id } = compoundDefDataModel
|
|
435
|
+
if (pagePermalinksById.has(id)) {
|
|
436
|
+
console.warn('Duplicate id', id)
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
const compound: CompoundBase | undefined = this.compoundsById.get(id)
|
|
440
|
+
if (compound === undefined) {
|
|
441
|
+
console.error(
|
|
442
|
+
'compoundDefDataModel',
|
|
443
|
+
id,
|
|
444
|
+
'not yet processed in',
|
|
445
|
+
this.constructor.name,
|
|
446
|
+
'validatePermalinks'
|
|
447
|
+
)
|
|
448
|
+
continue
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
const permalink = compound.relativePermalink
|
|
452
|
+
if (permalink !== undefined) {
|
|
453
|
+
// console.log('permalink:', permalink)
|
|
454
|
+
let compoundsMap = compoundsByPermalink.get(permalink)
|
|
455
|
+
if (compoundsMap === undefined) {
|
|
456
|
+
compoundsMap = new Map()
|
|
457
|
+
compoundsByPermalink.set(permalink, compoundsMap)
|
|
458
|
+
}
|
|
459
|
+
pagePermalinksById.set(id, permalink)
|
|
460
|
+
if (!compoundsMap.has(compound.id)) {
|
|
461
|
+
compoundsMap.set(compound.id, compound)
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
for (const [permalink, compoundsMap] of compoundsByPermalink) {
|
|
467
|
+
if (compoundsMap.size > 1) {
|
|
468
|
+
if (this.options.verbose) {
|
|
469
|
+
console.warn(
|
|
470
|
+
'Permalink',
|
|
471
|
+
permalink,
|
|
472
|
+
'has',
|
|
473
|
+
compoundsMap.size,
|
|
474
|
+
'occurrences:'
|
|
475
|
+
)
|
|
476
|
+
}
|
|
477
|
+
let count = 1
|
|
478
|
+
for (const [, compound] of compoundsMap) {
|
|
479
|
+
const suffix = `-${count.toString()}`
|
|
480
|
+
count += 1
|
|
481
|
+
assert(compound.relativePermalink !== undefined)
|
|
482
|
+
compound.relativePermalink += suffix
|
|
483
|
+
assert(compound.sidebarId !== undefined)
|
|
484
|
+
compound.sidebarId += suffix
|
|
485
|
+
|
|
486
|
+
if (this.options.verbose) {
|
|
487
|
+
console.warn('-', compound.relativePermalink, compound.id)
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
// --------------------------------------------------------------------------
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* Performs cleanup operations on view model objects.
|
|
498
|
+
*
|
|
499
|
+
* @remarks
|
|
500
|
+
* Removes references to the original compound definition data models
|
|
501
|
+
* to free memory and prevent potential circular references after
|
|
502
|
+
* the view model creation is complete. This cleanup phase optimises
|
|
503
|
+
* memory usage by removing unnecessary data model references that
|
|
504
|
+
* are no longer needed for documentation generation.
|
|
505
|
+
*/
|
|
506
|
+
cleanups(): void {
|
|
507
|
+
for (const [, compound] of this.compoundsById) {
|
|
508
|
+
compound._private._compoundDef = undefined
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
// ----------------------------------------------------------------------------
|