typedoc 0.26.10 → 0.27.0-beta.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/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 +172 -148
- 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 +210 -238
- package/dist/lib/converter/factories/index-signature.d.ts +1 -1
- package/dist/lib/converter/factories/index-signature.js +11 -17
- 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 +366 -2
- package/dist/lib/internationalization/locales/en.d.cts +339 -2
- package/dist/lib/internationalization/locales/jp.cjs +8 -11
- package/dist/lib/internationalization/locales/jp.d.cts +310 -1
- package/dist/lib/internationalization/locales/ko.cjs +7 -9
- package/dist/lib/internationalization/locales/ko.d.cts +223 -1
- package/dist/lib/internationalization/locales/zh.cjs +7 -10
- package/dist/lib/internationalization/locales/zh.d.cts +381 -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 +26 -13
- 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 +619 -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 +13 -0
- package/dist/lib/output/output.js +72 -0
- package/dist/lib/output/plugins/AssetsPlugin.d.ts +7 -8
- package/dist/lib/output/plugins/AssetsPlugin.js +62 -80
- 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 +6 -6
- package/dist/lib/output/plugins/index.js +6 -15
- package/dist/lib/output/renderer.d.ts +14 -13
- package/dist/lib/output/renderer.js +129 -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 +67 -34
- 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 +3 -3
- package/dist/lib/output/themes/default/partials/hierarchy.js +9 -12
- 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 +221 -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 +10 -13
- 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 +31 -34
- package/dist/lib/output/themes/lib.d.ts +17 -3
- package/dist/lib/output/themes/lib.js +110 -49
- 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 -5
- package/dist/lib/utils/jsx.elements.js +1 -4
- package/dist/lib/utils/jsx.js +53 -20
- package/dist/lib/utils/loggers.d.ts +3 -3
- package/dist/lib/utils/loggers.js +36 -46
- package/dist/lib/utils/map.d.ts +1 -1
- package/dist/lib/utils/map.js +6 -13
- package/dist/lib/utils/minimalSourceFile.js +5 -7
- package/dist/lib/utils/options/declaration.d.ts +33 -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 +47 -90
- 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 +220 -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 +16 -17
- 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 +14 -11
- package/static/main.js +4 -4
- package/static/style.css +91 -2
- 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,31 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
return true;
|
|
13
|
-
}
|
|
14
|
-
return declaration.getAllSignatures().some((sig) => {
|
|
15
|
-
return sig.hasComment() || sig.parameters?.some((p) => p.hasComment());
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
function memberDeclaration(context, props) {
|
|
19
|
-
function renderTypeDeclaration(type) {
|
|
20
|
-
if (renderingTypeDeclarationIsUseful(type.declaration)) {
|
|
21
|
-
return (utils_1.JSX.createElement("div", { class: "tsd-type-declaration" },
|
|
22
|
-
utils_1.JSX.createElement("h4", null, context.i18n.theme_type_declaration()),
|
|
23
|
-
context.parameter(type.declaration)));
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
const visitor = { reflection: renderTypeDeclaration };
|
|
27
|
-
/** Fix for #2717. If type is the same as value the type is omitted */
|
|
28
|
-
function shouldRenderType() {
|
|
1
|
+
import { JSX } from "../../../../utils/index.js";
|
|
2
|
+
import { FormattedCodeBuilder, FormattedCodeGenerator, Wrap } from "../../../formatter.js";
|
|
3
|
+
import { hasTypeParameters } from "../../lib.js";
|
|
4
|
+
export function memberDeclaration(context, props) {
|
|
5
|
+
const builder = new FormattedCodeBuilder(context.urlTo);
|
|
6
|
+
const content = [];
|
|
7
|
+
builder.member(content, props, { topLevelLinks: false });
|
|
8
|
+
const generator = new FormattedCodeGenerator(context.options.getValue("typePrintWidth"));
|
|
9
|
+
generator.node({ type: "nodes", content }, Wrap.Detect);
|
|
10
|
+
/** Fix for #2717. If type is the same as value the default value is omitted */
|
|
11
|
+
function shouldRenderDefaultValue() {
|
|
29
12
|
if (props.type && props.type.type === "literal") {
|
|
30
13
|
const reflectionTypeString = props.type.toString();
|
|
31
14
|
const defaultValue = props.defaultValue;
|
|
@@ -35,42 +18,16 @@ function memberDeclaration(context, props) {
|
|
|
35
18
|
}
|
|
36
19
|
return true;
|
|
37
20
|
}
|
|
38
|
-
return (
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
(
|
|
42
|
-
|
|
43
|
-
utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" },
|
|
44
|
-
!!props.flags.isOptional && "?",
|
|
45
|
-
":"),
|
|
46
|
-
" ",
|
|
47
|
-
context.type(props.type))),
|
|
48
|
-
!!props.defaultValue && (utils_1.JSX.createElement(utils_1.JSX.Fragment, null,
|
|
49
|
-
utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" },
|
|
21
|
+
return (JSX.createElement(JSX.Fragment, null,
|
|
22
|
+
JSX.createElement("div", { class: "tsd-signature" },
|
|
23
|
+
generator.toElement(),
|
|
24
|
+
!!props.defaultValue && shouldRenderDefaultValue() && (JSX.createElement(JSX.Fragment, null,
|
|
25
|
+
JSX.createElement("span", { class: "tsd-signature-symbol" },
|
|
50
26
|
" = ",
|
|
51
27
|
props.defaultValue)))),
|
|
52
28
|
context.commentSummary(props),
|
|
53
|
-
|
|
54
|
-
props.type
|
|
55
|
-
reflection: renderTypeDeclaration,
|
|
56
|
-
array: (arr) => arr.elementType.visit(visitor),
|
|
57
|
-
intersection: (int) => int.types.map((t) => t.visit(visitor)),
|
|
58
|
-
union: (union) => {
|
|
59
|
-
if (union.elementSummaries) {
|
|
60
|
-
const result = [];
|
|
61
|
-
for (let i = 0; i < union.types.length; ++i) {
|
|
62
|
-
result.push(utils_1.JSX.createElement("li", null,
|
|
63
|
-
context.type(union.types[i]),
|
|
64
|
-
utils_1.JSX.createElement(utils_1.Raw, { html: context.markdown(union.elementSummaries[i]) }),
|
|
65
|
-
union.types[i].visit(visitor)));
|
|
66
|
-
}
|
|
67
|
-
return utils_1.JSX.createElement("ul", null, result);
|
|
68
|
-
}
|
|
69
|
-
return union.types.map((t) => t.visit(visitor));
|
|
70
|
-
},
|
|
71
|
-
reference: (ref) => ref.typeArguments?.map((t) => t.visit(visitor)),
|
|
72
|
-
tuple: (ref) => ref.elements.map((t) => t.visit(visitor)),
|
|
73
|
-
}),
|
|
29
|
+
hasTypeParameters(props) && context.typeParameters(props.typeParameters),
|
|
30
|
+
props.type && context.typeDeclaration(props.type),
|
|
74
31
|
context.commentTags(props),
|
|
75
32
|
context.memberSources(props)));
|
|
76
33
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DeclarationReflection } from "../../../../models";
|
|
2
|
-
import { JSX } from "../../../../utils";
|
|
3
|
-
import type { DefaultThemeRenderContext } from "../DefaultThemeRenderContext";
|
|
1
|
+
import type { DeclarationReflection } from "../../../../models/index.js";
|
|
2
|
+
import { JSX } from "../../../../utils/index.js";
|
|
3
|
+
import type { DefaultThemeRenderContext } from "../DefaultThemeRenderContext.js";
|
|
4
4
|
export declare const memberGetterSetter: (context: DefaultThemeRenderContext, props: DeclarationReflection) => JSX.Element;
|
|
@@ -1,28 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const lib_1 = require("../../lib");
|
|
6
|
-
const memberGetterSetter = (context, props) => (utils_1.JSX.createElement(utils_1.JSX.Fragment, null,
|
|
7
|
-
utils_1.JSX.createElement("ul", { class: (0, lib_1.classNames)({
|
|
1
|
+
import { JSX } from "../../../../utils/index.js";
|
|
2
|
+
import { classNames } from "../../lib.js";
|
|
3
|
+
export const memberGetterSetter = (context, props) => (JSX.createElement(JSX.Fragment, null,
|
|
4
|
+
JSX.createElement("ul", { class: classNames({
|
|
8
5
|
"tsd-signatures": true,
|
|
9
6
|
}, context.getReflectionClasses(props)) },
|
|
10
|
-
!!props.getSignature && (
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
hideName: true,
|
|
17
|
-
})),
|
|
18
|
-
utils_1.JSX.createElement("li", { class: "tsd-description" }, context.memberSignatureBody(props.getSignature)))),
|
|
19
|
-
!!props.setSignature && (utils_1.JSX.createElement(utils_1.JSX.Fragment, null,
|
|
20
|
-
utils_1.JSX.createElement("li", { class: "tsd-signature", id: props.setSignature.anchor },
|
|
21
|
-
utils_1.JSX.createElement("span", { class: "tsd-signature-keyword" }, "set"),
|
|
22
|
-
" ",
|
|
23
|
-
props.name,
|
|
24
|
-
context.memberSignatureTitle(props.setSignature, {
|
|
25
|
-
hideName: true,
|
|
26
|
-
})),
|
|
27
|
-
utils_1.JSX.createElement("li", { class: "tsd-description" }, context.memberSignatureBody(props.setSignature)))))));
|
|
28
|
-
exports.memberGetterSetter = memberGetterSetter;
|
|
7
|
+
!!props.getSignature && (JSX.createElement(JSX.Fragment, null,
|
|
8
|
+
JSX.createElement("li", { class: "tsd-signature", id: props.getSignature.anchor }, context.memberSignatureTitle(props.getSignature)),
|
|
9
|
+
JSX.createElement("li", { class: "tsd-description" }, context.memberSignatureBody(props.getSignature)))),
|
|
10
|
+
!!props.setSignature && (JSX.createElement(JSX.Fragment, null,
|
|
11
|
+
JSX.createElement("li", { class: "tsd-signature", id: props.setSignature.anchor }, context.memberSignatureTitle(props.setSignature)),
|
|
12
|
+
JSX.createElement("li", { class: "tsd-description" }, context.memberSignatureBody(props.setSignature)))))));
|
|
@@ -1,41 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const models_1 = require("../../../../models");
|
|
7
|
-
const anchor_icon_1 = require("./anchor-icon");
|
|
8
|
-
function member(context, props) {
|
|
1
|
+
import { classNames, getDisplayName, wbr } from "../../lib.js";
|
|
2
|
+
import { JSX, Raw } from "../../../../utils/index.js";
|
|
3
|
+
import {} from "../../../../models/index.js";
|
|
4
|
+
import { anchorIcon } from "./anchor-icon.js";
|
|
5
|
+
export function member(context, props) {
|
|
9
6
|
context.page.pageHeadings.push({
|
|
10
7
|
link: `#${props.anchor}`,
|
|
11
|
-
text:
|
|
8
|
+
text: getDisplayName(props),
|
|
12
9
|
kind: props.kind,
|
|
13
10
|
classes: context.getReflectionClasses(props),
|
|
14
11
|
});
|
|
15
12
|
// With the default url derivation, we'll never hit this case as documents are always placed into their
|
|
16
13
|
// own pages. Handle it here in case someone creates a custom url scheme which embeds guides within the page.
|
|
17
14
|
if (props.isDocument()) {
|
|
18
|
-
return (
|
|
19
|
-
|
|
20
|
-
!!props.name && (
|
|
15
|
+
return (JSX.createElement("section", { class: classNames({ "tsd-panel": true, "tsd-member": true }, context.getReflectionClasses(props)) },
|
|
16
|
+
JSX.createElement("a", { id: props.anchor, class: "tsd-anchor" }),
|
|
17
|
+
!!props.name && (JSX.createElement("h3", { class: "tsd-anchor-link" },
|
|
21
18
|
context.reflectionFlags(props),
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
JSX.createElement("span", { class: classNames({ deprecated: props.isDeprecated() }) }, wbr(props.name)),
|
|
20
|
+
anchorIcon(context, props.anchor))),
|
|
21
|
+
JSX.createElement("div", { class: "tsd-comment tsd-typography" },
|
|
22
|
+
JSX.createElement(Raw, { html: context.markdown(props.content) }))));
|
|
26
23
|
}
|
|
27
|
-
return (
|
|
28
|
-
|
|
29
|
-
!!props.name && (
|
|
24
|
+
return (JSX.createElement("section", { class: classNames({ "tsd-panel": true, "tsd-member": true }, context.getReflectionClasses(props)) },
|
|
25
|
+
JSX.createElement("a", { id: props.anchor, class: "tsd-anchor" }),
|
|
26
|
+
!!props.name && (JSX.createElement("h3", { class: "tsd-anchor-link" },
|
|
30
27
|
context.reflectionFlags(props),
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
JSX.createElement("span", { class: classNames({ deprecated: props.isDeprecated() }) }, wbr(props.name)),
|
|
29
|
+
anchorIcon(context, props.anchor))),
|
|
33
30
|
props.signatures
|
|
34
31
|
? context.memberSignatures(props)
|
|
35
32
|
: props.hasGetterOrSetter()
|
|
36
33
|
? context.memberGetterSetter(props)
|
|
37
|
-
: props
|
|
38
|
-
? context.memberReference(props)
|
|
39
|
-
: context.memberDeclaration(props),
|
|
34
|
+
: context.memberDeclaration(props),
|
|
40
35
|
props.groups?.map((item) => item.children.map((item) => !item.hasOwnDocument && context.member(item)))));
|
|
41
36
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { DefaultThemeRenderContext } from "../DefaultThemeRenderContext";
|
|
2
|
-
import { JSX } from "../../../../utils";
|
|
3
|
-
import {
|
|
1
|
+
import type { DefaultThemeRenderContext } from "../DefaultThemeRenderContext.js";
|
|
2
|
+
import { JSX } from "../../../../utils/index.js";
|
|
3
|
+
import type { SignatureReflection } from "../../../../models/index.js";
|
|
4
4
|
export declare function memberSignatureBody(context: DefaultThemeRenderContext, props: SignatureReflection, { hideSources }?: {
|
|
5
5
|
hideSources?: boolean;
|
|
6
6
|
}): JSX.Element;
|
|
@@ -1,37 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const utils_1 = require("../../../../utils");
|
|
5
|
-
const models_1 = require("../../../../models");
|
|
6
|
-
const lib_1 = require("../../lib");
|
|
7
|
-
function memberSignatureBody(context, props, { hideSources = false } = {}) {
|
|
1
|
+
import { JSX, Raw } from "../../../../utils/index.js";
|
|
2
|
+
import { hasTypeParameters } from "../../lib.js";
|
|
3
|
+
export function memberSignatureBody(context, props, { hideSources = false } = {}) {
|
|
8
4
|
const returnsTag = props.comment?.getTag("@returns");
|
|
9
|
-
return (
|
|
5
|
+
return (JSX.createElement(JSX.Fragment, null,
|
|
10
6
|
context.reflectionFlags(props),
|
|
11
7
|
context.commentSummary(props),
|
|
12
|
-
|
|
13
|
-
props.parameters && props.parameters.length > 0 && (
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
hasTypeParameters(props) && context.typeParameters(props.typeParameters),
|
|
9
|
+
props.parameters && props.parameters.length > 0 && (JSX.createElement("div", { class: "tsd-parameters" },
|
|
10
|
+
JSX.createElement("h4", { class: "tsd-parameters-title" }, context.i18n.kind_plural_parameter()),
|
|
11
|
+
JSX.createElement("ul", { class: "tsd-parameter-list" }, props.parameters.map((item) => (JSX.createElement("li", null,
|
|
12
|
+
JSX.createElement("span", null,
|
|
17
13
|
context.reflectionFlags(item),
|
|
18
|
-
!!item.flags.isRest &&
|
|
19
|
-
|
|
14
|
+
!!item.flags.isRest && JSX.createElement("span", { class: "tsd-signature-symbol" }, "..."),
|
|
15
|
+
JSX.createElement("span", { class: "tsd-kind-parameter" }, item.name),
|
|
20
16
|
": ",
|
|
21
17
|
context.type(item.type),
|
|
22
|
-
item.defaultValue != null && (
|
|
18
|
+
item.defaultValue != null && (JSX.createElement("span", { class: "tsd-signature-symbol" },
|
|
23
19
|
" = ",
|
|
24
20
|
item.defaultValue))),
|
|
25
21
|
context.commentSummary(item),
|
|
26
22
|
context.commentTags(item),
|
|
27
|
-
|
|
28
|
-
props.type && (
|
|
29
|
-
|
|
23
|
+
context.typeDetailsIfUseful(item.type))))))),
|
|
24
|
+
props.type && (JSX.createElement(JSX.Fragment, null,
|
|
25
|
+
JSX.createElement("h4", { class: "tsd-returns-title" },
|
|
30
26
|
context.i18n.theme_returns(),
|
|
31
27
|
" ",
|
|
32
28
|
context.type(props.type)),
|
|
33
|
-
returnsTag &&
|
|
34
|
-
|
|
29
|
+
returnsTag && JSX.createElement(Raw, { html: context.markdown(returnsTag.content) }),
|
|
30
|
+
context.typeDetailsIfUseful(props.type))),
|
|
35
31
|
context.commentTags(props),
|
|
36
32
|
!hideSources && context.memberSources(props)));
|
|
37
33
|
}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import type { DefaultThemeRenderContext } from "../DefaultThemeRenderContext";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
export declare function memberSignatureTitle(context: DefaultThemeRenderContext, props: SignatureReflection, { hideName, arrowStyle, hideParamTypes, }?: {
|
|
1
|
+
import type { DefaultThemeRenderContext } from "../DefaultThemeRenderContext.js";
|
|
2
|
+
import { type SignatureReflection } from "../../../../models/index.js";
|
|
3
|
+
export declare function memberSignatureTitle(context: DefaultThemeRenderContext, props: SignatureReflection, options?: {
|
|
5
4
|
hideName?: boolean;
|
|
6
|
-
|
|
7
|
-
hideParamTypes?: boolean;
|
|
8
|
-
}): JSX.Element;
|
|
5
|
+
}): import("../../../../utils/jsx.elements.js").JsxElement;
|
|
@@ -1,36 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
return
|
|
9
|
-
!!item.flags.isRest && utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, "..."),
|
|
10
|
-
utils_1.JSX.createElement("span", { class: "tsd-kind-parameter" }, item.name),
|
|
11
|
-
utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" },
|
|
12
|
-
!!item.flags.isOptional && "?",
|
|
13
|
-
!!item.defaultValue && "?",
|
|
14
|
-
": "),
|
|
15
|
-
context.type(item.type)));
|
|
16
|
-
}
|
|
17
|
-
function renderParameterWithoutType(item) {
|
|
18
|
-
return (utils_1.JSX.createElement(utils_1.JSX.Fragment, null,
|
|
19
|
-
!!item.flags.isRest && utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, "..."),
|
|
20
|
-
utils_1.JSX.createElement("span", { class: "tsd-kind-parameter" }, item.name),
|
|
21
|
-
(item.flags.isOptional || item.defaultValue) && utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, "?")));
|
|
22
|
-
}
|
|
23
|
-
function memberSignatureTitle(context, props, { hideName = false, arrowStyle = false, hideParamTypes = context.options.getValue("hideParameterTypesInTitle"), } = {}) {
|
|
24
|
-
const renderParam = hideParamTypes ? renderParameterWithoutType : renderParameterWithType.bind(null, context);
|
|
25
|
-
return (utils_1.JSX.createElement(utils_1.JSX.Fragment, null,
|
|
26
|
-
!hideName ? (utils_1.JSX.createElement("span", { class: (0, lib_1.getKindClass)(props) }, (0, lib_1.wbr)(props.name))) : (utils_1.JSX.createElement(utils_1.JSX.Fragment, null, props.kind === models_1.ReflectionKind.ConstructorSignature && (utils_1.JSX.createElement(utils_1.JSX.Fragment, null,
|
|
27
|
-
!!props.flags.isAbstract && utils_1.JSX.createElement("span", { class: "tsd-signature-keyword" }, "abstract "),
|
|
28
|
-
utils_1.JSX.createElement("span", { class: "tsd-signature-keyword" }, "new "))))),
|
|
29
|
-
(0, lib_1.renderTypeParametersSignature)(context, props.typeParameters),
|
|
30
|
-
utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, "("),
|
|
31
|
-
(0, lib_1.join)(", ", props.parameters ?? [], renderParam),
|
|
32
|
-
utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, ")"),
|
|
33
|
-
!!props.type && (utils_1.JSX.createElement(utils_1.JSX.Fragment, null,
|
|
34
|
-
utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, arrowStyle ? " => " : ": "),
|
|
35
|
-
context.type(props.type)))));
|
|
1
|
+
import {} from "../../../../models/index.js";
|
|
2
|
+
import { FormattedCodeBuilder, FormattedCodeGenerator, Wrap } from "../../../formatter.js";
|
|
3
|
+
export function memberSignatureTitle(context, props, options = {}) {
|
|
4
|
+
const builder = new FormattedCodeBuilder(context.urlTo);
|
|
5
|
+
const tree = builder.signature(props, options);
|
|
6
|
+
const generator = new FormattedCodeGenerator(context.options.getValue("typePrintWidth"));
|
|
7
|
+
generator.node(tree, Wrap.Detect);
|
|
8
|
+
return generator.toElement();
|
|
36
9
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DefaultThemeRenderContext } from "../DefaultThemeRenderContext";
|
|
2
|
-
import { JSX } from "../../../../utils";
|
|
3
|
-
import type { DeclarationReflection } from "../../../../models";
|
|
1
|
+
import type { DefaultThemeRenderContext } from "../DefaultThemeRenderContext.js";
|
|
2
|
+
import { JSX } from "../../../../utils/index.js";
|
|
3
|
+
import type { DeclarationReflection } from "../../../../models/index.js";
|
|
4
4
|
export declare const memberSignatures: (context: DefaultThemeRenderContext, props: DeclarationReflection) => JSX.Element;
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
utils_1.JSX.createElement("ul", { class: (0, lib_1.classNames)({ "tsd-signatures": true }, context.getReflectionClasses(props)) }, props.signatures?.map((item) => (utils_1.JSX.createElement(utils_1.JSX.Fragment, null,
|
|
9
|
-
utils_1.JSX.createElement("li", { class: "tsd-signature tsd-anchor-link" },
|
|
10
|
-
utils_1.JSX.createElement("a", { id: item.anchor, class: "tsd-anchor" }),
|
|
1
|
+
import { JSX } from "../../../../utils/index.js";
|
|
2
|
+
import { anchorIcon } from "./anchor-icon.js";
|
|
3
|
+
import { classNames } from "../../lib.js";
|
|
4
|
+
export const memberSignatures = (context, props) => (JSX.createElement(JSX.Fragment, null,
|
|
5
|
+
JSX.createElement("ul", { class: classNames({ "tsd-signatures": true }, context.getReflectionClasses(props)) }, props.signatures?.map((item) => (JSX.createElement(JSX.Fragment, null,
|
|
6
|
+
JSX.createElement("li", { class: "tsd-signature tsd-anchor-link" },
|
|
7
|
+
JSX.createElement("a", { id: item.anchor, class: "tsd-anchor" }),
|
|
11
8
|
context.memberSignatureTitle(item),
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
exports.memberSignatures = memberSignatures;
|
|
9
|
+
anchorIcon(context, item.anchor)),
|
|
10
|
+
JSX.createElement("li", { class: "tsd-description" }, context.memberSignatureBody(item))))))));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DefaultThemeRenderContext } from "../DefaultThemeRenderContext";
|
|
2
|
-
import { JSX } from "../../../../utils";
|
|
3
|
-
import type { DeclarationReflection, SignatureReflection } from "../../../../models";
|
|
1
|
+
import type { DefaultThemeRenderContext } from "../DefaultThemeRenderContext.js";
|
|
2
|
+
import { JSX } from "../../../../utils/index.js";
|
|
3
|
+
import type { DeclarationReflection, SignatureReflection } from "../../../../models/index.js";
|
|
4
4
|
export declare const memberSources: (context: DefaultThemeRenderContext, props: SignatureReflection | DeclarationReflection) => JSX.Element;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.memberSources = void 0;
|
|
4
|
-
const utils_1 = require("../../../../utils");
|
|
1
|
+
import { JSX } from "../../../../utils/index.js";
|
|
5
2
|
function sourceLink(context, item) {
|
|
6
3
|
if (!item.url) {
|
|
7
|
-
return (
|
|
4
|
+
return (JSX.createElement("li", null,
|
|
8
5
|
context.i18n.theme_defined_in(),
|
|
9
6
|
" ",
|
|
10
7
|
item.fileName,
|
|
@@ -12,48 +9,47 @@ function sourceLink(context, item) {
|
|
|
12
9
|
item.line));
|
|
13
10
|
}
|
|
14
11
|
if (context.options.getValue("sourceLinkExternal")) {
|
|
15
|
-
return (
|
|
12
|
+
return (JSX.createElement("li", null,
|
|
16
13
|
context.i18n.theme_defined_in(),
|
|
17
14
|
" ",
|
|
18
|
-
|
|
15
|
+
JSX.createElement("a", { href: item.url, class: "external", target: "_blank" },
|
|
19
16
|
item.fileName,
|
|
20
17
|
":",
|
|
21
18
|
item.line)));
|
|
22
19
|
}
|
|
23
|
-
return (
|
|
20
|
+
return (JSX.createElement("li", null,
|
|
24
21
|
context.i18n.theme_defined_in(),
|
|
25
22
|
" ",
|
|
26
|
-
|
|
23
|
+
JSX.createElement("a", { href: item.url },
|
|
27
24
|
item.fileName,
|
|
28
25
|
":",
|
|
29
26
|
item.line)));
|
|
30
27
|
}
|
|
31
|
-
const memberSources = (context, props) => {
|
|
28
|
+
export const memberSources = (context, props) => {
|
|
32
29
|
const sources = [];
|
|
33
30
|
if (props.implementationOf) {
|
|
34
|
-
sources.push(
|
|
31
|
+
sources.push(JSX.createElement("p", null,
|
|
35
32
|
context.i18n.theme_implementation_of(),
|
|
36
33
|
" ",
|
|
37
34
|
context.typeAndParent(props.implementationOf)));
|
|
38
35
|
}
|
|
39
36
|
if (props.inheritedFrom) {
|
|
40
|
-
sources.push(
|
|
37
|
+
sources.push(JSX.createElement("p", null,
|
|
41
38
|
context.i18n.theme_inherited_from(),
|
|
42
39
|
" ",
|
|
43
40
|
context.typeAndParent(props.inheritedFrom)));
|
|
44
41
|
}
|
|
45
42
|
if (props.overwrites) {
|
|
46
|
-
sources.push(
|
|
43
|
+
sources.push(JSX.createElement("p", null,
|
|
47
44
|
context.i18n.theme_overrides(),
|
|
48
45
|
" ",
|
|
49
46
|
context.typeAndParent(props.overwrites)));
|
|
50
47
|
}
|
|
51
48
|
if (props.sources?.length) {
|
|
52
|
-
sources.push(
|
|
49
|
+
sources.push(JSX.createElement("ul", null, props.sources.map((item) => sourceLink(context, item))));
|
|
53
50
|
}
|
|
54
51
|
if (sources.length === 0) {
|
|
55
|
-
return
|
|
52
|
+
return JSX.createElement(JSX.Fragment, null);
|
|
56
53
|
}
|
|
57
|
-
return
|
|
54
|
+
return JSX.createElement("aside", { class: "tsd-sources" }, sources);
|
|
58
55
|
};
|
|
59
|
-
exports.memberSources = memberSources;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DefaultThemeRenderContext } from "../DefaultThemeRenderContext";
|
|
2
|
-
import { JSX } from "../../../../utils";
|
|
3
|
-
import type
|
|
1
|
+
import type { DefaultThemeRenderContext } from "../DefaultThemeRenderContext.js";
|
|
2
|
+
import { JSX } from "../../../../utils/index.js";
|
|
3
|
+
import { type ContainerReflection } from "../../../../models/index.js";
|
|
4
4
|
export declare function members(context: DefaultThemeRenderContext, props: ContainerReflection): JSX.Element;
|
|
@@ -1,48 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
return (0, utils_1.filterMap)(parent.categories, (cat) => {
|
|
8
|
-
if (!cat.allChildrenHaveOwnDocument()) {
|
|
9
|
-
return {
|
|
10
|
-
title: cat.title,
|
|
11
|
-
children: cat.children.filter((child) => !child.hasOwnDocument),
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
if (parent.groups?.length) {
|
|
17
|
-
return parent.groups.flatMap((group) => {
|
|
18
|
-
if (group.categories?.length) {
|
|
19
|
-
return (0, utils_1.filterMap)(group.categories, (cat) => {
|
|
20
|
-
if (!cat.allChildrenHaveOwnDocument()) {
|
|
21
|
-
return {
|
|
22
|
-
title: `${group.title} - ${cat.title}`,
|
|
23
|
-
children: cat.children.filter((child) => !child.hasOwnDocument),
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
return {
|
|
29
|
-
title: group.title,
|
|
30
|
-
children: group.children.filter((child) => !child.hasOwnDocument),
|
|
31
|
-
};
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
return [];
|
|
35
|
-
}
|
|
36
|
-
function members(context, props) {
|
|
37
|
-
const sections = getMemberSections(props).filter((sect) => sect.children.length);
|
|
38
|
-
return (utils_1.JSX.createElement(utils_1.JSX.Fragment, null, sections.map(({ title, children }) => {
|
|
1
|
+
import { JSX } from "../../../../utils/index.js";
|
|
2
|
+
import {} from "../../../../models/index.js";
|
|
3
|
+
import { getMemberSections } from "../../lib.js";
|
|
4
|
+
export function members(context, props) {
|
|
5
|
+
const sections = getMemberSections(props, (child) => !child.hasOwnDocument);
|
|
6
|
+
return (JSX.createElement(JSX.Fragment, null, sections.map(({ title, children }) => {
|
|
39
7
|
context.page.startNewSection(title);
|
|
40
|
-
return (
|
|
41
|
-
|
|
42
|
-
|
|
8
|
+
return (JSX.createElement("details", { class: "tsd-panel-group tsd-member-group tsd-accordion", open: true },
|
|
9
|
+
JSX.createElement("summary", { class: "tsd-accordion-summary", "data-key": "section-" + title },
|
|
10
|
+
JSX.createElement("h2", null,
|
|
43
11
|
context.icons.chevronDown(),
|
|
44
12
|
" ",
|
|
45
13
|
title)),
|
|
46
|
-
|
|
14
|
+
JSX.createElement("section", null, children.map((item) => context.member(item)))));
|
|
47
15
|
})));
|
|
48
16
|
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type DocumentReflection, type DeclarationReflection, type ProjectReflection } from "../../../../models/index.js";
|
|
2
|
+
import { JSX } from "../../../../utils/index.js";
|
|
3
|
+
import type { DefaultThemeRenderContext } from "../DefaultThemeRenderContext.js";
|
|
4
|
+
export declare function moduleReflection(context: DefaultThemeRenderContext, mod: DeclarationReflection | ProjectReflection): JSX.Element;
|
|
5
|
+
export declare function moduleMemberSummary(context: DefaultThemeRenderContext, member: DeclarationReflection | DocumentReflection): JSX.Element;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { ReferenceReflection, ReflectionKind, } from "../../../../models/index.js";
|
|
2
|
+
import { JSX, Raw } from "../../../../utils/index.js";
|
|
3
|
+
import { classNames, getDisplayName, getMemberSections, getUniquePath, join } from "../../lib.js";
|
|
4
|
+
import { anchorIcon } from "./anchor-icon.js";
|
|
5
|
+
export function moduleReflection(context, mod) {
|
|
6
|
+
const sections = getMemberSections(mod);
|
|
7
|
+
return (JSX.createElement(JSX.Fragment, null,
|
|
8
|
+
mod.hasComment() && (JSX.createElement("section", { class: "tsd-panel tsd-comment" },
|
|
9
|
+
context.commentSummary(mod),
|
|
10
|
+
context.commentTags(mod))),
|
|
11
|
+
mod.isDeclaration() && mod.kind === ReflectionKind.Module && mod.readme?.length && (JSX.createElement("section", { class: "tsd-panel tsd-typography" },
|
|
12
|
+
JSX.createElement(Raw, { html: context.markdown(mod.readme) }))),
|
|
13
|
+
sections.map(({ title, children }) => {
|
|
14
|
+
context.page.startNewSection(title);
|
|
15
|
+
return (JSX.createElement("details", { class: "tsd-panel-group tsd-member-group tsd-accordion", open: true },
|
|
16
|
+
JSX.createElement("summary", { class: "tsd-accordion-summary", "data-key": "section-" + title },
|
|
17
|
+
JSX.createElement("h2", null,
|
|
18
|
+
context.icons.chevronDown(),
|
|
19
|
+
" ",
|
|
20
|
+
title)),
|
|
21
|
+
JSX.createElement("dl", { class: "tsd-member-summaries" }, children.map((item) => context.moduleMemberSummary(item)))));
|
|
22
|
+
})));
|
|
23
|
+
}
|
|
24
|
+
export function moduleMemberSummary(context, member) {
|
|
25
|
+
const id = context.slugger.slug(member.name);
|
|
26
|
+
context.page.pageHeadings.push({
|
|
27
|
+
link: `#${id}`,
|
|
28
|
+
text: getDisplayName(member),
|
|
29
|
+
kind: member instanceof ReferenceReflection ? member.getTargetReflectionDeep().kind : member.kind,
|
|
30
|
+
classes: context.getReflectionClasses(member),
|
|
31
|
+
});
|
|
32
|
+
let name;
|
|
33
|
+
if (member instanceof ReferenceReflection) {
|
|
34
|
+
const target = member.getTargetReflectionDeep();
|
|
35
|
+
name = (JSX.createElement("span", { class: "tsd-member-summary-name" },
|
|
36
|
+
context.icons[target.kind](),
|
|
37
|
+
JSX.createElement("span", { class: classNames({ deprecated: member.isDeprecated() }) }, member.name),
|
|
38
|
+
JSX.createElement("span", null,
|
|
39
|
+
"\u00A0",
|
|
40
|
+
"\u2192",
|
|
41
|
+
"\u00A0"),
|
|
42
|
+
uniqueName(context, target),
|
|
43
|
+
anchorIcon(context, id)));
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
name = (JSX.createElement("span", { class: "tsd-member-summary-name" },
|
|
47
|
+
context.icons[member.kind](),
|
|
48
|
+
JSX.createElement("a", { class: classNames({ deprecated: member.isDeprecated() }), href: context.urlTo(member) }, member.name),
|
|
49
|
+
anchorIcon(context, id)));
|
|
50
|
+
}
|
|
51
|
+
return (JSX.createElement(JSX.Fragment, null,
|
|
52
|
+
JSX.createElement("dt", { class: classNames({ "tsd-member-summary": true }, context.getReflectionClasses(member)) },
|
|
53
|
+
JSX.createElement("a", { id: id, class: "tsd-anchor" }),
|
|
54
|
+
name),
|
|
55
|
+
JSX.createElement("dd", { class: classNames({ "tsd-member-summary": true }, context.getReflectionClasses(member)) }, context.commentShortSummary(member))));
|
|
56
|
+
}
|
|
57
|
+
// Note: This version of uniqueName does NOT include colors... they looked weird to me
|
|
58
|
+
// when looking at a module page.
|
|
59
|
+
function uniqueName(context, reflection) {
|
|
60
|
+
const name = join(".", getUniquePath(reflection), (item) => (JSX.createElement("a", { href: context.urlTo(item), class: classNames({ deprecated: item.isDeprecated() }) }, item.name)));
|
|
61
|
+
return JSX.createElement(JSX.Fragment, null, name);
|
|
62
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { type Reflection } from "../../../../models";
|
|
2
|
-
import { JSX } from "../../../../utils";
|
|
3
|
-
import type { PageEvent } from "../../../events";
|
|
4
|
-
import type { DefaultThemeRenderContext } from "../DefaultThemeRenderContext";
|
|
1
|
+
import { type Reflection } from "../../../../models/index.js";
|
|
2
|
+
import { JSX } from "../../../../utils/index.js";
|
|
3
|
+
import type { PageEvent } from "../../../events.js";
|
|
4
|
+
import type { DefaultThemeRenderContext } from "../DefaultThemeRenderContext.js";
|
|
5
5
|
export declare function sidebar(context: DefaultThemeRenderContext, props: PageEvent<Reflection>): JSX.Element;
|
|
6
6
|
export declare function sidebarLinks(context: DefaultThemeRenderContext): JSX.Element | null;
|
|
7
7
|
export declare function settings(context: DefaultThemeRenderContext): JSX.Element;
|