@apify/docusaurus-plugin-typedoc-api 4.4.12 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -296
- package/lib/components/AnchorLink.d.ts +5 -0
- package/lib/components/AnchorLink.d.ts.map +1 -0
- package/lib/components/AnchorLink.js +7 -26
- package/lib/components/AnchorLink.js.map +1 -1
- package/lib/components/ApiChangelog.d.ts +6 -0
- package/lib/components/ApiChangelog.d.ts.map +1 -0
- package/lib/components/ApiChangelog.js +7 -24
- package/lib/components/ApiChangelog.js.map +1 -1
- package/lib/components/ApiDataContext.d.ts +6 -0
- package/lib/components/ApiDataContext.d.ts.map +1 -0
- package/lib/components/ApiDataContext.js +12 -15
- package/lib/components/ApiDataContext.js.map +1 -1
- package/lib/components/ApiIndex.d.ts +14 -0
- package/lib/components/ApiIndex.d.ts.map +1 -0
- package/lib/components/ApiIndex.js +33 -93
- package/lib/components/ApiIndex.js.map +1 -1
- package/lib/components/ApiItem.d.ts +6 -0
- package/lib/components/ApiItem.d.ts.map +1 -0
- package/lib/components/ApiItem.js +131 -191
- package/lib/components/ApiItem.js.map +1 -1
- package/lib/components/ApiItemLayout.d.ts +14 -0
- package/lib/components/ApiItemLayout.d.ts.map +1 -0
- package/lib/components/ApiItemLayout.js +21 -97
- package/lib/components/ApiItemLayout.js.map +1 -1
- package/lib/components/ApiOptionsContext.d.ts +5 -0
- package/lib/components/ApiOptionsContext.d.ts.map +1 -0
- package/lib/components/ApiOptionsContext.js +5 -9
- package/lib/components/ApiOptionsContext.js.map +1 -1
- package/lib/components/ApiOptionsLayout.d.ts +4 -0
- package/lib/components/ApiOptionsLayout.d.ts.map +1 -0
- package/lib/components/ApiOptionsLayout.js +10 -34
- package/lib/components/ApiOptionsLayout.js.map +1 -1
- package/lib/components/ApiPage.d.ts +11 -0
- package/lib/components/ApiPage.d.ts.map +1 -0
- package/lib/components/ApiPage.js +50 -63
- package/lib/components/ApiPage.js.map +1 -1
- package/lib/components/Breadcrumb.d.ts +7 -0
- package/lib/components/Breadcrumb.d.ts.map +1 -0
- package/lib/components/Breadcrumb.js +17 -49
- package/lib/components/Breadcrumb.js.map +1 -1
- package/lib/components/Comment.d.ts +10 -0
- package/lib/components/Comment.d.ts.map +1 -0
- package/lib/components/Comment.js +33 -60
- package/lib/components/Comment.js.map +1 -1
- package/lib/components/CommentBadges.d.ts +9 -0
- package/lib/components/CommentBadges.d.ts.map +1 -0
- package/lib/components/CommentBadges.js +16 -28
- package/lib/components/CommentBadges.js.map +1 -1
- package/lib/components/DefaultValue.d.ts +10 -0
- package/lib/components/DefaultValue.d.ts.map +1 -0
- package/lib/components/DefaultValue.js +25 -55
- package/lib/components/DefaultValue.js.map +1 -1
- package/lib/components/Flags.d.ts +6 -0
- package/lib/components/Flags.d.ts.map +1 -0
- package/lib/components/Flags.js +11 -22
- package/lib/components/Flags.js.map +1 -1
- package/lib/components/Footer.d.ts +2 -0
- package/lib/components/Footer.d.ts.map +1 -0
- package/lib/components/Footer.js +4 -16
- package/lib/components/Footer.js.map +1 -1
- package/lib/components/Hierarchy.d.ts +6 -0
- package/lib/components/Hierarchy.d.ts.map +1 -0
- package/lib/components/Hierarchy.js +5 -25
- package/lib/components/Hierarchy.js.map +1 -1
- package/lib/components/Icon.d.ts +6 -0
- package/lib/components/Icon.d.ts.map +1 -0
- package/lib/components/Icon.js +10 -21
- package/lib/components/Icon.js.map +1 -1
- package/lib/components/Index.d.ts +9 -0
- package/lib/components/Index.d.ts.map +1 -0
- package/lib/components/Index.js +30 -113
- package/lib/components/Index.js.map +1 -1
- package/lib/components/Markdown.d.ts +5 -0
- package/lib/components/Markdown.d.ts.map +1 -0
- package/lib/components/Markdown.js +138 -202
- package/lib/components/Markdown.js.map +1 -1
- package/lib/components/Member.d.ts +5 -0
- package/lib/components/Member.d.ts.map +1 -0
- package/lib/components/Member.js +40 -69
- package/lib/components/Member.js.map +1 -1
- package/lib/components/MemberDeclaration.d.ts +5 -0
- package/lib/components/MemberDeclaration.d.ts.map +1 -0
- package/lib/components/MemberDeclaration.js +20 -71
- package/lib/components/MemberDeclaration.js.map +1 -1
- package/lib/components/MemberGetterSetter.d.ts +8 -0
- package/lib/components/MemberGetterSetter.d.ts.map +1 -0
- package/lib/components/MemberGetterSetter.js +13 -68
- package/lib/components/MemberGetterSetter.js.map +1 -1
- package/lib/components/MemberReference.d.ts +6 -0
- package/lib/components/MemberReference.d.ts.map +1 -0
- package/lib/components/MemberReference.js +18 -48
- package/lib/components/MemberReference.js.map +1 -1
- package/lib/components/MemberSignatureBody.d.ts +9 -0
- package/lib/components/MemberSignatureBody.d.ts.map +1 -0
- package/lib/components/MemberSignatureBody.js +85 -182
- package/lib/components/MemberSignatureBody.js.map +1 -1
- package/lib/components/MemberSignatureTitle.d.ts +11 -0
- package/lib/components/MemberSignatureTitle.d.ts.map +1 -0
- package/lib/components/MemberSignatureTitle.js +27 -81
- package/lib/components/MemberSignatureTitle.js.map +1 -1
- package/lib/components/MemberSignatures.d.ts +7 -0
- package/lib/components/MemberSignatures.d.ts.map +1 -0
- package/lib/components/MemberSignatures.js +18 -66
- package/lib/components/MemberSignatures.js.map +1 -1
- package/lib/components/MemberSources.d.ts +7 -0
- package/lib/components/MemberSources.d.ts.map +1 -0
- package/lib/components/MemberSources.js +10 -34
- package/lib/components/MemberSources.js.map +1 -1
- package/lib/components/Members.d.ts +6 -0
- package/lib/components/Members.d.ts.map +1 -0
- package/lib/components/Members.js +29 -49
- package/lib/components/Members.js.map +1 -1
- package/lib/components/MembersGroup.d.ts +6 -0
- package/lib/components/MembersGroup.d.ts.map +1 -0
- package/lib/components/MembersGroup.js +16 -40
- package/lib/components/MembersGroup.js.map +1 -1
- package/lib/components/Parameter.d.ts +6 -0
- package/lib/components/Parameter.d.ts.map +1 -0
- package/lib/components/Parameter.js +35 -171
- package/lib/components/Parameter.js.map +1 -1
- package/lib/components/Reflection.d.ts +6 -0
- package/lib/components/Reflection.d.ts.map +1 -0
- package/lib/components/Reflection.js +29 -132
- package/lib/components/Reflection.js.map +1 -1
- package/lib/components/SourceLink.d.ts +10 -0
- package/lib/components/SourceLink.d.ts.map +1 -0
- package/lib/components/SourceLink.js +16 -36
- package/lib/components/SourceLink.js.map +1 -1
- package/lib/components/Type.d.ts +12 -0
- package/lib/components/Type.d.ts.map +1 -0
- package/lib/components/Type.js +142 -464
- package/lib/components/Type.js.map +1 -1
- package/lib/components/TypeAndParent.d.ts +6 -0
- package/lib/components/TypeAndParent.d.ts.map +1 -0
- package/lib/components/TypeAndParent.js +11 -27
- package/lib/components/TypeAndParent.js.map +1 -1
- package/lib/components/TypeParameters.d.ts +6 -0
- package/lib/components/TypeParameters.d.ts.map +1 -0
- package/lib/components/TypeParameters.js +10 -38
- package/lib/components/TypeParameters.js.map +1 -1
- package/lib/components/TypeParametersGeneric.d.ts +6 -0
- package/lib/components/TypeParametersGeneric.d.ts.map +1 -0
- package/lib/components/TypeParametersGeneric.js +8 -27
- package/lib/components/TypeParametersGeneric.js.map +1 -1
- package/lib/components/VersionBanner.d.ts +2 -0
- package/lib/components/VersionBanner.d.ts.map +1 -0
- package/lib/components/VersionBanner.js +18 -49
- package/lib/components/VersionBanner.js.map +1 -1
- package/lib/hooks/useBreadcrumbs.d.ts +2 -0
- package/lib/hooks/useBreadcrumbs.d.ts.map +1 -0
- package/lib/hooks/useBreadcrumbs.js +5 -8
- package/lib/hooks/useBreadcrumbs.js.map +1 -1
- package/lib/hooks/useGitRefName.d.ts +2 -0
- package/lib/hooks/useGitRefName.d.ts.map +1 -0
- package/lib/hooks/useGitRefName.js +5 -8
- package/lib/hooks/useGitRefName.js.map +1 -1
- package/lib/hooks/useMinimalLayout.d.ts +2 -0
- package/lib/hooks/useMinimalLayout.d.ts.map +1 -0
- package/lib/hooks/useMinimalLayout.js +5 -8
- package/lib/hooks/useMinimalLayout.js.map +1 -1
- package/lib/hooks/useReflection.d.ts +4 -0
- package/lib/hooks/useReflection.d.ts.map +1 -0
- package/lib/hooks/useReflection.js +15 -21
- package/lib/hooks/useReflection.js.map +1 -1
- package/lib/hooks/useReflectionMap.d.ts +3 -0
- package/lib/hooks/useReflectionMap.d.ts.map +1 -0
- package/lib/hooks/useReflectionMap.js +5 -8
- package/lib/hooks/useReflectionMap.js.map +1 -1
- package/lib/index.d.ts +4 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +349 -361
- package/lib/index.js.map +1 -1
- package/lib/markdownLoader.d.ts +6 -0
- package/lib/markdownLoader.d.ts.map +1 -0
- package/lib/markdownLoader.js +6 -10
- package/lib/markdownLoader.js.map +1 -1
- package/lib/plugin/data.d.ts +21 -0
- package/lib/plugin/data.d.ts.map +1 -0
- package/lib/plugin/data.js +391 -429
- package/lib/plugin/data.js.map +1 -1
- package/lib/plugin/python/consts.d.ts +35 -0
- package/lib/plugin/python/consts.d.ts.map +1 -0
- package/lib/plugin/python/consts.js +44 -44
- package/lib/plugin/python/consts.js.map +1 -1
- package/lib/plugin/python/index.d.ts +12 -0
- package/lib/plugin/python/index.d.ts.map +1 -0
- package/lib/plugin/python/index.js +25 -36
- package/lib/plugin/python/index.js.map +1 -1
- package/lib/plugin/python/inheritance.d.ts +42 -0
- package/lib/plugin/python/inheritance.d.ts.map +1 -0
- package/lib/plugin/python/inheritance.js +148 -153
- package/lib/plugin/python/inheritance.js.map +1 -1
- package/lib/plugin/python/packageVersions.d.ts +7 -0
- package/lib/plugin/python/packageVersions.d.ts.map +1 -0
- package/lib/plugin/python/packageVersions.js +30 -38
- package/lib/plugin/python/packageVersions.js.map +1 -1
- package/lib/plugin/python/transformation.d.ts +90 -0
- package/lib/plugin/python/transformation.d.ts.map +1 -0
- package/lib/plugin/python/transformation.js +424 -391
- package/lib/plugin/python/transformation.js.map +1 -1
- package/lib/plugin/python/type-parsing/index.d.ts +34 -0
- package/lib/plugin/python/type-parsing/index.d.ts.map +1 -0
- package/lib/plugin/python/type-parsing/index.js +78 -85
- package/lib/plugin/python/type-parsing/index.js.map +1 -1
- package/lib/plugin/python/types.d.ts +107 -0
- package/lib/plugin/python/types.d.ts.map +1 -0
- package/lib/plugin/python/types.js +2 -2
- package/lib/plugin/python/types.js.map +1 -1
- package/lib/plugin/python/utils.d.ts +40 -0
- package/lib/plugin/python/utils.d.ts.map +1 -0
- package/lib/plugin/python/utils.js +74 -73
- package/lib/plugin/python/utils.js.map +1 -1
- package/lib/plugin/sidebar.d.ts +6 -0
- package/lib/plugin/sidebar.d.ts.map +1 -0
- package/lib/plugin/sidebar.js +94 -96
- package/lib/plugin/sidebar.js.map +1 -1
- package/lib/plugin/structure/0.23.d.ts +3 -0
- package/lib/plugin/structure/0.23.d.ts.map +1 -0
- package/lib/plugin/structure/0.23.js +33 -41
- package/lib/plugin/structure/0.23.js.map +1 -1
- package/lib/plugin/url.d.ts +6 -0
- package/lib/plugin/url.d.ts.map +1 -0
- package/lib/plugin/url.js +36 -46
- package/lib/plugin/url.js.map +1 -1
- package/lib/plugin/version.d.ts +5 -0
- package/lib/plugin/version.d.ts.map +1 -0
- package/lib/plugin/version.js +73 -78
- package/lib/plugin/version.js.map +1 -1
- package/lib/types.d.ts +142 -0
- package/lib/types.d.ts.map +1 -0
- package/lib/types.js +2 -2
- package/lib/types.js.map +1 -1
- package/lib/utils/helpers.d.ts +2 -0
- package/lib/utils/helpers.d.ts.map +1 -0
- package/lib/utils/helpers.js +5 -7
- package/lib/utils/helpers.js.map +1 -1
- package/lib/utils/hierarchy.d.ts +8 -0
- package/lib/utils/hierarchy.d.ts.map +1 -0
- package/lib/utils/hierarchy.js +31 -33
- package/lib/utils/hierarchy.js.map +1 -1
- package/lib/utils/icons.d.ts +5 -0
- package/lib/utils/icons.d.ts.map +1 -0
- package/lib/utils/icons.js +82 -114
- package/lib/utils/icons.js.map +1 -1
- package/lib/utils/links.d.ts +2 -0
- package/lib/utils/links.d.ts.map +1 -0
- package/lib/utils/links.js +24 -41
- package/lib/utils/links.js.map +1 -1
- package/lib/utils/markdown.d.ts +4 -0
- package/lib/utils/markdown.d.ts.map +1 -0
- package/lib/utils/markdown.js +45 -54
- package/lib/utils/markdown.js.map +1 -1
- package/lib/utils/reexports.d.ts +5 -0
- package/lib/utils/reexports.d.ts.map +1 -0
- package/lib/utils/reexports.js +90 -90
- package/lib/utils/reexports.js.map +1 -1
- package/lib/utils/removeScopes.d.ts +2 -0
- package/lib/utils/removeScopes.d.ts.map +1 -0
- package/lib/utils/removeScopes.js +7 -0
- package/lib/utils/removeScopes.js.map +1 -0
- package/lib/utils/visibility.d.ts +6 -0
- package/lib/utils/visibility.d.ts.map +1 -0
- package/lib/utils/visibility.js +14 -19
- package/lib/utils/visibility.js.map +1 -1
- package/package.json +29 -17
- package/python-scripts/docspec-gen/google_docstring_processor.py +54 -20
- package/src/components/ApiIndex.tsx +1 -1
- package/src/index.ts +2 -2
- package/src/plugin/data.ts +3 -3
- package/src/plugin/python/index.ts +3 -3
- package/src/plugin/python/packageVersions.ts +3 -3
- package/src/plugin/python/transformation.ts +89 -15
- package/src/plugin/python/types.ts +3 -4
- package/src/plugin/sidebar.ts +1 -1
- package/src/plugin/url.ts +1 -1
- package/src/plugin/version.ts +1 -1
- package/src/utils/links.ts +1 -12
- package/src/utils/removeScopes.ts +10 -0
- /package/{assets/styles-8ad572ec.css → lib/components/styles.css} +0 -0
package/lib/plugin/url.js
CHANGED
|
@@ -1,49 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const _interopDefault = e => e && e.__esModule ? e : {
|
|
6
|
-
default: e
|
|
7
|
-
};
|
|
8
|
-
const path__default = /*#__PURE__*/_interopDefault(path);
|
|
9
|
-
function joinUrl(...paths) {
|
|
10
|
-
return path__default.default.join(...paths).replace(/\\/g, '/');
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { ReflectionKind } from 'typedoc';
|
|
3
|
+
export function joinUrl(...paths) {
|
|
4
|
+
return path.join(...paths).replace(/\\/g, '/');
|
|
11
5
|
}
|
|
12
|
-
function getKindSlug(decl) {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
6
|
+
export function getKindSlug(decl) {
|
|
7
|
+
switch (decl.kind) {
|
|
8
|
+
case ReflectionKind.Module:
|
|
9
|
+
return 'package';
|
|
10
|
+
case ReflectionKind.Namespace:
|
|
11
|
+
return 'namespace';
|
|
12
|
+
case ReflectionKind.Enum:
|
|
13
|
+
return 'enum';
|
|
14
|
+
case ReflectionKind.Function:
|
|
15
|
+
return 'function';
|
|
16
|
+
case ReflectionKind.Class:
|
|
17
|
+
return 'class';
|
|
18
|
+
case ReflectionKind.Interface:
|
|
19
|
+
return 'interface';
|
|
20
|
+
default:
|
|
21
|
+
return '';
|
|
22
|
+
}
|
|
29
23
|
}
|
|
30
|
-
function getPackageSlug(pkgConfig, importPath, isSinglePackage) {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
return `${slug}-${importName}`;
|
|
24
|
+
export function getPackageSlug(pkgConfig, importPath, isSinglePackage) {
|
|
25
|
+
var _a;
|
|
26
|
+
// Monorepo with 1 package has special handling
|
|
27
|
+
if (isSinglePackage && pkgConfig.packageSlug !== '.') {
|
|
28
|
+
return '.';
|
|
29
|
+
}
|
|
30
|
+
// packages/foo -> foo
|
|
31
|
+
const slug = (_a = pkgConfig.packageSlug) !== null && _a !== void 0 ? _a : path.basename(pkgConfig.packagePath);
|
|
32
|
+
// bar/baz -> bar-baz
|
|
33
|
+
const importName = importPath.replace(/\\/g, '-');
|
|
34
|
+
if (importName === 'index') {
|
|
35
|
+
return slug;
|
|
36
|
+
}
|
|
37
|
+
return `${slug}-${importName}`;
|
|
45
38
|
}
|
|
46
|
-
|
|
47
|
-
exports.getPackageSlug = getPackageSlug;
|
|
48
|
-
exports.joinUrl = joinUrl;
|
|
49
|
-
//# sourceMappingURL=url.js.map
|
|
39
|
+
//# sourceMappingURL=url.js.map
|
package/lib/plugin/url.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"url.js","sources":["../../src/plugin/url.ts"],"
|
|
1
|
+
{"version":3,"file":"url.js","sourceRoot":"","sources":["../../src/plugin/url.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAc,cAAc,EAAE,MAAM,SAAS,CAAC;AAGrD,MAAM,UAAU,OAAO,CAAC,GAAG,KAAe;IACzC,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AAChD,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,IAAsC;IACjE,QAAQ,IAAI,CAAC,IAAI,EAAE,CAAC;QACnB,KAAK,cAAc,CAAC,MAAM;YACzB,OAAO,SAAS,CAAC;QAClB,KAAK,cAAc,CAAC,SAAS;YAC5B,OAAO,WAAW,CAAC;QACpB,KAAK,cAAc,CAAC,IAAI;YACvB,OAAO,MAAM,CAAC;QACf,KAAK,cAAc,CAAC,QAAQ;YAC3B,OAAO,UAAU,CAAC;QACnB,KAAK,cAAc,CAAC,KAAK;YACxB,OAAO,OAAO,CAAC;QAChB,KAAK,cAAc,CAAC,SAAS;YAC5B,OAAO,WAAW,CAAC;QACpB;YACC,OAAO,EAAE,CAAC;IACZ,CAAC;AACF,CAAC;AAED,MAAM,UAAU,cAAc,CAC7B,SAAgC,EAChC,UAAkB,EAClB,eAAwB;;IAExB,+CAA+C;IAC/C,IAAI,eAAe,IAAI,SAAS,CAAC,WAAW,KAAK,GAAG,EAAE,CAAC;QACtD,OAAO,GAAG,CAAC;IACZ,CAAC;IAED,sBAAsB;IACtB,MAAM,IAAI,GAAG,MAAA,SAAS,CAAC,WAAW,mCAAI,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IAE3E,qBAAqB;IACrB,MAAM,UAAU,GAAG,UAAU,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAElD,IAAI,UAAU,KAAK,OAAO,EAAE,CAAC;QAC5B,OAAO,IAAI,CAAC;IACb,CAAC;IAED,OAAO,GAAG,IAAI,IAAI,UAAU,EAAE,CAAC;AAChC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { LoadContext } from '@docusaurus/types';
|
|
2
|
+
import type { DocusaurusPluginTypeDocApiOptions, VersionMetadata } from '../types';
|
|
3
|
+
export declare function getVersionedDocsDirPath(siteDir: string, pluginId: string): string;
|
|
4
|
+
export declare function readVersionsMetadata(context: LoadContext, options: DocusaurusPluginTypeDocApiOptions): Promise<VersionMetadata[]>;
|
|
5
|
+
//# sourceMappingURL=version.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/plugin/version.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,OAAO,KAAK,EAAE,iCAAiC,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAInF,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAKjF;AA2DD,wBAAsB,oBAAoB,CACzC,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,iCAAiC,GACxC,OAAO,CAAC,eAAe,EAAE,CAAC,CAiC5B"}
|
package/lib/plugin/version.js
CHANGED
|
@@ -1,84 +1,79 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
6
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
7
|
-
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
8
|
-
const path = require('node:path');
|
|
9
|
-
const server = require('@docusaurus/plugin-content-docs/server');
|
|
10
|
-
const utils = require('@docusaurus/utils');
|
|
11
|
-
const _interopDefault = e => e && e.__esModule ? e : {
|
|
12
|
-
default: e
|
|
13
|
-
};
|
|
14
|
-
const path__default = /*#__PURE__*/_interopDefault(path);
|
|
15
|
-
|
|
16
1
|
// BASED ON: https://github.com/facebook/docusaurus/blob/main/packages/docusaurus-plugin-content-docs/src/versions.ts
|
|
17
|
-
|
|
18
|
-
function
|
|
19
|
-
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
import path from 'node:path';
|
|
12
|
+
import { CURRENT_VERSION_NAME, filterVersions, getDefaultVersionBanner, readVersionNames, VERSIONED_DOCS_DIR, } from '@docusaurus/plugin-content-docs/server';
|
|
13
|
+
import { DEFAULT_PLUGIN_ID, normalizeUrl } from '@docusaurus/utils';
|
|
14
|
+
export function getVersionedDocsDirPath(siteDir, pluginId) {
|
|
15
|
+
return path.join(siteDir, pluginId === DEFAULT_PLUGIN_ID ? VERSIONED_DOCS_DIR : `${pluginId}_${VERSIONED_DOCS_DIR}`);
|
|
20
16
|
}
|
|
21
17
|
function getDefaultLastVersionName(versionNames) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
var _a;
|
|
19
|
+
if (versionNames.length === 1) {
|
|
20
|
+
return versionNames[0];
|
|
21
|
+
}
|
|
22
|
+
return (_a = versionNames.find((versionName) => versionName !== CURRENT_VERSION_NAME)) !== null && _a !== void 0 ? _a : '';
|
|
26
23
|
}
|
|
27
|
-
function createVersionMetadata({
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
};
|
|
24
|
+
function createVersionMetadata({ versionName, versionNames, lastVersionName, context, options, }) {
|
|
25
|
+
var _a, _b, _c, _d, _e, _f;
|
|
26
|
+
const isLast = versionName === lastVersionName;
|
|
27
|
+
const versionOptions = (_a = options.versions[versionName]) !== null && _a !== void 0 ? _a : {};
|
|
28
|
+
const versionLabel = ((_b = versionOptions.label) !== null && _b !== void 0 ? _b : versionName === CURRENT_VERSION_NAME) ? 'Next' : versionName;
|
|
29
|
+
let versionPathPart = ((_c = versionOptions.path) !== null && _c !== void 0 ? _c : versionName === CURRENT_VERSION_NAME) ? 'next' : versionName;
|
|
30
|
+
if (isLast) {
|
|
31
|
+
versionPathPart = '';
|
|
32
|
+
}
|
|
33
|
+
const versionPath = normalizeUrl([
|
|
34
|
+
context.siteConfig.baseUrl,
|
|
35
|
+
(_d = options.routeBasePath) !== null && _d !== void 0 ? _d : 'api',
|
|
36
|
+
versionPathPart,
|
|
37
|
+
]);
|
|
38
|
+
return {
|
|
39
|
+
isLast: versionName === lastVersionName,
|
|
40
|
+
routePriority: versionPathPart === '' ? -1 : undefined,
|
|
41
|
+
versionBadge: (_e = versionOptions === null || versionOptions === void 0 ? void 0 : versionOptions.badge) !== null && _e !== void 0 ? _e : versionNames.length !== 1,
|
|
42
|
+
versionBanner: getDefaultVersionBanner({
|
|
43
|
+
context,
|
|
44
|
+
lastVersionName,
|
|
45
|
+
// @ts-expect-error Ignore internal options
|
|
46
|
+
options,
|
|
47
|
+
versionName,
|
|
48
|
+
versionNames,
|
|
49
|
+
}),
|
|
50
|
+
versionClassName: (_f = versionOptions === null || versionOptions === void 0 ? void 0 : versionOptions.className) !== null && _f !== void 0 ? _f : `api-version-${versionName}`,
|
|
51
|
+
versionLabel,
|
|
52
|
+
versionName,
|
|
53
|
+
versionPath,
|
|
54
|
+
};
|
|
59
55
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
56
|
+
export function readVersionsMetadata(context, options) {
|
|
57
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
+
var _a, _b, _c;
|
|
59
|
+
// Docusaurus internals require *every* option, but the versioning
|
|
60
|
+
// does not actually use them. We are casting the types here to
|
|
61
|
+
// ignore all the missing properties.
|
|
62
|
+
const specialOptions = options;
|
|
63
|
+
const versionNamesUnfiltered = yield readVersionNames(context.siteDir, Object.assign(Object.assign({}, specialOptions), { disableVersioning: (_a = options.disableVersioning) !== null && _a !== void 0 ? _a : false, id: (_b = options.id) !== null && _b !== void 0 ? _b : 'default', includeCurrentVersion: (_c = options.includeCurrentVersion) !== null && _c !== void 0 ? _c : true }));
|
|
64
|
+
const versionNames = filterVersions(versionNamesUnfiltered, Object.assign(Object.assign({}, specialOptions), { onlyIncludeVersions: options.onlyIncludeVersions && options.onlyIncludeVersions.length > 0
|
|
65
|
+
? options.onlyIncludeVersions
|
|
66
|
+
: undefined }));
|
|
67
|
+
const lastVersionName = options.lastVersion
|
|
68
|
+
? options.lastVersion
|
|
69
|
+
: getDefaultLastVersionName(versionNames);
|
|
70
|
+
return versionNames.map((versionName) => createVersionMetadata({
|
|
71
|
+
context,
|
|
72
|
+
lastVersionName,
|
|
73
|
+
options,
|
|
74
|
+
versionName,
|
|
75
|
+
versionNames,
|
|
76
|
+
}));
|
|
77
|
+
});
|
|
81
78
|
}
|
|
82
|
-
|
|
83
|
-
exports.readVersionsMetadata = readVersionsMetadata;
|
|
84
|
-
//# sourceMappingURL=version.js.map
|
|
79
|
+
//# sourceMappingURL=version.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sources":["../../src/plugin/version.ts"],"
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/plugin/version.ts"],"names":[],"mappings":"AAAA,qHAAqH;;;;;;;;;;AAErH,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EACN,oBAAoB,EACpB,cAAc,EACd,uBAAuB,EACvB,gBAAgB,EAChB,kBAAkB,GAClB,MAAM,wCAAwC,CAAC;AAEhD,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAKpE,MAAM,UAAU,uBAAuB,CAAC,OAAe,EAAE,QAAgB;IACxE,OAAO,IAAI,CAAC,IAAI,CACf,OAAO,EACP,QAAQ,KAAK,iBAAiB,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,GAAG,QAAQ,IAAI,kBAAkB,EAAE,CACzF,CAAC;AACH,CAAC;AAED,SAAS,yBAAyB,CAAC,YAAsB;;IACxD,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC/B,OAAO,YAAY,CAAC,CAAC,CAAC,CAAC;IACxB,CAAC;IAED,OAAO,MAAA,YAAY,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,WAAW,KAAK,oBAAoB,CAAC,mCAAI,EAAE,CAAC;AACvF,CAAC;AAED,SAAS,qBAAqB,CAAC,EAC9B,WAAW,EACX,YAAY,EACZ,eAAe,EACf,OAAO,EACP,OAAO,GAOP;;IACA,MAAM,MAAM,GAAG,WAAW,KAAK,eAAe,CAAC;IAC/C,MAAM,cAAc,GAAG,MAAA,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,mCAAI,EAAE,CAAC;IAC3D,MAAM,YAAY,GACjB,CAAC,MAAA,cAAc,CAAC,KAAK,mCAAI,WAAW,KAAK,oBAAoB,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,CAA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AAO,CAAC,qBAAqB,mCAAI,IAAI,IAC3D,CAAC;QACH,MAAM,YAAY,GAAG,cAAc,CAAC,sBAAsB,kCACtD,cAAc,KACjB,mBAAmB,EAClB,OAAO,CAAC,mBAAmB,IAAI,OAAO,CAAC,mBAAmB,CAAC,MAAM,GAAG,CAAC;gBACpE,CAAC,CAAC,OAAO,CAAC,mBAAmB;gBAC7B,CAAC,CAAC,SAAS,IACZ,CAAC;QACH,MAAM,eAAe,GAAG,OAAO,CAAC,WAAW;YAC1C,CAAC,CAAC,OAAO,CAAC,WAAW;YACrB,CAAC,CAAC,yBAAyB,CAAC,YAAY,CAAC,CAAC;QAE3C,OAAO,YAAY,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE,CACvC,qBAAqB,CAAC;YACrB,OAAO;YACP,eAAe;YACf,OAAO;YACP,WAAW;YACX,YAAY;SACZ,CAAC,CACF,CAAC;IACH,CAAC;CAAA"}
|
package/lib/types.d.ts
ADDED
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import type { JSONOutput, TypeDocOptions } from 'typedoc';
|
|
2
|
+
import type { MDXPlugin } from '@docusaurus/mdx-loader';
|
|
3
|
+
import type { PropSidebarItem, VersionBanner, VersionsOptions } from '@docusaurus/plugin-content-docs';
|
|
4
|
+
export type { VersionBanner };
|
|
5
|
+
export interface TypedocJSONFile {
|
|
6
|
+
children: TypedocJSONFile[];
|
|
7
|
+
groups: {
|
|
8
|
+
title: string;
|
|
9
|
+
children: number[];
|
|
10
|
+
}[];
|
|
11
|
+
}
|
|
12
|
+
export interface DocusaurusPluginTypeDocApiOptions extends Omit<VersionsOptions, 'disableVersioning' | 'includeCurrentVersion'> {
|
|
13
|
+
banner?: string;
|
|
14
|
+
breadcrumbs?: boolean;
|
|
15
|
+
changelogName?: string;
|
|
16
|
+
changelogs?: boolean;
|
|
17
|
+
gitRefName?: string;
|
|
18
|
+
debug?: boolean;
|
|
19
|
+
exclude?: string[];
|
|
20
|
+
id?: string;
|
|
21
|
+
minimal?: boolean;
|
|
22
|
+
packageJsonName?: string;
|
|
23
|
+
packages: (PackageConfig | string)[];
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated Use `pythonOptions` and the bundled transformation script instead.
|
|
26
|
+
*/
|
|
27
|
+
pathToCurrentVersionTypedocJSON?: string;
|
|
28
|
+
projectRoot: string;
|
|
29
|
+
readmeName?: string;
|
|
30
|
+
readmes?: boolean;
|
|
31
|
+
removeScopes?: string[];
|
|
32
|
+
sortPackages?: (a: PackageReflectionGroup, d: PackageReflectionGroup) => number;
|
|
33
|
+
sortSidebar?: (a: string, d: string) => number;
|
|
34
|
+
tsconfigName?: string;
|
|
35
|
+
typedocOptions?: Partial<TypeDocOptions>;
|
|
36
|
+
/**
|
|
37
|
+
* Enables the Python-specific rendering patches.
|
|
38
|
+
* If `pythonOptions` is specified, this is automatically set to `true`.
|
|
39
|
+
*/
|
|
40
|
+
python: boolean;
|
|
41
|
+
pythonOptions: {
|
|
42
|
+
moduleShortcutsPath?: string;
|
|
43
|
+
pythonModulePath?: string;
|
|
44
|
+
};
|
|
45
|
+
remarkPlugins: MDXPlugin[];
|
|
46
|
+
rehypePlugins: MDXPlugin[];
|
|
47
|
+
disableVersioning?: boolean;
|
|
48
|
+
includeCurrentVersion?: boolean;
|
|
49
|
+
routeBasePath?: string;
|
|
50
|
+
reexports: {
|
|
51
|
+
url: string;
|
|
52
|
+
group?: string;
|
|
53
|
+
}[];
|
|
54
|
+
}
|
|
55
|
+
export interface GlobalData {
|
|
56
|
+
isPython: boolean;
|
|
57
|
+
}
|
|
58
|
+
export interface PackageEntryConfig {
|
|
59
|
+
label: string;
|
|
60
|
+
path: string;
|
|
61
|
+
}
|
|
62
|
+
export interface PackageConfig {
|
|
63
|
+
path: string;
|
|
64
|
+
entry?: Record<string, PackageEntryConfig | string> | string;
|
|
65
|
+
slug?: string;
|
|
66
|
+
}
|
|
67
|
+
export interface ResolvedPackageConfig {
|
|
68
|
+
entryPoints: Record<string, PackageEntryConfig>;
|
|
69
|
+
packageRoot: string;
|
|
70
|
+
packagePath: string;
|
|
71
|
+
packageSlug: string;
|
|
72
|
+
packageName: string;
|
|
73
|
+
packageVersion: string;
|
|
74
|
+
}
|
|
75
|
+
export interface VersionMetadata {
|
|
76
|
+
versionName: string;
|
|
77
|
+
versionLabel: string;
|
|
78
|
+
versionPath: string;
|
|
79
|
+
versionBadge: boolean;
|
|
80
|
+
versionBanner: VersionBanner | null;
|
|
81
|
+
versionClassName: string;
|
|
82
|
+
isLast: boolean;
|
|
83
|
+
routePriority: number | undefined;
|
|
84
|
+
}
|
|
85
|
+
export interface LoadedVersion extends VersionMetadata {
|
|
86
|
+
packages: PackageReflectionGroup[];
|
|
87
|
+
sidebars: SidebarItem[];
|
|
88
|
+
}
|
|
89
|
+
export interface LoadedContent {
|
|
90
|
+
loadedVersions: LoadedVersion[];
|
|
91
|
+
}
|
|
92
|
+
export type SidebarItem = PropSidebarItem;
|
|
93
|
+
export interface ApiOptions {
|
|
94
|
+
banner: string;
|
|
95
|
+
breadcrumbs: boolean;
|
|
96
|
+
gitRefName: string;
|
|
97
|
+
minimal: boolean;
|
|
98
|
+
pluginId: string;
|
|
99
|
+
scopes: string[];
|
|
100
|
+
}
|
|
101
|
+
export interface TOCItem {
|
|
102
|
+
readonly value: string;
|
|
103
|
+
readonly id: string;
|
|
104
|
+
readonly level: number;
|
|
105
|
+
}
|
|
106
|
+
export interface PackageReflectionGroupEntry {
|
|
107
|
+
index: boolean;
|
|
108
|
+
label: string;
|
|
109
|
+
reflection: TSDDeclarationReflection;
|
|
110
|
+
urlSlug: string;
|
|
111
|
+
}
|
|
112
|
+
export interface PackageReflectionGroup {
|
|
113
|
+
entryPoints: PackageReflectionGroupEntry[];
|
|
114
|
+
packageName: string;
|
|
115
|
+
packageVersion: string;
|
|
116
|
+
changelogPath?: string;
|
|
117
|
+
readmePath?: string;
|
|
118
|
+
}
|
|
119
|
+
export interface ApiMetadata {
|
|
120
|
+
id: number;
|
|
121
|
+
name: string;
|
|
122
|
+
permalink: string;
|
|
123
|
+
previousId?: number;
|
|
124
|
+
nextId?: number;
|
|
125
|
+
}
|
|
126
|
+
export interface TSDReflection extends Omit<JSONOutput.Reflection, 'signatures'>, ApiMetadata {
|
|
127
|
+
signatures: TSDSignatureReflection[];
|
|
128
|
+
parentId?: number;
|
|
129
|
+
}
|
|
130
|
+
export interface TSDDeclarationReflection extends Omit<JSONOutput.DeclarationReflection, 'children' | 'signatures'>, ApiMetadata {
|
|
131
|
+
children?: TSDDeclarationReflection[];
|
|
132
|
+
signatures: TSDSignatureReflection[];
|
|
133
|
+
}
|
|
134
|
+
export type TSDDeclarationReflectionMap = Record<number, TSDDeclarationReflection>;
|
|
135
|
+
export interface TSDSignatureReflection extends JSONOutput.SignatureReflection {
|
|
136
|
+
}
|
|
137
|
+
declare global {
|
|
138
|
+
var typedocBuild: {
|
|
139
|
+
count: number;
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EACX,eAAe,EACf,aAAa,EACb,eAAe,EACf,MAAM,iCAAiC,CAAC;AAEzC,YAAY,EAAE,aAAa,EAAE,CAAC;AAE9B,MAAM,WAAW,eAAe;IAC5B,QAAQ,EAAE,eAAe,EAAE,CAAC;IAC5B,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;KAAE,EAAE,CAAC;CACnD;AAED,MAAM,WAAW,iCAChB,SAAQ,IAAI,CAAC,eAAe,EAAE,mBAAmB,GAAG,uBAAuB,CAAC;IAC5E,MAA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IACtC,UAAU,EAAE,sBAAsB,EAAE,CAAC;CACrC;AAED,MAAM,MAAM,2BAA2B,GAAG,MAAM,CAAC,MAAM,EAAE,wBAAwB,CAAC,CAAC;AAEnF,MAAM,WAAW,sBAAuB,SAAQ,UAAU,CAAC,mBAAmB;CAE7E;AAED,OAAO,CAAC,MAAM,CAAC;IAEd,IAAI,YAAY,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;CACpC"}
|
package/lib/types.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
//# sourceMappingURL=types.js.map
|
|
1
|
+
export {};
|
|
2
|
+
//# sourceMappingURL=types.js.map
|
package/lib/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sources":[
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/utils/helpers.ts"],"names":[],"mappings":"AAAA,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAG7D"}
|
package/lib/utils/helpers.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
return value?.replace('<', '<').replace('>', '>') ?? null;
|
|
1
|
+
export function escapeMdx(value) {
|
|
2
|
+
var _a;
|
|
3
|
+
// New values are unicode!
|
|
4
|
+
return (_a = value === null || value === void 0 ? void 0 : value.replace('<', '<').replace('>', '>')) !== null && _a !== void 0 ? _a : null;
|
|
6
5
|
}
|
|
7
|
-
|
|
8
|
-
//# sourceMappingURL=helpers.js.map
|
|
6
|
+
//# sourceMappingURL=helpers.js.map
|
package/lib/utils/helpers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sources":["../../src/utils/helpers.ts"],"
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/utils/helpers.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,SAAS,CAAC,KAAoB;;IAC7C,0BAA0B;IAC1B,OAAO,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,mCAAI,IAAI,CAAC;AAC3D,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { JSONOutput } from 'typedoc';
|
|
2
|
+
export interface HierarchyNode {
|
|
3
|
+
types: JSONOutput.SomeType[];
|
|
4
|
+
next?: HierarchyNode;
|
|
5
|
+
isTarget?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare function createHierarchy(reflection: JSONOutput.Reflection): HierarchyNode;
|
|
8
|
+
//# sourceMappingURL=hierarchy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hierarchy.d.ts","sourceRoot":"","sources":["../../src/utils/hierarchy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,MAAM,WAAW,aAAa;IAC7B,KAAK,EAAE,UAAU,CAAC,QAAQ,EAAE,CAAC;IAC7B,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAID,wBAAgB,eAAe,CAAC,UAAU,EAAE,UAAU,CAAC,UAAU,iBAuChE"}
|
package/lib/utils/hierarchy.js
CHANGED
|
@@ -1,38 +1,36 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
1
|
// The JSON output does not include hierarchy information, so we need to duplicate the logic!
|
|
4
2
|
// https://github.com/TypeStrong/typedoc/blob/master/src/lib/converter/plugins/TypePlugin.ts#L98
|
|
5
|
-
function createHierarchy(reflection) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
export function createHierarchy(reflection) {
|
|
4
|
+
let root;
|
|
5
|
+
let hierarchy;
|
|
6
|
+
function push(types) {
|
|
7
|
+
if (!types) {
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
const level = { types };
|
|
11
|
+
if (hierarchy) {
|
|
12
|
+
hierarchy.next = level;
|
|
13
|
+
hierarchy = level;
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
root = level;
|
|
17
|
+
hierarchy = level;
|
|
18
|
+
}
|
|
11
19
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
};
|
|
15
|
-
if (hierarchy) {
|
|
16
|
-
hierarchy.next = level;
|
|
17
|
-
hierarchy = level;
|
|
18
|
-
} else {
|
|
19
|
-
root = level;
|
|
20
|
-
hierarchy = level;
|
|
20
|
+
if ('extendedTypes' in reflection && reflection.extendedTypes) {
|
|
21
|
+
push(reflection.extendedTypes);
|
|
21
22
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
return root;
|
|
23
|
+
push([
|
|
24
|
+
{
|
|
25
|
+
name: reflection.name,
|
|
26
|
+
target: reflection.id,
|
|
27
|
+
type: 'reference',
|
|
28
|
+
},
|
|
29
|
+
]);
|
|
30
|
+
hierarchy.isTarget = true;
|
|
31
|
+
if ('extendedBy' in reflection && reflection.extendedBy) {
|
|
32
|
+
push(reflection.extendedBy);
|
|
33
|
+
}
|
|
34
|
+
return root;
|
|
36
35
|
}
|
|
37
|
-
|
|
38
|
-
//# sourceMappingURL=hierarchy.js.map
|
|
36
|
+
//# sourceMappingURL=hierarchy.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hierarchy.js","sources":["../../src/utils/hierarchy.ts"],"
|
|
1
|
+
{"version":3,"file":"hierarchy.js","sourceRoot":"","sources":["../../src/utils/hierarchy.ts"],"names":[],"mappings":"AAQA,6FAA6F;AAC7F,gGAAgG;AAChG,MAAM,UAAU,eAAe,CAAC,UAAiC;IAChE,IAAI,IAAoB,CAAC;IACzB,IAAI,SAAyB,CAAC;IAE9B,SAAS,IAAI,CAAC,KAA6B;QAC1C,IAAI,CAAC,KAAK,EAAE,CAAC;YACZ,OAAO;QACR,CAAC;QAED,MAAM,KAAK,GAAkB,EAAE,KAAK,EAAE,CAAC;QAEvC,IAAI,SAAS,EAAE,CAAC;YACf,SAAS,CAAC,IAAI,GAAG,KAAK,CAAC;YACvB,SAAS,GAAG,KAAK,CAAC;QACnB,CAAC;aAAM,CAAC;YACP,IAAI,GAAG,KAAK,CAAC;YACb,SAAS,GAAG,KAAK,CAAC;QACnB,CAAC;IACF,CAAC;IAED,IAAI,eAAe,IAAI,UAAU,IAAI,UAAU,CAAC,aAAa,EAAE,CAAC;QAC/D,IAAI,CAAE,UAA+C,CAAC,aAAa,CAAC,CAAC;IACtE,CAAC;IAED,IAAI,CAAC;QACJ;YACC,IAAI,EAAE,UAAU,CAAC,IAAI;YACrB,MAAM,EAAE,UAAU,CAAC,EAAE;YACrB,IAAI,EAAE,WAAW;SACjB;KACD,CAAC,CAAC;IAEH,SAAS,CAAC,QAAQ,GAAG,IAAI,CAAC;IAE1B,IAAI,YAAY,IAAI,UAAU,IAAI,UAAU,CAAC,UAAU,EAAE,CAAC;QACzD,IAAI,CAAE,UAA+C,CAAC,UAAU,CAAC,CAAC;IACnE,CAAC;IAED,OAAO,IAAI,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ReflectionKind } from 'typedoc';
|
|
2
|
+
export declare function getKindIcon(kind: ReflectionKind, name?: string): string | null;
|
|
3
|
+
export declare function getKindIconColor(kind: ReflectionKind): string;
|
|
4
|
+
export declare function getKindIconHtml(kind: ReflectionKind, name: string): string;
|
|
5
|
+
//# sourceMappingURL=icons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../src/utils/icons.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AA+B9C,wBAAgB,WAAW,CAAC,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAW9E;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,cAAc,GAAG,MAAM,CA6C7D;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAU1E"}
|