typedoc 0.26.11 → 0.27.0-beta.1
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/bin/package.json +3 -0
- package/bin/typedoc +1 -1
- package/dist/index.d.ts +23 -13
- package/dist/index.js +22 -81
- package/dist/lib/application-events.js +1 -4
- package/dist/lib/application.d.ts +26 -16
- package/dist/lib/application.js +222 -242
- package/dist/lib/cli.js +3 -40
- package/dist/lib/converter/comments/blockLexer.d.ts +1 -1
- package/dist/lib/converter/comments/blockLexer.js +24 -30
- package/dist/lib/converter/comments/declarationReference.js +10 -21
- package/dist/lib/converter/comments/declarationReferenceResolver.d.ts +2 -2
- package/dist/lib/converter/comments/declarationReferenceResolver.js +40 -36
- package/dist/lib/converter/comments/discovery.d.ts +4 -4
- package/dist/lib/converter/comments/discovery.js +154 -172
- package/dist/lib/converter/comments/index.d.ts +4 -4
- package/dist/lib/converter/comments/index.js +39 -50
- package/dist/lib/converter/comments/lexer.d.ts +1 -1
- package/dist/lib/converter/comments/lexer.js +2 -5
- package/dist/lib/converter/comments/lineLexer.d.ts +1 -1
- package/dist/lib/converter/comments/lineLexer.js +12 -15
- package/dist/lib/converter/comments/linkResolver.d.ts +2 -2
- package/dist/lib/converter/comments/linkResolver.js +14 -21
- package/dist/lib/converter/comments/parser.d.ts +6 -6
- package/dist/lib/converter/comments/parser.js +69 -96
- package/dist/lib/converter/comments/rawLexer.d.ts +1 -1
- package/dist/lib/converter/comments/rawLexer.js +13 -16
- package/dist/lib/converter/comments/tagName.js +1 -4
- package/dist/lib/converter/comments/textParser.d.ts +4 -4
- package/dist/lib/converter/comments/textParser.js +28 -30
- package/dist/lib/converter/components.d.ts +2 -3
- package/dist/lib/converter/components.js +2 -7
- package/dist/lib/converter/context.d.ts +9 -9
- package/dist/lib/converter/context.js +54 -44
- package/dist/lib/converter/convert-expression.js +16 -23
- package/dist/lib/converter/converter-events.d.ts +1 -0
- package/dist/lib/converter/converter-events.js +2 -4
- package/dist/lib/converter/converter.d.ts +16 -13
- package/dist/lib/converter/converter.js +212 -239
- package/dist/lib/converter/factories/index-signature.d.ts +3 -3
- package/dist/lib/converter/factories/index-signature.js +43 -26
- package/dist/lib/converter/factories/signature.d.ts +2 -2
- package/dist/lib/converter/factories/signature.js +95 -106
- package/dist/lib/converter/index.d.ts +6 -7
- package/dist/lib/converter/index.js +3 -11
- package/dist/lib/converter/jsdoc.d.ts +1 -1
- package/dist/lib/converter/jsdoc.js +34 -41
- package/dist/lib/converter/plugins/CategoryPlugin.d.ts +6 -21
- package/dist/lib/converter/plugins/CategoryPlugin.js +57 -139
- package/dist/lib/converter/plugins/CommentPlugin.d.ts +3 -5
- package/dist/lib/converter/plugins/CommentPlugin.js +153 -163
- package/dist/lib/converter/plugins/GroupPlugin.d.ts +10 -9
- package/dist/lib/converter/plugins/GroupPlugin.js +87 -124
- package/dist/lib/converter/plugins/ImplementsPlugin.d.ts +3 -5
- package/dist/lib/converter/plugins/ImplementsPlugin.js +255 -321
- package/dist/lib/converter/plugins/IncludePlugin.d.ts +11 -0
- package/dist/lib/converter/plugins/IncludePlugin.js +72 -0
- package/dist/lib/converter/plugins/InheritDocPlugin.d.ts +4 -3
- package/dist/lib/converter/plugins/InheritDocPlugin.js +41 -72
- package/dist/lib/converter/plugins/LinkResolverPlugin.d.ts +5 -5
- package/dist/lib/converter/plugins/LinkResolverPlugin.js +37 -58
- package/dist/lib/converter/plugins/MergeModuleWithPlugin.d.ts +12 -0
- package/dist/lib/converter/plugins/MergeModuleWithPlugin.js +49 -0
- package/dist/lib/converter/plugins/PackagePlugin.d.ts +4 -3
- package/dist/lib/converter/plugins/PackagePlugin.js +62 -111
- package/dist/lib/converter/plugins/SourcePlugin.d.ts +3 -5
- package/dist/lib/converter/plugins/SourcePlugin.js +69 -110
- package/dist/lib/converter/plugins/TypePlugin.d.ts +4 -6
- package/dist/lib/converter/plugins/TypePlugin.js +95 -158
- package/dist/lib/converter/plugins/index.d.ts +10 -9
- package/dist/lib/converter/plugins/index.js +10 -21
- package/dist/lib/converter/symbols.d.ts +1 -1
- package/dist/lib/converter/symbols.js +234 -227
- package/dist/lib/converter/types.d.ts +2 -2
- package/dist/lib/converter/types.js +252 -237
- package/dist/lib/converter/utils/nodes.js +5 -13
- package/dist/lib/converter/utils/reflections.d.ts +1 -1
- package/dist/lib/converter/utils/reflections.js +4 -7
- package/dist/lib/converter/utils/repository.d.ts +1 -1
- package/dist/lib/converter/utils/repository.js +103 -97
- package/dist/lib/converter/utils/symbols.js +3 -9
- package/dist/lib/internationalization/index.d.ts +3 -4
- package/dist/lib/internationalization/index.js +3 -8
- package/dist/lib/internationalization/internationalization.d.ts +5 -4
- package/dist/lib/internationalization/internationalization.js +97 -103
- package/dist/lib/internationalization/locale-utils.cjs +8 -0
- package/dist/lib/internationalization/locale-utils.d.cts +8 -0
- package/dist/lib/internationalization/locales/en.cjs +372 -2
- package/dist/lib/internationalization/locales/en.d.cts +343 -2
- package/dist/lib/internationalization/locales/jp.cjs +13 -14
- package/dist/lib/internationalization/locales/jp.d.cts +307 -1
- package/dist/lib/internationalization/locales/ko.cjs +12 -11
- package/dist/lib/internationalization/locales/ko.d.cts +221 -1
- package/dist/lib/internationalization/locales/zh.cjs +43 -19
- package/dist/lib/internationalization/locales/zh.d.cts +409 -1
- package/dist/lib/internationalization/translatable.d.ts +4 -327
- package/dist/lib/internationalization/translatable.js +2 -360
- package/dist/lib/models/FileRegistry.d.ts +20 -9
- package/dist/lib/models/FileRegistry.js +54 -45
- package/dist/lib/models/ReflectionCategory.d.ts +2 -2
- package/dist/lib/models/ReflectionCategory.js +16 -12
- package/dist/lib/models/ReflectionGroup.d.ts +3 -3
- package/dist/lib/models/ReflectionGroup.js +23 -14
- package/dist/lib/models/comments/comment.d.ts +23 -37
- package/dist/lib/models/comments/comment.js +388 -325
- package/dist/lib/models/comments/index.d.ts +2 -2
- package/dist/lib/models/comments/index.js +1 -6
- package/dist/lib/models/index.d.ts +7 -7
- package/dist/lib/models/index.js +7 -23
- package/dist/lib/models/reflections/ReflectionSymbolId.d.ts +2 -2
- package/dist/lib/models/reflections/ReflectionSymbolId.js +42 -34
- package/dist/lib/models/reflections/abstract.d.ts +17 -20
- package/dist/lib/models/reflections/abstract.js +249 -256
- package/dist/lib/models/reflections/container.d.ts +7 -7
- package/dist/lib/models/reflections/container.js +43 -16
- package/dist/lib/models/reflections/declaration.d.ts +15 -12
- package/dist/lib/models/reflections/declaration.js +150 -29
- package/dist/lib/models/reflections/document.d.ts +3 -3
- package/dist/lib/models/reflections/document.js +26 -13
- package/dist/lib/models/reflections/index.d.ts +15 -15
- package/dist/lib/models/reflections/index.js +12 -31
- package/dist/lib/models/reflections/kind.d.ts +1 -1
- package/dist/lib/models/reflections/kind.js +3 -6
- package/dist/lib/models/reflections/parameter.d.ts +5 -4
- package/dist/lib/models/reflections/parameter.js +11 -13
- package/dist/lib/models/reflections/project.d.ts +14 -9
- package/dist/lib/models/reflections/project.js +104 -56
- package/dist/lib/models/reflections/reference.d.ts +3 -3
- package/dist/lib/models/reflections/reference.js +6 -9
- package/dist/lib/models/reflections/signature.d.ts +8 -8
- package/dist/lib/models/reflections/signature.js +35 -14
- package/dist/lib/models/reflections/type-parameter.d.ts +5 -5
- package/dist/lib/models/reflections/type-parameter.js +9 -10
- package/dist/lib/models/reflections/utils.js +1 -4
- package/dist/lib/models/reflections/variant.d.ts +8 -7
- package/dist/lib/models/reflections/variant.js +1 -2
- package/dist/lib/models/sources/file.d.ts +2 -2
- package/dist/lib/models/sources/file.js +22 -5
- package/dist/lib/models/sources/index.d.ts +1 -1
- package/dist/lib/models/sources/index.js +1 -5
- package/dist/lib/models/types.d.ts +29 -16
- package/dist/lib/models/types.js +236 -151
- package/dist/lib/output/components.d.ts +5 -11
- package/dist/lib/output/components.js +84 -125
- package/dist/lib/output/events.d.ts +3 -3
- package/dist/lib/output/events.js +128 -94
- package/dist/lib/output/formatter.d.ts +84 -0
- package/dist/lib/output/formatter.js +624 -0
- package/dist/lib/output/index.d.ts +9 -8
- package/dist/lib/output/index.js +7 -19
- package/dist/lib/output/models/UrlMapping.d.ts +2 -2
- package/dist/lib/output/models/UrlMapping.js +4 -5
- package/dist/lib/output/output.d.ts +14 -0
- package/dist/lib/output/output.js +91 -0
- package/dist/lib/output/plugins/AssetsPlugin.d.ts +9 -8
- package/dist/lib/output/plugins/AssetsPlugin.js +64 -80
- package/dist/lib/output/plugins/HierarchyPlugin.d.ts +7 -0
- package/dist/lib/output/plugins/HierarchyPlugin.js +67 -0
- package/dist/lib/output/plugins/IconsPlugin.d.ts +3 -2
- package/dist/lib/output/plugins/IconsPlugin.js +28 -84
- package/dist/lib/output/plugins/JavascriptIndexPlugin.d.ts +9 -2
- package/dist/lib/output/plugins/JavascriptIndexPlugin.js +90 -96
- package/dist/lib/output/plugins/NavigationPlugin.d.ts +3 -2
- package/dist/lib/output/plugins/NavigationPlugin.js +22 -102
- package/dist/lib/output/plugins/SitemapPlugin.d.ts +3 -2
- package/dist/lib/output/plugins/SitemapPlugin.js +60 -120
- package/dist/lib/output/plugins/index.d.ts +7 -6
- package/dist/lib/output/plugins/index.js +7 -15
- package/dist/lib/output/renderer.d.ts +14 -13
- package/dist/lib/output/renderer.js +130 -185
- package/dist/lib/output/theme.d.ts +9 -5
- package/dist/lib/output/theme.js +14 -62
- package/dist/lib/output/themes/MarkedPlugin.d.ts +8 -9
- package/dist/lib/output/themes/MarkedPlugin.js +152 -117
- package/dist/lib/output/themes/default/DefaultTheme.d.ts +17 -29
- package/dist/lib/output/themes/default/DefaultTheme.js +334 -310
- package/dist/lib/output/themes/default/DefaultThemeRenderContext.d.ts +63 -48
- package/dist/lib/output/themes/default/DefaultThemeRenderContext.js +119 -95
- package/dist/lib/output/themes/default/Slugger.d.ts +13 -0
- package/dist/lib/output/themes/default/Slugger.js +46 -0
- package/dist/lib/output/themes/default/layouts/default.d.ts +5 -5
- package/dist/lib/output/themes/default/layouts/default.js +48 -36
- package/dist/lib/output/themes/default/partials/anchor-icon.d.ts +2 -2
- package/dist/lib/output/themes/default/partials/anchor-icon.js +4 -7
- package/dist/lib/output/themes/default/partials/breadcrumb.d.ts +3 -3
- package/dist/lib/output/themes/default/partials/breadcrumb.js +4 -8
- package/dist/lib/output/themes/default/partials/comment.d.ts +6 -4
- package/dist/lib/output/themes/default/partials/comment.js +52 -29
- package/dist/lib/output/themes/default/partials/footer.d.ts +2 -2
- package/dist/lib/output/themes/default/partials/footer.js +11 -14
- package/dist/lib/output/themes/default/partials/header.d.ts +4 -4
- package/dist/lib/output/themes/default/partials/header.js +9 -13
- package/dist/lib/output/themes/default/partials/hierarchy.d.ts +4 -4
- package/dist/lib/output/themes/default/partials/hierarchy.js +12 -15
- package/dist/lib/output/themes/default/partials/icon.d.ts +4 -4
- package/dist/lib/output/themes/default/partials/icon.js +78 -73
- package/dist/lib/output/themes/default/partials/index.d.ts +3 -3
- package/dist/lib/output/themes/default/partials/index.js +19 -22
- package/dist/lib/output/themes/default/partials/member.d.ts +3 -3
- package/dist/lib/output/themes/default/partials/member.declaration.d.ts +3 -3
- package/dist/lib/output/themes/default/partials/member.declaration.js +18 -61
- package/dist/lib/output/themes/default/partials/member.getterSetter.d.ts +3 -3
- package/dist/lib/output/themes/default/partials/member.getterSetter.js +10 -26
- package/dist/lib/output/themes/default/partials/member.js +19 -24
- package/dist/lib/output/themes/default/partials/member.signature.body.d.ts +3 -3
- package/dist/lib/output/themes/default/partials/member.signature.body.js +17 -21
- package/dist/lib/output/themes/default/partials/member.signature.title.d.ts +4 -7
- package/dist/lib/output/themes/default/partials/member.signature.title.js +8 -35
- package/dist/lib/output/themes/default/partials/member.signatures.d.ts +3 -3
- package/dist/lib/output/themes/default/partials/member.signatures.js +9 -13
- package/dist/lib/output/themes/default/partials/member.sources.d.ts +3 -3
- package/dist/lib/output/themes/default/partials/member.sources.js +13 -17
- package/dist/lib/output/themes/default/partials/members.d.ts +3 -3
- package/dist/lib/output/themes/default/partials/members.js +10 -42
- package/dist/lib/output/themes/default/partials/moduleReflection.d.ts +5 -0
- package/dist/lib/output/themes/default/partials/moduleReflection.js +62 -0
- package/dist/lib/output/themes/default/partials/navigation.d.ts +4 -4
- package/dist/lib/output/themes/default/partials/navigation.js +51 -62
- package/dist/lib/output/themes/default/partials/reflectionPreview.d.ts +3 -3
- package/dist/lib/output/themes/default/partials/reflectionPreview.js +12 -15
- package/dist/lib/output/themes/default/partials/toolbar.d.ts +4 -4
- package/dist/lib/output/themes/default/partials/toolbar.js +16 -20
- package/dist/lib/output/themes/default/partials/type.d.ts +4 -6
- package/dist/lib/output/themes/default/partials/type.js +8 -388
- package/dist/lib/output/themes/default/partials/typeAndParent.d.ts +3 -3
- package/dist/lib/output/themes/default/partials/typeAndParent.js +11 -15
- package/dist/lib/output/themes/default/partials/typeDetails.d.ts +8 -0
- package/dist/lib/output/themes/default/partials/typeDetails.js +222 -0
- package/dist/lib/output/themes/default/partials/typeParameters.d.ts +3 -3
- package/dist/lib/output/themes/default/partials/typeParameters.js +14 -17
- package/dist/lib/output/themes/default/templates/document.d.ts +4 -4
- package/dist/lib/output/themes/default/templates/document.js +3 -7
- package/dist/lib/output/themes/default/templates/hierarchy.d.ts +4 -4
- package/dist/lib/output/themes/default/templates/hierarchy.js +24 -22
- package/dist/lib/output/themes/default/templates/index.d.ts +4 -4
- package/dist/lib/output/themes/default/templates/index.js +3 -7
- package/dist/lib/output/themes/default/templates/reflection.d.ts +4 -4
- package/dist/lib/output/themes/default/templates/reflection.js +32 -34
- package/dist/lib/output/themes/lib.d.ts +17 -3
- package/dist/lib/output/themes/lib.js +118 -50
- package/dist/lib/serialization/components.d.ts +2 -5
- package/dist/lib/serialization/components.js +1 -2
- package/dist/lib/serialization/deserializer.d.ts +21 -7
- package/dist/lib/serialization/deserializer.js +138 -123
- package/dist/lib/serialization/events.d.ts +2 -2
- package/dist/lib/serialization/events.js +6 -5
- package/dist/lib/serialization/index.d.ts +5 -5
- package/dist/lib/serialization/index.js +4 -33
- package/dist/lib/serialization/schema.d.ts +8 -2
- package/dist/lib/serialization/schema.js +2 -2
- package/dist/lib/serialization/serializer.d.ts +11 -5
- package/dist/lib/serialization/serializer.js +32 -25
- package/dist/lib/utils/array.d.ts +3 -0
- package/dist/lib/utils/array.js +26 -27
- package/dist/lib/utils/component.d.ts +2 -44
- package/dist/lib/utils/component.js +10 -102
- package/dist/lib/utils/entry-point.d.ts +3 -4
- package/dist/lib/utils/entry-point.js +114 -85
- package/dist/lib/utils/enum.js +6 -14
- package/dist/lib/utils/events.js +6 -12
- package/dist/lib/utils/fs.js +50 -91
- package/dist/lib/utils/general.d.ts +2 -1
- package/dist/lib/utils/general.js +50 -40
- package/dist/lib/utils/highlighter.js +30 -57
- package/dist/lib/utils/hooks.js +7 -13
- package/dist/lib/utils/html-entities.d.ts +8926 -0
- package/dist/lib/utils/html-entities.js +2329 -0
- package/dist/lib/utils/html.d.ts +8 -0
- package/dist/lib/utils/html.js +81 -34
- package/dist/lib/utils/index.d.ts +22 -22
- package/dist/lib/utils/index.js +20 -91
- package/dist/lib/utils/jsx.d.ts +12 -6
- package/dist/lib/utils/jsx.elements.d.ts +1 -1
- package/dist/lib/utils/jsx.elements.js +3 -4
- package/dist/lib/utils/jsx.js +82 -52
- package/dist/lib/utils/loggers.d.ts +3 -3
- package/dist/lib/utils/loggers.js +36 -46
- package/dist/lib/utils/map.js +6 -13
- package/dist/lib/utils/minimalSourceFile.js +5 -7
- package/dist/lib/utils/options/declaration.d.ts +35 -7
- package/dist/lib/utils/options/declaration.js +20 -22
- package/dist/lib/utils/options/defaults.d.ts +3 -2
- package/dist/lib/utils/options/defaults.js +18 -38
- package/dist/lib/utils/options/help.d.ts +2 -2
- package/dist/lib/utils/options/help.js +7 -10
- package/dist/lib/utils/options/index.d.ts +6 -6
- package/dist/lib/utils/options/index.js +4 -18
- package/dist/lib/utils/options/options.d.ts +8 -5
- package/dist/lib/utils/options/options.js +47 -71
- package/dist/lib/utils/options/readers/arguments.d.ts +2 -2
- package/dist/lib/utils/options/readers/arguments.js +15 -17
- package/dist/lib/utils/options/readers/index.d.ts +4 -4
- package/dist/lib/utils/options/readers/index.js +4 -11
- package/dist/lib/utils/options/readers/package-json.d.ts +3 -3
- package/dist/lib/utils/options/readers/package-json.js +15 -21
- package/dist/lib/utils/options/readers/tsconfig.d.ts +2 -2
- package/dist/lib/utils/options/readers/tsconfig.js +54 -63
- package/dist/lib/utils/options/readers/typedoc.d.ts +3 -3
- package/dist/lib/utils/options/readers/typedoc.js +44 -76
- package/dist/lib/utils/options/sources/index.d.ts +1 -1
- package/dist/lib/utils/options/sources/index.js +1 -5
- package/dist/lib/utils/options/sources/typedoc.d.ts +1 -1
- package/dist/lib/utils/options/sources/typedoc.js +232 -196
- package/dist/lib/utils/options/tsdoc-defaults.d.ts +3 -3
- package/dist/lib/utils/options/tsdoc-defaults.js +16 -12
- package/dist/lib/utils/package-manifest.d.ts +1 -1
- package/dist/lib/utils/package-manifest.js +15 -19
- package/dist/lib/utils/paths.js +9 -15
- package/dist/lib/utils/perf.js +6 -11
- package/dist/lib/utils/plugins.d.ts +1 -1
- package/dist/lib/utils/plugins.js +7 -10
- package/dist/lib/utils/reflections.d.ts +1 -1
- package/dist/lib/utils/reflections.js +9 -12
- package/dist/lib/utils/set.js +2 -6
- package/dist/lib/utils/sort.d.ts +3 -3
- package/dist/lib/utils/sort.js +20 -24
- package/dist/lib/utils/tsconfig.d.ts +1 -1
- package/dist/lib/utils/tsconfig.js +13 -21
- package/dist/lib/utils/tsutils.d.ts +1 -1
- package/dist/lib/utils/tsutils.js +3 -30
- package/dist/lib/utils/validation.js +6 -12
- package/dist/lib/validation/documentation.d.ts +2 -2
- package/dist/lib/validation/documentation.js +26 -29
- package/dist/lib/validation/exports.d.ts +2 -2
- package/dist/lib/validation/exports.js +9 -11
- package/dist/lib/validation/links.d.ts +2 -2
- package/dist/lib/validation/links.js +4 -7
- package/dist/lib/validation/unusedMergeModuleWith.d.ts +3 -0
- package/dist/lib/validation/unusedMergeModuleWith.js +11 -0
- package/package.json +17 -14
- package/static/main.js +4 -4
- package/static/style.css +109 -17
- package/tsdoc.json +30 -0
- package/dist/lib/output/themes/default/partials/member.reference.d.ts +0 -4
- package/dist/lib/output/themes/default/partials/member.reference.js +0 -30
- package/dist/lib/output/themes/default/partials/parameter.d.ts +0 -4
- package/dist/lib/output/themes/default/partials/parameter.js +0 -79
- package/dist/lib/utils/html-entities.json +0 -2326
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { ContainerReflection, type DeclarationReflection, type DocumentReflection } from "../../models/reflections/index";
|
|
2
|
-
import { ReflectionGroup } from "../../models/ReflectionGroup";
|
|
3
|
-
import { ConverterComponent } from "../components";
|
|
1
|
+
import { ContainerReflection, type DeclarationReflection, type DocumentReflection } from "../../models/reflections/index.js";
|
|
2
|
+
import { ReflectionGroup } from "../../models/ReflectionGroup.js";
|
|
3
|
+
import { ConverterComponent } from "../components.js";
|
|
4
|
+
import type { Converter } from "../converter.js";
|
|
5
|
+
import type { Internationalization } from "../../internationalization/index.js";
|
|
4
6
|
/**
|
|
5
7
|
* A handler that sorts and groups the found reflections in the resolving phase.
|
|
6
8
|
*
|
|
@@ -8,21 +10,19 @@ import { ConverterComponent } from "../components";
|
|
|
8
10
|
*/
|
|
9
11
|
export declare class GroupPlugin extends ConverterComponent {
|
|
10
12
|
sortFunction: (reflections: Array<DeclarationReflection | DocumentReflection>) => void;
|
|
11
|
-
accessor boosts: Record<string, number>;
|
|
12
13
|
accessor groupOrder: string[];
|
|
13
14
|
accessor sortEntryPoints: boolean;
|
|
14
|
-
|
|
15
|
+
accessor groupReferencesByType: boolean;
|
|
15
16
|
static WEIGHTS: string[];
|
|
16
|
-
|
|
17
|
-
* Create a new GroupPlugin instance.
|
|
18
|
-
*/
|
|
19
|
-
initialize(): void;
|
|
17
|
+
constructor(owner: Converter);
|
|
20
18
|
/**
|
|
21
19
|
* Triggered when the converter has finished resolving a project.
|
|
22
20
|
*
|
|
23
21
|
* @param context The context object describing the current state the converter is in.
|
|
24
22
|
*/
|
|
25
23
|
private onEndResolve;
|
|
24
|
+
private onRevive;
|
|
25
|
+
private setup;
|
|
26
26
|
private group;
|
|
27
27
|
/**
|
|
28
28
|
* Extracts the groups for a given reflection.
|
|
@@ -31,6 +31,7 @@ export declare class GroupPlugin extends ConverterComponent {
|
|
|
31
31
|
* If you change this, also update extractCategories in CategoryPlugin accordingly.
|
|
32
32
|
*/
|
|
33
33
|
getGroups(reflection: DeclarationReflection | DocumentReflection): Set<string>;
|
|
34
|
+
static getGroups(reflection: DeclarationReflection | DocumentReflection, groupReferencesByType: boolean, internationalization: Internationalization): Set<string>;
|
|
34
35
|
/**
|
|
35
36
|
* Create a grouped representation of the given list of reflections.
|
|
36
37
|
*
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
3
2
|
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
4
3
|
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
@@ -33,48 +32,33 @@ var __runInitializers = (this && this.__runInitializers) || function (thisArg, i
|
|
|
33
32
|
}
|
|
34
33
|
return useValue ? value : void 0;
|
|
35
34
|
};
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
46
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
47
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
48
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
49
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
50
|
-
};
|
|
51
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
52
|
-
exports.GroupPlugin = void 0;
|
|
53
|
-
const index_1 = require("../../models/reflections/index");
|
|
54
|
-
const ReflectionGroup_1 = require("../../models/ReflectionGroup");
|
|
55
|
-
const components_1 = require("../components");
|
|
56
|
-
const converter_1 = require("../converter");
|
|
57
|
-
const sort_1 = require("../../utils/sort");
|
|
58
|
-
const utils_1 = require("../../utils");
|
|
59
|
-
const models_1 = require("../../models");
|
|
35
|
+
import { ReflectionKind, ContainerReflection, ReferenceReflection, } from "../../models/reflections/index.js";
|
|
36
|
+
import { ReflectionGroup } from "../../models/ReflectionGroup.js";
|
|
37
|
+
import { ConverterComponent } from "../components.js";
|
|
38
|
+
import { getSortFunction } from "../../utils/sort.js";
|
|
39
|
+
import { Option } from "../../utils/index.js";
|
|
40
|
+
import { Comment } from "../../models/index.js";
|
|
41
|
+
import { ConverterEvents } from "../converter-events.js";
|
|
42
|
+
import { ApplicationEvents } from "../../application-events.js";
|
|
43
|
+
import assert from "assert";
|
|
60
44
|
// Same as the defaultKindSortOrder in sort.ts
|
|
61
45
|
const defaultGroupOrder = [
|
|
62
|
-
|
|
63
|
-
index_1.ReflectionKind.Reference,
|
|
46
|
+
ReflectionKind.Document,
|
|
64
47
|
// project is never a child so never added to a group
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
48
|
+
ReflectionKind.Module,
|
|
49
|
+
ReflectionKind.Namespace,
|
|
50
|
+
ReflectionKind.Enum,
|
|
51
|
+
ReflectionKind.EnumMember,
|
|
52
|
+
ReflectionKind.Class,
|
|
53
|
+
ReflectionKind.Interface,
|
|
54
|
+
ReflectionKind.TypeAlias,
|
|
55
|
+
ReflectionKind.Constructor,
|
|
56
|
+
ReflectionKind.Property,
|
|
57
|
+
ReflectionKind.Variable,
|
|
58
|
+
ReflectionKind.Function,
|
|
59
|
+
ReflectionKind.Accessor,
|
|
60
|
+
ReflectionKind.Method,
|
|
61
|
+
ReflectionKind.Reference,
|
|
78
62
|
// others are never added to groups
|
|
79
63
|
];
|
|
80
64
|
/**
|
|
@@ -83,47 +67,43 @@ const defaultGroupOrder = [
|
|
|
83
67
|
* The handler sets the `groups` property of all container reflections.
|
|
84
68
|
*/
|
|
85
69
|
let GroupPlugin = (() => {
|
|
86
|
-
|
|
87
|
-
let _classDecorators = [(0, components_1.Component)({ name: "group" })];
|
|
88
|
-
let _classDescriptor;
|
|
89
|
-
let _classExtraInitializers = [];
|
|
90
|
-
let _classThis;
|
|
91
|
-
let _classSuper = components_1.ConverterComponent;
|
|
92
|
-
let _boosts_decorators;
|
|
93
|
-
let _boosts_initializers = [];
|
|
94
|
-
let _boosts_extraInitializers = [];
|
|
70
|
+
let _classSuper = ConverterComponent;
|
|
95
71
|
let _groupOrder_decorators;
|
|
96
72
|
let _groupOrder_initializers = [];
|
|
97
73
|
let _groupOrder_extraInitializers = [];
|
|
98
74
|
let _sortEntryPoints_decorators;
|
|
99
75
|
let _sortEntryPoints_initializers = [];
|
|
100
76
|
let _sortEntryPoints_extraInitializers = [];
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
77
|
+
let _groupReferencesByType_decorators;
|
|
78
|
+
let _groupReferencesByType_initializers = [];
|
|
79
|
+
let _groupReferencesByType_extraInitializers = [];
|
|
80
|
+
return class GroupPlugin extends _classSuper {
|
|
81
|
+
static {
|
|
82
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
83
|
+
_groupOrder_decorators = [Option("groupOrder")];
|
|
84
|
+
_sortEntryPoints_decorators = [Option("sortEntryPoints")];
|
|
85
|
+
_groupReferencesByType_decorators = [Option("groupReferencesByType")];
|
|
86
|
+
__esDecorate(this, null, _groupOrder_decorators, { kind: "accessor", name: "groupOrder", static: false, private: false, access: { has: obj => "groupOrder" in obj, get: obj => obj.groupOrder, set: (obj, value) => { obj.groupOrder = value; } }, metadata: _metadata }, _groupOrder_initializers, _groupOrder_extraInitializers);
|
|
87
|
+
__esDecorate(this, null, _sortEntryPoints_decorators, { kind: "accessor", name: "sortEntryPoints", static: false, private: false, access: { has: obj => "sortEntryPoints" in obj, get: obj => obj.sortEntryPoints, set: (obj, value) => { obj.sortEntryPoints = value; } }, metadata: _metadata }, _sortEntryPoints_initializers, _sortEntryPoints_extraInitializers);
|
|
88
|
+
__esDecorate(this, null, _groupReferencesByType_decorators, { kind: "accessor", name: "groupReferencesByType", static: false, private: false, access: { has: obj => "groupReferencesByType" in obj, get: obj => obj.groupReferencesByType, set: (obj, value) => { obj.groupReferencesByType = value; } }, metadata: _metadata }, _groupReferencesByType_initializers, _groupReferencesByType_extraInitializers);
|
|
89
|
+
if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
108
90
|
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
get groupOrder() { return
|
|
112
|
-
set groupOrder(value) {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
}, -100);
|
|
126
|
-
this.owner.on(converter_1.Converter.EVENT_RESOLVE_END, this.onEndResolve.bind(this), -100);
|
|
91
|
+
sortFunction;
|
|
92
|
+
#groupOrder_accessor_storage = __runInitializers(this, _groupOrder_initializers, void 0);
|
|
93
|
+
get groupOrder() { return this.#groupOrder_accessor_storage; }
|
|
94
|
+
set groupOrder(value) { this.#groupOrder_accessor_storage = value; }
|
|
95
|
+
#sortEntryPoints_accessor_storage = (__runInitializers(this, _groupOrder_extraInitializers), __runInitializers(this, _sortEntryPoints_initializers, void 0));
|
|
96
|
+
get sortEntryPoints() { return this.#sortEntryPoints_accessor_storage; }
|
|
97
|
+
set sortEntryPoints(value) { this.#sortEntryPoints_accessor_storage = value; }
|
|
98
|
+
#groupReferencesByType_accessor_storage = (__runInitializers(this, _sortEntryPoints_extraInitializers), __runInitializers(this, _groupReferencesByType_initializers, void 0));
|
|
99
|
+
get groupReferencesByType() { return this.#groupReferencesByType_accessor_storage; }
|
|
100
|
+
set groupReferencesByType(value) { this.#groupReferencesByType_accessor_storage = value; }
|
|
101
|
+
static WEIGHTS = [];
|
|
102
|
+
constructor(owner) {
|
|
103
|
+
super(owner);
|
|
104
|
+
__runInitializers(this, _groupReferencesByType_extraInitializers);
|
|
105
|
+
this.owner.on(ConverterEvents.RESOLVE_END, this.onEndResolve.bind(this), -100);
|
|
106
|
+
this.application.on(ApplicationEvents.REVIVE, this.onRevive.bind(this), -100);
|
|
127
107
|
}
|
|
128
108
|
/**
|
|
129
109
|
* Triggered when the converter has finished resolving a project.
|
|
@@ -131,28 +111,35 @@ let GroupPlugin = (() => {
|
|
|
131
111
|
* @param context The context object describing the current state the converter is in.
|
|
132
112
|
*/
|
|
133
113
|
onEndResolve(context) {
|
|
114
|
+
this.setup();
|
|
134
115
|
this.group(context.project);
|
|
135
116
|
for (const id in context.project.reflections) {
|
|
136
117
|
const reflection = context.project.reflections[id];
|
|
137
|
-
if (reflection instanceof
|
|
118
|
+
if (reflection instanceof ContainerReflection) {
|
|
138
119
|
this.group(reflection);
|
|
139
120
|
}
|
|
140
121
|
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
122
|
+
}
|
|
123
|
+
onRevive(project) {
|
|
124
|
+
this.setup();
|
|
125
|
+
this.group(project);
|
|
126
|
+
for (const refl of project.getReflectionsByKind(ReflectionKind.SomeModule)) {
|
|
127
|
+
assert(refl.isDeclaration());
|
|
128
|
+
this.group(refl);
|
|
144
129
|
}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
130
|
+
}
|
|
131
|
+
setup() {
|
|
132
|
+
this.sortFunction = getSortFunction(this.application.options);
|
|
133
|
+
GroupPlugin.WEIGHTS = this.groupOrder;
|
|
134
|
+
if (GroupPlugin.WEIGHTS.length === 0) {
|
|
135
|
+
GroupPlugin.WEIGHTS = defaultGroupOrder.map((kind) => this.application.internationalization.kindPluralString(kind));
|
|
149
136
|
}
|
|
150
137
|
}
|
|
151
138
|
group(reflection) {
|
|
152
139
|
if (reflection.childrenIncludingDocuments && !reflection.groups) {
|
|
153
140
|
if (reflection.children) {
|
|
154
141
|
if (this.sortEntryPoints ||
|
|
155
|
-
!reflection.children.some((c) => c.kindOf(
|
|
142
|
+
!reflection.children.some((c) => c.kindOf(ReflectionKind.Module))) {
|
|
156
143
|
this.sortFunction(reflection.children);
|
|
157
144
|
this.sortFunction(reflection.documents || []);
|
|
158
145
|
this.sortFunction(reflection.childrenIncludingDocuments);
|
|
@@ -172,17 +159,18 @@ let GroupPlugin = (() => {
|
|
|
172
159
|
* If you change this, also update extractCategories in CategoryPlugin accordingly.
|
|
173
160
|
*/
|
|
174
161
|
getGroups(reflection) {
|
|
162
|
+
return GroupPlugin.getGroups(reflection, this.groupReferencesByType, this.application.internationalization);
|
|
163
|
+
}
|
|
164
|
+
static getGroups(reflection, groupReferencesByType, internationalization) {
|
|
175
165
|
const groups = new Set();
|
|
176
166
|
function extractGroupTags(comment) {
|
|
177
167
|
if (!comment)
|
|
178
168
|
return;
|
|
179
|
-
(
|
|
169
|
+
for (const tag of comment.blockTags) {
|
|
180
170
|
if (tag.tag === "@group") {
|
|
181
|
-
groups.add(
|
|
182
|
-
return true;
|
|
171
|
+
groups.add(Comment.combineDisplayParts(tag.content).trim());
|
|
183
172
|
}
|
|
184
|
-
|
|
185
|
-
});
|
|
173
|
+
}
|
|
186
174
|
}
|
|
187
175
|
if (reflection.isDeclaration()) {
|
|
188
176
|
extractGroupTags(reflection.comment);
|
|
@@ -198,17 +186,15 @@ let GroupPlugin = (() => {
|
|
|
198
186
|
}
|
|
199
187
|
if (reflection.isDocument() && "group" in reflection.frontmatter) {
|
|
200
188
|
groups.add(String(reflection.frontmatter["group"]));
|
|
201
|
-
delete reflection.frontmatter["group"];
|
|
202
189
|
}
|
|
203
190
|
groups.delete("");
|
|
204
191
|
if (groups.size === 0) {
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
reflection.
|
|
211
|
-
(reflection.relevanceBoost ?? 1) * this.boosts[group];
|
|
192
|
+
if (reflection instanceof ReferenceReflection &&
|
|
193
|
+
groupReferencesByType) {
|
|
194
|
+
groups.add(internationalization.kindPluralString(reflection.getTargetReflectionDeep().kind));
|
|
195
|
+
}
|
|
196
|
+
else {
|
|
197
|
+
groups.add(internationalization.kindPluralString(reflection.kind));
|
|
212
198
|
}
|
|
213
199
|
}
|
|
214
200
|
return groups;
|
|
@@ -227,16 +213,16 @@ let GroupPlugin = (() => {
|
|
|
227
213
|
for (const name of this.getGroups(child)) {
|
|
228
214
|
let group = groups.get(name);
|
|
229
215
|
if (!group) {
|
|
230
|
-
group = new
|
|
216
|
+
group = new ReflectionGroup(name, child);
|
|
231
217
|
groups.set(name, group);
|
|
232
218
|
}
|
|
233
219
|
group.children.push(child);
|
|
234
220
|
}
|
|
235
221
|
});
|
|
236
222
|
if (parent.comment) {
|
|
237
|
-
(
|
|
223
|
+
for (const tag of parent.comment.blockTags) {
|
|
238
224
|
if (tag.tag === "@groupDescription") {
|
|
239
|
-
const { header, body } =
|
|
225
|
+
const { header, body } = Comment.splitPartsToHeaderAndBody(tag.content);
|
|
240
226
|
const cat = groups.get(header);
|
|
241
227
|
if (cat) {
|
|
242
228
|
cat.description = body;
|
|
@@ -244,10 +230,8 @@ let GroupPlugin = (() => {
|
|
|
244
230
|
else {
|
|
245
231
|
this.application.logger.warn(this.application.i18n.comment_for_0_includes_groupDescription_for_1_but_no_child_in_group(parent.getFriendlyFullName(), header));
|
|
246
232
|
}
|
|
247
|
-
return true;
|
|
248
233
|
}
|
|
249
|
-
|
|
250
|
-
});
|
|
234
|
+
}
|
|
251
235
|
}
|
|
252
236
|
return Array.from(groups.values()).sort(GroupPlugin.sortGroupCallback);
|
|
253
237
|
}
|
|
@@ -275,26 +259,5 @@ let GroupPlugin = (() => {
|
|
|
275
259
|
return aWeight - bWeight;
|
|
276
260
|
}
|
|
277
261
|
};
|
|
278
|
-
_GroupPlugin_boosts_accessor_storage = new WeakMap();
|
|
279
|
-
_GroupPlugin_groupOrder_accessor_storage = new WeakMap();
|
|
280
|
-
_GroupPlugin_sortEntryPoints_accessor_storage = new WeakMap();
|
|
281
|
-
__setFunctionName(_classThis, "GroupPlugin");
|
|
282
|
-
(() => {
|
|
283
|
-
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
284
|
-
_boosts_decorators = [(0, utils_1.Option)("searchGroupBoosts")];
|
|
285
|
-
_groupOrder_decorators = [(0, utils_1.Option)("groupOrder")];
|
|
286
|
-
_sortEntryPoints_decorators = [(0, utils_1.Option)("sortEntryPoints")];
|
|
287
|
-
__esDecorate(_classThis, null, _boosts_decorators, { kind: "accessor", name: "boosts", static: false, private: false, access: { has: obj => "boosts" in obj, get: obj => obj.boosts, set: (obj, value) => { obj.boosts = value; } }, metadata: _metadata }, _boosts_initializers, _boosts_extraInitializers);
|
|
288
|
-
__esDecorate(_classThis, null, _groupOrder_decorators, { kind: "accessor", name: "groupOrder", static: false, private: false, access: { has: obj => "groupOrder" in obj, get: obj => obj.groupOrder, set: (obj, value) => { obj.groupOrder = value; } }, metadata: _metadata }, _groupOrder_initializers, _groupOrder_extraInitializers);
|
|
289
|
-
__esDecorate(_classThis, null, _sortEntryPoints_decorators, { kind: "accessor", name: "sortEntryPoints", static: false, private: false, access: { has: obj => "sortEntryPoints" in obj, get: obj => obj.sortEntryPoints, set: (obj, value) => { obj.sortEntryPoints = value; } }, metadata: _metadata }, _sortEntryPoints_initializers, _sortEntryPoints_extraInitializers);
|
|
290
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
291
|
-
GroupPlugin = _classThis = _classDescriptor.value;
|
|
292
|
-
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
293
|
-
})();
|
|
294
|
-
_classThis.WEIGHTS = [];
|
|
295
|
-
(() => {
|
|
296
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
297
|
-
})();
|
|
298
|
-
return GroupPlugin = _classThis;
|
|
299
262
|
})();
|
|
300
|
-
|
|
263
|
+
export { GroupPlugin };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ConverterComponent } from "../components";
|
|
1
|
+
import { ConverterComponent } from "../components.js";
|
|
2
|
+
import type { Converter } from "../converter.js";
|
|
2
3
|
/**
|
|
3
4
|
* A plugin that detects interface implementations of functions and
|
|
4
5
|
* properties on classes and links them.
|
|
@@ -7,10 +8,7 @@ export declare class ImplementsPlugin extends ConverterComponent {
|
|
|
7
8
|
private resolved;
|
|
8
9
|
private postponed;
|
|
9
10
|
private revivingSerialized;
|
|
10
|
-
|
|
11
|
-
* Create a new ImplementsPlugin instance.
|
|
12
|
-
*/
|
|
13
|
-
initialize(): void;
|
|
11
|
+
constructor(owner: Converter);
|
|
14
12
|
/**
|
|
15
13
|
* Mark all members of the given class to be the implementation of the matching interface member.
|
|
16
14
|
*/
|