@xpack/doxygen2docusaurus 2.1.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/README.md +2 -1
- package/bin/doxygen2docusaurus.js +4 -4
- 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/renderers.d.ts.map +1 -1
- package/dist/docusaurus/renderers/renderers.js +11 -2
- package/dist/docusaurus/renderers/renderers.js.map +1 -1
- package/dist/docusaurus/view-model/concepts-vm.d.ts +1 -0
- package/dist/docusaurus/view-model/concepts-vm.d.ts.map +1 -1
- package/dist/docusaurus/view-model/concepts-vm.js +11 -3
- package/dist/docusaurus/view-model/concepts-vm.js.map +1 -1
- package/dist/docusaurus/view-model/namespaces-vm.d.ts +1 -0
- package/dist/docusaurus/view-model/namespaces-vm.d.ts.map +1 -1
- package/dist/docusaurus/view-model/namespaces-vm.js +8 -2
- package/dist/docusaurus/view-model/namespaces-vm.js.map +1 -1
- package/dist/docusaurus/view-model/pages-vm.d.ts.map +1 -1
- package/dist/docusaurus/view-model/pages-vm.js +39 -0
- package/dist/docusaurus/view-model/pages-vm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/compounddef-dm.d.ts +2 -0
- package/dist/doxygen/data-model/compounds/compounddef-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/compounddef-dm.js +5 -0
- package/dist/doxygen/data-model/compounds/compounddef-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.map +1 -1
- package/dist/doxygen/data-model/compounds/descriptiontype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/memberdeftype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/memberdeftype-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/tableofcontentstype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/tableofcontentstype-dm.js.map +1 -1
- package/dist/doxygen/data-model/data-model.d.ts.map +1 -1
- package/dist/doxygen/data-model/data-model.js +4 -3
- package/dist/doxygen/data-model/data-model.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/package.json +8 -5
- package/src/cli/main.ts +4 -4
- package/src/docusaurus/cli-options.ts +4 -4
- package/src/docusaurus/generator.ts +4 -4
- package/src/docusaurus/renderers/conceptparts.ts +119 -0
- package/src/docusaurus/renderers/descriptiontype.ts +4 -4
- package/src/docusaurus/renderers/docinternalstype.ts +4 -4
- package/src/docusaurus/renderers/doclisttype.ts +4 -4
- package/src/docusaurus/renderers/doctabletype.ts +4 -4
- package/src/docusaurus/renderers/doctitletype.ts +4 -4
- package/src/docusaurus/renderers/docvariablelisttype.ts +4 -4
- package/src/docusaurus/renderers/docxrefsecttype.ts +4 -4
- package/src/docusaurus/renderers/element-renderer-base.ts +4 -4
- package/src/docusaurus/renderers/inctype.ts +4 -4
- package/src/docusaurus/renderers/linkedtexttype.ts +4 -4
- package/src/docusaurus/renderers/listingtype.ts +4 -4
- package/src/docusaurus/renderers/paramtype.ts +4 -4
- package/src/docusaurus/renderers/referencetype.ts +4 -4
- package/src/docusaurus/renderers/reftexttype.ts +4 -4
- package/src/docusaurus/renderers/reftype.ts +4 -4
- package/src/docusaurus/renderers/renderers.ts +66 -10
- package/src/docusaurus/renderers/substringtype.ts +4 -4
- package/src/docusaurus/renderers/tableofcontentstype.ts +4 -4
- package/src/docusaurus/types.ts +4 -4
- package/src/docusaurus/utils.ts +4 -4
- package/src/docusaurus/view-model/classes-vm.ts +4 -4
- package/src/docusaurus/view-model/collection-base.ts +4 -4
- package/src/docusaurus/view-model/compound-base-vm.ts +4 -4
- package/src/docusaurus/view-model/concepts-vm.ts +37 -7
- package/src/docusaurus/view-model/description-anchors.ts +4 -4
- package/src/docusaurus/view-model/files-and-folders-vm.ts +4 -4
- package/src/docusaurus/view-model/groups-vm.ts +4 -4
- package/src/docusaurus/view-model/members-vm.ts +4 -4
- package/src/docusaurus/view-model/namespaces-vm.ts +25 -6
- package/src/docusaurus/view-model/options.ts +4 -4
- package/src/docusaurus/view-model/pages-vm.ts +53 -6
- package/src/docusaurus/view-model/tree-entries-vm.ts +4 -4
- package/src/docusaurus/view-model/view-model.ts +4 -4
- package/src/docusaurus/workspace.ts +4 -4
- package/src/doxygen/data-model/compounds/compounddef-dm.ts +78 -4
- package/src/doxygen/data-model/compounds/compoundreftype-dm.ts +4 -4
- package/src/doxygen/data-model/compounds/concepts-dm.ts +362 -0
- package/src/doxygen/data-model/compounds/descriptiontype-dm.ts +12 -5
- package/src/doxygen/data-model/compounds/docvarlistentrytype-dm.ts +4 -4
- package/src/doxygen/data-model/compounds/doxygentype-dm.ts +4 -4
- package/src/doxygen/data-model/compounds/enumvaluetype-dm.ts +4 -4
- package/src/doxygen/data-model/compounds/inctype-dm.ts +4 -4
- package/src/doxygen/data-model/compounds/linkedtexttype-dm.ts +4 -4
- package/src/doxygen/data-model/compounds/listofallmemberstype-dm.ts +4 -4
- package/src/doxygen/data-model/compounds/locationtype-dm.ts +4 -4
- package/src/doxygen/data-model/compounds/memberdeftype-dm.ts +11 -4
- package/src/doxygen/data-model/compounds/memberreftype-dm.ts +4 -4
- package/src/doxygen/data-model/compounds/membertype-dm.ts +4 -4
- package/src/doxygen/data-model/compounds/paramtype-dm.ts +4 -4
- package/src/doxygen/data-model/compounds/referencetype-dm.ts +4 -4
- package/src/doxygen/data-model/compounds/reftexttype-dm.ts +4 -4
- package/src/doxygen/data-model/compounds/reftype-dm.ts +4 -4
- package/src/doxygen/data-model/compounds/reimplementtype-dm.ts +4 -4
- package/src/doxygen/data-model/compounds/requirements-dm.ts +50 -0
- package/src/doxygen/data-model/compounds/sectiondeftype-dm.ts +4 -4
- package/src/doxygen/data-model/compounds/tableofcontentstype-dm.ts +6 -5
- package/src/doxygen/data-model/compounds/templateparamlisttype-dm.ts +4 -4
- package/src/doxygen/data-model/data-model.ts +9 -8
- package/src/doxygen/data-model/doxyfile/doxyfileoptiontype-dm.ts +4 -4
- package/src/doxygen/data-model/doxyfile/doxyfiletype-dm.ts +4 -4
- package/src/doxygen/data-model/doxygen-xml-parser.ts +4 -4
- package/src/doxygen/data-model/index/indexcompoundtype-dm.ts +4 -4
- package/src/doxygen/data-model/index/indexdoxygentype-dm.ts +4 -4
- package/src/doxygen/data-model/index/indexmembertype-dm.ts +4 -4
- package/src/doxygen/data-model/types.ts +4 -4
- package/src/doxygen/data-model/xsds/README.md +3 -3
- package/src/doxygen/data-model/xsds/compound.xsd +91 -2
- package/src/doxygen/data-model/xsds/doxyfile.xsd +11 -1
- package/src/doxygen/data-model/xsds/index.xsd +3 -1
- package/src/index.ts +10 -4
- package/src/tsconfig.json +3 -1
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* This file is part of the xPack project (http://xpack.github.io).
|
|
3
3
|
* Copyright (c) 2025-2026 Liviu Ionescu. All rights reserved.
|
|
4
4
|
*
|
|
5
|
-
* Permission to use, copy, modify, and/or distribute this software
|
|
6
|
-
*
|
|
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
7
|
*
|
|
8
|
-
* If a copy of the license was not distributed with this file, it can
|
|
9
|
-
*
|
|
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
10
|
*/
|
|
11
11
|
|
|
12
12
|
// ----------------------------------------------------------------------------
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* This file is part of the xPack project (http://xpack.github.io).
|
|
3
3
|
* Copyright (c) 2025-2026 Liviu Ionescu. All rights reserved.
|
|
4
4
|
*
|
|
5
|
-
* Permission to use, copy, modify, and/or distribute this software
|
|
6
|
-
*
|
|
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
7
|
*
|
|
8
|
-
* If a copy of the license was not distributed with this file, it can
|
|
9
|
-
*
|
|
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
10
|
*/
|
|
11
11
|
|
|
12
12
|
// ----------------------------------------------------------------------------
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* This file is part of the xPack project (http://xpack.github.io).
|
|
3
3
|
* Copyright (c) 2025-2026 Liviu Ionescu. All rights reserved.
|
|
4
4
|
*
|
|
5
|
-
* Permission to use, copy, modify, and/or distribute this software
|
|
6
|
-
*
|
|
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
7
|
*
|
|
8
|
-
* If a copy of the license was not distributed with this file, it can
|
|
9
|
-
*
|
|
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
10
|
*/
|
|
11
11
|
|
|
12
12
|
// ----------------------------------------------------------------------------
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* This file is part of the xPack project (http://xpack.github.io).
|
|
3
3
|
* Copyright (c) 2025-2026 Liviu Ionescu. All rights reserved.
|
|
4
4
|
*
|
|
5
|
-
* Permission to use, copy, modify, and/or distribute this software
|
|
6
|
-
*
|
|
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
7
|
*
|
|
8
|
-
* If a copy of the license was not distributed with this file, it can
|
|
9
|
-
*
|
|
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
10
|
*/
|
|
11
11
|
|
|
12
12
|
// ----------------------------------------------------------------------------
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* This file is part of the xPack project (http://xpack.github.io).
|
|
3
3
|
* Copyright (c) 2025-2026 Liviu Ionescu. All rights reserved.
|
|
4
4
|
*
|
|
5
|
-
* Permission to use, copy, modify, and/or distribute this software
|
|
6
|
-
*
|
|
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
7
|
*
|
|
8
|
-
* If a copy of the license was not distributed with this file, it can
|
|
9
|
-
*
|
|
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
10
|
*/
|
|
11
11
|
|
|
12
12
|
// ----------------------------------------------------------------------------
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* This file is part of the xPack project (http://xpack.github.io).
|
|
3
3
|
* Copyright (c) 2025-2026 Liviu Ionescu. All rights reserved.
|
|
4
4
|
*
|
|
5
|
-
* Permission to use, copy, modify, and/or distribute this software
|
|
6
|
-
*
|
|
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
7
|
*
|
|
8
|
-
* If a copy of the license was not distributed with this file, it can
|
|
9
|
-
*
|
|
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
10
|
*/
|
|
11
11
|
|
|
12
12
|
// ----------------------------------------------------------------------------
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* This file is part of the xPack project (http://xpack.github.io).
|
|
3
3
|
* Copyright (c) 2025-2026 Liviu Ionescu. All rights reserved.
|
|
4
4
|
*
|
|
5
|
-
* Permission to use, copy, modify, and/or distribute this software
|
|
6
|
-
*
|
|
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
7
|
*
|
|
8
|
-
* If a copy of the license was not distributed with this file, it can
|
|
9
|
-
*
|
|
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
10
|
*/
|
|
11
11
|
|
|
12
12
|
// ----------------------------------------------------------------------------
|
|
@@ -74,6 +74,10 @@ import {
|
|
|
74
74
|
import { TocListLinesRenderer } from './tableofcontentstype.js'
|
|
75
75
|
import { ReferenceTypeStringRenderer } from './referencetype.js'
|
|
76
76
|
import type { DataModelElement } from '../../doxygen/data-model/types.js'
|
|
77
|
+
import {
|
|
78
|
+
ConceptCodePartLinesRenderer,
|
|
79
|
+
ConceptPartsLinesRenderer,
|
|
80
|
+
} from './conceptparts.js'
|
|
77
81
|
|
|
78
82
|
// ----------------------------------------------------------------------------
|
|
79
83
|
|
|
@@ -105,11 +109,38 @@ export class Renderers {
|
|
|
105
109
|
registerRenderers(workspace: Workspace): void {
|
|
106
110
|
// Add renderers for the parsed xml elements (in alphabetical order).
|
|
107
111
|
|
|
112
|
+
// ------------------------------------------------------------------------
|
|
113
|
+
// Register line-based renderers for elements that produce multi-line
|
|
114
|
+
// output.
|
|
115
|
+
//
|
|
116
|
+
// Some renderers are designed for specific types, while others are
|
|
117
|
+
// designed for abstract types and will be used as base renderers for
|
|
118
|
+
// multiple concrete types.
|
|
119
|
+
//
|
|
120
|
+
// The order of registration is significant, the specific renderers must
|
|
121
|
+
// be registered before the abstract ones.
|
|
122
|
+
//
|
|
123
|
+
// For readability and ease of maintenance, the renderers are registered
|
|
124
|
+
// in alphabetical order, with specific renderers listed before the
|
|
125
|
+
// abstract ones they are based on.
|
|
126
|
+
|
|
127
|
+
// This is a specific renderer.
|
|
108
128
|
this.elementLinesRenderers.set(
|
|
109
129
|
'VariableListPairDataModel',
|
|
110
130
|
new VariableListPairLinesRenderer(workspace)
|
|
111
131
|
)
|
|
112
132
|
|
|
133
|
+
// The following renderers are for abstract types, and will be used
|
|
134
|
+
// for all their concrete subtypes.
|
|
135
|
+
|
|
136
|
+
this.elementLinesRenderers.set(
|
|
137
|
+
'AbstractConceptCodePart',
|
|
138
|
+
new ConceptCodePartLinesRenderer(workspace)
|
|
139
|
+
)
|
|
140
|
+
this.elementLinesRenderers.set(
|
|
141
|
+
'AbstractConceptParts',
|
|
142
|
+
new ConceptPartsLinesRenderer(workspace)
|
|
143
|
+
)
|
|
113
144
|
this.elementLinesRenderers.set(
|
|
114
145
|
'AbstractDescriptionType',
|
|
115
146
|
new DescriptionTypeLinesRenderer(workspace)
|
|
@@ -218,13 +249,27 @@ export class Renderers {
|
|
|
218
249
|
'AbstractRefType',
|
|
219
250
|
new RefTypeLinesRenderer(workspace)
|
|
220
251
|
)
|
|
221
|
-
// console.log(this.elementGenerators.size, 'element generators')
|
|
222
252
|
|
|
253
|
+
// ------------------------------------------------------------------------
|
|
254
|
+
// Register string-based renderers for elements that produce single-line
|
|
255
|
+
// output.
|
|
256
|
+
//
|
|
257
|
+
// Same as for line renderers, the specific renderers must be registered
|
|
258
|
+
// before the abstract ones they are based on, and the renderers are
|
|
259
|
+
// registered in alphabetical order.
|
|
260
|
+
|
|
261
|
+
// This is a specific renderer.
|
|
223
262
|
this.elementStringRenderers.set(
|
|
224
263
|
'ComputerOutputDataModel',
|
|
225
264
|
new ComputerOutputDataModelStringRenderer(workspace)
|
|
226
265
|
)
|
|
227
266
|
|
|
267
|
+
// The following renderers are for abstract types, and will be used
|
|
268
|
+
// for all their concrete subtypes.
|
|
269
|
+
this.elementStringRenderers.set(
|
|
270
|
+
'ComputerOutputDataModel',
|
|
271
|
+
new ComputerOutputDataModelStringRenderer(workspace)
|
|
272
|
+
)
|
|
228
273
|
this.elementStringRenderers.set(
|
|
229
274
|
'AbstractDocEmptyType',
|
|
230
275
|
new DocEmptyTypeStringRenderer(workspace)
|
|
@@ -425,12 +470,14 @@ export class Renderers {
|
|
|
425
470
|
* @remarks
|
|
426
471
|
* Determines the appropriate renderer based on element type and delegates
|
|
427
472
|
* rendering. Handles strings, arrays, and objects with fallback logic
|
|
428
|
-
* between line and string renderers.
|
|
429
|
-
*
|
|
473
|
+
* between line and string renderers. Leading spaces at the start of each
|
|
474
|
+
* rendered line are converted to HTML non-breaking space entities so that
|
|
475
|
+
* indentation is preserved in the generated output. Provides error
|
|
476
|
+
* handling for unrecognised element types.
|
|
430
477
|
*
|
|
431
478
|
* @param element - The element to render (single, array, or undefined)
|
|
432
479
|
* @param type - The rendering context type
|
|
433
|
-
* @returns Array of formatted output lines
|
|
480
|
+
* @returns Array of formatted output lines with preserved indentation
|
|
434
481
|
*/
|
|
435
482
|
renderElementToLines(
|
|
436
483
|
element: DataModelElement | DataModelElement[] | undefined,
|
|
@@ -459,13 +506,22 @@ export class Renderers {
|
|
|
459
506
|
const linesRenderer: ElementLinesRendererBase | undefined =
|
|
460
507
|
this.getElementLinesRenderer(element)
|
|
461
508
|
if (linesRenderer !== undefined) {
|
|
462
|
-
return linesRenderer
|
|
509
|
+
return linesRenderer
|
|
510
|
+
.renderToLines(element, type)
|
|
511
|
+
.map((line) =>
|
|
512
|
+
line.replace(/^ +/, (match) => ' '.repeat(match.length))
|
|
513
|
+
)
|
|
463
514
|
}
|
|
464
515
|
|
|
465
516
|
const textRenderer: ElementStringRendererBase | undefined =
|
|
466
517
|
this.getElementTextRenderer(element)
|
|
467
518
|
if (textRenderer !== undefined) {
|
|
468
|
-
return textRenderer
|
|
519
|
+
return textRenderer
|
|
520
|
+
.renderToString(element, type)
|
|
521
|
+
.split('\n')
|
|
522
|
+
.map((line) =>
|
|
523
|
+
line.replace(/^ +/, (match) => ' '.repeat(match.length))
|
|
524
|
+
)
|
|
469
525
|
}
|
|
470
526
|
|
|
471
527
|
console.error(util.inspect(element, { compact: false, depth: 999 }))
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* This file is part of the xPack project (http://xpack.github.io).
|
|
3
3
|
* Copyright (c) 2025-2026 Liviu Ionescu. All rights reserved.
|
|
4
4
|
*
|
|
5
|
-
* Permission to use, copy, modify, and/or distribute this software
|
|
6
|
-
*
|
|
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
7
|
*
|
|
8
|
-
* If a copy of the license was not distributed with this file, it can
|
|
9
|
-
*
|
|
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
10
|
*/
|
|
11
11
|
|
|
12
12
|
// ----------------------------------------------------------------------------
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* This file is part of the xPack project (http://xpack.github.io).
|
|
3
3
|
* Copyright (c) 2025-2026 Liviu Ionescu. All rights reserved.
|
|
4
4
|
*
|
|
5
|
-
* Permission to use, copy, modify, and/or distribute this software
|
|
6
|
-
*
|
|
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
7
|
*
|
|
8
|
-
* If a copy of the license was not distributed with this file, it can
|
|
9
|
-
*
|
|
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
10
|
*/
|
|
11
11
|
|
|
12
12
|
// ----------------------------------------------------------------------------
|
package/src/docusaurus/types.ts
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* This file is part of the xPack project (http://xpack.github.io).
|
|
3
3
|
* Copyright (c) 2025-2026 Liviu Ionescu. All rights reserved.
|
|
4
4
|
*
|
|
5
|
-
* Permission to use, copy, modify, and/or distribute this software
|
|
6
|
-
*
|
|
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
7
|
*
|
|
8
|
-
* If a copy of the license was not distributed with this file, it can
|
|
9
|
-
*
|
|
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
10
|
*/
|
|
11
11
|
|
|
12
12
|
// ----------------------------------------------------------------------------
|
package/src/docusaurus/utils.ts
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* This file is part of the xPack project (http://xpack.github.io).
|
|
3
3
|
* Copyright (c) 2025-2026 Liviu Ionescu. All rights reserved.
|
|
4
4
|
*
|
|
5
|
-
* Permission to use, copy, modify, and/or distribute this software
|
|
6
|
-
*
|
|
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
7
|
*
|
|
8
|
-
* If a copy of the license was not distributed with this file, it can
|
|
9
|
-
*
|
|
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
10
|
*/
|
|
11
11
|
|
|
12
12
|
// ----------------------------------------------------------------------------
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* This file is part of the xPack project (http://xpack.github.io).
|
|
3
3
|
* Copyright (c) 2025-2026 Liviu Ionescu. All rights reserved.
|
|
4
4
|
*
|
|
5
|
-
* Permission to use, copy, modify, and/or distribute this software
|
|
6
|
-
*
|
|
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
7
|
*
|
|
8
|
-
* If a copy of the license was not distributed with this file, it can
|
|
9
|
-
*
|
|
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
10
|
*/
|
|
11
11
|
|
|
12
12
|
// ----------------------------------------------------------------------------
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* This file is part of the xPack project (http://xpack.github.io).
|
|
3
3
|
* Copyright (c) 2025-2026 Liviu Ionescu. All rights reserved.
|
|
4
4
|
*
|
|
5
|
-
* Permission to use, copy, modify, and/or distribute this software
|
|
6
|
-
*
|
|
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
7
|
*
|
|
8
|
-
* If a copy of the license was not distributed with this file, it can
|
|
9
|
-
*
|
|
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
10
|
*/
|
|
11
11
|
|
|
12
12
|
// ----------------------------------------------------------------------------
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* This file is part of the xPack project (http://xpack.github.io).
|
|
3
3
|
* Copyright (c) 2025-2026 Liviu Ionescu. All rights reserved.
|
|
4
4
|
*
|
|
5
|
-
* Permission to use, copy, modify, and/or distribute this software
|
|
6
|
-
*
|
|
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
7
|
*
|
|
8
|
-
* If a copy of the license was not distributed with this file, it can
|
|
9
|
-
*
|
|
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
10
|
*/
|
|
11
11
|
|
|
12
12
|
// ----------------------------------------------------------------------------
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* This file is part of the xPack project (http://xpack.github.io).
|
|
3
3
|
* Copyright (c) 2025-2026 Liviu Ionescu. All rights reserved.
|
|
4
4
|
*
|
|
5
|
-
* Permission to use, copy, modify, and/or distribute this software
|
|
6
|
-
*
|
|
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
7
|
*
|
|
8
|
-
* If a copy of the license was not distributed with this file, it can
|
|
9
|
-
*
|
|
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
10
|
*/
|
|
11
11
|
|
|
12
12
|
// ----------------------------------------------------------------------------
|
|
@@ -221,7 +221,7 @@ export class Concepts extends CollectionBase {
|
|
|
221
221
|
return undefined
|
|
222
222
|
}
|
|
223
223
|
|
|
224
|
-
if (!namespace.
|
|
224
|
+
if (!namespace.hasConceptsRecursively()) {
|
|
225
225
|
return undefined
|
|
226
226
|
}
|
|
227
227
|
|
|
@@ -391,7 +391,7 @@ export class Concepts extends CollectionBase {
|
|
|
391
391
|
return []
|
|
392
392
|
}
|
|
393
393
|
|
|
394
|
-
if (!namespace.
|
|
394
|
+
if (!namespace.hasConceptsRecursively()) {
|
|
395
395
|
return []
|
|
396
396
|
}
|
|
397
397
|
|
|
@@ -564,6 +564,19 @@ export class Concept extends CompoundBase {
|
|
|
564
564
|
*/
|
|
565
565
|
initializerString = '???'
|
|
566
566
|
|
|
567
|
+
/**
|
|
568
|
+
* Rendered HTML lines for the concept parts content.
|
|
569
|
+
*
|
|
570
|
+
* @remarks
|
|
571
|
+
* Stores the rendered output of the Doxygen `conceptParts` element, which
|
|
572
|
+
* may contain an ordered mixture of documentation fragments and code
|
|
573
|
+
* fragments associated with the concept. Populated during
|
|
574
|
+
* {@link initializeLate}, and appended to the generated page body by
|
|
575
|
+
* {@link renderToLines}. The array remains empty when the compound does not
|
|
576
|
+
* include any concept parts.
|
|
577
|
+
*/
|
|
578
|
+
conceptPartsHtmlLines: string[] = []
|
|
579
|
+
|
|
567
580
|
/**
|
|
568
581
|
* Creates a new Concept instance.
|
|
569
582
|
*
|
|
@@ -652,6 +665,15 @@ export class Concept extends CompoundBase {
|
|
|
652
665
|
.join('<br/>\n')
|
|
653
666
|
.replace(/template/, 'template ')
|
|
654
667
|
}
|
|
668
|
+
|
|
669
|
+
const conceptParts = this._private._compoundDef?.conceptParts
|
|
670
|
+
if (conceptParts !== undefined) {
|
|
671
|
+
this.conceptPartsHtmlLines = workspace.renderElementToLines(
|
|
672
|
+
conceptParts,
|
|
673
|
+
'html'
|
|
674
|
+
)
|
|
675
|
+
// console.log('conceptParts', this.conceptPartsHtmlLines)
|
|
676
|
+
}
|
|
655
677
|
}
|
|
656
678
|
|
|
657
679
|
/**
|
|
@@ -708,9 +730,17 @@ export class Concept extends CompoundBase {
|
|
|
708
730
|
})
|
|
709
731
|
)
|
|
710
732
|
|
|
733
|
+
if (this.locationLines !== undefined) {
|
|
734
|
+
lines.push(...this.locationLines)
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
lines.push(...this.conceptPartsHtmlLines)
|
|
738
|
+
|
|
739
|
+
// Currently here are no sections.
|
|
711
740
|
// lines.push(...this.renderSectionsToLines())
|
|
712
741
|
|
|
713
|
-
|
|
742
|
+
// Currently there are none.
|
|
743
|
+
// lines.push(...this.renderGeneratedFromToLines())
|
|
714
744
|
|
|
715
745
|
return lines
|
|
716
746
|
}
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* This file is part of the xPack project (http://xpack.github.io).
|
|
3
3
|
* Copyright (c) 2025-2026 Liviu Ionescu. All rights reserved.
|
|
4
4
|
*
|
|
5
|
-
* Permission to use, copy, modify, and/or distribute this software
|
|
6
|
-
*
|
|
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
7
|
*
|
|
8
|
-
* If a copy of the license was not distributed with this file, it can
|
|
9
|
-
*
|
|
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
10
|
*/
|
|
11
11
|
|
|
12
12
|
// ----------------------------------------------------------------------------
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* This file is part of the xPack project (http://xpack.github.io).
|
|
3
3
|
* Copyright (c) 2025-2026 Liviu Ionescu. All rights reserved.
|
|
4
4
|
*
|
|
5
|
-
* Permission to use, copy, modify, and/or distribute this software
|
|
6
|
-
*
|
|
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
7
|
*
|
|
8
|
-
* If a copy of the license was not distributed with this file, it can
|
|
9
|
-
*
|
|
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
10
|
*/
|
|
11
11
|
|
|
12
12
|
// ----------------------------------------------------------------------------
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* This file is part of the xPack project (http://xpack.github.io).
|
|
3
3
|
* Copyright (c) 2025-2026 Liviu Ionescu. All rights reserved.
|
|
4
4
|
*
|
|
5
|
-
* Permission to use, copy, modify, and/or distribute this software
|
|
6
|
-
*
|
|
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
7
|
*
|
|
8
|
-
* If a copy of the license was not distributed with this file, it can
|
|
9
|
-
*
|
|
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
10
|
*/
|
|
11
11
|
|
|
12
12
|
// ----------------------------------------------------------------------------
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* This file is part of the xPack project (http://xpack.github.io).
|
|
3
3
|
* Copyright (c) 2025-2026 Liviu Ionescu. All rights reserved.
|
|
4
4
|
*
|
|
5
|
-
* Permission to use, copy, modify, and/or distribute this software
|
|
6
|
-
*
|
|
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
7
|
*
|
|
8
|
-
* If a copy of the license was not distributed with this file, it can
|
|
9
|
-
*
|
|
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
10
|
*/
|
|
11
11
|
|
|
12
12
|
// ----------------------------------------------------------------------------
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* This file is part of the xPack project (http://xpack.github.io).
|
|
3
3
|
* Copyright (c) 2025-2026 Liviu Ionescu. All rights reserved.
|
|
4
4
|
*
|
|
5
|
-
* Permission to use, copy, modify, and/or distribute this software
|
|
6
|
-
*
|
|
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
7
|
*
|
|
8
|
-
* If a copy of the license was not distributed with this file, it can
|
|
9
|
-
*
|
|
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
10
|
*/
|
|
11
11
|
|
|
12
12
|
// ----------------------------------------------------------------------------
|
|
@@ -916,20 +916,39 @@ export class Namespace extends CompoundBase {
|
|
|
916
916
|
*
|
|
917
917
|
* @public
|
|
918
918
|
*/
|
|
919
|
-
|
|
919
|
+
hasConceptsRecursively(): boolean {
|
|
920
920
|
if (this.concepts.length > 0) {
|
|
921
921
|
return true
|
|
922
922
|
}
|
|
923
923
|
|
|
924
924
|
for (const child of this.children) {
|
|
925
925
|
assert(child instanceof Namespace)
|
|
926
|
-
if (child.
|
|
926
|
+
if (child.hasConceptsRecursively()) {
|
|
927
927
|
return true
|
|
928
928
|
}
|
|
929
929
|
}
|
|
930
930
|
return false
|
|
931
931
|
}
|
|
932
932
|
|
|
933
|
+
/**
|
|
934
|
+
* Determines whether this namespace contains any C++20 concept compounds.
|
|
935
|
+
*
|
|
936
|
+
* @remarks
|
|
937
|
+
* Checks the namespace's own `concepts` array to determine if it contains
|
|
938
|
+
* any concepts. This method does not recurse into child namespaces.
|
|
939
|
+
*
|
|
940
|
+
* @returns `true` if at least one concept is present in this namespace,
|
|
941
|
+
* `false` otherwise
|
|
942
|
+
*
|
|
943
|
+
* @public
|
|
944
|
+
*/
|
|
945
|
+
hasConcepts(): boolean {
|
|
946
|
+
if (this.concepts.length > 0) {
|
|
947
|
+
return true
|
|
948
|
+
}
|
|
949
|
+
return false
|
|
950
|
+
}
|
|
951
|
+
|
|
933
952
|
// --------------------------------------------------------------------------
|
|
934
953
|
|
|
935
954
|
/**
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* This file is part of the xPack project (http://xpack.github.io).
|
|
3
3
|
* Copyright (c) 2025-2026 Liviu Ionescu. All rights reserved.
|
|
4
4
|
*
|
|
5
|
-
* Permission to use, copy, modify, and/or distribute this software
|
|
6
|
-
*
|
|
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
7
|
*
|
|
8
|
-
* If a copy of the license was not distributed with this file, it can
|
|
9
|
-
*
|
|
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
10
|
*/
|
|
11
11
|
|
|
12
12
|
// ----------------------------------------------------------------------------
|