typedoc 0.25.13 → 0.26.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/dist/index.d.ts +3 -2
- package/dist/index.js +3 -2
- package/dist/lib/application.d.ts +15 -3
- package/dist/lib/application.js +75 -24
- package/dist/lib/cli.js +1 -1
- package/dist/lib/converter/comments/blockLexer.d.ts +1 -1
- package/dist/lib/converter/comments/blockLexer.js +1 -2
- package/dist/lib/converter/comments/declarationReference.js +8 -8
- package/dist/lib/converter/comments/declarationReferenceResolver.d.ts +1 -1
- package/dist/lib/converter/comments/declarationReferenceResolver.js +15 -14
- package/dist/lib/converter/comments/discovery.d.ts +3 -3
- package/dist/lib/converter/comments/discovery.js +21 -19
- package/dist/lib/converter/comments/index.d.ts +1 -1
- package/dist/lib/converter/comments/index.js +35 -16
- package/dist/lib/converter/comments/lineLexer.d.ts +1 -1
- package/dist/lib/converter/comments/lineLexer.js +1 -2
- package/dist/lib/converter/comments/linkResolver.d.ts +2 -2
- package/dist/lib/converter/comments/linkResolver.js +5 -3
- package/dist/lib/converter/comments/parser.d.ts +14 -3
- package/dist/lib/converter/comments/parser.js +147 -39
- package/dist/lib/converter/comments/rawLexer.d.ts +7 -1
- package/dist/lib/converter/comments/rawLexer.js +21 -70
- package/dist/lib/converter/comments/tagName.js +1 -2
- package/dist/lib/converter/context.d.ts +7 -2
- package/dist/lib/converter/context.js +10 -2
- package/dist/lib/converter/convert-expression.js +2 -3
- package/dist/lib/converter/converter.d.ts +9 -4
- package/dist/lib/converter/converter.js +55 -17
- package/dist/lib/converter/factories/index-signature.d.ts +1 -1
- package/dist/lib/converter/factories/index-signature.js +9 -12
- package/dist/lib/converter/factories/signature.d.ts +1 -1
- package/dist/lib/converter/factories/signature.js +14 -15
- package/dist/lib/converter/jsdoc.js +2 -3
- package/dist/lib/converter/plugins/CategoryPlugin.d.ts +3 -3
- package/dist/lib/converter/plugins/CategoryPlugin.js +24 -17
- package/dist/lib/converter/plugins/CommentPlugin.d.ts +3 -1
- package/dist/lib/converter/plugins/CommentPlugin.js +112 -69
- package/dist/lib/converter/plugins/GroupPlugin.d.ts +4 -4
- package/dist/lib/converter/plugins/GroupPlugin.js +52 -18
- package/dist/lib/converter/plugins/ImplementsPlugin.js +4 -3
- package/dist/lib/converter/plugins/InheritDocPlugin.d.ts +1 -1
- package/dist/lib/converter/plugins/InheritDocPlugin.js +5 -6
- package/dist/lib/converter/plugins/LinkResolverPlugin.d.ts +2 -2
- package/dist/lib/converter/plugins/PackagePlugin.d.ts +0 -2
- package/dist/lib/converter/plugins/PackagePlugin.js +8 -30
- package/dist/lib/converter/plugins/SourcePlugin.js +2 -2
- package/dist/lib/converter/symbols.js +6 -11
- package/dist/lib/converter/types.d.ts +1 -1
- package/dist/lib/converter/types.js +4 -5
- package/dist/lib/converter/utils/nodes.js +3 -4
- package/dist/lib/converter/utils/reflections.d.ts +1 -1
- package/dist/lib/converter/utils/reflections.js +1 -2
- package/dist/lib/converter/utils/repository.js +4 -4
- package/dist/lib/converter/utils/symbols.js +1 -2
- package/dist/lib/internationalization/index.d.ts +7 -0
- package/dist/lib/internationalization/index.js +11 -0
- package/dist/lib/internationalization/internationalization.d.ts +92 -0
- package/dist/lib/internationalization/internationalization.js +194 -0
- package/dist/lib/internationalization/locales/en.cjs +3 -0
- package/dist/lib/internationalization/locales/en.d.cts +2 -0
- package/dist/lib/internationalization/locales/test.cjs +8 -0
- package/dist/lib/internationalization/locales/test.d.cts +5 -0
- package/dist/lib/internationalization/translatable.d.ts +304 -0
- package/dist/lib/internationalization/translatable.js +329 -0
- package/dist/lib/models/ReflectionCategory.d.ts +2 -2
- package/dist/lib/models/ReflectionGroup.d.ts +2 -2
- package/dist/lib/models/comments/comment.d.ts +17 -3
- package/dist/lib/models/comments/comment.js +377 -298
- package/dist/lib/models/reflections/ReflectionSymbolId.js +2 -2
- package/dist/lib/models/reflections/abstract.d.ts +11 -8
- package/dist/lib/models/reflections/abstract.js +17 -11
- package/dist/lib/models/reflections/container.d.ts +25 -3
- package/dist/lib/models/reflections/container.js +64 -0
- package/dist/lib/models/reflections/declaration.d.ts +3 -15
- package/dist/lib/models/reflections/declaration.js +16 -21
- package/dist/lib/models/reflections/document.d.ts +27 -0
- package/dist/lib/models/reflections/document.js +43 -0
- package/dist/lib/models/reflections/index.d.ts +4 -3
- package/dist/lib/models/reflections/index.js +5 -4
- package/dist/lib/models/reflections/kind.d.ts +14 -1
- package/dist/lib/models/reflections/kind.js +13 -0
- package/dist/lib/models/reflections/parameter.d.ts +1 -1
- package/dist/lib/models/reflections/project.d.ts +2 -2
- package/dist/lib/models/reflections/project.js +8 -7
- package/dist/lib/models/reflections/signature.d.ts +2 -2
- package/dist/lib/models/reflections/type-parameter.d.ts +1 -1
- package/dist/lib/models/reflections/utils.js +1 -2
- package/dist/lib/models/reflections/variant.d.ts +2 -0
- package/dist/lib/models/types.d.ts +4 -4
- package/dist/lib/models/types.js +3 -3
- package/dist/lib/output/events.d.ts +5 -5
- package/dist/lib/output/events.js +2 -1
- package/dist/lib/output/index.d.ts +1 -1
- package/dist/lib/output/index.js +2 -1
- package/dist/lib/output/plugins/AssetsPlugin.js +1 -1
- package/dist/lib/output/plugins/JavascriptIndexPlugin.d.ts +3 -1
- package/dist/lib/output/plugins/JavascriptIndexPlugin.js +28 -8
- package/dist/lib/output/plugins/SitemapPlugin.d.ts +1 -1
- package/dist/lib/output/plugins/SitemapPlugin.js +17 -27
- package/dist/lib/output/renderer.d.ts +3 -1
- package/dist/lib/output/renderer.js +7 -7
- package/dist/lib/output/themes/MarkedPlugin.d.ts +16 -25
- package/dist/lib/output/themes/MarkedPlugin.js +89 -161
- package/dist/lib/output/themes/default/DefaultTheme.d.ts +16 -4
- package/dist/lib/output/themes/default/DefaultTheme.js +66 -17
- package/dist/lib/output/themes/default/DefaultThemeRenderContext.d.ts +44 -44
- package/dist/lib/output/themes/default/DefaultThemeRenderContext.js +6 -13
- package/dist/lib/output/themes/default/layouts/default.js +2 -2
- package/dist/lib/output/themes/default/partials/analytics.js +1 -2
- package/dist/lib/output/themes/default/partials/anchor-icon.js +2 -3
- package/dist/lib/output/themes/default/partials/comment.d.ts +1 -1
- package/dist/lib/output/themes/default/partials/comment.js +3 -4
- package/dist/lib/output/themes/default/partials/footer.js +31 -5
- package/dist/lib/output/themes/default/partials/header.d.ts +1 -1
- package/dist/lib/output/themes/default/partials/header.js +4 -3
- package/dist/lib/output/themes/default/partials/hierarchy.js +3 -4
- package/dist/lib/output/themes/default/partials/icon.js +7 -2
- package/dist/lib/output/themes/default/partials/index.js +4 -4
- package/dist/lib/output/themes/default/partials/member.d.ts +2 -2
- package/dist/lib/output/themes/default/partials/member.declaration.js +2 -3
- package/dist/lib/output/themes/default/partials/member.js +13 -2
- package/dist/lib/output/themes/default/partials/member.reference.d.ts +1 -1
- package/dist/lib/output/themes/default/partials/member.reference.js +9 -6
- package/dist/lib/output/themes/default/partials/member.signature.body.d.ts +1 -1
- package/dist/lib/output/themes/default/partials/member.signature.body.js +4 -4
- package/dist/lib/output/themes/default/partials/member.signature.title.d.ts +1 -1
- package/dist/lib/output/themes/default/partials/member.signature.title.js +1 -2
- package/dist/lib/output/themes/default/partials/member.sources.js +12 -6
- package/dist/lib/output/themes/default/partials/members.d.ts +1 -1
- package/dist/lib/output/themes/default/partials/members.group.js +1 -2
- package/dist/lib/output/themes/default/partials/members.js +1 -2
- package/dist/lib/output/themes/default/partials/navigation.d.ts +1 -1
- package/dist/lib/output/themes/default/partials/navigation.js +19 -17
- package/dist/lib/output/themes/default/partials/parameter.d.ts +1 -1
- package/dist/lib/output/themes/default/partials/parameter.js +15 -15
- package/dist/lib/output/themes/default/partials/reflectionPreview.js +1 -2
- package/dist/lib/output/themes/default/partials/toolbar.js +4 -4
- package/dist/lib/output/themes/default/partials/type.d.ts +1 -1
- package/dist/lib/output/themes/default/partials/type.js +14 -14
- package/dist/lib/output/themes/default/partials/typeAndParent.d.ts +1 -1
- package/dist/lib/output/themes/default/partials/typeParameters.js +2 -3
- package/dist/lib/output/themes/default/templates/document.d.ts +5 -0
- package/dist/lib/output/themes/default/templates/document.js +7 -0
- package/dist/lib/output/themes/default/templates/hierarchy.js +1 -2
- package/dist/lib/output/themes/default/templates/reflection.d.ts +1 -1
- package/dist/lib/output/themes/default/templates/reflection.js +21 -19
- package/dist/lib/output/themes/lib.d.ts +1 -1
- package/dist/lib/output/themes/lib.js +12 -16
- package/dist/lib/serialization/deserializer.d.ts +3 -3
- package/dist/lib/serialization/deserializer.js +7 -5
- package/dist/lib/serialization/schema.d.ts +10 -3
- package/dist/lib/utils/array.js +9 -10
- package/dist/lib/utils/component.d.ts +1 -1
- package/dist/lib/utils/component.js +2 -2
- package/dist/lib/utils/entry-point.d.ts +11 -0
- package/dist/lib/utils/entry-point.js +51 -24
- package/dist/lib/utils/enum.js +6 -7
- package/dist/lib/utils/fs.js +15 -16
- package/dist/lib/utils/general.d.ts +4 -3
- package/dist/lib/utils/general.js +4 -5
- package/dist/lib/utils/highlighter.d.ts +4 -2
- package/dist/lib/utils/highlighter.js +41 -40
- package/dist/lib/utils/html.js +2 -3
- package/dist/lib/utils/index.d.ts +1 -1
- package/dist/lib/utils/index.js +1 -2
- package/dist/lib/utils/jsx.elements.d.ts +13 -1
- package/dist/lib/utils/jsx.js +4 -4
- package/dist/lib/utils/loggers.d.ts +13 -7
- package/dist/lib/utils/loggers.js +13 -10
- package/dist/lib/utils/map.d.ts +1 -1
- package/dist/lib/utils/map.js +1 -1
- package/dist/lib/utils/options/declaration.d.ts +48 -21
- package/dist/lib/utils/options/declaration.js +36 -36
- package/dist/lib/utils/options/help.d.ts +2 -1
- package/dist/lib/utils/options/help.js +10 -10
- package/dist/lib/utils/options/index.d.ts +1 -1
- package/dist/lib/utils/options/index.js +1 -2
- package/dist/lib/utils/options/options.d.ts +5 -34
- package/dist/lib/utils/options/options.js +13 -23
- package/dist/lib/utils/options/readers/arguments.js +3 -5
- package/dist/lib/utils/options/readers/package-json.js +2 -2
- package/dist/lib/utils/options/readers/tsconfig.js +8 -12
- package/dist/lib/utils/options/readers/typedoc.d.ts +1 -1
- package/dist/lib/utils/options/readers/typedoc.js +8 -7
- package/dist/lib/utils/options/sources/typedoc.js +225 -178
- package/dist/lib/utils/options/tsdoc-defaults.d.ts +4 -4
- package/dist/lib/utils/options/tsdoc-defaults.js +27 -20
- package/dist/lib/utils/package-manifest.d.ts +1 -1
- package/dist/lib/utils/package-manifest.js +9 -11
- package/dist/lib/utils/paths.js +4 -5
- package/dist/lib/utils/perf.js +3 -4
- package/dist/lib/utils/plugins.js +4 -5
- package/dist/lib/utils/reflections.d.ts +1 -1
- package/dist/lib/utils/reflections.js +2 -3
- package/dist/lib/utils/set.d.ts +1 -0
- package/dist/lib/utils/set.js +12 -0
- package/dist/lib/utils/sort.d.ts +3 -2
- package/dist/lib/utils/sort.js +37 -6
- package/dist/lib/utils/tsconfig.js +3 -4
- package/dist/lib/utils/tsutils.js +2 -3
- package/dist/lib/utils/validation.js +4 -4
- package/dist/lib/validation/documentation.d.ts +1 -1
- package/dist/lib/validation/documentation.js +9 -4
- package/dist/lib/validation/exports.js +3 -5
- package/dist/lib/validation/links.js +2 -3
- package/package.json +12 -11
- package/static/main.js +4 -4
- package/static/style.css +46 -29
- package/tsdoc.json +22 -0
|
@@ -5,21 +5,24 @@ const utils_1 = require("../../../../utils");
|
|
|
5
5
|
function sourceLink(context, item) {
|
|
6
6
|
if (!item.url) {
|
|
7
7
|
return (utils_1.JSX.createElement("li", null,
|
|
8
|
-
|
|
8
|
+
context.i18n.theme_defined_in(),
|
|
9
|
+
" ",
|
|
9
10
|
item.fileName,
|
|
10
11
|
":",
|
|
11
12
|
item.line));
|
|
12
13
|
}
|
|
13
14
|
if (context.options.getValue("sourceLinkExternal")) {
|
|
14
15
|
return (utils_1.JSX.createElement("li", null,
|
|
15
|
-
|
|
16
|
+
context.i18n.theme_defined_in(),
|
|
17
|
+
" ",
|
|
16
18
|
utils_1.JSX.createElement("a", { href: item.url, class: "external", target: "_blank" },
|
|
17
19
|
item.fileName,
|
|
18
20
|
":",
|
|
19
21
|
item.line)));
|
|
20
22
|
}
|
|
21
23
|
return (utils_1.JSX.createElement("li", null,
|
|
22
|
-
|
|
24
|
+
context.i18n.theme_defined_in(),
|
|
25
|
+
" ",
|
|
23
26
|
utils_1.JSX.createElement("a", { href: item.url },
|
|
24
27
|
item.fileName,
|
|
25
28
|
":",
|
|
@@ -29,17 +32,20 @@ const memberSources = (context, props) => {
|
|
|
29
32
|
const sources = [];
|
|
30
33
|
if (props.implementationOf) {
|
|
31
34
|
sources.push(utils_1.JSX.createElement("p", null,
|
|
32
|
-
|
|
35
|
+
context.i18n.theme_implementation_of(),
|
|
36
|
+
" ",
|
|
33
37
|
context.typeAndParent(props.implementationOf)));
|
|
34
38
|
}
|
|
35
39
|
if (props.inheritedFrom) {
|
|
36
40
|
sources.push(utils_1.JSX.createElement("p", null,
|
|
37
|
-
|
|
41
|
+
context.i18n.theme_inherited_from(),
|
|
42
|
+
" ",
|
|
38
43
|
context.typeAndParent(props.inheritedFrom)));
|
|
39
44
|
}
|
|
40
45
|
if (props.overwrites) {
|
|
41
46
|
sources.push(utils_1.JSX.createElement("p", null,
|
|
42
|
-
|
|
47
|
+
context.i18n.theme_overrides(),
|
|
48
|
+
" ",
|
|
43
49
|
context.typeAndParent(props.overwrites)));
|
|
44
50
|
}
|
|
45
51
|
if (props.sources?.length) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { DefaultThemeRenderContext } from "../DefaultThemeRenderContext";
|
|
2
2
|
import { JSX } from "../../../../utils";
|
|
3
|
-
import { ContainerReflection } from "../../../../models";
|
|
3
|
+
import { type ContainerReflection } from "../../../../models";
|
|
4
4
|
export declare function members(context: DefaultThemeRenderContext, props: ContainerReflection): JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.membersGroup =
|
|
3
|
+
exports.membersGroup = membersGroup;
|
|
4
4
|
const utils_1 = require("../../../../utils");
|
|
5
5
|
function membersGroup(context, group) {
|
|
6
6
|
if (group.categories) {
|
|
@@ -16,4 +16,3 @@ function membersGroup(context, group) {
|
|
|
16
16
|
utils_1.JSX.createElement("h2", null, group.title),
|
|
17
17
|
group.children.map((item) => !item.hasOwnDocument && context.member(item))));
|
|
18
18
|
}
|
|
19
|
-
exports.membersGroup = membersGroup;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.members =
|
|
3
|
+
exports.members = members;
|
|
4
4
|
const utils_1 = require("../../../../utils");
|
|
5
5
|
const models_1 = require("../../../../models");
|
|
6
6
|
const lib_1 = require("../../lib");
|
|
@@ -12,4 +12,3 @@ function members(context, props) {
|
|
|
12
12
|
}
|
|
13
13
|
return utils_1.JSX.createElement(utils_1.JSX.Fragment, null, props.groups?.map((item) => !item.allChildrenHaveOwnDocument() && context.membersGroup(item)));
|
|
14
14
|
}
|
|
15
|
-
exports.members = members;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Reflection } from "../../../../models";
|
|
1
|
+
import { type Reflection } from "../../../../models";
|
|
2
2
|
import { JSX } from "../../../../utils";
|
|
3
3
|
import type { PageEvent } from "../../../events";
|
|
4
4
|
import type { DefaultThemeRenderContext } from "../DefaultThemeRenderContext";
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.navigation = void 0;
|
|
4
|
+
exports.sidebar = sidebar;
|
|
5
|
+
exports.sidebarLinks = sidebarLinks;
|
|
6
|
+
exports.settings = settings;
|
|
7
|
+
exports.pageSidebar = pageSidebar;
|
|
8
|
+
exports.pageNavigation = pageNavigation;
|
|
4
9
|
const models_1 = require("../../../../models");
|
|
5
10
|
const utils_1 = require("../../../../utils");
|
|
6
11
|
const lib_1 = require("../../lib");
|
|
@@ -9,7 +14,6 @@ function sidebar(context, props) {
|
|
|
9
14
|
context.sidebarLinks(),
|
|
10
15
|
context.navigation(props)));
|
|
11
16
|
}
|
|
12
|
-
exports.sidebar = sidebar;
|
|
13
17
|
function buildFilterItem(context, name, displayName, defaultValue) {
|
|
14
18
|
return (utils_1.JSX.createElement("li", { class: "tsd-filter-item" },
|
|
15
19
|
utils_1.JSX.createElement("label", { class: "tsd-filter-input" },
|
|
@@ -19,11 +23,13 @@ function buildFilterItem(context, name, displayName, defaultValue) {
|
|
|
19
23
|
}
|
|
20
24
|
function sidebarLinks(context) {
|
|
21
25
|
const links = Object.entries(context.options.getValue("sidebarLinks"));
|
|
22
|
-
|
|
26
|
+
const navLinks = Object.entries(context.options.getValue("navigationLinks"));
|
|
27
|
+
if (!links.length && !navLinks.length)
|
|
23
28
|
return null;
|
|
24
|
-
return (utils_1.JSX.createElement("nav", { id: "tsd-sidebar-links", class: "tsd-navigation" },
|
|
29
|
+
return (utils_1.JSX.createElement("nav", { id: "tsd-sidebar-links", class: "tsd-navigation" },
|
|
30
|
+
links.map(([label, url]) => (utils_1.JSX.createElement("a", { href: url }, label))),
|
|
31
|
+
navLinks.map(([label, url]) => (utils_1.JSX.createElement("a", { href: url, class: "tsd-nav-link" }, label)))));
|
|
25
32
|
}
|
|
26
|
-
exports.sidebarLinks = sidebarLinks;
|
|
27
33
|
function settings(context) {
|
|
28
34
|
const defaultFilters = context.options.getValue("visibilityFilters");
|
|
29
35
|
const visibilityOptions = [];
|
|
@@ -48,20 +54,18 @@ function settings(context) {
|
|
|
48
54
|
utils_1.JSX.createElement("summary", { class: "tsd-accordion-summary" },
|
|
49
55
|
utils_1.JSX.createElement("h3", null,
|
|
50
56
|
context.icons.chevronDown(),
|
|
51
|
-
|
|
57
|
+
context.i18n.theme_settings())),
|
|
52
58
|
utils_1.JSX.createElement("div", { class: "tsd-accordion-details" },
|
|
53
59
|
visibilityOptions.length && (utils_1.JSX.createElement("div", { class: "tsd-filter-visibility" },
|
|
54
|
-
utils_1.JSX.createElement("
|
|
55
|
-
utils_1.JSX.createElement("
|
|
56
|
-
utils_1.JSX.createElement("ul", { id: "tsd-filter-options" }, ...visibilityOptions)))),
|
|
60
|
+
utils_1.JSX.createElement("span", { class: "settings-label" }, context.i18n.theme_member_visibility()),
|
|
61
|
+
utils_1.JSX.createElement("ul", { id: "tsd-filter-options" }, ...visibilityOptions))),
|
|
57
62
|
utils_1.JSX.createElement("div", { class: "tsd-theme-toggle" },
|
|
58
|
-
utils_1.JSX.createElement("
|
|
63
|
+
utils_1.JSX.createElement("label", { class: "settings-label", for: "tsd-theme" }, context.i18n.theme_theme()),
|
|
59
64
|
utils_1.JSX.createElement("select", { id: "tsd-theme" },
|
|
60
|
-
utils_1.JSX.createElement("option", { value: "os" },
|
|
61
|
-
utils_1.JSX.createElement("option", { value: "light" },
|
|
62
|
-
utils_1.JSX.createElement("option", { value: "dark" },
|
|
65
|
+
utils_1.JSX.createElement("option", { value: "os" }, context.i18n.theme_os()),
|
|
66
|
+
utils_1.JSX.createElement("option", { value: "light" }, context.i18n.theme_light()),
|
|
67
|
+
utils_1.JSX.createElement("option", { value: "dark" }, context.i18n.theme_dark())))))));
|
|
63
68
|
}
|
|
64
|
-
exports.settings = settings;
|
|
65
69
|
const navigation = function navigation(context, props) {
|
|
66
70
|
return (utils_1.JSX.createElement("nav", { class: "tsd-navigation" },
|
|
67
71
|
utils_1.JSX.createElement("a", { href: context.urlTo(props.project), class: (0, lib_1.classNames)({ current: props.project === props.model }) },
|
|
@@ -76,7 +80,6 @@ function pageSidebar(context, props) {
|
|
|
76
80
|
context.settings(),
|
|
77
81
|
context.pageNavigation(props)));
|
|
78
82
|
}
|
|
79
|
-
exports.pageSidebar = pageSidebar;
|
|
80
83
|
function pageNavigation(context, props) {
|
|
81
84
|
const levels = [[]];
|
|
82
85
|
function finalizeLevel(finishedHandlingHeadings) {
|
|
@@ -113,7 +116,6 @@ function pageNavigation(context, props) {
|
|
|
113
116
|
utils_1.JSX.createElement("summary", { class: "tsd-accordion-summary" },
|
|
114
117
|
utils_1.JSX.createElement("h3", null,
|
|
115
118
|
context.icons.chevronDown(),
|
|
116
|
-
|
|
119
|
+
context.i18n.theme_on_this_page())),
|
|
117
120
|
utils_1.JSX.createElement("div", { class: "tsd-accordion-details" }, levels[0])));
|
|
118
121
|
}
|
|
119
|
-
exports.pageNavigation = pageNavigation;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { DefaultThemeRenderContext } from "../DefaultThemeRenderContext";
|
|
2
2
|
import { JSX } from "../../../../utils";
|
|
3
|
-
import { DeclarationReflection } from "../../../../models";
|
|
3
|
+
import { type DeclarationReflection } from "../../../../models";
|
|
4
4
|
export declare const parameter: (context: DefaultThemeRenderContext, props: DeclarationReflection) => JSX.Element;
|
|
@@ -14,21 +14,7 @@ const parameter = (context, props) => (utils_1.JSX.createElement(utils_1.JSX.Fra
|
|
|
14
14
|
utils_1.JSX.createElement("li", { class: "tsd-description" }, context.memberSignatureBody(item, {
|
|
15
15
|
hideSources: true,
|
|
16
16
|
})))))))),
|
|
17
|
-
|
|
18
|
-
utils_1.JSX.createElement("li", { class: "tsd-parameter-index-signature" },
|
|
19
|
-
utils_1.JSX.createElement("h5", null,
|
|
20
|
-
utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, "["),
|
|
21
|
-
props.indexSignature?.parameters?.map((item) => (utils_1.JSX.createElement(utils_1.JSX.Fragment, null,
|
|
22
|
-
!!item.flags.isRest && utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, "..."),
|
|
23
|
-
utils_1.JSX.createElement("span", { class: (0, lib_1.getKindClass)(item) }, item.name),
|
|
24
|
-
": ",
|
|
25
|
-
context.type(item.type)))),
|
|
26
|
-
utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, "]: "),
|
|
27
|
-
context.type(props.indexSignature.type)),
|
|
28
|
-
context.commentSummary(props.indexSignature),
|
|
29
|
-
context.commentTags(props.indexSignature),
|
|
30
|
-
props.indexSignature.type instanceof models_1.ReflectionType &&
|
|
31
|
-
context.parameter(props.indexSignature.type.declaration)))),
|
|
17
|
+
props.indexSignatures?.map((index) => renderParamIndexSignature(context, index)),
|
|
32
18
|
props.children?.map((item) => (utils_1.JSX.createElement(utils_1.JSX.Fragment, null, item.signatures ? (utils_1.JSX.createElement("li", { class: "tsd-parameter" },
|
|
33
19
|
utils_1.JSX.createElement("h5", null,
|
|
34
20
|
!!item.flags.isRest && utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, "..."),
|
|
@@ -77,3 +63,17 @@ const parameter = (context, props) => (utils_1.JSX.createElement(utils_1.JSX.Fra
|
|
|
77
63
|
context.commentSummary(item.setSignature),
|
|
78
64
|
context.commentTags(item.setSignature))))))))))));
|
|
79
65
|
exports.parameter = parameter;
|
|
66
|
+
function renderParamIndexSignature(context, index) {
|
|
67
|
+
return (utils_1.JSX.createElement("li", { class: "tsd-parameter-index-signature" },
|
|
68
|
+
utils_1.JSX.createElement("h5", null,
|
|
69
|
+
utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, "["),
|
|
70
|
+
index.parameters.map((item) => (utils_1.JSX.createElement(utils_1.JSX.Fragment, null,
|
|
71
|
+
utils_1.JSX.createElement("span", { class: (0, lib_1.getKindClass)(item) }, item.name),
|
|
72
|
+
": ",
|
|
73
|
+
context.type(item.type)))),
|
|
74
|
+
utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, "]: "),
|
|
75
|
+
context.type(index.type)),
|
|
76
|
+
context.commentSummary(index),
|
|
77
|
+
context.commentTags(index),
|
|
78
|
+
index.type instanceof models_1.ReflectionType && context.parameter(index.type.declaration)));
|
|
79
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.reflectionPreview =
|
|
3
|
+
exports.reflectionPreview = reflectionPreview;
|
|
4
4
|
const models_1 = require("../../../../models");
|
|
5
5
|
const utils_1 = require("../../../../utils");
|
|
6
6
|
const lib_1 = require("../../lib");
|
|
@@ -18,4 +18,3 @@ function reflectionPreview(context, props) {
|
|
|
18
18
|
context.type(new models_1.ReflectionType(props), { topLevelLinks: true })));
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
exports.reflectionPreview = reflectionPreview;
|
|
@@ -8,13 +8,13 @@ const toolbar = (context, props) => (utils_1.JSX.createElement("header", { class
|
|
|
8
8
|
utils_1.JSX.createElement("div", { class: "table-cell", id: "tsd-search", "data-base": context.relativeURL("./") },
|
|
9
9
|
utils_1.JSX.createElement("div", { class: "field" },
|
|
10
10
|
utils_1.JSX.createElement("label", { for: "tsd-search-field", class: "tsd-widget tsd-toolbar-icon search no-caption" }, context.icons.search()),
|
|
11
|
-
utils_1.JSX.createElement("input", { type: "text", id: "tsd-search-field", "aria-label":
|
|
11
|
+
utils_1.JSX.createElement("input", { type: "text", id: "tsd-search-field", "aria-label": context.i18n.theme_search() })),
|
|
12
12
|
utils_1.JSX.createElement("div", { class: "field" },
|
|
13
13
|
utils_1.JSX.createElement("div", { id: "tsd-toolbar-links" }, Object.entries(context.options.getValue("navigationLinks")).map(([label, url]) => (utils_1.JSX.createElement("a", { href: url }, label))))),
|
|
14
14
|
utils_1.JSX.createElement("ul", { class: "results" },
|
|
15
|
-
utils_1.JSX.createElement("li", { class: "state loading" },
|
|
16
|
-
utils_1.JSX.createElement("li", { class: "state failure" },
|
|
15
|
+
utils_1.JSX.createElement("li", { class: "state loading" }, context.i18n.theme_preparing_search_index()),
|
|
16
|
+
utils_1.JSX.createElement("li", { class: "state failure" }, context.i18n.theme_search_index_not_available())),
|
|
17
17
|
utils_1.JSX.createElement("a", { href: context.options.getValue("titleLink") || context.relativeURL("index.html"), class: "title" }, (0, lib_1.getDisplayName)(props.project))),
|
|
18
18
|
utils_1.JSX.createElement("div", { class: "table-cell", id: "tsd-widgets" },
|
|
19
|
-
utils_1.JSX.createElement("a", { href: "#", class: "tsd-widget tsd-toolbar-icon menu no-caption", "data-toggle": "menu", "aria-label":
|
|
19
|
+
utils_1.JSX.createElement("a", { href: "#", class: "tsd-widget tsd-toolbar-icon menu no-caption", "data-toggle": "menu", "aria-label": context.i18n.theme_menu() }, context.icons.menu())))));
|
|
20
20
|
exports.toolbar = toolbar;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DefaultThemeRenderContext } from "../DefaultThemeRenderContext";
|
|
2
|
-
import { Type } from "../../../../models";
|
|
2
|
+
import { type Type } from "../../../../models";
|
|
3
3
|
import { JSX } from "../../../../utils";
|
|
4
4
|
export declare function validateStateIsClean(page: string): void;
|
|
5
5
|
export declare function type(context: DefaultThemeRenderContext, type: Type | undefined, options?: {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.validateStateIsClean = validateStateIsClean;
|
|
4
|
+
exports.type = type;
|
|
4
5
|
const models_1 = require("../../../../models");
|
|
5
6
|
const utils_1 = require("../../../../utils");
|
|
6
7
|
const lib_1 = require("../../lib");
|
|
@@ -59,7 +60,6 @@ function includeIndentation() {
|
|
|
59
60
|
function validateStateIsClean(page) {
|
|
60
61
|
(0, assert_1.ok)(indentationDepth === 0, `Rendering ${page}: Indentation depth increment/decrement not matched: ${indentationDepth}`);
|
|
61
62
|
}
|
|
62
|
-
exports.validateStateIsClean = validateStateIsClean;
|
|
63
63
|
// The type helper accepts an optional needsParens parameter that is checked
|
|
64
64
|
// if an inner type may result in invalid output without them. For example:
|
|
65
65
|
// 1 | 2[] !== (1 | 2)[]
|
|
@@ -262,17 +262,18 @@ const typeRenderers = {
|
|
|
262
262
|
utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, item.flags.isOptional ? "?: " : ": "),
|
|
263
263
|
renderType(context, item.type, models_1.TypeContext.none)));
|
|
264
264
|
}
|
|
265
|
-
if (type.declaration.
|
|
266
|
-
const index
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
265
|
+
if (type.declaration.indexSignatures) {
|
|
266
|
+
for (const index of type.declaration.indexSignatures) {
|
|
267
|
+
members.push(utils_1.JSX.createElement(utils_1.JSX.Fragment, null,
|
|
268
|
+
"[",
|
|
269
|
+
utils_1.JSX.createElement("span", { class: (0, lib_1.getKindClass)(index) }, index.parameters[0].name),
|
|
270
|
+
":",
|
|
271
|
+
" ",
|
|
272
|
+
renderType(context, index.parameters[0].type, models_1.TypeContext.none),
|
|
273
|
+
"]",
|
|
274
|
+
utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, ": "),
|
|
275
|
+
renderType(context, index.type, models_1.TypeContext.none)));
|
|
276
|
+
}
|
|
276
277
|
}
|
|
277
278
|
if (!members.length && type.declaration.signatures?.length === 1) {
|
|
278
279
|
indentationDepth--;
|
|
@@ -362,4 +363,3 @@ function renderType(context, type, where, options = { topLevelLinks: false }) {
|
|
|
362
363
|
function type(context, type, options = { topLevelLinks: false }) {
|
|
363
364
|
return renderType(context, type, models_1.TypeContext.none, options);
|
|
364
365
|
}
|
|
365
|
-
exports.type = type;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { DefaultThemeRenderContext } from "../DefaultThemeRenderContext";
|
|
2
|
-
import { Type } from "../../../../models";
|
|
2
|
+
import { type Type } from "../../../../models";
|
|
3
3
|
import { JSX } from "../../../../utils";
|
|
4
4
|
export declare const typeAndParent: (context: DefaultThemeRenderContext, props: Type) => JSX.Element;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.typeParameters =
|
|
3
|
+
exports.typeParameters = typeParameters;
|
|
4
4
|
const utils_1 = require("../../../../utils");
|
|
5
5
|
function typeParameters(context, typeParameters) {
|
|
6
6
|
return (utils_1.JSX.createElement(utils_1.JSX.Fragment, null,
|
|
7
7
|
utils_1.JSX.createElement("section", { class: "tsd-panel" },
|
|
8
|
-
utils_1.JSX.createElement("h4", null,
|
|
8
|
+
utils_1.JSX.createElement("h4", null, context.i18n.kind_plural_type_parameter()),
|
|
9
9
|
utils_1.JSX.createElement("ul", { class: "tsd-type-parameter-list" }, typeParameters?.map((item) => (utils_1.JSX.createElement("li", null,
|
|
10
10
|
utils_1.JSX.createElement("span", null,
|
|
11
11
|
utils_1.JSX.createElement("a", { id: item.anchor, class: "tsd-anchor" }),
|
|
@@ -23,4 +23,3 @@ function typeParameters(context, typeParameters) {
|
|
|
23
23
|
context.commentSummary(item),
|
|
24
24
|
context.commentTags(item))))))));
|
|
25
25
|
}
|
|
26
|
-
exports.typeParameters = typeParameters;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { DefaultThemeRenderContext } from "../DefaultThemeRenderContext";
|
|
2
|
+
import type { DocumentReflection } from "../../../../models";
|
|
3
|
+
import type { PageEvent } from "../../../events";
|
|
4
|
+
import { JSX } from "../../../../utils";
|
|
5
|
+
export declare const documentTemplate: ({ markdown }: DefaultThemeRenderContext, props: PageEvent<DocumentReflection>) => JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.documentTemplate = void 0;
|
|
4
|
+
const utils_1 = require("../../../../utils");
|
|
5
|
+
const documentTemplate = ({ markdown }, props) => (utils_1.JSX.createElement("div", { class: "tsd-panel tsd-typography" },
|
|
6
|
+
utils_1.JSX.createElement(utils_1.Raw, { html: markdown(props.model.content) })));
|
|
7
|
+
exports.documentTemplate = documentTemplate;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.hierarchyTemplate =
|
|
3
|
+
exports.hierarchyTemplate = hierarchyTemplate;
|
|
4
4
|
const utils_1 = require("../../../../utils");
|
|
5
5
|
const lib_1 = require("../../lib");
|
|
6
6
|
function fullHierarchy(context, root, seen = new Set()) {
|
|
@@ -28,4 +28,3 @@ function hierarchyTemplate(context, props) {
|
|
|
28
28
|
utils_1.JSX.createElement("h2", null, "Class Hierarchy"),
|
|
29
29
|
(0, lib_1.getHierarchyRoots)(props.project).map((root) => (utils_1.JSX.createElement("ul", { class: "tsd-full-hierarchy" }, fullHierarchy(context, root))))));
|
|
30
30
|
}
|
|
31
|
-
exports.hierarchyTemplate = hierarchyTemplate;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DefaultThemeRenderContext } from "../DefaultThemeRenderContext";
|
|
2
2
|
import type { PageEvent } from "../../../events";
|
|
3
|
-
import { ContainerReflection } from "../../../../models";
|
|
3
|
+
import { type ContainerReflection } from "../../../../models";
|
|
4
4
|
import { JSX } from "../../../../utils";
|
|
5
5
|
export declare function reflectionTemplate(context: DefaultThemeRenderContext, props: PageEvent<ContainerReflection>): JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.reflectionTemplate =
|
|
3
|
+
exports.reflectionTemplate = reflectionTemplate;
|
|
4
4
|
const lib_1 = require("../../lib");
|
|
5
5
|
const models_1 = require("../../../../models");
|
|
6
6
|
const utils_1 = require("../../../../utils");
|
|
@@ -25,28 +25,30 @@ function reflectionTemplate(context, props) {
|
|
|
25
25
|
props.model instanceof models_1.DeclarationReflection && (utils_1.JSX.createElement(utils_1.JSX.Fragment, null,
|
|
26
26
|
context.hierarchy(props.model.typeHierarchy),
|
|
27
27
|
!!props.model.implementedTypes && (utils_1.JSX.createElement("section", { class: "tsd-panel" },
|
|
28
|
-
utils_1.JSX.createElement("h4", null,
|
|
28
|
+
utils_1.JSX.createElement("h4", null, context.i18n.theme_implements()),
|
|
29
29
|
utils_1.JSX.createElement("ul", { class: "tsd-hierarchy" }, props.model.implementedTypes.map((item) => (utils_1.JSX.createElement("li", null, context.type(item))))))),
|
|
30
30
|
!!props.model.implementedBy && (utils_1.JSX.createElement("section", { class: "tsd-panel" },
|
|
31
|
-
utils_1.JSX.createElement("h4", null,
|
|
31
|
+
utils_1.JSX.createElement("h4", null, context.i18n.theme_implemented_by()),
|
|
32
32
|
utils_1.JSX.createElement("ul", { class: "tsd-hierarchy" }, props.model.implementedBy.map((item) => (utils_1.JSX.createElement("li", null, context.type(item))))))),
|
|
33
|
-
!!props.model.signatures && (utils_1.JSX.createElement("section", { class: "tsd-panel" }, context.memberSignatures(props.model))),
|
|
34
|
-
!!props.model.
|
|
35
|
-
utils_1.JSX.createElement("h4", { class: "tsd-before-signature" },
|
|
36
|
-
|
|
37
|
-
utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, "["),
|
|
38
|
-
props.model.indexSignature.parameters.map((item) => (utils_1.JSX.createElement(utils_1.JSX.Fragment, null,
|
|
39
|
-
item.name,
|
|
40
|
-
": ",
|
|
41
|
-
context.type(item.type)))),
|
|
42
|
-
utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, "]: "),
|
|
43
|
-
context.type(props.model.indexSignature.type)),
|
|
44
|
-
context.commentSummary(props.model.indexSignature),
|
|
45
|
-
context.commentTags(props.model.indexSignature),
|
|
46
|
-
props.model.indexSignature?.type instanceof models_1.ReflectionType &&
|
|
47
|
-
context.parameter(props.model.indexSignature.type.declaration))),
|
|
33
|
+
!!props.model.signatures?.length && (utils_1.JSX.createElement("section", { class: "tsd-panel" }, context.memberSignatures(props.model))),
|
|
34
|
+
!!props.model.indexSignatures?.length && (utils_1.JSX.createElement("section", { class: (0, lib_1.classNames)({ "tsd-panel": true }, context.getReflectionClasses(props.model)) },
|
|
35
|
+
utils_1.JSX.createElement("h4", { class: "tsd-before-signature" }, context.i18n.theme_indexable()),
|
|
36
|
+
props.model.indexSignatures.map((index) => renderIndexSignature(context, index)))),
|
|
48
37
|
!props.model.signatures && context.memberSources(props.model))),
|
|
49
38
|
!!props.model.children?.length && context.index(props.model),
|
|
50
39
|
context.members(props.model)));
|
|
51
40
|
}
|
|
52
|
-
|
|
41
|
+
function renderIndexSignature(context, index) {
|
|
42
|
+
return (utils_1.JSX.createElement(utils_1.JSX.Fragment, null,
|
|
43
|
+
utils_1.JSX.createElement("div", { class: "tsd-signature" },
|
|
44
|
+
utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, "["),
|
|
45
|
+
index.parameters.map((item) => (utils_1.JSX.createElement(utils_1.JSX.Fragment, null,
|
|
46
|
+
utils_1.JSX.createElement("span", { class: (0, lib_1.getKindClass)(item) }, item.name),
|
|
47
|
+
": ",
|
|
48
|
+
context.type(item.type)))),
|
|
49
|
+
utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, "]: "),
|
|
50
|
+
context.type(index.type)),
|
|
51
|
+
context.commentSummary(index),
|
|
52
|
+
context.commentTags(index),
|
|
53
|
+
index.type instanceof models_1.ReflectionType && context.parameter(index.type.declaration)));
|
|
54
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DefaultThemeRenderContext } from "..";
|
|
2
|
-
import { DeclarationReflection, ProjectReflection, Reflection, TypeParameterReflection } from "../../models";
|
|
2
|
+
import { DeclarationReflection, ProjectReflection, type Reflection, type TypeParameterReflection } from "../../models";
|
|
3
3
|
import { JSX } from "../../utils";
|
|
4
4
|
export declare function stringify(data: unknown): string;
|
|
5
5
|
export declare function getDisplayName(refl: Reflection): string;
|
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.stringify = stringify;
|
|
4
|
+
exports.getDisplayName = getDisplayName;
|
|
5
|
+
exports.toStyleClass = toStyleClass;
|
|
6
|
+
exports.getKindClass = getKindClass;
|
|
7
|
+
exports.wbr = wbr;
|
|
8
|
+
exports.join = join;
|
|
9
|
+
exports.classNames = classNames;
|
|
10
|
+
exports.hasTypeParameters = hasTypeParameters;
|
|
11
|
+
exports.renderTypeParametersSignature = renderTypeParametersSignature;
|
|
12
|
+
exports.camelToTitleCase = camelToTitleCase;
|
|
13
|
+
exports.renderName = renderName;
|
|
14
|
+
exports.getHierarchyRoots = getHierarchyRoots;
|
|
4
15
|
const models_1 = require("../../models");
|
|
5
16
|
const utils_1 = require("../../utils");
|
|
6
17
|
function stringify(data) {
|
|
@@ -9,7 +20,6 @@ function stringify(data) {
|
|
|
9
20
|
}
|
|
10
21
|
return JSON.stringify(data);
|
|
11
22
|
}
|
|
12
|
-
exports.stringify = stringify;
|
|
13
23
|
function getDisplayName(refl) {
|
|
14
24
|
let version = "";
|
|
15
25
|
if ((refl instanceof models_1.DeclarationReflection || refl instanceof models_1.ProjectReflection) && refl.packageVersion) {
|
|
@@ -17,18 +27,15 @@ function getDisplayName(refl) {
|
|
|
17
27
|
}
|
|
18
28
|
return `${refl.name}${version}`;
|
|
19
29
|
}
|
|
20
|
-
exports.getDisplayName = getDisplayName;
|
|
21
30
|
function toStyleClass(str) {
|
|
22
31
|
return str.replace(/(\w)([A-Z])/g, (_m, m1, m2) => m1 + "-" + m2).toLowerCase();
|
|
23
32
|
}
|
|
24
|
-
exports.toStyleClass = toStyleClass;
|
|
25
33
|
function getKindClass(refl) {
|
|
26
34
|
if (refl instanceof models_1.ReferenceReflection) {
|
|
27
35
|
return getKindClass(refl.getTargetReflectionDeep());
|
|
28
36
|
}
|
|
29
37
|
return models_1.ReflectionKind.classString(refl.kind);
|
|
30
38
|
}
|
|
31
|
-
exports.getKindClass = getKindClass;
|
|
32
39
|
/**
|
|
33
40
|
* Insert word break tags ``<wbr>`` into the given string.
|
|
34
41
|
*
|
|
@@ -50,7 +57,6 @@ function wbr(str) {
|
|
|
50
57
|
ret.push(str.slice(i));
|
|
51
58
|
return ret;
|
|
52
59
|
}
|
|
53
|
-
exports.wbr = wbr;
|
|
54
60
|
function join(joiner, list, cb) {
|
|
55
61
|
const result = [];
|
|
56
62
|
for (const item of list) {
|
|
@@ -61,7 +67,6 @@ function join(joiner, list, cb) {
|
|
|
61
67
|
}
|
|
62
68
|
return utils_1.JSX.createElement(utils_1.JSX.Fragment, null, result);
|
|
63
69
|
}
|
|
64
|
-
exports.join = join;
|
|
65
70
|
function classNames(names, extraCss) {
|
|
66
71
|
const css = Object.keys(names)
|
|
67
72
|
.filter((key) => names[key])
|
|
@@ -71,13 +76,11 @@ function classNames(names, extraCss) {
|
|
|
71
76
|
.replace(/\s+/g, " ");
|
|
72
77
|
return css.length ? css : undefined;
|
|
73
78
|
}
|
|
74
|
-
exports.classNames = classNames;
|
|
75
79
|
function hasTypeParameters(reflection) {
|
|
76
80
|
return ((reflection instanceof models_1.DeclarationReflection || reflection instanceof models_1.SignatureReflection) &&
|
|
77
81
|
reflection.typeParameters != null &&
|
|
78
82
|
reflection.typeParameters.length > 0);
|
|
79
83
|
}
|
|
80
|
-
exports.hasTypeParameters = hasTypeParameters;
|
|
81
84
|
function renderTypeParametersSignature(context, typeParameters) {
|
|
82
85
|
if (!typeParameters || typeParameters.length === 0)
|
|
83
86
|
return utils_1.JSX.createElement(utils_1.JSX.Fragment, null);
|
|
@@ -102,18 +105,13 @@ function renderTypeParametersSignature(context, typeParameters) {
|
|
|
102
105
|
context.type(item.type)))))),
|
|
103
106
|
utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, ">")));
|
|
104
107
|
}
|
|
105
|
-
exports.renderTypeParametersSignature = renderTypeParametersSignature;
|
|
106
108
|
function camelToTitleCase(text) {
|
|
107
109
|
return text.substring(0, 1).toUpperCase() + text.substring(1).replace(/[a-z][A-Z]/g, (x) => `${x[0]} ${x[1]}`);
|
|
108
110
|
}
|
|
109
|
-
exports.camelToTitleCase = camelToTitleCase;
|
|
110
111
|
/**
|
|
111
112
|
* Renders the reflection name with an additional `?` if optional.
|
|
112
113
|
*/
|
|
113
114
|
function renderName(refl) {
|
|
114
|
-
if (!refl.name) {
|
|
115
|
-
return utils_1.JSX.createElement("em", null, wbr(models_1.ReflectionKind.singularString(refl.kind)));
|
|
116
|
-
}
|
|
117
115
|
if (refl.flags.isOptional) {
|
|
118
116
|
return utils_1.JSX.createElement(utils_1.JSX.Fragment, null,
|
|
119
117
|
wbr(refl.name),
|
|
@@ -121,7 +119,6 @@ function renderName(refl) {
|
|
|
121
119
|
}
|
|
122
120
|
return wbr(refl.name);
|
|
123
121
|
}
|
|
124
|
-
exports.renderName = renderName;
|
|
125
122
|
function getHierarchyRoots(project) {
|
|
126
123
|
const allClasses = project.getReflectionsByKind(models_1.ReflectionKind.ClassOrInterface);
|
|
127
124
|
const roots = allClasses.filter((refl) => {
|
|
@@ -144,4 +141,3 @@ function getHierarchyRoots(project) {
|
|
|
144
141
|
});
|
|
145
142
|
return roots.sort((a, b) => a.name.localeCompare(b.name));
|
|
146
143
|
}
|
|
147
|
-
exports.getHierarchyRoots = getHierarchyRoots;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Application } from "../application";
|
|
2
|
-
import { ProjectReflection, ReflectionVariant, TypeKindMap } from "../models/index";
|
|
2
|
+
import { ProjectReflection, type ReflectionVariant, type TypeKindMap } from "../models/index";
|
|
3
3
|
import type { Logger } from "../utils/loggers";
|
|
4
4
|
import type { JSONOutput } from "./index";
|
|
5
5
|
export interface DeserializerComponent {
|
|
@@ -11,11 +11,11 @@ export interface Deserializable<T> {
|
|
|
11
11
|
fromObject(d: Deserializer, o: T): void;
|
|
12
12
|
}
|
|
13
13
|
export declare class Deserializer {
|
|
14
|
-
|
|
14
|
+
readonly application: Application;
|
|
15
15
|
private deferred;
|
|
16
16
|
private deserializers;
|
|
17
17
|
private activeReflection;
|
|
18
|
-
constructor(
|
|
18
|
+
constructor(application: Application);
|
|
19
19
|
get logger(): Logger;
|
|
20
20
|
reflectionBuilders: {
|
|
21
21
|
[K in keyof ReflectionVariant]: (parent: NonNullable<ReflectionVariant[K]["parent"]>, obj: JSONOutput.ModelToObject<ReflectionVariant[K]>) => ReflectionVariant[K];
|
|
@@ -5,8 +5,8 @@ const assert_1 = require("assert");
|
|
|
5
5
|
const index_1 = require("../models/index");
|
|
6
6
|
const array_1 = require("../utils/array");
|
|
7
7
|
class Deserializer {
|
|
8
|
-
constructor(
|
|
9
|
-
this.
|
|
8
|
+
constructor(application) {
|
|
9
|
+
this.application = application;
|
|
10
10
|
this.deferred = [];
|
|
11
11
|
this.deserializers = [];
|
|
12
12
|
this.activeReflection = [];
|
|
@@ -14,6 +14,9 @@ class Deserializer {
|
|
|
14
14
|
declaration(parent, obj) {
|
|
15
15
|
return new index_1.DeclarationReflection(obj.name, obj.kind, parent);
|
|
16
16
|
},
|
|
17
|
+
document(parent, obj) {
|
|
18
|
+
return new index_1.DocumentReflection(obj.name, parent, [], {});
|
|
19
|
+
},
|
|
17
20
|
param(parent, obj) {
|
|
18
21
|
return new index_1.ParameterReflection(obj.name, obj.kind, parent);
|
|
19
22
|
},
|
|
@@ -101,7 +104,7 @@ class Deserializer {
|
|
|
101
104
|
this.oldIdToNewId = {};
|
|
102
105
|
}
|
|
103
106
|
get logger() {
|
|
104
|
-
return this.
|
|
107
|
+
return this.application.logger;
|
|
105
108
|
}
|
|
106
109
|
addDeserializer(de) {
|
|
107
110
|
(0, array_1.insertPrioritySorted)(this.deserializers, de);
|
|
@@ -134,13 +137,12 @@ class Deserializer {
|
|
|
134
137
|
return this.reviveProject(projects[0], name);
|
|
135
138
|
}
|
|
136
139
|
const project = new index_1.ProjectReflection(name);
|
|
137
|
-
project.children = [];
|
|
138
140
|
this.project = project;
|
|
139
141
|
for (const proj of projects) {
|
|
140
142
|
(0, assert_1.ok)(this.deferred.length === 0, "Deserializer.defer was called when not deserializing");
|
|
141
143
|
const projModule = new index_1.DeclarationReflection(proj.name, index_1.ReflectionKind.Module, project);
|
|
142
144
|
project.registerReflection(projModule);
|
|
143
|
-
project.
|
|
145
|
+
project.addChild(projModule);
|
|
144
146
|
this.oldIdToNewId = { [proj.id]: projModule.id };
|
|
145
147
|
this.fromObject(projModule, proj);
|
|
146
148
|
const deferred = this.deferred;
|