@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,588 @@
|
|
|
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
|
+
import * as fs from 'node:fs/promises'
|
|
16
|
+
// import * as util from 'node:util'
|
|
17
|
+
import path from 'node:path'
|
|
18
|
+
import { fileURLToPath } from 'node:url'
|
|
19
|
+
|
|
20
|
+
import { ParaDataModel } from '../doxygen/data-model/compounds/descriptiontype-dm.js'
|
|
21
|
+
import { AbstractDataModelBase } from '../doxygen/data-model/types.js'
|
|
22
|
+
import { type DataModel } from '../doxygen/data-model/data-model.js'
|
|
23
|
+
import { Renderers } from './renderers/renderers.js'
|
|
24
|
+
import type { CliOptions } from './cli-options.js'
|
|
25
|
+
import type { FrontMatter } from './types.js'
|
|
26
|
+
import type { CompoundBase } from './view-model/compound-base-vm.js'
|
|
27
|
+
import { type File } from './view-model/files-and-folders-vm.js'
|
|
28
|
+
import { DoxygenFileOptions } from './view-model/options.js'
|
|
29
|
+
import { type Page } from './view-model/pages-vm.js'
|
|
30
|
+
import {
|
|
31
|
+
stripPermalinkHexAnchor,
|
|
32
|
+
getPermalinkAnchor,
|
|
33
|
+
stripPermalinkTextAnchor,
|
|
34
|
+
} from './utils.js'
|
|
35
|
+
import { ViewModel } from './view-model/view-model.js'
|
|
36
|
+
|
|
37
|
+
// ----------------------------------------------------------------------------
|
|
38
|
+
// <xsd:simpleType name="DoxCompoundKind">
|
|
39
|
+
// <xsd:restriction base="xsd:string">
|
|
40
|
+
// <xsd:enumeration value="class" />
|
|
41
|
+
// <xsd:enumeration value="struct" />
|
|
42
|
+
// <xsd:enumeration value="union" />
|
|
43
|
+
// <xsd:enumeration value="interface" />
|
|
44
|
+
// <xsd:enumeration value="protocol" />
|
|
45
|
+
// <xsd:enumeration value="category" />
|
|
46
|
+
// <xsd:enumeration value="exception" />
|
|
47
|
+
// <xsd:enumeration value="service" />
|
|
48
|
+
// <xsd:enumeration value="singleton" />
|
|
49
|
+
// <xsd:enumeration value="module" />
|
|
50
|
+
// <xsd:enumeration value="type" />
|
|
51
|
+
// <xsd:enumeration value="file" />
|
|
52
|
+
// <xsd:enumeration value="namespace" />
|
|
53
|
+
// <xsd:enumeration value="group" />
|
|
54
|
+
// <xsd:enumeration value="page" />
|
|
55
|
+
// <xsd:enumeration value="example" />
|
|
56
|
+
// <xsd:enumeration value="dir" />
|
|
57
|
+
// <xsd:enumeration value="concept" />
|
|
58
|
+
// </xsd:restriction>
|
|
59
|
+
// </xsd:simpleType>
|
|
60
|
+
// ----------------------------------------------------------------------------
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Central workspace that coordinates the conversion process.
|
|
64
|
+
*
|
|
65
|
+
* @remarks
|
|
66
|
+
* The Workspace class serves as the primary orchestrator for transforming
|
|
67
|
+
* Doxygen XML data into Docusaurus-compatible documentation. It manages
|
|
68
|
+
* the data model, view model, rendering system, and output generation whilst
|
|
69
|
+
* providing centralised configuration and URL management for consistent
|
|
70
|
+
* documentation structure across all generated content.
|
|
71
|
+
*
|
|
72
|
+
* @public
|
|
73
|
+
*/
|
|
74
|
+
export class Workspace extends Renderers {
|
|
75
|
+
/** Configuration options controlling the conversion process. */
|
|
76
|
+
// From the project docusaurus.config.ts or defaults.
|
|
77
|
+
options: CliOptions
|
|
78
|
+
|
|
79
|
+
/** The parsed Doxygen data model containing all source information. */
|
|
80
|
+
// The data parsed from the Doxygen XML files.
|
|
81
|
+
dataModel: DataModel
|
|
82
|
+
|
|
83
|
+
/** The view model that structures data for documentation generation. */
|
|
84
|
+
viewModel: ViewModel
|
|
85
|
+
|
|
86
|
+
/** The absolute path to the doxygen2docusaurus project directory. */
|
|
87
|
+
// The doxygen2docusaurus project path.
|
|
88
|
+
projectPath: string
|
|
89
|
+
|
|
90
|
+
/** Doxygen configuration options from the original build process. */
|
|
91
|
+
// The many options used by Doxygen during build.
|
|
92
|
+
doxygenOptions: DoxygenFileOptions
|
|
93
|
+
|
|
94
|
+
/** The absolute base URL for the generated documentation site. */
|
|
95
|
+
// Like `/micro-os-plus/docs/api/`.
|
|
96
|
+
absoluteBaseUrl: string
|
|
97
|
+
|
|
98
|
+
/** The page base URL for individual documentation pages. */
|
|
99
|
+
// Like `/micro-os-plus/docs/api/`.
|
|
100
|
+
pageBaseUrl: string
|
|
101
|
+
|
|
102
|
+
/** The slug base URL for Docusaurus routing. */
|
|
103
|
+
// Like `/api/`.
|
|
104
|
+
slugBaseUrl: string
|
|
105
|
+
|
|
106
|
+
/** The menu base URL for navigation elements. */
|
|
107
|
+
// Like `/docs/api/`.
|
|
108
|
+
menuBaseUrl: string
|
|
109
|
+
|
|
110
|
+
/** The output folder path for generated Markdown files. */
|
|
111
|
+
// Like `docs/api/`.
|
|
112
|
+
outputFolderPath: string
|
|
113
|
+
|
|
114
|
+
/** The sidebar base identifier for navigation structure. */
|
|
115
|
+
// like `api/`.
|
|
116
|
+
sidebarBaseId: string
|
|
117
|
+
|
|
118
|
+
/** The main page compound, if one exists in the documentation. */
|
|
119
|
+
mainPage: Page | undefined
|
|
120
|
+
|
|
121
|
+
/** Map of file paths to their corresponding File objects. */
|
|
122
|
+
filesByPath = new Map<string, File>()
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* @brief Map to keep track of indices that have content.
|
|
126
|
+
*
|
|
127
|
+
* @details
|
|
128
|
+
* The map keys are:
|
|
129
|
+
* - classes
|
|
130
|
+
* - namespaces
|
|
131
|
+
* - files
|
|
132
|
+
*
|
|
133
|
+
* and the Set may include:
|
|
134
|
+
* - all
|
|
135
|
+
* - classes
|
|
136
|
+
* - namespaces
|
|
137
|
+
* - functions
|
|
138
|
+
* - variables
|
|
139
|
+
* - typedefs
|
|
140
|
+
* - enums
|
|
141
|
+
* - enumvalues
|
|
142
|
+
*/
|
|
143
|
+
indicesMaps = new Map<string, Set<string>>()
|
|
144
|
+
|
|
145
|
+
/** Counter for the total number of Markdown files written. */
|
|
146
|
+
writtenMdFilesCounter = 0
|
|
147
|
+
|
|
148
|
+
/** Counter for the total number of HTML redirect files written. */
|
|
149
|
+
writtenHtmlFilesCounter = 0
|
|
150
|
+
|
|
151
|
+
/** Mapping of Doxygen compound kinds to collection names. */
|
|
152
|
+
collectionNamesByKind: Record<string, string> = {
|
|
153
|
+
class: 'classes',
|
|
154
|
+
struct: 'classes',
|
|
155
|
+
union: 'classes',
|
|
156
|
+
// interface
|
|
157
|
+
// protocol
|
|
158
|
+
// category
|
|
159
|
+
// exception
|
|
160
|
+
// service
|
|
161
|
+
// singleton
|
|
162
|
+
// module
|
|
163
|
+
// type
|
|
164
|
+
file: 'files',
|
|
165
|
+
namespace: 'namespaces',
|
|
166
|
+
group: 'groups',
|
|
167
|
+
page: 'pages',
|
|
168
|
+
// example
|
|
169
|
+
dir: 'files',
|
|
170
|
+
concept: 'concepts',
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/** Defines the order of entries in the sidebar and top menu dropdown. */
|
|
174
|
+
// The order of entries in the sidebar and in the top menu dropdown.
|
|
175
|
+
sidebarCollectionNames: string[] = [
|
|
176
|
+
'groups',
|
|
177
|
+
'namespaces',
|
|
178
|
+
'concepts',
|
|
179
|
+
'classes',
|
|
180
|
+
'files',
|
|
181
|
+
'pages',
|
|
182
|
+
]
|
|
183
|
+
|
|
184
|
+
// --------------------------------------------------------------------------
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Constructs a new Workspace instance.
|
|
188
|
+
*
|
|
189
|
+
* @remarks
|
|
190
|
+
* Initialises the workspace with the provided data model and sets up
|
|
191
|
+
* the necessary paths, URLs, and configuration for documentation generation.
|
|
192
|
+
* This includes configuring base URLs, output paths, sidebar identifiers,
|
|
193
|
+
* and establishing the view model for structured documentation creation.
|
|
194
|
+
*
|
|
195
|
+
* @param dataModel - The parsed Doxygen data model.
|
|
196
|
+
*/
|
|
197
|
+
constructor(dataModel: DataModel) {
|
|
198
|
+
super()
|
|
199
|
+
console.log()
|
|
200
|
+
|
|
201
|
+
this.dataModel = dataModel
|
|
202
|
+
this.options = dataModel.options
|
|
203
|
+
|
|
204
|
+
// Like .../doxygen2docusaurus/dist/docusaurus/generator
|
|
205
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
|
206
|
+
|
|
207
|
+
// doxygen2docusaurus
|
|
208
|
+
this.projectPath = path.dirname(path.dirname(__dirname))
|
|
209
|
+
// console.log(__dirname, this.projectPath)
|
|
210
|
+
|
|
211
|
+
this.doxygenOptions = new DoxygenFileOptions(
|
|
212
|
+
this.dataModel.doxyfile?.options
|
|
213
|
+
)
|
|
214
|
+
|
|
215
|
+
const docsFolderPath = this.options.docsFolderPath
|
|
216
|
+
.replace(/^[/]/, '')
|
|
217
|
+
.replace(/[/]$/, '')
|
|
218
|
+
const apiFolderPath = this.options.apiFolderPath
|
|
219
|
+
.replace(/^[/]/, '')
|
|
220
|
+
.replace(/[/]$/, '')
|
|
221
|
+
|
|
222
|
+
this.outputFolderPath = `${docsFolderPath}/${apiFolderPath}/`
|
|
223
|
+
|
|
224
|
+
this.sidebarBaseId = `${apiFolderPath}/`
|
|
225
|
+
|
|
226
|
+
const docsBaseUrl = this.options.docsBaseUrl
|
|
227
|
+
.replace(/^[/]/, '')
|
|
228
|
+
.replace(/[/]$/, '')
|
|
229
|
+
let apiBaseUrl = this.options.apiBaseUrl
|
|
230
|
+
.replace(/^[/]/, '')
|
|
231
|
+
.replace(/[/]$/, '')
|
|
232
|
+
if (apiBaseUrl.length > 0) {
|
|
233
|
+
apiBaseUrl += '/'
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
const baseUrl = this.options.baseUrl
|
|
237
|
+
this.absoluteBaseUrl = `${baseUrl}${docsBaseUrl}/${apiBaseUrl}`
|
|
238
|
+
this.pageBaseUrl = `${baseUrl}${docsBaseUrl}/${apiBaseUrl}`
|
|
239
|
+
this.slugBaseUrl = `/${apiBaseUrl}`
|
|
240
|
+
this.menuBaseUrl = `/${docsBaseUrl}/${apiBaseUrl}`
|
|
241
|
+
|
|
242
|
+
this.registerRenderers(this)
|
|
243
|
+
|
|
244
|
+
this.viewModel = new ViewModel(this)
|
|
245
|
+
this.viewModel.create()
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
// --------------------------------------------------------------------------
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* Writes a Markdown output file with proper front matter and formatting.
|
|
252
|
+
*
|
|
253
|
+
* @remarks
|
|
254
|
+
* Creates a complete Docusaurus-compatible Markdown file including YAML
|
|
255
|
+
* front matter, content body, and generated footer information. The method
|
|
256
|
+
* handles permalink processing, emoji prevention, and proper file structure
|
|
257
|
+
* to ensure optimal integration with Docusaurus documentation sites.
|
|
258
|
+
*
|
|
259
|
+
* @param filePath - The output file path for the Markdown file.
|
|
260
|
+
* @param bodyLines - Array of content lines for the file body.
|
|
261
|
+
* @param frontMatter - YAML front matter configuration object.
|
|
262
|
+
* @param frontMatterCodeLines - Optional additional front matter code.
|
|
263
|
+
* @param title - Optional page title if not specified in front matter.
|
|
264
|
+
* @param pagePermalink - Optional page permalink for anchor processing.
|
|
265
|
+
*/
|
|
266
|
+
async writeOutputMdFile({
|
|
267
|
+
filePath,
|
|
268
|
+
bodyLines,
|
|
269
|
+
frontMatter,
|
|
270
|
+
frontMatterCodeLines,
|
|
271
|
+
title,
|
|
272
|
+
pagePermalink,
|
|
273
|
+
}: {
|
|
274
|
+
filePath: string
|
|
275
|
+
bodyLines: string[]
|
|
276
|
+
frontMatter: FrontMatter
|
|
277
|
+
frontMatterCodeLines?: string[]
|
|
278
|
+
title?: string
|
|
279
|
+
pagePermalink?: string
|
|
280
|
+
}): Promise<void> {
|
|
281
|
+
const lines: string[] = []
|
|
282
|
+
|
|
283
|
+
lines.push('')
|
|
284
|
+
lines.push('<div class="doxyPage">')
|
|
285
|
+
|
|
286
|
+
if (frontMatter.title === undefined && title !== undefined) {
|
|
287
|
+
lines.push('')
|
|
288
|
+
lines.push(`# ${title}`)
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
lines.push('')
|
|
292
|
+
lines.push(...bodyLines)
|
|
293
|
+
lines.push('')
|
|
294
|
+
lines.push('<hr/>')
|
|
295
|
+
lines.push('')
|
|
296
|
+
assert(this.dataModel.doxygenindex?.version !== undefined)
|
|
297
|
+
assert(this.dataModel.projectVersion !== undefined)
|
|
298
|
+
lines.push(
|
|
299
|
+
'<p class="doxyGeneratedBy">Generated via ' +
|
|
300
|
+
'<a href="https://xpack.github.io/doxygen2docusaurus">' +
|
|
301
|
+
'doxygen2docusaurus</a> ' +
|
|
302
|
+
this.dataModel.projectVersion +
|
|
303
|
+
' by ' +
|
|
304
|
+
'<a href="https://www.doxygen.nl">Doxygen</a> ' +
|
|
305
|
+
this.dataModel.doxygenindex.version +
|
|
306
|
+
'.' +
|
|
307
|
+
'</p>'
|
|
308
|
+
)
|
|
309
|
+
lines.push('')
|
|
310
|
+
lines.push('</div>')
|
|
311
|
+
lines.push('')
|
|
312
|
+
|
|
313
|
+
// Hack to prevent Docusaurus replace legit content with emojis.
|
|
314
|
+
let text = lines.join('\n')
|
|
315
|
+
if (pagePermalink !== undefined && pagePermalink.length > 0) {
|
|
316
|
+
// Strip local page permalink from anchors.
|
|
317
|
+
text = text.replaceAll(`"${pagePermalink}/#`, '"#')
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
// No longer needed for `.md`.
|
|
321
|
+
// text = text.replaceAll(':thread:', "{':thread:'}")
|
|
322
|
+
// .replaceAll(':flags:', "{':flags:'}")
|
|
323
|
+
// https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-content-docs#markdown-front-matter
|
|
324
|
+
const frontMatterLines: string[] = []
|
|
325
|
+
|
|
326
|
+
frontMatterLines.push('---')
|
|
327
|
+
frontMatterLines.push('')
|
|
328
|
+
frontMatterLines.push('# DO NOT EDIT!')
|
|
329
|
+
frontMatterLines.push(
|
|
330
|
+
'# Automatically generated via doxygen2docusaurus by Doxygen.'
|
|
331
|
+
)
|
|
332
|
+
frontMatterLines.push('')
|
|
333
|
+
for (const [key, value] of Object.entries(frontMatter)) {
|
|
334
|
+
if (Array.isArray(value)) {
|
|
335
|
+
frontMatterLines.push(`${key}:`)
|
|
336
|
+
|
|
337
|
+
for (const arrayValue of value) {
|
|
338
|
+
frontMatterLines.push(` - ${arrayValue}`)
|
|
339
|
+
}
|
|
340
|
+
} else if (typeof value === 'boolean') {
|
|
341
|
+
frontMatterLines.push(`${key}: ${value ? 'true' : 'false'}`)
|
|
342
|
+
} else if (value == null) {
|
|
343
|
+
frontMatterLines.push(`${key}: null`)
|
|
344
|
+
} else {
|
|
345
|
+
frontMatterLines.push(`${key}: ${value.toString()}`)
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
frontMatterLines.push('')
|
|
349
|
+
|
|
350
|
+
// Skip date, to avoid unnecessary git commits.
|
|
351
|
+
// frontMatterText += `date: ${formatDate(new Date())}\n`
|
|
352
|
+
// frontMatterText += '\n'
|
|
353
|
+
frontMatterLines.push('---')
|
|
354
|
+
frontMatterLines.push('')
|
|
355
|
+
|
|
356
|
+
if (frontMatterCodeLines !== undefined && frontMatterCodeLines.length > 0) {
|
|
357
|
+
frontMatterLines.push('')
|
|
358
|
+
for (const line of frontMatterCodeLines) {
|
|
359
|
+
frontMatterLines.push(line)
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
await fs.mkdir(path.dirname(filePath), { recursive: true })
|
|
364
|
+
const fileHandle = await fs.open(filePath, 'ax')
|
|
365
|
+
|
|
366
|
+
await fileHandle.write(frontMatterLines.join('\n'))
|
|
367
|
+
await fileHandle.write(text)
|
|
368
|
+
|
|
369
|
+
await fileHandle.close()
|
|
370
|
+
|
|
371
|
+
this.writtenMdFilesCounter += 1
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
// --------------------------------------------------------------------------
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* Marks paragraph elements to be skipped during rendering.
|
|
378
|
+
*
|
|
379
|
+
* @remarks
|
|
380
|
+
* Processes an array of elements and sets the skipPara flag on any
|
|
381
|
+
* ParaDataModel instances to prevent them from being rendered. This
|
|
382
|
+
* functionality is essential for controlling paragraph output in contexts
|
|
383
|
+
* where specific formatting requirements must be maintained.
|
|
384
|
+
*
|
|
385
|
+
* @param elements - Array of elements to process for paragraph skipping.
|
|
386
|
+
*/
|
|
387
|
+
skipElementsPara(
|
|
388
|
+
elements: (AbstractDataModelBase | string)[] | undefined
|
|
389
|
+
): void {
|
|
390
|
+
if (elements === undefined) {
|
|
391
|
+
return
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
for (const child of elements) {
|
|
395
|
+
if (child instanceof ParaDataModel) {
|
|
396
|
+
child.skipPara = true
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
// --------------------------------------------------------------------------
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
* Resolves a reference identifier to its corresponding permalink URL.
|
|
405
|
+
*
|
|
406
|
+
* @remarks
|
|
407
|
+
* Determines the appropriate permalink for a given reference based on
|
|
408
|
+
* the reference type (compound, member, or xrefsect) and constructs
|
|
409
|
+
* the full URL including anchors where applicable. This method handles
|
|
410
|
+
* complex reference resolution including table of contents items and
|
|
411
|
+
* description sections for comprehensive cross-referencing capabilities.
|
|
412
|
+
*
|
|
413
|
+
* @param refid - The reference identifier to resolve.
|
|
414
|
+
* @param kindref - The kind of reference ('compound', 'member', 'xrefsect').
|
|
415
|
+
* @returns The resolved permalink URL, or undefined if not found.
|
|
416
|
+
*/
|
|
417
|
+
getPermalink({
|
|
418
|
+
refid,
|
|
419
|
+
kindref,
|
|
420
|
+
}: {
|
|
421
|
+
refid: string | undefined
|
|
422
|
+
kindref: string // 'compound', 'member'
|
|
423
|
+
}): string | undefined {
|
|
424
|
+
// console.log(refid, kindref)
|
|
425
|
+
|
|
426
|
+
let permalink: string | undefined = undefined
|
|
427
|
+
if (refid == undefined || refid.length === 0) {
|
|
428
|
+
return undefined
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
if (kindref === 'compound') {
|
|
432
|
+
permalink = this.getPagePermalink(refid)
|
|
433
|
+
} else if (kindref === 'member') {
|
|
434
|
+
const anchor = getPermalinkAnchor(refid)
|
|
435
|
+
const compoundId = stripPermalinkHexAnchor(refid)
|
|
436
|
+
// console.log(
|
|
437
|
+
// 'refid:', refid, 'compoundId:', compoundId, 'anchor:', anchor
|
|
438
|
+
// )
|
|
439
|
+
permalink = this.getPagePermalink(compoundId, true)
|
|
440
|
+
if (permalink !== undefined) {
|
|
441
|
+
permalink += `/#${anchor}`
|
|
442
|
+
} else {
|
|
443
|
+
const tocItem = this.viewModel.descriptionTocItemsById.get(refid)
|
|
444
|
+
if (tocItem !== undefined) {
|
|
445
|
+
const { tocList } = tocItem
|
|
446
|
+
permalink = this.getPagePermalink(tocList.compound.id)
|
|
447
|
+
if (permalink !== undefined) {
|
|
448
|
+
permalink += `/#${anchor}`
|
|
449
|
+
} else {
|
|
450
|
+
console.error(
|
|
451
|
+
'Unknown permalink of',
|
|
452
|
+
tocList.compound.id,
|
|
453
|
+
'for',
|
|
454
|
+
refid,
|
|
455
|
+
'in',
|
|
456
|
+
this.constructor.name,
|
|
457
|
+
'getPermalink'
|
|
458
|
+
)
|
|
459
|
+
}
|
|
460
|
+
} else {
|
|
461
|
+
const descriptionSection =
|
|
462
|
+
this.viewModel.descriptionAnchorsById.get(refid)
|
|
463
|
+
if (descriptionSection !== undefined) {
|
|
464
|
+
permalink = this.getPagePermalink(descriptionSection.compound.id)
|
|
465
|
+
if (permalink !== undefined) {
|
|
466
|
+
permalink += `/#${anchor}`
|
|
467
|
+
} else {
|
|
468
|
+
console.error(
|
|
469
|
+
'Unknown permalink of',
|
|
470
|
+
descriptionSection.compound.id,
|
|
471
|
+
'for',
|
|
472
|
+
refid,
|
|
473
|
+
'in',
|
|
474
|
+
this.constructor.name,
|
|
475
|
+
'getPermalink'
|
|
476
|
+
)
|
|
477
|
+
}
|
|
478
|
+
} else {
|
|
479
|
+
console.error(
|
|
480
|
+
'Unknown permalink for',
|
|
481
|
+
refid,
|
|
482
|
+
'in',
|
|
483
|
+
this.constructor.name,
|
|
484
|
+
'getPermalink'
|
|
485
|
+
)
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
// console.log(permalink)
|
|
490
|
+
// }
|
|
491
|
+
} else if (kindref === 'xrefsect') {
|
|
492
|
+
const anchor = getPermalinkAnchor(refid)
|
|
493
|
+
const compoundId = stripPermalinkTextAnchor(refid)
|
|
494
|
+
// console.log(
|
|
495
|
+
// 'refid:', refid, 'compoundId:', compoundId, 'anchor:', anchor
|
|
496
|
+
// )
|
|
497
|
+
permalink = this.getPagePermalink(compoundId, true)
|
|
498
|
+
if (permalink !== undefined) {
|
|
499
|
+
permalink += `/#${anchor}`
|
|
500
|
+
} else {
|
|
501
|
+
console.error(
|
|
502
|
+
'Unknown permalink for',
|
|
503
|
+
refid,
|
|
504
|
+
'in',
|
|
505
|
+
this.constructor.name,
|
|
506
|
+
'getPermalink'
|
|
507
|
+
)
|
|
508
|
+
}
|
|
509
|
+
// console.log(permalink)
|
|
510
|
+
// }
|
|
511
|
+
} else {
|
|
512
|
+
console.error(
|
|
513
|
+
'Unsupported kindref',
|
|
514
|
+
kindref,
|
|
515
|
+
'for',
|
|
516
|
+
refid,
|
|
517
|
+
'in',
|
|
518
|
+
this.constructor.name,
|
|
519
|
+
'getPermalink'
|
|
520
|
+
)
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
return permalink
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
/**
|
|
527
|
+
* Retrieves the permalink URL for a specific page by reference identifier.
|
|
528
|
+
*
|
|
529
|
+
* @remarks
|
|
530
|
+
* Looks up a compound by its reference identifier and constructs the
|
|
531
|
+
* complete page permalink URL for linking purposes. The method includes
|
|
532
|
+
* comprehensive error handling and optional warning suppression for
|
|
533
|
+
* cases where references may not be resolvable during processing.
|
|
534
|
+
*
|
|
535
|
+
* @param refid - The reference identifier of the compound.
|
|
536
|
+
* @param noWarn - Whether to suppress warning messages for missing compounds.
|
|
537
|
+
* @returns The complete page permalink URL, or undefined if not found.
|
|
538
|
+
*/
|
|
539
|
+
getPagePermalink(refid: string, noWarn = false): string | undefined {
|
|
540
|
+
const dataObject: CompoundBase | undefined =
|
|
541
|
+
this.viewModel.compoundsById.get(refid)
|
|
542
|
+
if (dataObject === undefined) {
|
|
543
|
+
if (this.options.debug && !noWarn) {
|
|
544
|
+
console.warn('refid', refid, 'is not a known compound, no permalink')
|
|
545
|
+
}
|
|
546
|
+
return undefined
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
const pagePermalink = dataObject.relativePermalink
|
|
550
|
+
if (pagePermalink === undefined) {
|
|
551
|
+
if (this.options.verbose && !noWarn) {
|
|
552
|
+
console.warn('refid', refid, 'has no permalink')
|
|
553
|
+
}
|
|
554
|
+
return undefined
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
return `${this.pageBaseUrl}${pagePermalink}`
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
/**
|
|
561
|
+
* Constructs a cross-reference permalink for documentation pages.
|
|
562
|
+
*
|
|
563
|
+
* @remarks
|
|
564
|
+
* Generates a permalink URL for cross-references by extracting the page
|
|
565
|
+
* and anchor components from the identifier and constructing the
|
|
566
|
+
* appropriate URL structure. This method specifically handles the pages
|
|
567
|
+
* collection format for cross-reference navigation within the documentation.
|
|
568
|
+
*
|
|
569
|
+
* @param id - The cross-reference identifier to process.
|
|
570
|
+
* @returns The constructed cross-reference permalink URL.
|
|
571
|
+
*/
|
|
572
|
+
getXrefPermalink(id: string): string {
|
|
573
|
+
// console.log('1', id, this.currentCompoundDef.id)
|
|
574
|
+
const pagePart = id.replace(/_1.*/, '')
|
|
575
|
+
const anchorPart = id.replace(/.*_1/, '')
|
|
576
|
+
// console.log('2', part1, part2)
|
|
577
|
+
// if (
|
|
578
|
+
// this.currentCompound !== undefined &&
|
|
579
|
+
// pagePart === this.currentCompound.id
|
|
580
|
+
// ) {
|
|
581
|
+
// return `#${anchorPart}`
|
|
582
|
+
// } else {
|
|
583
|
+
return `${this.pageBaseUrl}pages/${pagePart}/#${anchorPart}`
|
|
584
|
+
// }
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
// ----------------------------------------------------------------------------
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# data-model
|
|
2
|
+
|
|
3
|
+
The Doxygen data extracted from the XML files is parsed and stored in data model objects, which are designed to closely follow the definitions in the DTDs.
|
|
4
|
+
|
|
5
|
+
The type definitions from the DTD are implemented as abstract classes.
|
|
6
|
+
|
|
7
|
+
Concrete objects are derived from these abstract classes.
|
|
8
|
+
|
|
9
|
+
Where necessary, object types should be distinguished using `instanceof`.
|
|
10
|
+
|
|
11
|
+
The `elementName` property is retained for debugging purposes and may be removed in the final release; it should therefore not be relied upon.
|
|
12
|
+
|
|
13
|
+
Parsing is initiated from `data-model.ts` by creating the top-level objects for each category. These objects then recursively instantiate their respective child objects.
|