@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,190 +1,93 @@
|
|
|
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
|
-
const react = require('react');
|
|
9
|
-
const useGlobalData = require('@docusaurus/useGlobalData');
|
|
10
|
-
const useMinimalLayout = require('../hooks/useMinimalLayout.js');
|
|
11
|
-
const ApiDataContext = require('./ApiDataContext.js');
|
|
12
|
-
const Comment = require('./Comment.js');
|
|
13
|
-
const CommentBadges = require('./CommentBadges.js');
|
|
14
|
-
const DefaultValue = require('./DefaultValue.js');
|
|
15
|
-
const Flags = require('./Flags.js');
|
|
16
|
-
const MemberSources = require('./MemberSources.js');
|
|
17
|
-
const Parameter = require('./Parameter.js');
|
|
18
|
-
const Type = require('./Type.js');
|
|
19
|
-
const TypeParameters = require('./TypeParameters.js');
|
|
20
|
-
const jsxRuntime = require('react/jsx-runtime');
|
|
21
|
-
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
2
|
// https://github.com/TypeStrong/typedoc-default-themes/blob/master/src/default/partials/member.signature.body.hbs
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
3
|
+
import { Fragment, useContext } from 'react';
|
|
4
|
+
import { usePluginData } from '@docusaurus/useGlobalData';
|
|
5
|
+
import { useMinimalLayout } from '../hooks/useMinimalLayout';
|
|
6
|
+
import { ApiDataContext } from './ApiDataContext';
|
|
7
|
+
import { Comment, hasComment } from './Comment';
|
|
8
|
+
import { CommentBadges, isCommentWithModifiers } from './CommentBadges';
|
|
9
|
+
import { DefaultValue } from './DefaultValue';
|
|
10
|
+
import { Flags } from './Flags';
|
|
11
|
+
import { hasSources, MemberSources } from './MemberSources';
|
|
12
|
+
import { Parameter } from './Parameter';
|
|
13
|
+
import { extractDeclarationFromType, Type } from './Type';
|
|
14
|
+
import { TypeParameters } from './TypeParameters';
|
|
15
|
+
export function hasSigBody(sig, minimal, hideSources = false) {
|
|
16
|
+
if (!sig) {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
return ((!hideSources && hasSources(sig)) ||
|
|
20
|
+
hasComment(sig.comment) ||
|
|
21
|
+
(sig.typeParameter && sig.typeParameter.length > 0) ||
|
|
22
|
+
(!minimal && sig.parameters && sig.parameters.length > 0) ||
|
|
23
|
+
(!minimal && sig.type));
|
|
29
24
|
}
|
|
30
25
|
function intoReturnComment(comment) {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
26
|
+
if (comment === null || comment === void 0 ? void 0 : comment.blockTags) {
|
|
27
|
+
const tags = comment.blockTags.map((tag) => tag.tag);
|
|
28
|
+
if (tags.includes('@returns')) {
|
|
29
|
+
const index = tags.indexOf('@returns');
|
|
30
|
+
return {
|
|
31
|
+
summary: comment.blockTags[index].content,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
38
34
|
}
|
|
39
|
-
|
|
40
|
-
return undefined;
|
|
35
|
+
return undefined;
|
|
41
36
|
}
|
|
42
37
|
const HIDE_TAGS = ['@returns', '@param'];
|
|
43
|
-
function MemberSignatureBody({
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
38
|
+
export function MemberSignatureBody({ hideSources, sig }) {
|
|
39
|
+
var _a, _b, _c;
|
|
40
|
+
const minimal = useMinimalLayout();
|
|
41
|
+
const showTypes = sig.typeParameter && sig.typeParameter.length > 0;
|
|
42
|
+
const showParams = !minimal && sig.parameters && sig.parameters.length > 0;
|
|
43
|
+
const showReturn = !minimal && sig.type;
|
|
44
|
+
const { reflections } = useContext(ApiDataContext);
|
|
45
|
+
const { isPython } = usePluginData('docusaurus-plugin-typedoc-api');
|
|
46
|
+
if (isPython) {
|
|
47
|
+
sig.parameters = (_a = sig.parameters) === null || _a === void 0 ? void 0 : _a.reduce((acc, param) => {
|
|
48
|
+
var _a, _b, _c;
|
|
49
|
+
// @ts-expect-error Silence ts errors
|
|
50
|
+
switch ((_a = param.type) === null || _a === void 0 ? void 0 : _a.name) {
|
|
51
|
+
case 'Unpack':
|
|
52
|
+
// @ts-expect-error Silence ts errors
|
|
53
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
54
|
+
acc.push(...((_c = (_b = reflections[param.type.typeArguments[0].target]) === null || _b === void 0 ? void 0 : _b.children) !== null && _c !== void 0 ? _c : []).map((x) => (Object.assign(Object.assign({}, x), { flags: { 'keyword-only': true, optional: true } }))));
|
|
55
|
+
break;
|
|
56
|
+
default:
|
|
57
|
+
acc.push(param);
|
|
58
|
+
break;
|
|
59
|
+
}
|
|
60
|
+
return acc;
|
|
61
|
+
}, []);
|
|
62
|
+
sig.parameters = (_b = sig.parameters) === null || _b === void 0 ? void 0 : _b.reduce((acc, param) => {
|
|
63
|
+
var _a;
|
|
64
|
+
// @ts-expect-error Silence ts errors
|
|
65
|
+
switch ((_a = param.type) === null || _a === void 0 ? void 0 : _a.name) {
|
|
66
|
+
case 'NotRequired':
|
|
67
|
+
// @ts-expect-error Silence ts errors
|
|
68
|
+
// eslint-disable-next-line
|
|
69
|
+
acc.push(Object.assign(Object.assign({}, param), { type: param.type.typeArguments[0] }));
|
|
70
|
+
break;
|
|
71
|
+
default:
|
|
72
|
+
acc.push(param);
|
|
73
|
+
break;
|
|
66
74
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
break;
|
|
85
|
-
default:
|
|
86
|
-
acc.push(param);
|
|
87
|
-
break;
|
|
88
|
-
}
|
|
89
|
-
return acc;
|
|
90
|
-
}, []);
|
|
91
|
-
}
|
|
92
|
-
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
93
|
-
children: [!hideSources && /*#__PURE__*/jsxRuntime.jsx(MemberSources.MemberSources, {
|
|
94
|
-
reflection: sig
|
|
95
|
-
}), CommentBadges.isCommentWithModifiers(sig.comment) && /*#__PURE__*/jsxRuntime.jsx(CommentBadges.CommentBadges, {
|
|
96
|
-
comment: sig.comment
|
|
97
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Comment.Comment, {
|
|
98
|
-
comment: sig.comment,
|
|
99
|
-
hideTags: HIDE_TAGS
|
|
100
|
-
}), Comment.hasComment(sig.comment) && (showTypes || showParams || showReturn) && /*#__PURE__*/jsxRuntime.jsx("hr", {
|
|
101
|
-
className: "tsd-divider"
|
|
102
|
-
}), showTypes && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
103
|
-
children: [/*#__PURE__*/jsxRuntime.jsx("h4", {
|
|
104
|
-
className: "tsd-type-parameters-title",
|
|
105
|
-
children: "Type parameters"
|
|
106
|
-
}), /*#__PURE__*/jsxRuntime.jsx(TypeParameters.TypeParameters, {
|
|
107
|
-
params: sig.typeParameter
|
|
108
|
-
})]
|
|
109
|
-
}), showParams && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
110
|
-
children: [/*#__PURE__*/jsxRuntime.jsx("h4", {
|
|
111
|
-
className: "tsd-parameters-title",
|
|
112
|
-
children: "Parameters"
|
|
113
|
-
}), /*#__PURE__*/jsxRuntime.jsx("ul", {
|
|
114
|
-
className: "tsd-parameters",
|
|
115
|
-
children: sig.parameters?.map(param => /*#__PURE__*/jsxRuntime.jsxs(react.Fragment, {
|
|
116
|
-
children: [/*#__PURE__*/jsxRuntime.jsxs("li", {
|
|
117
|
-
children: [/*#__PURE__*/jsxRuntime.jsxs("h5", {
|
|
118
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(Flags.Flags, {
|
|
119
|
-
flags: param.flags
|
|
120
|
-
}), param.flags?.isRest && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
121
|
-
className: "tsd-signature-symbol",
|
|
122
|
-
children: "..."
|
|
123
|
-
}), `${param.name}: `, /*#__PURE__*/jsxRuntime.jsx(Type.Type, {
|
|
124
|
-
type: param.type
|
|
125
|
-
}), /*#__PURE__*/jsxRuntime.jsx(DefaultValue.DefaultValue, {
|
|
126
|
-
comment: param.comment,
|
|
127
|
-
type: param.type,
|
|
128
|
-
value: param.defaultValue
|
|
129
|
-
})]
|
|
130
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Comment.Comment, {
|
|
131
|
-
comment: param.comment
|
|
132
|
-
})]
|
|
133
|
-
}), param.type?.type === 'reflection' && /*#__PURE__*/jsxRuntime.jsx("ul", {
|
|
134
|
-
children: param.type.declaration?.children?.map(reflectionChild => /*#__PURE__*/jsxRuntime.jsxs("li", {
|
|
135
|
-
children: [/*#__PURE__*/jsxRuntime.jsxs("h5", {
|
|
136
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(Flags.Flags, {
|
|
137
|
-
flags: reflectionChild.flags
|
|
138
|
-
}), reflectionChild.flags?.isRest && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
139
|
-
className: "tsd-signature-symbol",
|
|
140
|
-
children: "..."
|
|
141
|
-
}), `${reflectionChild.name}: `, /*#__PURE__*/jsxRuntime.jsx(Type.Type, {
|
|
142
|
-
type: reflectionChild.type
|
|
143
|
-
}), /*#__PURE__*/jsxRuntime.jsx(DefaultValue.DefaultValue, {
|
|
144
|
-
comment: reflectionChild.comment,
|
|
145
|
-
type: reflectionChild.type,
|
|
146
|
-
value: reflectionChild.defaultValue
|
|
147
|
-
})]
|
|
148
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Comment.Comment, {
|
|
149
|
-
comment: reflectionChild.comment
|
|
150
|
-
})]
|
|
151
|
-
}, reflectionChild.id))
|
|
152
|
-
}, param.type.declaration.id), param.type?.type === 'union' && param.type.types.filter(unionType => unionType.type === 'reflection').map(unionReflectionType => /*#__PURE__*/jsxRuntime.jsx("ul", {
|
|
153
|
-
children: unionReflectionType.declaration?.children?.map(unionChild => /*#__PURE__*/jsxRuntime.jsxs("li", {
|
|
154
|
-
children: [/*#__PURE__*/jsxRuntime.jsxs("h5", {
|
|
155
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(Flags.Flags, {
|
|
156
|
-
flags: unionChild.flags
|
|
157
|
-
}), unionChild.flags?.isRest && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
158
|
-
className: "tsd-signature-symbol",
|
|
159
|
-
children: "..."
|
|
160
|
-
}), `${unionChild.name}: `, /*#__PURE__*/jsxRuntime.jsx(Type.Type, {
|
|
161
|
-
type: unionChild.type
|
|
162
|
-
}), /*#__PURE__*/jsxRuntime.jsx(DefaultValue.DefaultValue, {
|
|
163
|
-
comment: unionChild.comment,
|
|
164
|
-
type: unionChild.type,
|
|
165
|
-
value: unionChild.defaultValue
|
|
166
|
-
})]
|
|
167
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Comment.Comment, {
|
|
168
|
-
comment: unionChild.comment
|
|
169
|
-
})]
|
|
170
|
-
}, unionChild.id))
|
|
171
|
-
}, unionReflectionType.declaration.id))]
|
|
172
|
-
}, param.id))
|
|
173
|
-
})]
|
|
174
|
-
}), showReturn && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
175
|
-
children: [/*#__PURE__*/jsxRuntime.jsxs("h4", {
|
|
176
|
-
className: "tsd-returns-title",
|
|
177
|
-
children: ["Returns ", /*#__PURE__*/jsxRuntime.jsx(Type.Type, {
|
|
178
|
-
type: sig.type
|
|
179
|
-
})]
|
|
180
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Comment.Comment, {
|
|
181
|
-
comment: intoReturnComment(sig.comment)
|
|
182
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Parameter.Parameter, {
|
|
183
|
-
param: Type.extractDeclarationFromType(sig.type)
|
|
184
|
-
})]
|
|
185
|
-
})]
|
|
186
|
-
});
|
|
75
|
+
return acc;
|
|
76
|
+
}, []);
|
|
77
|
+
}
|
|
78
|
+
return (_jsxs(_Fragment, { children: [!hideSources && _jsx(MemberSources, { reflection: sig }), isCommentWithModifiers(sig.comment) && _jsx(CommentBadges, { comment: sig.comment }), _jsx(Comment, { comment: sig.comment, hideTags: HIDE_TAGS }), hasComment(sig.comment) && (showTypes || showParams || showReturn) && (_jsx("hr", { className: "tsd-divider" })), showTypes && (_jsxs(_Fragment, { children: [_jsx("h4", { className: "tsd-type-parameters-title", children: "Type parameters" }), _jsx(TypeParameters, { params: sig.typeParameter })] })), showParams && (_jsxs(_Fragment, { children: [_jsx("h4", { className: "tsd-parameters-title", children: "Parameters" }), _jsx("ul", { className: "tsd-parameters", children: (_c = sig.parameters) === null || _c === void 0 ? void 0 : _c.map((param) => {
|
|
79
|
+
var _a, _b, _c, _d, _e;
|
|
80
|
+
return (_jsxs(Fragment, { children: [_jsxs("li", { children: [_jsxs("h5", { children: [_jsx(Flags, { flags: param.flags }), ((_a = param.flags) === null || _a === void 0 ? void 0 : _a.isRest) && _jsx("span", { className: "tsd-signature-symbol", children: "..." }), `${param.name}: `, _jsx(Type, { type: param.type }), _jsx(DefaultValue, { comment: param.comment, type: param.type, value: param.defaultValue })] }), _jsx(Comment, { comment: param.comment })] }), ((_b = param.type) === null || _b === void 0 ? void 0 : _b.type) === 'reflection' && (_jsx("ul", { children: (_d = (_c = param.type.declaration) === null || _c === void 0 ? void 0 : _c.children) === null || _d === void 0 ? void 0 : _d.map((reflectionChild) => {
|
|
81
|
+
var _a;
|
|
82
|
+
return (_jsxs("li", { children: [_jsxs("h5", { children: [_jsx(Flags, { flags: reflectionChild.flags }), ((_a = reflectionChild.flags) === null || _a === void 0 ? void 0 : _a.isRest) && (_jsx("span", { className: "tsd-signature-symbol", children: "..." })), `${reflectionChild.name}: `, _jsx(Type, { type: reflectionChild.type }), _jsx(DefaultValue, { comment: reflectionChild.comment, type: reflectionChild.type, value: reflectionChild.defaultValue })] }), _jsx(Comment, { comment: reflectionChild.comment })] }, reflectionChild.id));
|
|
83
|
+
}) }, param.type.declaration.id)), ((_e = param.type) === null || _e === void 0 ? void 0 : _e.type) === 'union' &&
|
|
84
|
+
param.type.types.filter((unionType) => unionType.type === 'reflection').map((unionReflectionType) => {
|
|
85
|
+
var _a, _b;
|
|
86
|
+
return (_jsx("ul", { children: (_b = (_a = unionReflectionType.declaration) === null || _a === void 0 ? void 0 : _a.children) === null || _b === void 0 ? void 0 : _b.map((unionChild) => {
|
|
87
|
+
var _a;
|
|
88
|
+
return (_jsxs("li", { children: [_jsxs("h5", { children: [_jsx(Flags, { flags: unionChild.flags }), ((_a = unionChild.flags) === null || _a === void 0 ? void 0 : _a.isRest) && (_jsx("span", { className: "tsd-signature-symbol", children: "..." })), `${unionChild.name}: `, _jsx(Type, { type: unionChild.type }), _jsx(DefaultValue, { comment: unionChild.comment, type: unionChild.type, value: unionChild.defaultValue })] }), _jsx(Comment, { comment: unionChild.comment })] }, unionChild.id));
|
|
89
|
+
}) }, unionReflectionType.declaration.id));
|
|
90
|
+
})] }, param.id));
|
|
91
|
+
}) })] })), showReturn && (_jsxs(_Fragment, { children: [_jsxs("h4", { className: "tsd-returns-title", children: ["Returns ", _jsx(Type, { type: sig.type })] }), _jsx(Comment, { comment: intoReturnComment(sig.comment) }), _jsx(Parameter, { param: extractDeclarationFromType(sig.type) })] }))] }));
|
|
187
92
|
}
|
|
188
|
-
|
|
189
|
-
exports.hasSigBody = hasSigBody;
|
|
190
|
-
//# sourceMappingURL=MemberSignatureBody.js.map
|
|
93
|
+
//# sourceMappingURL=MemberSignatureBody.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MemberSignatureBody.js","sources":["../../src/components/MemberSignatureBody.tsx"],"
|
|
1
|
+
{"version":3,"file":"MemberSignatureBody.js","sourceRoot":"","sources":["../../src/components/MemberSignatureBody.tsx"],"names":[],"mappings":";AAAA,kHAAkH;AAElH,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAG7C,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAE7D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,0BAA0B,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,UAAU,UAAU,CACz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CAAC,GAAI,IACxD,CACH,IACC,CACH,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { TSDSignatureReflection } from '../types';
|
|
2
|
+
export interface MemberSignatureTitleProps {
|
|
3
|
+
useArrow?: boolean;
|
|
4
|
+
hideName?: boolean;
|
|
5
|
+
sig: TSDSignatureReflection & {
|
|
6
|
+
modifiers?: string[];
|
|
7
|
+
};
|
|
8
|
+
hasMultipleSignatures?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare function MemberSignatureTitle({ useArrow, hideName, sig, hasMultipleSignatures }: MemberSignatureTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=MemberSignatureTitle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MemberSignatureTitle.d.ts","sourceRoot":"","sources":["../../src/components/MemberSignatureTitle.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAc,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAKnE,MAAM,WAAW,yBAAyB;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,GAAG,EAAE,sBAAsB,GAAG;QAAE,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IACvD,qBAAqB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,wBAAgB,oBAAoB,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,qBAAqB,EAAE,EAAE,yBAAyB,2CAiEjH"}
|
|
@@ -1,84 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const react = require('react');
|
|
4
|
-
const useGlobalData = require('@docusaurus/useGlobalData');
|
|
5
|
-
const helpers = require('../utils/helpers.js');
|
|
6
|
-
const Type = require('./Type.js');
|
|
7
|
-
const TypeParametersGeneric = require('./TypeParametersGeneric.js');
|
|
8
|
-
const jsxRuntime = require('react/jsx-runtime');
|
|
9
|
-
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
10
2
|
/* eslint-disable no-nested-ternary */
|
|
11
3
|
// https://github.com/TypeStrong/typedoc-default-themes/blob/master/src/default/partials/member.signature.title.hbs
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
})]
|
|
38
|
-
}) :
|
|
39
|
-
// Constructor signature
|
|
40
|
-
sig.kind === 16_384 ? /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
41
|
-
children: [sig.flags?.isAbstract && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
42
|
-
className: "tsd-signature-symbol",
|
|
43
|
-
children: "abstract "
|
|
44
|
-
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
45
|
-
className: "tsd-signature-symbol",
|
|
46
|
-
children: "new "
|
|
47
|
-
})]
|
|
48
|
-
}) : null, /*#__PURE__*/jsxRuntime.jsx(TypeParametersGeneric.TypeParametersGeneric, {
|
|
49
|
-
params: sig.typeParameters ?? sig.typeParameter
|
|
50
|
-
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
51
|
-
className: "tsd-signature-symbol",
|
|
52
|
-
children: "("
|
|
53
|
-
}), parametersCopy.map((param, index) => /*#__PURE__*/jsxRuntime.jsxs(react.Fragment, {
|
|
54
|
-
children: [index > 0 && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
55
|
-
className: "tsd-signature-symbol",
|
|
56
|
-
children: ", "
|
|
57
|
-
}), /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
58
|
-
children: [param.flags?.isRest && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
59
|
-
className: "tsd-signature-symbol",
|
|
60
|
-
children: "..."
|
|
61
|
-
}), helpers.escapeMdx(param.name), !isPython || hasMultipleSignatures && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
62
|
-
children: [/*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
63
|
-
className: "tsd-signature-symbol",
|
|
64
|
-
children: [(param.flags?.isOptional || 'defaultValue' in param) && '?', ': ']
|
|
65
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Type.Type, {
|
|
66
|
-
type: param.type
|
|
67
|
-
})]
|
|
68
|
-
})]
|
|
69
|
-
})]
|
|
70
|
-
}, param.id)), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
71
|
-
className: "tsd-signature-symbol",
|
|
72
|
-
children: ")"
|
|
73
|
-
}), sig.type && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
74
|
-
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
75
|
-
className: "tsd-signature-symbol",
|
|
76
|
-
children: useArrow ? ' => ' : ': '
|
|
77
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Type.Type, {
|
|
78
|
-
type: sig.type
|
|
79
|
-
})]
|
|
80
|
-
})]
|
|
81
|
-
});
|
|
4
|
+
import { Fragment } from 'react';
|
|
5
|
+
import { usePluginData } from '@docusaurus/useGlobalData';
|
|
6
|
+
import { escapeMdx } from '../utils/helpers';
|
|
7
|
+
import { Type } from './Type';
|
|
8
|
+
import { TypeParametersGeneric } from './TypeParametersGeneric';
|
|
9
|
+
export function MemberSignatureTitle({ useArrow, hideName, sig, hasMultipleSignatures }) {
|
|
10
|
+
var _a, _b, _c, _d;
|
|
11
|
+
const { isPython } = usePluginData('docusaurus-plugin-typedoc-api');
|
|
12
|
+
// add `*` before the first keyword-only parameter
|
|
13
|
+
const parametersCopy = (_b = (_a = sig.parameters) === null || _a === void 0 ? void 0 : _a.slice()) !== null && _b !== void 0 ? _b : [];
|
|
14
|
+
const firstKeywordOnlyIndex = parametersCopy.findIndex((param) => param.flags['keyword-only']);
|
|
15
|
+
if (firstKeywordOnlyIndex >= 0) {
|
|
16
|
+
parametersCopy.splice(firstKeywordOnlyIndex, 0, {
|
|
17
|
+
id: 999999,
|
|
18
|
+
name: '*',
|
|
19
|
+
kind: 32768,
|
|
20
|
+
flags: {},
|
|
21
|
+
variant: 'param',
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
return (_jsxs(_Fragment, { children: [!hideName && sig.name !== '__type' ? (_jsxs("span", { children: [sig.modifiers ? `${sig.modifiers.join(' ')} ` : '', _jsx("b", { children: escapeMdx(sig.name) })] })) : // Constructor signature
|
|
25
|
+
sig.kind === 16384 ? (_jsxs(_Fragment, { children: [((_c = sig.flags) === null || _c === void 0 ? void 0 : _c.isAbstract) && _jsx("span", { className: "tsd-signature-symbol", children: "abstract " }), _jsx("span", { className: "tsd-signature-symbol", children: "new " })] })) : null, _jsx(TypeParametersGeneric, { params: (_d = sig.typeParameters) !== null && _d !== void 0 ? _d : sig.typeParameter }), _jsx("span", { className: "tsd-signature-symbol", children: "(" }), parametersCopy.map((param, index) => {
|
|
26
|
+
var _a, _b;
|
|
27
|
+
return (_jsxs(Fragment, { children: [index > 0 && _jsx("span", { className: "tsd-signature-symbol", children: ", " }), _jsxs("span", { children: [((_a = param.flags) === null || _a === void 0 ? void 0 : _a.isRest) && _jsx("span", { className: "tsd-signature-symbol", children: "..." }), escapeMdx(param.name), !isPython || hasMultipleSignatures && (_jsxs(_Fragment, { children: [_jsxs("span", { className: "tsd-signature-symbol", children: [(((_b = param.flags) === null || _b === void 0 ? void 0 : _b.isOptional) || 'defaultValue' in param) && '?', ': '] }), _jsx(Type, { type: param.type })] }))] })] }, param.id));
|
|
28
|
+
}), _jsx("span", { className: "tsd-signature-symbol", children: ")" }), sig.type && (_jsxs(_Fragment, { children: [_jsx("span", { className: "tsd-signature-symbol", children: useArrow ? ' => ' : ': ' }), _jsx(Type, { type: sig.type })] }))] }));
|
|
82
29
|
}
|
|
83
|
-
|
|
84
|
-
//# sourceMappingURL=MemberSignatureTitle.js.map
|
|
30
|
+
//# sourceMappingURL=MemberSignatureTitle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MemberSignatureTitle.js","sources":["../../src/components/MemberSignatureTitle.tsx"],"
|
|
1
|
+
{"version":3,"file":"MemberSignatureTitle.js","sourceRoot":"","sources":["../../src/components/MemberSignatureTitle.tsx"],"names":[],"mappings":";AAAA,sCAAsC;AACtC,mHAAmH;AAEnH,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAShE,MAAM,UAAU,oBAAoB,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,qBAAqB,EAA6B;;IACjH,MAAM,EAAE,QAAQ,EAAE,GAAG,aAAa,CAAC,+BAA+B,CAAe,CAAC;IAClF,kDAAkD;IAClD,MAAM,cAAc,GAAG,MAAA,MAAA,GAAG,CAAC,UAAU,0CAAE,KAAK,EAAE,mCAAI,EAAE,CAAC;IACrD,MAAM,qBAAqB,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC;IAE/F,IAAI,qBAAqB,IAAI,CAAC,EAAE,CAAC;QAChC,cAAc,CAAC,MAAM,CAAC,qBAAqB,EAAE,CAAC,EAAE;YAC/C,EAAE,EAAE,M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E,UAAU,KAAI,cAAc,IAAI,KAAK,CAAC,IAAI,GAAG,EAC3D,IAAI,IACC,EACP,KAAC,IAAI,IAAC,IAAI,EAAE,KAAK,CAAC,IAAI,GAAI,IACxB,CACH,IACK,KAfO,KAAK,CAAC,EAAE,CAgBZ,CACX,CAAA;aAAA,CAAC,EAEF,eAAM,SAAS,EAAC,sBAAsB,kBAAS,EAE9C,GAAG,CAAC,IAAI,IAAI,CACZ,8BACC,eAAM,SAAS,EAAC,sBAAsB,YAAE,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,GAAQ,EACxE,KAAC,IAAI,IAAC,IAAI,EAAE,GAAG,CAAC,IAAI,GAAI,IACtB,CACH,IACC,CACH,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { TSDSignatureReflection } from '../types';
|
|
2
|
+
export interface MemberSignaturesProps {
|
|
3
|
+
inPanel?: boolean;
|
|
4
|
+
sigs: TSDSignatureReflection[];
|
|
5
|
+
}
|
|
6
|
+
export declare function MemberSignatures({ inPanel, sigs }: MemberSignaturesProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=MemberSignatures.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MemberSignatures.d.ts","sourceRoot":"","sources":["../../src/components/MemberSignatures.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAKvD,MAAM,WAAW,qBAAqB;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,sBAAsB,EAAE,CAAC;CAC/B;AAED,wBAAgB,gBAAgB,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,qBAAqB,2CA+CxE"}
|
|
@@ -1,70 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
4
|
-
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."); }
|
|
5
|
-
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; } }
|
|
6
|
-
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; }
|
|
7
|
-
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; } }
|
|
8
|
-
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
9
|
-
const react = require('react');
|
|
10
|
-
const useMinimalLayout = require('../hooks/useMinimalLayout.js');
|
|
11
|
-
const Icon = require('./Icon.js');
|
|
12
|
-
const MemberSignatureBody = require('./MemberSignatureBody.js');
|
|
13
|
-
const MemberSignatureTitle = require('./MemberSignatureTitle.js');
|
|
14
|
-
const jsxRuntime = require('react/jsx-runtime');
|
|
15
|
-
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
16
2
|
/* eslint-disable jsx-a11y/no-noninteractive-element-interactions */
|
|
17
3
|
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
|
18
4
|
// https://github.com/TypeStrong/typedoc-default-themes/blob/master/src/default/partials/member.signatures.hbs
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
className: "tsd-signatures",
|
|
36
|
-
children: sigs.map((sig, i) => /*#__PURE__*/jsxRuntime.jsxs("li", {
|
|
37
|
-
className: `tsd-signature tsd-kind-icon ${i === activeIndex ? '' : 'tsd-signature-inactive'} ${hasMultiple ? 'tsd-pressable' : ''}`,
|
|
38
|
-
onClick: hasMultiple ?
|
|
39
|
-
// eslint-disable-next-line react-perf/jsx-no-new-function-as-prop
|
|
40
|
-
() => {
|
|
41
|
-
setActiveIndex(i);
|
|
42
|
-
} : undefined,
|
|
43
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(Icon.Icon, {
|
|
44
|
-
reflection: sig
|
|
45
|
-
}), /*#__PURE__*/jsxRuntime.jsx(MemberSignatureTitle.MemberSignatureTitle, {
|
|
46
|
-
hasMultipleSignatures: sigs.length > 1,
|
|
47
|
-
sig: sig
|
|
48
|
-
})]
|
|
49
|
-
}, sig.id))
|
|
50
|
-
})
|
|
51
|
-
}), MemberSignatureBody.hasSigBody(body, minimal) && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
52
|
-
children: [!inPanel && /*#__PURE__*/jsxRuntime.jsx("hr", {
|
|
53
|
-
className: "tsd-divider"
|
|
54
|
-
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
55
|
-
className: inPanel ? 'tsd-panel-content' : '',
|
|
56
|
-
children: /*#__PURE__*/jsxRuntime.jsx("ul", {
|
|
57
|
-
className: "tsd-descriptions",
|
|
58
|
-
children: /*#__PURE__*/jsxRuntime.jsx("li", {
|
|
59
|
-
className: "tsd-description",
|
|
60
|
-
children: /*#__PURE__*/jsxRuntime.jsx(MemberSignatureBody.MemberSignatureBody, {
|
|
61
|
-
sig: body
|
|
62
|
-
})
|
|
63
|
-
}, body.id)
|
|
64
|
-
})
|
|
65
|
-
})]
|
|
66
|
-
})]
|
|
67
|
-
});
|
|
5
|
+
import { useState } from 'react';
|
|
6
|
+
import { useMinimalLayout } from '../hooks/useMinimalLayout';
|
|
7
|
+
import { Icon } from './Icon';
|
|
8
|
+
import { hasSigBody, MemberSignatureBody } from './MemberSignatureBody';
|
|
9
|
+
import { MemberSignatureTitle } from './MemberSignatureTitle';
|
|
10
|
+
export function MemberSignatures({ inPanel, sigs }) {
|
|
11
|
+
const [activeIndex, setActiveIndex] = useState(0);
|
|
12
|
+
const minimal = useMinimalLayout();
|
|
13
|
+
const hasMultiple = sigs.length > 1;
|
|
14
|
+
const body = sigs[activeIndex];
|
|
15
|
+
return (_jsxs(_Fragment, { children: [_jsx("div", { className: inPanel ? 'tsd-panel-content' : '', children: _jsx("ul", { className: "tsd-signatures", children: sigs.map((sig, i) => (_jsxs("li", { className: `tsd-signature tsd-kind-icon ${i === activeIndex ? '' : 'tsd-signature-inactive'} ${hasMultiple ? 'tsd-pressable' : ''}`, onClick: hasMultiple
|
|
16
|
+
? // eslint-disable-next-line react-perf/jsx-no-new-function-as-prop
|
|
17
|
+
() => {
|
|
18
|
+
setActiveIndex(i);
|
|
19
|
+
}
|
|
20
|
+
: undefined, children: [_jsx(Icon, { reflection: sig }), _jsx(MemberSignatureTitle, { hasMultipleSignatures: sigs.length > 1, sig: sig })] }, sig.id))) }) }), hasSigBody(body, minimal) && (_jsxs(_Fragment, { children: [!inPanel && _jsx("hr", { className: "tsd-divider" }), _jsx("div", { className: inPanel ? 'tsd-panel-content' : '', children: _jsx("ul", { className: "tsd-descriptions", children: _jsx("li", { className: "tsd-description", children: _jsx(MemberSignatureBody, { sig: body }) }, body.id) }) })] }))] }));
|
|
68
21
|
}
|
|
69
|
-
|
|
70
|
-
//# sourceMappingURL=MemberSignatures.js.map
|
|
22
|
+
//# sourceMappingURL=MemberSignatures.js.map
|