@xpack/doxygen2docusaurus 2.0.0 → 2.2.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 +3 -1
- package/bin/doxygen2docusaurus.js +5 -5
- 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/conceptparts.d.ts +9 -0
- package/dist/docusaurus/renderers/conceptparts.d.ts.map +1 -0
- package/dist/docusaurus/renderers/conceptparts.js +21 -0
- package/dist/docusaurus/renderers/conceptparts.js.map +1 -0
- 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 +15 -186
- 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 +27 -0
- package/dist/docusaurus/view-model/concepts-vm.d.ts.map +1 -0
- package/dist/docusaurus/view-model/concepts-vm.js +337 -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 +5 -199
- package/dist/docusaurus/view-model/namespaces-vm.d.ts.map +1 -1
- package/dist/docusaurus/view-model/namespaces-vm.js +85 -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 +39 -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 +7 -492
- package/dist/doxygen/data-model/compounds/compounddef-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/compounddef-dm.js +28 -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/concepts-dm.d.ts +23 -0
- package/dist/doxygen/data-model/compounds/concepts-dm.d.ts.map +1 -0
- package/dist/doxygen/data-model/compounds/concepts-dm.js +94 -0
- package/dist/doxygen/data-model/compounds/concepts-dm.js.map +1 -0
- 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/requirements-dm.d.ts +2 -0
- package/dist/doxygen/data-model/compounds/requirements-dm.d.ts.map +1 -0
- package/dist/doxygen/data-model/compounds/requirements-dm.js +2 -0
- package/dist/doxygen/data-model/compounds/requirements-dm.js.map +1 -0
- 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 +8 -200
- 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 +5 -16
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -42
- package/dist/index.js.map +1 -1
- package/package.json +49 -52
- 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/conceptparts.ts +119 -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 +812 -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 +749 -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 +1037 -0
- package/src/docusaurus/view-model/options.ts +95 -0
- package/src/docusaurus/view-model/pages-vm.ts +389 -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 +1230 -0
- package/src/doxygen/data-model/compounds/compoundreftype-dm.ts +266 -0
- package/src/doxygen/data-model/compounds/concepts-dm.ts +362 -0
- package/src/doxygen/data-model/compounds/descriptiontype-dm.ts +10114 -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 +881 -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/requirements-dm.ts +50 -0
- package/src/doxygen/data-model/compounds/sectiondeftype-dm.ts +330 -0
- package/src/doxygen/data-model/compounds/tableofcontentstype-dm.ts +564 -0
- package/src/doxygen/data-model/compounds/templateparamlisttype-dm.ts +150 -0
- package/src/doxygen/data-model/data-model.ts +378 -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 +1788 -0
- package/src/doxygen/data-model/xsds/doxyfile.xsd +365 -0
- package/src/doxygen/data-model/xsds/index.xsd +74 -0
- package/src/doxygen/data-model/xsds/xml.xsd +23 -0
- package/src/index.ts +267 -0
- package/src/tsconfig.json +12 -0
- package/dist/doxygen2docusaurus.d.ts +0 -4774
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/dist/tsdoc-metadata.json +0 -11
|
@@ -0,0 +1,1293 @@
|
|
|
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 for any
|
|
6
|
+
* 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 be
|
|
9
|
+
* obtained from https://opensource.org/licenses/mit.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
// ----------------------------------------------------------------------------
|
|
13
|
+
|
|
14
|
+
// import * as util from 'node:util'
|
|
15
|
+
import assert from 'node:assert'
|
|
16
|
+
|
|
17
|
+
import { CompoundBase } from './compound-base-vm.js'
|
|
18
|
+
import type { CompoundDefDataModel } from '../../doxygen/data-model/compounds/compounddef-dm.js'
|
|
19
|
+
import { CollectionBase } from './collection-base.js'
|
|
20
|
+
import type {
|
|
21
|
+
NavbarItem,
|
|
22
|
+
SidebarCategory,
|
|
23
|
+
SidebarCategoryItem,
|
|
24
|
+
SidebarDocItem,
|
|
25
|
+
SidebarItem,
|
|
26
|
+
FrontMatter,
|
|
27
|
+
} from '../types.js'
|
|
28
|
+
import type { Workspace } from '../workspace.js'
|
|
29
|
+
import { flattenPath, sanitizeHierarchicalPath } from '../utils.js'
|
|
30
|
+
import type { ProgramListingDataModel } from '../../doxygen/data-model/compounds/descriptiontype-dm.js'
|
|
31
|
+
import { FileTreeEntry } from './tree-entries-vm.js'
|
|
32
|
+
import type { TreeEntryBase } from './tree-entries-vm.js'
|
|
33
|
+
import { Class } from './classes-vm.js'
|
|
34
|
+
import { Namespace } from './namespaces-vm.js'
|
|
35
|
+
import { Concept } from './concepts-vm.js'
|
|
36
|
+
|
|
37
|
+
// ----------------------------------------------------------------------------
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Manages the collection of file and folder documentation compounds.
|
|
41
|
+
*
|
|
42
|
+
* @remarks
|
|
43
|
+
* Handles the organisation and generation of file-based documentation,
|
|
44
|
+
* including folder hierarchies, file listings, sidebar generation, and
|
|
45
|
+
* index file creation. Provides a structured view of the source code
|
|
46
|
+
* organisation with proper navigation support.
|
|
47
|
+
*
|
|
48
|
+
* @public
|
|
49
|
+
*/
|
|
50
|
+
export class FilesAndFolders extends CollectionBase {
|
|
51
|
+
// compoundsById: Map<string, File | Folder>
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Map of folder compounds indexed by identifier.
|
|
55
|
+
*
|
|
56
|
+
* @remarks
|
|
57
|
+
* Stores all folder instances for efficient lookup and hierarchy
|
|
58
|
+
* construction, separate from the main compounds collection.
|
|
59
|
+
*/
|
|
60
|
+
compoundFoldersById: Map<string, Folder>
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Map of file compounds indexed by identifier.
|
|
64
|
+
*
|
|
65
|
+
* @remarks
|
|
66
|
+
* Stores all file instances for efficient lookup and organisation,
|
|
67
|
+
* separate from the main compounds collection.
|
|
68
|
+
*/
|
|
69
|
+
compoundFilesById: Map<string, File>
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Array of top-level folders without parent folders.
|
|
73
|
+
*
|
|
74
|
+
* @remarks
|
|
75
|
+
* Contains folders that are at the root level of the documentation
|
|
76
|
+
* hierarchy, used for organising hierarchical displays.
|
|
77
|
+
*/
|
|
78
|
+
topLevelFolders: Folder[] = []
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Array of top-level files without parent folders.
|
|
82
|
+
*
|
|
83
|
+
* @remarks
|
|
84
|
+
* Contains files that are at the root level of the documentation
|
|
85
|
+
* hierarchy, not contained within any documented folder.
|
|
86
|
+
*/
|
|
87
|
+
topLevelFiles: File[] = []
|
|
88
|
+
|
|
89
|
+
// folders: Folders
|
|
90
|
+
|
|
91
|
+
// --------------------------------------------------------------------------
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Creates a new files and folders collection.
|
|
95
|
+
*
|
|
96
|
+
* @remarks
|
|
97
|
+
* Initialises the collection with separate maps for folders and files
|
|
98
|
+
* to enable efficient organisation and hierarchy construction.
|
|
99
|
+
*
|
|
100
|
+
* @param workspace - The workspace instance
|
|
101
|
+
*/
|
|
102
|
+
constructor(workspace: Workspace) {
|
|
103
|
+
super(workspace)
|
|
104
|
+
|
|
105
|
+
// this.compoundsById = new Map()
|
|
106
|
+
this.compoundFoldersById = new Map()
|
|
107
|
+
this.compoundFilesById = new Map()
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// --------------------------------------------------------------------------
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Adds a file or folder compound to the collection.
|
|
114
|
+
*
|
|
115
|
+
* @remarks
|
|
116
|
+
* Creates either a File or Folder instance based on the compound kind,
|
|
117
|
+
* registers it in the appropriate collections, and returns the created
|
|
118
|
+
* instance for further processing.
|
|
119
|
+
*
|
|
120
|
+
* @param compoundDef - The compound definition for the file or folder
|
|
121
|
+
* @returns The created File or Folder instance
|
|
122
|
+
* @throws Error if compound kind is not 'file' or 'dir'
|
|
123
|
+
*/
|
|
124
|
+
override addChild(compoundDef: CompoundDefDataModel): CompoundBase {
|
|
125
|
+
if (compoundDef.kind === 'file') {
|
|
126
|
+
const file = new File(this, compoundDef)
|
|
127
|
+
this.collectionCompoundsById.set(file.id, file)
|
|
128
|
+
this.compoundFilesById.set(file.id, file)
|
|
129
|
+
return file
|
|
130
|
+
} else if (compoundDef.kind === 'dir') {
|
|
131
|
+
const folder = new Folder(this, compoundDef)
|
|
132
|
+
this.collectionCompoundsById.set(folder.id, folder)
|
|
133
|
+
this.compoundFoldersById.set(folder.id, folder)
|
|
134
|
+
return folder
|
|
135
|
+
} else {
|
|
136
|
+
throw new Error(
|
|
137
|
+
`kind ${compoundDef.kind} not implemented in ${this.constructor.name}`
|
|
138
|
+
)
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// --------------------------------------------------------------------------
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Creates hierarchical relationships between file and folder compounds.
|
|
146
|
+
*
|
|
147
|
+
* @remarks
|
|
148
|
+
* Establishes parent-child relationships for folders and files,
|
|
149
|
+
* builds the complete file hierarchy, and generates relative paths
|
|
150
|
+
* and permalinks for all compounds. Registers files in the workspace
|
|
151
|
+
* for global lookup and identifies top-level entities.
|
|
152
|
+
*/
|
|
153
|
+
override createCompoundsHierarchies(): void {
|
|
154
|
+
// Recreate files and folders hierarchies.
|
|
155
|
+
// console.log(this.compoundsById.size)
|
|
156
|
+
for (const [, folder] of this.compoundFoldersById) {
|
|
157
|
+
for (const childFolderId of folder.childrenFolderIds) {
|
|
158
|
+
const childFolder = this.compoundFoldersById.get(childFolderId)
|
|
159
|
+
assert(childFolder !== undefined)
|
|
160
|
+
if (this.workspace.options.debug) {
|
|
161
|
+
console.log(
|
|
162
|
+
'childFolderId',
|
|
163
|
+
childFolderId,
|
|
164
|
+
childFolder.compoundName,
|
|
165
|
+
'has parent',
|
|
166
|
+
folder.parent?.id ?? '(no parent id)',
|
|
167
|
+
folder.compoundName
|
|
168
|
+
)
|
|
169
|
+
}
|
|
170
|
+
childFolder.parent = folder
|
|
171
|
+
folder.children.push(childFolder)
|
|
172
|
+
}
|
|
173
|
+
for (const childFileId of folder.childrenFileIds) {
|
|
174
|
+
const childFile = this.compoundFilesById.get(childFileId)
|
|
175
|
+
if (childFile !== undefined) {
|
|
176
|
+
if (this.workspace.options.debug) {
|
|
177
|
+
console.log(
|
|
178
|
+
'childFileId',
|
|
179
|
+
childFileId,
|
|
180
|
+
childFile.compoundName,
|
|
181
|
+
'has parent',
|
|
182
|
+
folder.parent?.id ?? '(no parent id)',
|
|
183
|
+
folder.compoundName
|
|
184
|
+
)
|
|
185
|
+
}
|
|
186
|
+
childFile.parent = folder
|
|
187
|
+
folder.children.push(childFile)
|
|
188
|
+
} else {
|
|
189
|
+
console.warn(childFileId, 'not a child of', folder.id)
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
for (const [fileId, file] of this.compoundFilesById) {
|
|
195
|
+
this.workspace.viewModel.compoundsById.set(fileId, file)
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
for (const [folderId, folder] of this.compoundFoldersById) {
|
|
199
|
+
if (folder.parent === undefined) {
|
|
200
|
+
if (this.workspace.options.debug) {
|
|
201
|
+
console.log('topFolderId:', folderId, folder.compoundName)
|
|
202
|
+
}
|
|
203
|
+
this.topLevelFolders.push(folder)
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
for (const [fileId, file] of this.compoundFilesById) {
|
|
208
|
+
if (file.parent === undefined) {
|
|
209
|
+
if (this.workspace.options.debug) {
|
|
210
|
+
console.log('topFileId:', fileId, file.compoundName)
|
|
211
|
+
}
|
|
212
|
+
this.topLevelFiles.push(file)
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
const { locationFilePath } = file
|
|
216
|
+
assert(locationFilePath !== undefined)
|
|
217
|
+
this.workspace.filesByPath.set(locationFilePath, file)
|
|
218
|
+
if (this.workspace.options.debug) {
|
|
219
|
+
// console.log('filesByPath.set', path, file)
|
|
220
|
+
console.log('filesByPath.set', locationFilePath)
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
for (const [, folder] of this.compoundFoldersById) {
|
|
225
|
+
let parentPath = ''
|
|
226
|
+
if (folder.parent !== undefined) {
|
|
227
|
+
if (folder.parent instanceof Folder) {
|
|
228
|
+
parentPath = `${this.getRelativePathRecursively(folder.parent)}/`
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
// console.log(folder.compoundName)
|
|
233
|
+
folder.relativePath = `${parentPath}${folder.compoundName}`
|
|
234
|
+
|
|
235
|
+
const sanitizedPath: string = sanitizeHierarchicalPath(
|
|
236
|
+
folder.relativePath
|
|
237
|
+
)
|
|
238
|
+
folder.relativePermalink = `folders/${sanitizedPath}`
|
|
239
|
+
|
|
240
|
+
folder.sidebarId = `folders/${flattenPath(sanitizedPath)}`
|
|
241
|
+
|
|
242
|
+
// console.log('0', folder.id)
|
|
243
|
+
// console.log('1', folder.compoundName)
|
|
244
|
+
// console.log('2', folder.relativePermalink)
|
|
245
|
+
// console.log('3', folder.docusaurusId)
|
|
246
|
+
// console.log('4', folder.sidebarLabel)
|
|
247
|
+
// console.log('5', folder.indexName)
|
|
248
|
+
// console.log()
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
// Cannot be done in each object, since it needs the hierarchy.
|
|
252
|
+
for (const [, file] of this.compoundFilesById) {
|
|
253
|
+
let parentPath = ''
|
|
254
|
+
if (file.parent !== undefined) {
|
|
255
|
+
if (file.parent instanceof Folder) {
|
|
256
|
+
parentPath = `${this.getRelativePathRecursively(file.parent)}/`
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
// console.log(file.compoundName)
|
|
261
|
+
file.relativePath = `${parentPath}${file.compoundName}`
|
|
262
|
+
|
|
263
|
+
const sanitizedPath: string = sanitizeHierarchicalPath(file.relativePath)
|
|
264
|
+
file.relativePermalink = `files/${sanitizedPath}`
|
|
265
|
+
|
|
266
|
+
file.sidebarId = `files/${flattenPath(sanitizedPath)}`
|
|
267
|
+
|
|
268
|
+
// console.log('0', file.id)
|
|
269
|
+
// console.log('1', file.compoundName)
|
|
270
|
+
// console.log('2', file.relativePermalink)
|
|
271
|
+
// console.log('3', file.docusaurusId)
|
|
272
|
+
// console.log('4', file.sidebarLabel)
|
|
273
|
+
// console.log('5', file.indexName)
|
|
274
|
+
// console.log()
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Recursively builds the relative path for a folder from root.
|
|
280
|
+
*
|
|
281
|
+
* @remarks
|
|
282
|
+
* Traverses the folder hierarchy upwards to construct the complete
|
|
283
|
+
* relative path by concatenating parent folder names. Used for
|
|
284
|
+
* generating proper folder permalinks and navigation structures.
|
|
285
|
+
*
|
|
286
|
+
* @param folder - The folder to build the path for
|
|
287
|
+
* @returns The complete relative path from root to the folder
|
|
288
|
+
*/
|
|
289
|
+
private getRelativePathRecursively(folder: Folder): string {
|
|
290
|
+
let parentPath = ''
|
|
291
|
+
if (folder.parent !== undefined) {
|
|
292
|
+
if (folder.parent instanceof Folder) {
|
|
293
|
+
parentPath = `${this.getRelativePathRecursively(folder.parent)}/`
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
return `${parentPath}${folder.compoundName}`
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
// --------------------------------------------------------------------------
|
|
300
|
+
|
|
301
|
+
override addSidebarItems(sidebarCategory: SidebarCategory): void {
|
|
302
|
+
const indicesSet = this.workspace.indicesMaps.get('files')
|
|
303
|
+
if (indicesSet === undefined) {
|
|
304
|
+
return
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
// Add folders & files to the sidebar.
|
|
308
|
+
// Top level folders & files are added below a Files category
|
|
309
|
+
const filesCategory: SidebarCategoryItem = {
|
|
310
|
+
type: 'category',
|
|
311
|
+
label: 'Files',
|
|
312
|
+
link: {
|
|
313
|
+
type: 'doc',
|
|
314
|
+
id: `${this.workspace.sidebarBaseId}indices/files/index`,
|
|
315
|
+
},
|
|
316
|
+
collapsed: true,
|
|
317
|
+
items: [
|
|
318
|
+
{
|
|
319
|
+
type: 'category',
|
|
320
|
+
label: 'Hierarchy',
|
|
321
|
+
link: {
|
|
322
|
+
type: 'doc',
|
|
323
|
+
id: `${this.workspace.sidebarBaseId}indices/files/index`,
|
|
324
|
+
},
|
|
325
|
+
collapsed: true,
|
|
326
|
+
items: [],
|
|
327
|
+
},
|
|
328
|
+
],
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
for (const folder of this.topLevelFolders) {
|
|
332
|
+
const item = this.createFolderSidebarItemRecursively(folder)
|
|
333
|
+
if (item !== undefined) {
|
|
334
|
+
;(filesCategory.items[0] as SidebarCategoryItem).items.push(item)
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
for (const file of this.topLevelFiles) {
|
|
339
|
+
const item = this.createFileSidebarItem(file)
|
|
340
|
+
if (item !== undefined) {
|
|
341
|
+
;(filesCategory.items[0] as SidebarCategoryItem).items.push(item)
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
if (indicesSet.has('all')) {
|
|
346
|
+
filesCategory.items.push({
|
|
347
|
+
type: 'doc',
|
|
348
|
+
label: 'All',
|
|
349
|
+
id: `${this.workspace.sidebarBaseId}indices/files/all`,
|
|
350
|
+
})
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
if (indicesSet.has('concepts')) {
|
|
354
|
+
filesCategory.items.push({
|
|
355
|
+
type: 'doc',
|
|
356
|
+
label: 'Concepts',
|
|
357
|
+
id: `${this.workspace.sidebarBaseId}indices/files/concepts`,
|
|
358
|
+
})
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
if (indicesSet.has('classes')) {
|
|
362
|
+
filesCategory.items.push({
|
|
363
|
+
type: 'doc',
|
|
364
|
+
label: 'Classes',
|
|
365
|
+
id: `${this.workspace.sidebarBaseId}indices/files/classes`,
|
|
366
|
+
})
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
if (indicesSet.has('namespaces')) {
|
|
370
|
+
filesCategory.items.push({
|
|
371
|
+
type: 'doc',
|
|
372
|
+
label: 'Namespaces',
|
|
373
|
+
id: `${this.workspace.sidebarBaseId}indices/files/namespaces`,
|
|
374
|
+
})
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
if (indicesSet.has('functions')) {
|
|
378
|
+
filesCategory.items.push({
|
|
379
|
+
type: 'doc',
|
|
380
|
+
label: 'Functions',
|
|
381
|
+
id: `${this.workspace.sidebarBaseId}indices/files/functions`,
|
|
382
|
+
})
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
if (indicesSet.has('variables')) {
|
|
386
|
+
filesCategory.items.push({
|
|
387
|
+
type: 'doc',
|
|
388
|
+
label: 'Variables',
|
|
389
|
+
id: `${this.workspace.sidebarBaseId}indices/files/variables`,
|
|
390
|
+
})
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
if (indicesSet.has('typedefs')) {
|
|
394
|
+
filesCategory.items.push({
|
|
395
|
+
type: 'doc',
|
|
396
|
+
label: 'Typedefs',
|
|
397
|
+
id: `${this.workspace.sidebarBaseId}indices/files/typedefs`,
|
|
398
|
+
})
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
if (indicesSet.has('enums')) {
|
|
402
|
+
filesCategory.items.push({
|
|
403
|
+
type: 'doc',
|
|
404
|
+
label: 'Enums',
|
|
405
|
+
id: `${this.workspace.sidebarBaseId}indices/files/enums`,
|
|
406
|
+
})
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
if (indicesSet.has('enumvalues')) {
|
|
410
|
+
filesCategory.items.push({
|
|
411
|
+
type: 'doc',
|
|
412
|
+
label: 'Enum Values',
|
|
413
|
+
id: `${this.workspace.sidebarBaseId}indices/files/enumvalues`,
|
|
414
|
+
})
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
if (indicesSet.has('defines')) {
|
|
418
|
+
filesCategory.items.push({
|
|
419
|
+
type: 'doc',
|
|
420
|
+
label: 'Macro Definitions',
|
|
421
|
+
id: `${this.workspace.sidebarBaseId}indices/files/defines`,
|
|
422
|
+
})
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
sidebarCategory.items.push(filesCategory)
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
/**
|
|
429
|
+
* Creates sidebar items for folder hierarchies recursively.
|
|
430
|
+
*
|
|
431
|
+
* @remarks
|
|
432
|
+
* Generates hierarchical sidebar structures for folder trees,
|
|
433
|
+
* creating category items with nested children for subfolders
|
|
434
|
+
* and files. Processes folders first, then files within each
|
|
435
|
+
* folder level.
|
|
436
|
+
*
|
|
437
|
+
* @param folder - The folder to create sidebar items for
|
|
438
|
+
* @returns The sidebar category item or undefined if folder lacks data
|
|
439
|
+
*/
|
|
440
|
+
private createFolderSidebarItemRecursively(
|
|
441
|
+
folder: Folder
|
|
442
|
+
): SidebarItem | undefined {
|
|
443
|
+
if (folder.sidebarLabel === undefined || folder.sidebarId == undefined) {
|
|
444
|
+
return undefined
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
const categoryItem: SidebarCategoryItem = {
|
|
448
|
+
type: 'category',
|
|
449
|
+
label: folder.sidebarLabel,
|
|
450
|
+
link: {
|
|
451
|
+
type: 'doc',
|
|
452
|
+
id: `${this.workspace.sidebarBaseId}${folder.sidebarId}`,
|
|
453
|
+
},
|
|
454
|
+
className: 'doxyEllipsis',
|
|
455
|
+
collapsed: true,
|
|
456
|
+
items: [],
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
for (const fileOrFolder of folder.children) {
|
|
460
|
+
if (fileOrFolder instanceof Folder) {
|
|
461
|
+
const item = this.createFolderSidebarItemRecursively(fileOrFolder)
|
|
462
|
+
if (item !== undefined) {
|
|
463
|
+
categoryItem.items.push(item)
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
for (const fileOrFolder of folder.children) {
|
|
469
|
+
if (fileOrFolder instanceof File) {
|
|
470
|
+
const item = this.createFileSidebarItem(fileOrFolder)
|
|
471
|
+
if (item !== undefined) {
|
|
472
|
+
categoryItem.items.push(item)
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
return categoryItem
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
/**
|
|
481
|
+
* Creates a sidebar document item for a file.
|
|
482
|
+
*
|
|
483
|
+
* @remarks
|
|
484
|
+
* Generates a simple document sidebar item for individual files
|
|
485
|
+
* with appropriate CSS classes and navigation links. Used for
|
|
486
|
+
* leaf nodes in the file hierarchy sidebar.
|
|
487
|
+
*
|
|
488
|
+
* @param file - The file to create a sidebar item for
|
|
489
|
+
* @returns The sidebar document item or undefined if file lacks data
|
|
490
|
+
*/
|
|
491
|
+
private createFileSidebarItem(file: File): SidebarItem | undefined {
|
|
492
|
+
if (file.sidebarLabel === undefined || file.sidebarId === undefined) {
|
|
493
|
+
return undefined
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
const docItem: SidebarDocItem = {
|
|
497
|
+
type: 'doc',
|
|
498
|
+
label: file.sidebarLabel,
|
|
499
|
+
className: 'doxyEllipsis',
|
|
500
|
+
id: `${this.workspace.sidebarBaseId}${file.sidebarId}`,
|
|
501
|
+
}
|
|
502
|
+
return docItem
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
// --------------------------------------------------------------------------
|
|
506
|
+
|
|
507
|
+
override createNavbarItems(): NavbarItem[] {
|
|
508
|
+
const navbarItem: NavbarItem = {
|
|
509
|
+
label: 'Files',
|
|
510
|
+
to: `${this.workspace.menuBaseUrl}files/`,
|
|
511
|
+
}
|
|
512
|
+
return [navbarItem]
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
// --------------------------------------------------------------------------
|
|
516
|
+
|
|
517
|
+
override async generateIndexDotMdFile(): Promise<void> {
|
|
518
|
+
if (this.topLevelFolders.length === 0 && this.topLevelFiles.length === 0) {
|
|
519
|
+
return
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
const filePath = `${this.workspace.outputFolderPath}indices/files/index.md`
|
|
523
|
+
const permalink = 'files'
|
|
524
|
+
|
|
525
|
+
const frontMatter: FrontMatter = {
|
|
526
|
+
title: 'Files & Folders',
|
|
527
|
+
slug: `${this.workspace.slugBaseUrl}${permalink}`,
|
|
528
|
+
description:
|
|
529
|
+
'The files and folders that contributed content to this site',
|
|
530
|
+
custom_edit_url: null,
|
|
531
|
+
keywords: ['doxygen', 'files', 'folders', 'reference'],
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
const contentLines: string[] = []
|
|
535
|
+
for (const folder of this.topLevelFolders) {
|
|
536
|
+
contentLines.push(...this.generateIndexMdFileRecursively(folder, 0))
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
for (const file of this.topLevelFiles) {
|
|
540
|
+
contentLines.push(...this.generateFileIndexMd(file, 0))
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
if (contentLines.length === 0) {
|
|
544
|
+
return
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
const lines: string[] = []
|
|
548
|
+
|
|
549
|
+
lines.push('The files & folders that contributed content to this site are:')
|
|
550
|
+
|
|
551
|
+
lines.push(...this.workspace.renderTreeTableToHtmlLines({ contentLines }))
|
|
552
|
+
|
|
553
|
+
if (this.workspace.options.verbose) {
|
|
554
|
+
console.log(`Writing files index file '${filePath}'...`)
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
await this.workspace.writeOutputMdFile({
|
|
558
|
+
filePath,
|
|
559
|
+
frontMatter,
|
|
560
|
+
bodyLines: lines,
|
|
561
|
+
})
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
/**
|
|
565
|
+
* Generates hierarchical index content for folders recursively.
|
|
566
|
+
*
|
|
567
|
+
* @remarks
|
|
568
|
+
* Creates HTML tree table rows for folder hierarchies with proper
|
|
569
|
+
* indentation and folder icons. Processes subfolders first, then
|
|
570
|
+
* files within each folder level to maintain organised structure.
|
|
571
|
+
*
|
|
572
|
+
* @param folder - The folder to generate index content for
|
|
573
|
+
* @param depth - The current depth level in the hierarchy (0-based)
|
|
574
|
+
* @returns Array of HTML strings representing the tree table rows
|
|
575
|
+
*/
|
|
576
|
+
private generateIndexMdFileRecursively(
|
|
577
|
+
folder: Folder,
|
|
578
|
+
depth: number
|
|
579
|
+
): string[] {
|
|
580
|
+
// console.log(util.inspect(folder, { compact: false, depth: 999 }))
|
|
581
|
+
|
|
582
|
+
const lines: string[] = []
|
|
583
|
+
|
|
584
|
+
const label = this.workspace.renderString(folder.compoundName, 'html')
|
|
585
|
+
|
|
586
|
+
const permalink = this.workspace.getPagePermalink(folder.id)
|
|
587
|
+
if (permalink === undefined || permalink.length === 0) {
|
|
588
|
+
// console.log(namespace)
|
|
589
|
+
return []
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
let description = ''
|
|
593
|
+
if (
|
|
594
|
+
folder.briefDescriptionHtmlString !== undefined &&
|
|
595
|
+
folder.briefDescriptionHtmlString.length > 0
|
|
596
|
+
) {
|
|
597
|
+
description = folder.briefDescriptionHtmlString.replace(/[.]$/, '')
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
lines.push('')
|
|
601
|
+
lines.push(
|
|
602
|
+
...this.workspace.renderTreeTableRowToHtmlLines({
|
|
603
|
+
itemIconClass: 'doxyIconFolder',
|
|
604
|
+
itemLabel: label,
|
|
605
|
+
itemLink: permalink,
|
|
606
|
+
depth,
|
|
607
|
+
description,
|
|
608
|
+
})
|
|
609
|
+
)
|
|
610
|
+
|
|
611
|
+
if (folder.children.length > 0) {
|
|
612
|
+
for (const childFileOrFolder of folder.children) {
|
|
613
|
+
if (childFileOrFolder instanceof Folder) {
|
|
614
|
+
lines.push(
|
|
615
|
+
...this.generateIndexMdFileRecursively(childFileOrFolder, depth + 1)
|
|
616
|
+
)
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
for (const childFileOrFolder of folder.children) {
|
|
621
|
+
if (childFileOrFolder instanceof File) {
|
|
622
|
+
lines.push(...this.generateFileIndexMd(childFileOrFolder, depth + 1))
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
return lines
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
/**
|
|
631
|
+
* Generates index content for individual files.
|
|
632
|
+
*
|
|
633
|
+
* @remarks
|
|
634
|
+
* Creates HTML tree table rows for file entries with appropriate
|
|
635
|
+
* file icons, labels, and descriptions. Generates consistent
|
|
636
|
+
* formatting for file documentation links within hierarchical
|
|
637
|
+
* index structures.
|
|
638
|
+
*
|
|
639
|
+
* @param file - The file to generate index content for
|
|
640
|
+
* @param depth - The current depth level in the hierarchy (0-based)
|
|
641
|
+
* @returns Array of HTML strings representing the file table row
|
|
642
|
+
*/
|
|
643
|
+
private generateFileIndexMd(file: File, depth: number): string[] {
|
|
644
|
+
// console.log(util.inspect(file, { compact: false, depth: 999 }))
|
|
645
|
+
const lines: string[] = []
|
|
646
|
+
|
|
647
|
+
const label = this.workspace.renderString(file.compoundName, 'html')
|
|
648
|
+
|
|
649
|
+
const permalink = this.workspace.getPagePermalink(file.id, true)
|
|
650
|
+
if (permalink === undefined || permalink.length === 0) {
|
|
651
|
+
return []
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
let description = ''
|
|
655
|
+
if (
|
|
656
|
+
file.briefDescriptionHtmlString !== undefined &&
|
|
657
|
+
file.briefDescriptionHtmlString.length > 0
|
|
658
|
+
) {
|
|
659
|
+
description = file.briefDescriptionHtmlString.replace(/[.]$/, '')
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
lines.push('')
|
|
663
|
+
lines.push(
|
|
664
|
+
...this.workspace.renderTreeTableRowToHtmlLines({
|
|
665
|
+
itemIconClass: 'doxyIconFile',
|
|
666
|
+
itemLabel: label,
|
|
667
|
+
itemLink: permalink,
|
|
668
|
+
depth,
|
|
669
|
+
description,
|
|
670
|
+
})
|
|
671
|
+
)
|
|
672
|
+
|
|
673
|
+
return lines
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
override isVisibleInSidebar(): boolean {
|
|
677
|
+
for (const [, compound] of this.collectionCompoundsById) {
|
|
678
|
+
if (compound instanceof File && compound.hasAnyContent()) {
|
|
679
|
+
return true
|
|
680
|
+
} else if (compound instanceof Folder && compound.children.length > 0) {
|
|
681
|
+
return true
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
console.log('none')
|
|
685
|
+
return false
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
override async generatePerInitialsIndexMdFiles(): Promise<void> {
|
|
689
|
+
if (this.topLevelFiles.length === 0) {
|
|
690
|
+
return
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
const allUnorderedEntriesMap = new Map<string, TreeEntryBase>()
|
|
694
|
+
|
|
695
|
+
for (const [, compound] of this.collectionCompoundsById) {
|
|
696
|
+
if (!(compound instanceof File)) {
|
|
697
|
+
continue
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
if (compound.innerCompounds !== undefined) {
|
|
701
|
+
if (this.workspace.options.debug) {
|
|
702
|
+
console.log(
|
|
703
|
+
compound.indexName,
|
|
704
|
+
Array.from(compound.innerCompounds.keys())
|
|
705
|
+
)
|
|
706
|
+
}
|
|
707
|
+
const conceptCompoundDef = compound.innerCompounds.get('innerConcepts')
|
|
708
|
+
if (conceptCompoundDef?.innerConcepts !== undefined) {
|
|
709
|
+
for (const innerConcept of conceptCompoundDef.innerConcepts) {
|
|
710
|
+
// console.log(innerConcept.refid)
|
|
711
|
+
const compoundConcept = this.workspace.viewModel.compoundsById.get(
|
|
712
|
+
innerConcept.refid
|
|
713
|
+
)
|
|
714
|
+
if (compoundConcept instanceof Concept) {
|
|
715
|
+
const conceptEntry = new FileTreeEntry(compoundConcept, compound)
|
|
716
|
+
allUnorderedEntriesMap.set(conceptEntry.id, conceptEntry)
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
const classCompoundDef = compound.innerCompounds.get('innerClasses')
|
|
721
|
+
if (classCompoundDef?.innerClasses !== undefined) {
|
|
722
|
+
for (const innerClass of classCompoundDef.innerClasses) {
|
|
723
|
+
// console.log(innerClass.refid)
|
|
724
|
+
const compoundClass = this.workspace.viewModel.compoundsById.get(
|
|
725
|
+
innerClass.refid
|
|
726
|
+
)
|
|
727
|
+
if (compoundClass instanceof Class) {
|
|
728
|
+
const classEntry = new FileTreeEntry(compoundClass, compound)
|
|
729
|
+
allUnorderedEntriesMap.set(classEntry.id, classEntry)
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
const namespaceCompoundDef =
|
|
734
|
+
compound.innerCompounds.get('innerNamespaces')
|
|
735
|
+
if (namespaceCompoundDef?.innerNamespaces !== undefined) {
|
|
736
|
+
for (const innerNamespace of namespaceCompoundDef.innerNamespaces) {
|
|
737
|
+
// console.log(innerNamespace.refid)
|
|
738
|
+
const compoundNamespace =
|
|
739
|
+
this.workspace.viewModel.compoundsById.get(innerNamespace.refid)
|
|
740
|
+
if (compoundNamespace instanceof Namespace) {
|
|
741
|
+
const namespaceEntry = new FileTreeEntry(
|
|
742
|
+
compoundNamespace,
|
|
743
|
+
compound
|
|
744
|
+
)
|
|
745
|
+
allUnorderedEntriesMap.set(namespaceEntry.id, namespaceEntry)
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
for (const section of compound.sections) {
|
|
752
|
+
for (const member of section.definitionMembers) {
|
|
753
|
+
const memberEntry = new FileTreeEntry(member, compound)
|
|
754
|
+
allUnorderedEntriesMap.set(memberEntry.id, memberEntry)
|
|
755
|
+
if (member.enumValues !== undefined) {
|
|
756
|
+
for (const enumValue of member.enumValues) {
|
|
757
|
+
const enumValueEntry = new FileTreeEntry(enumValue, compound)
|
|
758
|
+
allUnorderedEntriesMap.set(enumValueEntry.id, enumValueEntry)
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
// ------------------------------------------------------------------------
|
|
766
|
+
|
|
767
|
+
await this.generateIndexFile({
|
|
768
|
+
group: 'files',
|
|
769
|
+
fileKind: 'all',
|
|
770
|
+
title: 'Files Definitions Index',
|
|
771
|
+
description: 'The definitions part of the files are:',
|
|
772
|
+
map: allUnorderedEntriesMap,
|
|
773
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
774
|
+
filter: (kind) => true,
|
|
775
|
+
})
|
|
776
|
+
|
|
777
|
+
await this.generateIndexFile({
|
|
778
|
+
group: 'files',
|
|
779
|
+
fileKind: 'concepts',
|
|
780
|
+
title: 'Files Concepts Index',
|
|
781
|
+
description: 'The concepts defined in the project are:',
|
|
782
|
+
map: allUnorderedEntriesMap,
|
|
783
|
+
filter: (kind) => kind === 'concept',
|
|
784
|
+
})
|
|
785
|
+
|
|
786
|
+
await this.generateIndexFile({
|
|
787
|
+
group: 'files',
|
|
788
|
+
fileKind: 'classes',
|
|
789
|
+
title: 'Files Classes Index',
|
|
790
|
+
description: 'The classes, structs, unions defined in the project are:',
|
|
791
|
+
map: allUnorderedEntriesMap,
|
|
792
|
+
filter: (kind) =>
|
|
793
|
+
kind === 'class' || kind === 'struct' || kind === 'union',
|
|
794
|
+
})
|
|
795
|
+
|
|
796
|
+
await this.generateIndexFile({
|
|
797
|
+
group: 'files',
|
|
798
|
+
fileKind: 'namespaces',
|
|
799
|
+
title: 'Files Namespaces Index',
|
|
800
|
+
description: 'The namespaces defined in the project are:',
|
|
801
|
+
map: allUnorderedEntriesMap,
|
|
802
|
+
filter: (kind) => kind === 'namespace',
|
|
803
|
+
})
|
|
804
|
+
|
|
805
|
+
await this.generateIndexFile({
|
|
806
|
+
group: 'files',
|
|
807
|
+
fileKind: 'functions',
|
|
808
|
+
title: 'Files Functions Index',
|
|
809
|
+
description: 'The functions defined in the project are:',
|
|
810
|
+
map: allUnorderedEntriesMap,
|
|
811
|
+
filter: (kind) => kind === 'function',
|
|
812
|
+
})
|
|
813
|
+
|
|
814
|
+
await this.generateIndexFile({
|
|
815
|
+
group: 'files',
|
|
816
|
+
fileKind: 'variables',
|
|
817
|
+
title: 'Files Variables Index',
|
|
818
|
+
description: 'The variables defined in the project are:',
|
|
819
|
+
map: allUnorderedEntriesMap,
|
|
820
|
+
filter: (kind) => kind === 'variable',
|
|
821
|
+
})
|
|
822
|
+
|
|
823
|
+
await this.generateIndexFile({
|
|
824
|
+
group: 'files',
|
|
825
|
+
fileKind: 'typedefs',
|
|
826
|
+
title: 'Files Type Definitions Index',
|
|
827
|
+
description: 'The typedefs defined in the project are:',
|
|
828
|
+
map: allUnorderedEntriesMap,
|
|
829
|
+
filter: (kind) => kind === 'typedef',
|
|
830
|
+
})
|
|
831
|
+
|
|
832
|
+
await this.generateIndexFile({
|
|
833
|
+
group: 'files',
|
|
834
|
+
fileKind: 'enums',
|
|
835
|
+
title: 'Files Enums Index',
|
|
836
|
+
description: 'The enums defined in the project are:',
|
|
837
|
+
map: allUnorderedEntriesMap,
|
|
838
|
+
filter: (kind) => kind === 'enum',
|
|
839
|
+
})
|
|
840
|
+
|
|
841
|
+
await this.generateIndexFile({
|
|
842
|
+
group: 'files',
|
|
843
|
+
fileKind: 'enumvalues',
|
|
844
|
+
title: 'Files Enum Values Index',
|
|
845
|
+
description: 'The enum values defined in the project are:',
|
|
846
|
+
map: allUnorderedEntriesMap,
|
|
847
|
+
filter: (kind) => kind === 'enumvalue',
|
|
848
|
+
})
|
|
849
|
+
|
|
850
|
+
await this.generateIndexFile({
|
|
851
|
+
group: 'files',
|
|
852
|
+
fileKind: 'defines',
|
|
853
|
+
title: 'Files Macro Definitions Index',
|
|
854
|
+
description: 'The macros defined in the project are:',
|
|
855
|
+
map: allUnorderedEntriesMap,
|
|
856
|
+
filter: (kind) => kind === 'define',
|
|
857
|
+
})
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
// ----------------------------------------------------------------------------
|
|
862
|
+
|
|
863
|
+
/**
|
|
864
|
+
* Represents a folder compound for directory documentation.
|
|
865
|
+
*
|
|
866
|
+
* @remarks
|
|
867
|
+
* Manages folder-specific functionality including child file and folder
|
|
868
|
+
* tracking, hierarchy construction, and documentation generation. Provides
|
|
869
|
+
* structured organisation for file system hierarchies within the
|
|
870
|
+
* documentation.
|
|
871
|
+
*
|
|
872
|
+
* @public
|
|
873
|
+
*/
|
|
874
|
+
export class Folder extends CompoundBase {
|
|
875
|
+
/** Array of child file identifiers contained in this folder. */
|
|
876
|
+
childrenFileIds: string[] = []
|
|
877
|
+
|
|
878
|
+
/** Array of child folder identifiers contained in this folder. */
|
|
879
|
+
childrenFolderIds: string[] = []
|
|
880
|
+
|
|
881
|
+
/** Relative path from root to this folder. */
|
|
882
|
+
relativePath = ''
|
|
883
|
+
|
|
884
|
+
// --------------------------------------------------------------------------
|
|
885
|
+
|
|
886
|
+
/**
|
|
887
|
+
* Creates a new Folder instance from compound definition data.
|
|
888
|
+
*
|
|
889
|
+
* @remarks
|
|
890
|
+
* Initialises folder metadata including child file and folder
|
|
891
|
+
* references, display labels, and page titles. Sets up the
|
|
892
|
+
* folder structure for hierarchy construction and documentation
|
|
893
|
+
* generation.
|
|
894
|
+
*
|
|
895
|
+
* @param collection - The parent FilesAndFolders collection
|
|
896
|
+
* @param compoundDef - The Doxygen compound definition for the folder
|
|
897
|
+
*/
|
|
898
|
+
constructor(collection: FilesAndFolders, compoundDef: CompoundDefDataModel) {
|
|
899
|
+
super(collection, compoundDef)
|
|
900
|
+
|
|
901
|
+
// console.log('folder:', util.inspect(compoundDef))
|
|
902
|
+
// console.log('folder:', compoundDef.compoundName)
|
|
903
|
+
|
|
904
|
+
if (Array.isArray(compoundDef.innerDirs)) {
|
|
905
|
+
for (const ref of compoundDef.innerDirs) {
|
|
906
|
+
// console.log(
|
|
907
|
+
// 'component', compoundDef.id, 'has child folder', ref.refid
|
|
908
|
+
// )
|
|
909
|
+
this.childrenIds.push(ref.refid)
|
|
910
|
+
this.childrenFolderIds.push(ref.refid)
|
|
911
|
+
}
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
if (Array.isArray(compoundDef.innerFiles)) {
|
|
915
|
+
for (const ref of compoundDef.innerFiles) {
|
|
916
|
+
// console.log('component', compoundDef.id, 'has child file', ref.refid)
|
|
917
|
+
this.childrenIds.push(ref.refid)
|
|
918
|
+
this.childrenFileIds.push(ref.refid)
|
|
919
|
+
}
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
const { compoundName } = compoundDef
|
|
923
|
+
this.sidebarLabel = compoundName
|
|
924
|
+
this.indexName = compoundName
|
|
925
|
+
this.treeEntryName = compoundName
|
|
926
|
+
|
|
927
|
+
this.pageTitle = `\`${this.sidebarLabel}\` Folder`
|
|
928
|
+
|
|
929
|
+
this.createSections()
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
/**
|
|
933
|
+
* Determines if the folder has any children worth displaying.
|
|
934
|
+
*
|
|
935
|
+
* @remarks
|
|
936
|
+
* Recursively checks for files or non-empty subfolders to determine
|
|
937
|
+
* if the folder should be included in documentation. Empty folders
|
|
938
|
+
* without content are typically excluded from navigation.
|
|
939
|
+
*
|
|
940
|
+
* @returns True if the folder contains files or non-empty subfolders
|
|
941
|
+
*/
|
|
942
|
+
hasChildren(): boolean {
|
|
943
|
+
for (const child of this.children) {
|
|
944
|
+
if (child instanceof File) {
|
|
945
|
+
return true
|
|
946
|
+
} else if (child instanceof Folder && child.hasChildren()) {
|
|
947
|
+
return true
|
|
948
|
+
}
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
return false
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
override hasAnyContent(): boolean {
|
|
955
|
+
// console.log('checking', this.compoundName)
|
|
956
|
+
if (this.hasChildren()) {
|
|
957
|
+
// console.log('has content children', this)
|
|
958
|
+
return true
|
|
959
|
+
}
|
|
960
|
+
// if (!super.hasAnyContent()) {
|
|
961
|
+
// console.log('has no content', this)
|
|
962
|
+
// }
|
|
963
|
+
return super.hasAnyContent()
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
// --------------------------------------------------------------------------
|
|
967
|
+
|
|
968
|
+
/**
|
|
969
|
+
* Renders the complete folder documentation to markdown lines.
|
|
970
|
+
*
|
|
971
|
+
* @remarks
|
|
972
|
+
* Generates the full documentation page including brief descriptions,
|
|
973
|
+
* inner directory and file indices, member sections, and detailed
|
|
974
|
+
* descriptions. Creates structured folder documentation with proper
|
|
975
|
+
* navigation and content organisation.
|
|
976
|
+
*
|
|
977
|
+
* @param frontMatter - The frontmatter configuration for the page
|
|
978
|
+
* @returns Array of markdown strings representing the complete documentation
|
|
979
|
+
*/
|
|
980
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
981
|
+
override renderToLines(frontMatter: FrontMatter): string[] {
|
|
982
|
+
const lines: string[] = []
|
|
983
|
+
|
|
984
|
+
const descriptionTodo = `@dir ${this.collection.workspace.renderString(
|
|
985
|
+
this.relativePath,
|
|
986
|
+
'html'
|
|
987
|
+
)}`
|
|
988
|
+
|
|
989
|
+
// The Description header is always shown.
|
|
990
|
+
const morePermalink = '#details'
|
|
991
|
+
|
|
992
|
+
lines.push(
|
|
993
|
+
this.renderBriefDescriptionToHtmlString({
|
|
994
|
+
briefDescriptionHtmlString: this.briefDescriptionHtmlString,
|
|
995
|
+
todo: descriptionTodo,
|
|
996
|
+
morePermalink,
|
|
997
|
+
})
|
|
998
|
+
)
|
|
999
|
+
|
|
1000
|
+
lines.push(
|
|
1001
|
+
...this.renderInnerIndicesToLines({
|
|
1002
|
+
suffixes: ['Dirs', 'Files'],
|
|
1003
|
+
})
|
|
1004
|
+
)
|
|
1005
|
+
|
|
1006
|
+
lines.push(...this.renderSectionIndicesToLines())
|
|
1007
|
+
|
|
1008
|
+
lines.push(
|
|
1009
|
+
...this.renderDetailedDescriptionToHtmlLines({
|
|
1010
|
+
briefDescriptionHtmlString: this.briefDescriptionHtmlString,
|
|
1011
|
+
detailedDescriptionHtmlLines: this.detailedDescriptionHtmlLines,
|
|
1012
|
+
todo: descriptionTodo,
|
|
1013
|
+
showHeader: true,
|
|
1014
|
+
showBrief: !this.hasSect1InDescription,
|
|
1015
|
+
})
|
|
1016
|
+
)
|
|
1017
|
+
|
|
1018
|
+
lines.push(...this.renderSectionsToLines())
|
|
1019
|
+
|
|
1020
|
+
return lines
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
/**
|
|
1024
|
+
* Performs late initialisation for folders with content validation.
|
|
1025
|
+
*
|
|
1026
|
+
* @remarks
|
|
1027
|
+
* Validates folder content and conditionally disables sidebar generation for
|
|
1028
|
+
* empty folders. This ensures that folders without meaningful documentation
|
|
1029
|
+
* do not appear in the generated sidebar navigation.
|
|
1030
|
+
*
|
|
1031
|
+
* @public
|
|
1032
|
+
*/
|
|
1033
|
+
override initializeLate(): void {
|
|
1034
|
+
super.initializeLate()
|
|
1035
|
+
|
|
1036
|
+
const { workspace } = this.collection
|
|
1037
|
+
|
|
1038
|
+
// console.log(this)
|
|
1039
|
+
if (!this.hasAnyContent()) {
|
|
1040
|
+
if (!workspace.options.suggestToDoDescriptions) {
|
|
1041
|
+
console.log(this.kind, this.compoundName, 'has no content, not shown')
|
|
1042
|
+
|
|
1043
|
+
this.sidebarId = undefined
|
|
1044
|
+
this.sidebarLabel = undefined
|
|
1045
|
+
this.relativePermalink = undefined
|
|
1046
|
+
|
|
1047
|
+
return
|
|
1048
|
+
} else {
|
|
1049
|
+
if (workspace.options.verbose) {
|
|
1050
|
+
console.log(
|
|
1051
|
+
this.kind,
|
|
1052
|
+
this.compoundName,
|
|
1053
|
+
'has no content, see the TODO description'
|
|
1054
|
+
)
|
|
1055
|
+
}
|
|
1056
|
+
}
|
|
1057
|
+
}
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
// ----------------------------------------------------------------------------
|
|
1062
|
+
|
|
1063
|
+
/**
|
|
1064
|
+
* Represents a file compound for source code documentation.
|
|
1065
|
+
*
|
|
1066
|
+
* @remarks
|
|
1067
|
+
* Manages file-specific functionality including program listings,
|
|
1068
|
+
* line number tracking, and source code documentation generation.
|
|
1069
|
+
* Provides structured representation of source files within the
|
|
1070
|
+
* documentation hierarchy.
|
|
1071
|
+
*
|
|
1072
|
+
* @public
|
|
1073
|
+
*/
|
|
1074
|
+
export class File extends CompoundBase {
|
|
1075
|
+
/** Relative path from root to this file. */
|
|
1076
|
+
relativePath = ''
|
|
1077
|
+
|
|
1078
|
+
/** Set of line numbers available in the program listing. */
|
|
1079
|
+
listingLineNumbers = new Set<number>()
|
|
1080
|
+
|
|
1081
|
+
/** Program listing data for source code display. */
|
|
1082
|
+
programListing: ProgramListingDataModel | undefined
|
|
1083
|
+
|
|
1084
|
+
/**
|
|
1085
|
+
* Creates a new File instance from compound definition data.
|
|
1086
|
+
*
|
|
1087
|
+
* @remarks
|
|
1088
|
+
* Initialises file metadata including display labels, page titles,
|
|
1089
|
+
* and member sections. Sets up the file structure for documentation
|
|
1090
|
+
* generation and source code listing display.
|
|
1091
|
+
*
|
|
1092
|
+
* @param collection - The parent FilesAndFolders collection
|
|
1093
|
+
* @param compoundDef - The Doxygen compound definition for the file
|
|
1094
|
+
*/
|
|
1095
|
+
constructor(collection: FilesAndFolders, compoundDef: CompoundDefDataModel) {
|
|
1096
|
+
super(collection, compoundDef)
|
|
1097
|
+
|
|
1098
|
+
// console.log('file:', compoundDef.compoundName)
|
|
1099
|
+
|
|
1100
|
+
// The compoundName is the actual file name, without path.
|
|
1101
|
+
const { compoundName } = compoundDef
|
|
1102
|
+
assert(compoundName.length > 0)
|
|
1103
|
+
this.sidebarLabel = compoundName
|
|
1104
|
+
this.indexName = compoundName
|
|
1105
|
+
this.treeEntryName = compoundName
|
|
1106
|
+
|
|
1107
|
+
this.pageTitle = `\`${this.sidebarLabel}\` File`
|
|
1108
|
+
|
|
1109
|
+
this.createSections()
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1112
|
+
/**
|
|
1113
|
+
* Performs late initialisation for files with program listing setup.
|
|
1114
|
+
*
|
|
1115
|
+
* @remarks
|
|
1116
|
+
* Processes the program listing for source code rendering and tracks valid
|
|
1117
|
+
* line numbers for link validation. Also validates file content and
|
|
1118
|
+
* conditionally disables sidebar generation for empty files.
|
|
1119
|
+
*
|
|
1120
|
+
* @public
|
|
1121
|
+
*/
|
|
1122
|
+
override initializeLate(): void {
|
|
1123
|
+
super.initializeLate()
|
|
1124
|
+
|
|
1125
|
+
const compoundDef = this._private._compoundDef
|
|
1126
|
+
assert(compoundDef !== undefined)
|
|
1127
|
+
|
|
1128
|
+
const { programListing } = compoundDef
|
|
1129
|
+
this.programListing = programListing
|
|
1130
|
+
|
|
1131
|
+
if (this.collection.workspace.options.renderProgramListing) {
|
|
1132
|
+
// Keep track of line number, since not all lines referred exist and
|
|
1133
|
+
// this might result in broken links.
|
|
1134
|
+
if (this.programListing?.codelines !== undefined) {
|
|
1135
|
+
for (const codeline of this.programListing.codelines) {
|
|
1136
|
+
if (codeline.lineno !== undefined) {
|
|
1137
|
+
this.listingLineNumbers.add(codeline.lineno.valueOf())
|
|
1138
|
+
}
|
|
1139
|
+
}
|
|
1140
|
+
}
|
|
1141
|
+
}
|
|
1142
|
+
|
|
1143
|
+
const { workspace } = this.collection
|
|
1144
|
+
|
|
1145
|
+
// console.log(this)
|
|
1146
|
+
if (!this.hasAnyContent()) {
|
|
1147
|
+
if (!workspace.options.suggestToDoDescriptions) {
|
|
1148
|
+
console.log(this.kind, this.compoundName, 'has no content, not shown')
|
|
1149
|
+
|
|
1150
|
+
this.sidebarId = undefined
|
|
1151
|
+
this.sidebarLabel = undefined
|
|
1152
|
+
this.relativePermalink = undefined
|
|
1153
|
+
|
|
1154
|
+
return
|
|
1155
|
+
} else {
|
|
1156
|
+
if (workspace.options.verbose) {
|
|
1157
|
+
console.log(
|
|
1158
|
+
this.kind,
|
|
1159
|
+
this.compoundName,
|
|
1160
|
+
'has no content, see the TODO description'
|
|
1161
|
+
)
|
|
1162
|
+
}
|
|
1163
|
+
}
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
|
|
1167
|
+
/**
|
|
1168
|
+
* Determines if the file has any documentable content.
|
|
1169
|
+
*
|
|
1170
|
+
* @remarks
|
|
1171
|
+
* Checks for children elements, inner compounds, and include relationships
|
|
1172
|
+
* to determine content availability. This method helps filter empty files
|
|
1173
|
+
* from the generated documentation.
|
|
1174
|
+
*
|
|
1175
|
+
* @returns True if the file contains documentable content, false otherwise.
|
|
1176
|
+
*
|
|
1177
|
+
* @public
|
|
1178
|
+
*/
|
|
1179
|
+
override hasAnyContent(): boolean {
|
|
1180
|
+
// console.log('checking', this.compoundName)
|
|
1181
|
+
if (this.childrenIds.length > 0) {
|
|
1182
|
+
// console.log('has content childrenIds', this)
|
|
1183
|
+
return true
|
|
1184
|
+
}
|
|
1185
|
+
if (this.children.length > 0) {
|
|
1186
|
+
// console.log('has content children.length', this)
|
|
1187
|
+
return true
|
|
1188
|
+
}
|
|
1189
|
+
if (this.innerCompounds !== undefined) {
|
|
1190
|
+
// console.log('has content innerCompounds', this)
|
|
1191
|
+
return true
|
|
1192
|
+
}
|
|
1193
|
+
if (this.includes !== undefined) {
|
|
1194
|
+
// console.log('has content includes', this)
|
|
1195
|
+
return true
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
// if (this.collection.workspace.options.renderProgramListing) {
|
|
1199
|
+
// if (this.programListing !== undefined) {
|
|
1200
|
+
// return true
|
|
1201
|
+
// }
|
|
1202
|
+
// }
|
|
1203
|
+
|
|
1204
|
+
return super.hasAnyContent()
|
|
1205
|
+
}
|
|
1206
|
+
|
|
1207
|
+
// --------------------------------------------------------------------------
|
|
1208
|
+
|
|
1209
|
+
/**
|
|
1210
|
+
* Renders the file documentation to Markdown lines.
|
|
1211
|
+
*
|
|
1212
|
+
* @remarks
|
|
1213
|
+
* Generates comprehensive file documentation including brief description,
|
|
1214
|
+
* includes index, inner compound indices, section indices, detailed
|
|
1215
|
+
* description, and optionally the program listing. The output follows
|
|
1216
|
+
* Docusaurus conventions for file documentation pages.
|
|
1217
|
+
*
|
|
1218
|
+
* @param frontMatter - The front matter configuration for the page
|
|
1219
|
+
* @returns Array of Markdown lines representing the file documentation
|
|
1220
|
+
*
|
|
1221
|
+
* @public
|
|
1222
|
+
*/
|
|
1223
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1224
|
+
override renderToLines(frontMatter: FrontMatter): string[] {
|
|
1225
|
+
const lines: string[] = []
|
|
1226
|
+
|
|
1227
|
+
const descriptionTodo = `@file ${this.collection.workspace.renderString(
|
|
1228
|
+
this.relativePath,
|
|
1229
|
+
'html'
|
|
1230
|
+
)}`
|
|
1231
|
+
|
|
1232
|
+
// The Description header is always shown.
|
|
1233
|
+
const morePermalink = '#details'
|
|
1234
|
+
|
|
1235
|
+
lines.push(
|
|
1236
|
+
this.renderBriefDescriptionToHtmlString({
|
|
1237
|
+
briefDescriptionHtmlString: this.briefDescriptionHtmlString,
|
|
1238
|
+
todo: descriptionTodo,
|
|
1239
|
+
morePermalink,
|
|
1240
|
+
})
|
|
1241
|
+
)
|
|
1242
|
+
|
|
1243
|
+
lines.push(...this.renderIncludesIndexToLines())
|
|
1244
|
+
|
|
1245
|
+
lines.push(
|
|
1246
|
+
...this.renderInnerIndicesToLines({
|
|
1247
|
+
suffixes: ['Namespaces', 'Classes', 'Concepts'],
|
|
1248
|
+
})
|
|
1249
|
+
)
|
|
1250
|
+
|
|
1251
|
+
// TODO: render Concepts Index
|
|
1252
|
+
// For now the xml does not include the necessary information to do so,
|
|
1253
|
+
// since the inner compounds only include namespaces and classes, but
|
|
1254
|
+
// not concepts. This would require changes in the XML generation in
|
|
1255
|
+
// Doxygen.
|
|
1256
|
+
|
|
1257
|
+
lines.push(...this.renderSectionIndicesToLines())
|
|
1258
|
+
|
|
1259
|
+
lines.push(
|
|
1260
|
+
...this.renderDetailedDescriptionToHtmlLines({
|
|
1261
|
+
briefDescriptionHtmlString: this.briefDescriptionHtmlString,
|
|
1262
|
+
detailedDescriptionHtmlLines: this.detailedDescriptionHtmlLines,
|
|
1263
|
+
todo: descriptionTodo,
|
|
1264
|
+
showHeader: true,
|
|
1265
|
+
showBrief: !this.hasSect1InDescription,
|
|
1266
|
+
})
|
|
1267
|
+
)
|
|
1268
|
+
|
|
1269
|
+
lines.push(...this.renderSectionsToLines())
|
|
1270
|
+
|
|
1271
|
+
if (
|
|
1272
|
+
this.programListing !== undefined &&
|
|
1273
|
+
this.collection.workspace.options.renderProgramListing
|
|
1274
|
+
) {
|
|
1275
|
+
lines.push('')
|
|
1276
|
+
lines.push('## File Listing')
|
|
1277
|
+
|
|
1278
|
+
lines.push('')
|
|
1279
|
+
lines.push('The file content with the documentation metadata removed is:')
|
|
1280
|
+
|
|
1281
|
+
lines.push(
|
|
1282
|
+
...this.collection.workspace.renderElementToLines(
|
|
1283
|
+
this.programListing,
|
|
1284
|
+
'html'
|
|
1285
|
+
)
|
|
1286
|
+
)
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
return lines
|
|
1290
|
+
}
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1293
|
+
// ----------------------------------------------------------------------------
|