@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
|
@@ -1,98 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const jsxRuntime = require('react/jsx-runtime');
|
|
10
|
-
const _interopDefault = e => e && e.__esModule ? e : {
|
|
11
|
-
default: e
|
|
12
|
-
};
|
|
13
|
-
const Link__default = /*#__PURE__*/_interopDefault(Link);
|
|
14
|
-
const Heading__default = /*#__PURE__*/_interopDefault(Heading);
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect } from 'react';
|
|
3
|
+
import Link from '@docusaurus/Link';
|
|
4
|
+
import { useDocsPreferredVersion, useDocsVersion } from '@docusaurus/plugin-content-docs/client';
|
|
5
|
+
import Heading from '@theme/Heading';
|
|
6
|
+
import { removeScopes } from '../utils/removeScopes';
|
|
7
|
+
import { VersionBanner } from './VersionBanner';
|
|
8
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
15
9
|
const foo = {};
|
|
16
10
|
function addVersionToUrl(url, latestVersion, preferredVersion) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
11
|
+
if (!url.match(/api\/([\d.]+)/) &&
|
|
12
|
+
!url.includes('api/next') &&
|
|
13
|
+
preferredVersion &&
|
|
14
|
+
preferredVersion.name !== latestVersion.version) {
|
|
15
|
+
const version = preferredVersion.name === 'current' ? 'next' : preferredVersion.name;
|
|
16
|
+
if (url.endsWith('/api')) {
|
|
17
|
+
return `${url}/${version}`;
|
|
18
|
+
}
|
|
19
|
+
return url.replace('/api/', `/api/${version}/`);
|
|
21
20
|
}
|
|
22
|
-
return url
|
|
23
|
-
}
|
|
24
|
-
return url;
|
|
21
|
+
return url;
|
|
25
22
|
}
|
|
26
|
-
function ApiIndex({
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
} else if (preferredVersion) {
|
|
41
|
-
history.replace(addVersionToUrl(history.location.pathname, latestVersion, preferredVersion));
|
|
42
|
-
}
|
|
43
|
-
}, [packages, history, latestVersion, preferredVersion]);
|
|
44
|
-
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
45
|
-
className: "row",
|
|
46
|
-
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
47
|
-
className: "col apiItemCol",
|
|
48
|
-
children: [options.banner && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
49
|
-
className: "alert alert--info margin-bottom--md",
|
|
50
|
-
role: "alert",
|
|
51
|
-
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
52
|
-
dangerouslySetInnerHTML: {
|
|
53
|
-
__html: options.banner
|
|
54
|
-
}
|
|
55
|
-
})
|
|
56
|
-
}), /*#__PURE__*/jsxRuntime.jsx(VersionBanner.VersionBanner, {}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
57
|
-
className: "apiItemContainer",
|
|
58
|
-
children: /*#__PURE__*/jsxRuntime.jsx("article", {
|
|
59
|
-
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
60
|
-
className: "markdown",
|
|
61
|
-
children: [/*#__PURE__*/jsxRuntime.jsx("header", {
|
|
62
|
-
children: /*#__PURE__*/jsxRuntime.jsx(Heading__default.default, {
|
|
63
|
-
as: "h1",
|
|
64
|
-
children: "API"
|
|
65
|
-
})
|
|
66
|
-
}), /*#__PURE__*/jsxRuntime.jsxs("section", {
|
|
67
|
-
className: "tsd-panel",
|
|
68
|
-
children: [/*#__PURE__*/jsxRuntime.jsx("h3", {
|
|
69
|
-
className: "tsd-panel-header",
|
|
70
|
-
children: "Packages"
|
|
71
|
-
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
72
|
-
className: "tsd-panel-content",
|
|
73
|
-
children: /*#__PURE__*/jsxRuntime.jsx("ul", {
|
|
74
|
-
className: "tsd-index-list",
|
|
75
|
-
children: packages.map(pkg => /*#__PURE__*/jsxRuntime.jsx("li", {
|
|
76
|
-
className: "tsd-truncate",
|
|
77
|
-
children: /*#__PURE__*/jsxRuntime.jsxs(Link__default.default, {
|
|
78
|
-
className: "tsd-kind-icon",
|
|
79
|
-
to: pkg.entryPoints[0].reflection.permalink,
|
|
80
|
-
children: [/*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
81
|
-
className: "tsd-signature-symbol",
|
|
82
|
-
children: ["v", pkg.packageVersion]
|
|
83
|
-
}), ' ', /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
84
|
-
children: links.removeScopes(pkg.packageName, options.scopes)
|
|
85
|
-
})]
|
|
86
|
-
})
|
|
87
|
-
}, pkg.packageName))
|
|
88
|
-
})
|
|
89
|
-
})]
|
|
90
|
-
})]
|
|
91
|
-
})
|
|
92
|
-
})
|
|
93
|
-
})]
|
|
94
|
-
})
|
|
95
|
-
});
|
|
23
|
+
export default function ApiIndex({ options, packages, history }) {
|
|
24
|
+
const latestVersion = useDocsVersion();
|
|
25
|
+
const { preferredVersion } = useDocsPreferredVersion(latestVersion.pluginId);
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
// Redirect to package when only 1
|
|
28
|
+
if (packages.length === 1) {
|
|
29
|
+
history.replace(addVersionToUrl(packages[0].entryPoints[0].reflection.permalink, latestVersion, preferredVersion));
|
|
30
|
+
// Redirect to preferred version
|
|
31
|
+
}
|
|
32
|
+
else if (preferredVersion) {
|
|
33
|
+
history.replace(addVersionToUrl(history.location.pathname, latestVersion, preferredVersion));
|
|
34
|
+
}
|
|
35
|
+
}, [packages, history, latestVersion, preferredVersion]);
|
|
36
|
+
return (_jsx("div", { className: "row", children: _jsxs("div", { className: "col apiItemCol", children: [options.banner && (_jsx("div", { className: "alert alert--info margin-bottom--md", role: "alert", children: _jsx("div", { dangerouslySetInnerHTML: { __html: options.banner } }) })), _jsx(VersionBanner, {}), _jsx("div", { className: "apiItemContainer", children: _jsx("article", { children: _jsxs("div", { className: "markdown", children: [_jsx("header", { children: _jsx(Heading, { as: "h1", children: "API" }) }), _jsxs("section", { className: "tsd-panel", children: [_jsx("h3", { className: "tsd-panel-header", children: "Packages" }), _jsx("div", { className: "tsd-panel-content", children: _jsx("ul", { className: "tsd-index-list", children: packages.map((pkg) => (_jsx("li", { className: "tsd-truncate", children: _jsxs(Link, { className: "tsd-kind-icon", to: pkg.entryPoints[0].reflection.permalink, children: [_jsxs("span", { className: "tsd-signature-symbol", children: ["v", pkg.packageVersion] }), ' ', _jsx("span", { children: removeScopes(pkg.packageName, options.scopes) })] }) }, pkg.packageName))) }) })] })] }) }) })] }) }));
|
|
96
37
|
}
|
|
97
|
-
|
|
98
|
-
//# sourceMappingURL=ApiIndex.js.map
|
|
38
|
+
//# sourceMappingURL=ApiIndex.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiIndex.js","sources":["../../src/components/ApiIndex.tsx"],"
|
|
1
|
+
{"version":3,"file":"ApiIndex.js","sourceRoot":"","sources":["../../src/components/ApiIndex.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,IAAI,MAAM,kBAAkB,CAAC;AAGpC,OAAO,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAGjG,OAAO,OAAO,MAAM,gBAAgB,CAAC;AAErC,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,6DAA6D;AAC7D,MAAM,GAAG,GAAG,EAA+B,CAAC;AAW5C,SAAS,eAAe,CACvB,GAAW,EACX,aAAkC,EAClC,gBAAkD;IAElD,IACC,CAAC,GAAG,CAAC,KAAK,CAAC,eAAe,CAAC;QAC3B,CAAC,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC;QACzB,gBAAgB;QAChB,gBAAgB,CAAC,IAAI,KAAK,aAAa,CAAC,OAAO,EAC9C,CAAC;QACF,MAAM,OAAO,GAAG,gBAAgB,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,gBAAgB,CAAC,IAAI,CAAC;QAErF,IAAI,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;YAC1B,OAAO,GAAG,GAAG,IAAI,OAAO,EAAE,CAAC;QAC5B,CAAC;QAED,OAAO,GAAG,CAAC,OAAO,CAAC,OAAO,EAAE,QAAQ,OAAO,GAAG,CAAC,C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AC,WAAW,aAC7B,aAAI,SAAS,EAAC,kBAAkB,yBAAc,EAC9C,cAAK,SAAS,EAAC,mBAAmB,YACjC,aAAI,SAAS,EAAC,gBAAgB,YAC5B,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CACtB,aAA0B,SAAS,EAAC,cAAc,YACjD,MAAC,IAAI,IACJ,SAAS,EAAC,eAAe,EACzB,EAAE,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,SAAS,aAE3C,gBAAM,SAAS,EAAC,sBAAsB,kBAAG,GAAG,CAAC,cAAc,IAAQ,EAAC,GAAG,EACvE,yBAAO,YAAY,CAAC,GAAG,CAAC,WAAW,EAAE,OAAO,CAAC,MAAM,CAAC,GAAQ,IACtD,IAPC,GAAG,CAAC,WAAW,CAQnB,CACL,CAAC,GACE,GACA,IACG,IACL,GACG,GACL,IACD,GACD,CACN,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Props as DocItemProps } from '@theme/DocItem';
|
|
2
|
+
export interface ApiItemProps extends Pick<DocItemProps, 'route'> {
|
|
3
|
+
readme?: React.ComponentType;
|
|
4
|
+
}
|
|
5
|
+
export default function ApiItem({ readme: Readme, route }: ApiItemProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=ApiItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApiItem.d.ts","sourceRoot":"","sources":["../../src/components/ApiItem.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,KAAK,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAoD5D,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC;IAChE,MAAM,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAuED,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,YAAY,2CAqGtE"}
|
|
@@ -1,210 +1,150 @@
|
|
|
1
|
-
|
|
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
|
-
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
9
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
10
|
-
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
11
|
-
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
12
|
-
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
13
|
-
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
14
|
-
const react = require('react');
|
|
15
|
-
const themeCommon = require('@docusaurus/theme-common');
|
|
16
|
-
const useDocusaurusContext = require('@docusaurus/useDocusaurusContext');
|
|
17
|
-
const useGitRefName = require('../hooks/useGitRefName.js');
|
|
18
|
-
const useReflection = require('../hooks/useReflection.js');
|
|
19
|
-
const useReflectionMap = require('../hooks/useReflectionMap.js');
|
|
20
|
-
const helpers = require('../utils/helpers.js');
|
|
21
|
-
const icons = require('../utils/icons.js');
|
|
22
|
-
const ApiItemLayout = require('./ApiItemLayout.js');
|
|
23
|
-
const ApiOptionsContext = require('./ApiOptionsContext.js');
|
|
24
|
-
const Comment = require('./Comment.js');
|
|
25
|
-
const Flags = require('./Flags.js');
|
|
26
|
-
const Reflection = require('./Reflection.js');
|
|
27
|
-
const SourceLink = require('./SourceLink.js');
|
|
28
|
-
const TypeParametersGeneric = require('./TypeParametersGeneric.js');
|
|
29
|
-
const jsxRuntime = require('react/jsx-runtime');
|
|
30
|
-
const _interopDefault = e => e && e.__esModule ? e : {
|
|
31
|
-
default: e
|
|
32
|
-
};
|
|
33
|
-
const useDocusaurusContext__default = /*#__PURE__*/_interopDefault(useDocusaurusContext);
|
|
34
|
-
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
35
2
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
3
|
+
import { useMemo, useState } from 'react';
|
|
4
|
+
import { PageMetadata } from '@docusaurus/theme-common';
|
|
5
|
+
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
|
6
|
+
import { useGitRefName } from '../hooks/useGitRefName';
|
|
7
|
+
import { useReflection, useRequiredReflection } from '../hooks/useReflection';
|
|
8
|
+
import { useReflectionMap } from '../hooks/useReflectionMap';
|
|
9
|
+
import { escapeMdx } from '../utils/helpers';
|
|
10
|
+
import { getKindIconHtml } from '../utils/icons';
|
|
11
|
+
import ApiItemLayout from './ApiItemLayout';
|
|
12
|
+
import { ApiOptionsContext } from './ApiOptionsContext';
|
|
13
|
+
import { displayPartsToMarkdown } from './Comment';
|
|
14
|
+
import { Flags } from './Flags';
|
|
15
|
+
import { Reflection } from './Reflection';
|
|
16
|
+
import { resolveGithubUrl } from './SourceLink';
|
|
17
|
+
import { TypeParametersGeneric } from './TypeParametersGeneric';
|
|
36
18
|
function extractTOC(item, map, hideInherited) {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
19
|
+
var _a;
|
|
20
|
+
const toc = [];
|
|
21
|
+
const mapped = new Set();
|
|
22
|
+
(_a = item.groups) === null || _a === void 0 ? void 0 : _a.forEach((group) => {
|
|
23
|
+
var _a;
|
|
24
|
+
(_a = group.children) === null || _a === void 0 ? void 0 : _a.forEach((childId) => {
|
|
25
|
+
var _a;
|
|
26
|
+
const child = map[childId];
|
|
27
|
+
const shouldShow = (child === null || child === void 0 ? void 0 : child.inheritedFrom) ? !hideInherited : true;
|
|
28
|
+
if (!child || !shouldShow || mapped.has(child.name)) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
if (!child.permalink || child.permalink.includes('#')) {
|
|
32
|
+
const iconHtml = getKindIconHtml(child.kind, child.name);
|
|
33
|
+
const value = (_a = escapeMdx(child.name)) !== null && _a !== void 0 ? _a : '';
|
|
34
|
+
toc.push({
|
|
35
|
+
// @ts-expect-error Not typed upstream
|
|
36
|
+
children: [],
|
|
37
|
+
id: child.name,
|
|
38
|
+
value: iconHtml ? `${iconHtml} ${value}` : value,
|
|
39
|
+
level: 1,
|
|
40
|
+
});
|
|
41
|
+
mapped.add(child.name);
|
|
42
|
+
}
|
|
55
43
|
});
|
|
56
|
-
mapped.add(child.name);
|
|
57
|
-
}
|
|
58
44
|
});
|
|
59
|
-
|
|
60
|
-
return toc;
|
|
45
|
+
return toc;
|
|
61
46
|
}
|
|
62
47
|
// Recursively traverse the passed object. If the object has a `sources` property, resolve the GitHub URLs.
|
|
63
48
|
function resolveGithubUrls(obj, siteConfig, gitRefName) {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
obj.sources
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
49
|
+
if (!obj)
|
|
50
|
+
return;
|
|
51
|
+
if (obj.sources) {
|
|
52
|
+
obj.sources.forEach((source) => {
|
|
53
|
+
source.url = resolveGithubUrl(source, siteConfig, gitRefName);
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
for (const key in obj) {
|
|
57
|
+
if (typeof obj[key] === 'object') {
|
|
58
|
+
resolveGithubUrls(obj[key], siteConfig, gitRefName);
|
|
59
|
+
}
|
|
73
60
|
}
|
|
74
|
-
}
|
|
75
61
|
}
|
|
76
62
|
function resolveTypeReferences(obj, reflectionMap, baseUrl) {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
if (ref && obj.ref) obj.ref.permalink = new URL(ref?.permalink ?? '', baseUrl).toString();
|
|
95
|
-
}
|
|
96
|
-
for (const key in obj) {
|
|
97
|
-
if (typeof obj[key] === 'object') {
|
|
98
|
-
resolveTypeReferences(obj[key], reflectionMap, baseUrl);
|
|
63
|
+
var _a, _b;
|
|
64
|
+
if (!obj)
|
|
65
|
+
return;
|
|
66
|
+
if (obj.type === 'reference') {
|
|
67
|
+
const reflectionIdentifier = (_a = obj.target) !== null && _a !== void 0 ? _a : obj.id;
|
|
68
|
+
const ref = reflectionIdentifier ? reflectionMap[Number(reflectionIdentifier)] : null;
|
|
69
|
+
obj.target = obj.target ? obj.target : 0;
|
|
70
|
+
const { id, sources, kind, permalink } = ref !== null && ref !== void 0 ? ref : {};
|
|
71
|
+
// @ts-expect-error Partial reexports
|
|
72
|
+
obj.ref = { id, sources, kind, permalink };
|
|
73
|
+
if (ref && obj.ref)
|
|
74
|
+
obj.ref.permalink = new URL((_b = ref === null || ref === void 0 ? void 0 : ref.permalink) !== null && _b !== void 0 ? _b : '', baseUrl).toString();
|
|
75
|
+
}
|
|
76
|
+
for (const key in obj) {
|
|
77
|
+
if (typeof obj[key] === 'object') {
|
|
78
|
+
resolveTypeReferences(obj[key], reflectionMap, baseUrl);
|
|
79
|
+
}
|
|
99
80
|
}
|
|
100
|
-
}
|
|
101
81
|
}
|
|
102
82
|
function getOwnGroupNames(reflection, reflections) {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
children
|
|
106
|
-
}) => children?.includes(reflection.id)).map(({
|
|
107
|
-
title
|
|
108
|
-
}) => title) ?? [];
|
|
83
|
+
var _a, _b;
|
|
84
|
+
const parent = reflections[reflection.parentId];
|
|
85
|
+
return (_b = (_a = parent === null || parent === void 0 ? void 0 : parent.groups) === null || _a === void 0 ? void 0 : _a.filter(({ children }) => children === null || children === void 0 ? void 0 : children.includes(reflection.id)).map(({ title }) => title)) !== null && _b !== void 0 ? _b : [];
|
|
109
86
|
}
|
|
110
87
|
function deepCopy(obj) {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
88
|
+
if (typeof obj !== 'object')
|
|
89
|
+
return obj;
|
|
90
|
+
const copy = Array.isArray(obj) ? [] : {};
|
|
91
|
+
// eslint-disable-next-line guard-for-in
|
|
92
|
+
for (const key in obj) {
|
|
93
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access
|
|
94
|
+
copy[key] = deepCopy(obj[key]);
|
|
95
|
+
}
|
|
96
|
+
return copy;
|
|
119
97
|
}
|
|
120
98
|
function base64Encode(message) {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
99
|
+
const bytes = new TextEncoder().encode(message);
|
|
100
|
+
const binString = Array.from(bytes, (byte) => String.fromCodePoint(byte)).join("");
|
|
101
|
+
return btoa(binString);
|
|
124
102
|
}
|
|
125
|
-
function ApiItem({
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
hideInherited
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
hideInherited,
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
siteConfig =
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
className: "tsd-header-flags",
|
|
172
|
-
children: /*#__PURE__*/jsxRuntime.jsx(Flags.Flags, {
|
|
173
|
-
flags: item.flags
|
|
174
|
-
})
|
|
175
|
-
}), helpers.escapeMdx(item.name), " ", /*#__PURE__*/jsxRuntime.jsx(TypeParametersGeneric.TypeParametersGeneric, {
|
|
176
|
-
params: item.typeParameters
|
|
177
|
-
})]
|
|
178
|
-
}),
|
|
179
|
-
pageMetadata: /*#__PURE__*/jsxRuntime.jsx(themeCommon.PageMetadata, {
|
|
180
|
-
description: shortenedDescription,
|
|
181
|
-
title: `${item.name} | API`
|
|
182
|
-
}),
|
|
183
|
-
pagingMetadata: pagingMetadata,
|
|
184
|
-
route: route,
|
|
185
|
-
toc: toc,
|
|
186
|
-
children: [Readme && /*#__PURE__*/jsxRuntime.jsx("section", {
|
|
187
|
-
className: "tsd-readme",
|
|
188
|
-
children: /*#__PURE__*/jsxRuntime.jsx(Readme, {})
|
|
189
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Reflection.Reflection, {
|
|
190
|
-
reflection: item
|
|
191
|
-
}), /*#__PURE__*/jsxRuntime.jsx("script", {
|
|
192
|
-
// eslint-disable-next-line react/no-danger,react-perf/jsx-no-new-object-as-prop
|
|
193
|
-
dangerouslySetInnerHTML: {
|
|
194
|
-
__html: base64Encode(JSON.stringify({
|
|
195
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
196
|
-
item: _objectSpread(_objectSpread({}, apiItem), {}, {
|
|
197
|
-
nextId: undefined,
|
|
198
|
-
previousId: undefined,
|
|
199
|
-
parentId: undefined
|
|
200
|
-
}),
|
|
201
|
-
groups: getOwnGroupNames(item, reflections)
|
|
202
|
-
}))
|
|
203
|
-
},
|
|
204
|
-
type: "application/typedoc-data;base64"
|
|
205
|
-
})]
|
|
206
|
-
})
|
|
207
|
-
});
|
|
103
|
+
export default function ApiItem({ readme: Readme, route }) {
|
|
104
|
+
var _a, _b;
|
|
105
|
+
const [hideInherited, setHideInherited] = useState(false);
|
|
106
|
+
const apiOptions = useMemo(() => ({
|
|
107
|
+
hideInherited,
|
|
108
|
+
setHideInherited,
|
|
109
|
+
}), [hideInherited, setHideInherited]);
|
|
110
|
+
const item = useRequiredReflection(route.id);
|
|
111
|
+
const reflections = useReflectionMap();
|
|
112
|
+
const toc = useMemo(() => extractTOC(item, reflections, hideInherited), [item, reflections, hideInherited]);
|
|
113
|
+
// Pagination
|
|
114
|
+
const prevItem = useReflection(item.previousId);
|
|
115
|
+
const nextItem = useReflection(item.nextId);
|
|
116
|
+
const pagingMetadata = useMemo(() => {
|
|
117
|
+
var _a, _b;
|
|
118
|
+
return ({
|
|
119
|
+
next: nextItem
|
|
120
|
+
? {
|
|
121
|
+
permalink: nextItem.permalink,
|
|
122
|
+
title: (_a = escapeMdx(nextItem.name)) !== null && _a !== void 0 ? _a : '',
|
|
123
|
+
}
|
|
124
|
+
: undefined,
|
|
125
|
+
previous: prevItem
|
|
126
|
+
? {
|
|
127
|
+
permalink: prevItem.permalink,
|
|
128
|
+
title: (_b = escapeMdx(prevItem.name)) !== null && _b !== void 0 ? _b : '',
|
|
129
|
+
}
|
|
130
|
+
: undefined,
|
|
131
|
+
});
|
|
132
|
+
}, [nextItem, prevItem]);
|
|
133
|
+
const { siteConfig } = useDocusaurusContext();
|
|
134
|
+
const gitRefName = useGitRefName();
|
|
135
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
136
|
+
const apiItem = deepCopy(item);
|
|
137
|
+
const shortenedDescription = displayPartsToMarkdown((_b = (_a = item.comment) === null || _a === void 0 ? void 0 : _a.summary) !== null && _b !== void 0 ? _b : []).split('\n')[0];
|
|
138
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
139
|
+
resolveGithubUrls(apiItem, siteConfig, gitRefName);
|
|
140
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
141
|
+
resolveTypeReferences(apiItem, reflections, new URL(siteConfig.baseUrl, siteConfig.url).href);
|
|
142
|
+
return (_jsx(ApiOptionsContext.Provider, { value: apiOptions, children: _jsxs(ApiItemLayout, { heading: _jsxs(_Fragment, { children: [_jsx("span", { className: "tsd-header-flags", children: _jsx(Flags, { flags: item.flags }) }), escapeMdx(item.name), " ", _jsx(TypeParametersGeneric, { params: item.typeParameters })] }), pageMetadata: _jsx(PageMetadata, { description: shortenedDescription, title: `${item.name} | API` }), pagingMetadata: pagingMetadata, route: route, toc: toc, children: [Readme && (_jsx("section", { className: "tsd-readme", children: _jsx(Readme, {}) })), _jsx(Reflection, { reflection: item }), _jsx("script", {
|
|
143
|
+
// eslint-disable-next-line react/no-danger,react-perf/jsx-no-new-object-as-prop
|
|
144
|
+
dangerouslySetInnerHTML: { __html: base64Encode(JSON.stringify({
|
|
145
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
146
|
+
item: Object.assign(Object.assign({}, apiItem), { nextId: undefined, previousId: undefined, parentId: undefined }),
|
|
147
|
+
groups: getOwnGroupNames(item, reflections),
|
|
148
|
+
})) }, type: "application/typedoc-data;base64" })] }) }));
|
|
208
149
|
}
|
|
209
|
-
|
|
210
|
-
//# sourceMappingURL=ApiItem.js.map
|
|
150
|
+
//# sourceMappingURL=ApiItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiItem.js","sources":["../../src/components/ApiItem.tsx"],"
|
|
1
|
+
{"version":3,"file":"ApiItem.js","sourceRoot":"","sources":["../../src/components/ApiItem.tsx"],"names":[],"mappings":";AAAA,uDAAuD;AACvD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC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EhC;oBACA,gFAAgF;oBAC/E,uBAAuB,EAAE,EAAC,MAAM,EAAE,YAAY,CAC7C,IAAI,CAAC,SAAS,CACb;4BACC,mEAAmE;4BACnE,IAAI,kCACA,OAAO,KACV,MAAM,EAAE,SAAS,EACjB,UAAU,EAAE,SAAS,EACrB,QAAQ,EAAE,SAAS,GACnB;4BACD,MAAM,EAAE,gBAAgB,CAAC,IAAI,EAAE,WAAW,CAAC;yBAC3C,CACD,CACD,EAAC,EACF,IAAI,EAAC,iCAAiC,GACrC,IACa,GACY,CAC7B,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { PropNavigation } from '@docusaurus/plugin-content-docs';
|
|
2
|
+
import type { Props as DocItemProps } from '@theme/DocItem';
|
|
3
|
+
import type { TOCItem } from '../types';
|
|
4
|
+
export interface ApiItemLayoutProps extends Pick<DocItemProps, 'route'> {
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
heading: React.ReactNode;
|
|
7
|
+
toc: readonly TOCItem[];
|
|
8
|
+
pageMetadata?: React.ReactNode;
|
|
9
|
+
pagingMetadata?: PropNavigation;
|
|
10
|
+
name?: string;
|
|
11
|
+
module?: string;
|
|
12
|
+
}
|
|
13
|
+
export default function ApiItemLayout({ children, heading, pageMetadata, pagingMetadata, toc, name, module, }: ApiItemLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
//# sourceMappingURL=ApiItemLayout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApiItemLayout.d.ts","sourceRoot":"","sources":["../../src/components/ApiItemLayout.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAGtE,OAAO,KAAK,EAAE,KAAK,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAQ5D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAIxC,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC;IACtE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,GAAG,EAAE,SAAS,OAAO,EAAE,CAAC;IACxB,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EACrC,QAAQ,EACR,OAAO,EACP,YAAY,EACZ,cAAc,EACd,GAAG,EACH,IAAI,EACJ,MAAM,GACN,EAAE,kBAAkB,2CAgEpB"}
|