@d-fischer/documen.ts 0.16.9 → 0.17.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/index.html +36 -35
- package/lib/common/CustomError.js +1 -4
- package/lib/common/CustomError.js.map +1 -1
- package/lib/common/Paths.js +1 -2
- package/lib/common/components/Badge.js +7 -10
- package/lib/common/components/Badge.js.map +1 -1
- package/lib/common/components/BetaNotice.js +5 -10
- package/lib/common/components/BetaNotice.js.map +1 -1
- package/lib/common/components/Button.js +8 -12
- package/lib/common/components/Button.js.map +1 -1
- package/lib/common/components/CodeBlock.js +45 -61
- package/lib/common/components/CodeBlock.js.map +1 -1
- package/lib/common/components/CodeLink.js +12 -15
- package/lib/common/components/CodeLink.js.map +1 -1
- package/lib/common/components/DeprecationNotice.js +5 -10
- package/lib/common/components/DeprecationNotice.js.map +1 -1
- package/lib/common/components/FunctionParamDesc.js +7 -19
- package/lib/common/components/FunctionParamDesc.js.map +1 -1
- package/lib/common/components/FunctionParamDescEntry.js +26 -38
- package/lib/common/components/FunctionParamDescEntry.js.map +1 -1
- package/lib/common/components/FunctionReturnType.js +8 -17
- package/lib/common/components/FunctionReturnType.js.map +1 -1
- package/lib/common/components/FunctionSignature.js +7 -22
- package/lib/common/components/FunctionSignature.js.map +1 -1
- package/lib/common/components/InterfaceDetail.js +11 -18
- package/lib/common/components/InterfaceDetail.js.map +1 -1
- package/lib/common/components/InterfaceRepresentation.js +21 -40
- package/lib/common/components/InterfaceRepresentation.js.map +1 -1
- package/lib/common/components/MainMenu.js +20 -36
- package/lib/common/components/MainMenu.js.map +1 -1
- package/lib/common/components/NavMenu.js +6 -9
- package/lib/common/components/NavMenu.js.map +1 -1
- package/lib/common/components/NavMenuGroup.js +5 -10
- package/lib/common/components/NavMenuGroup.js.map +1 -1
- package/lib/common/components/NavMenuItem.js +8 -11
- package/lib/common/components/NavMenuItem.js.map +1 -1
- package/lib/common/components/PageArticle.js +7 -10
- package/lib/common/components/PageArticle.js.map +1 -1
- package/lib/common/components/SymbolHeader.js +6 -20
- package/lib/common/components/SymbolHeader.js.map +1 -1
- package/lib/common/components/TypeAliasHint.js +7 -22
- package/lib/common/components/TypeAliasHint.js.map +1 -1
- package/lib/common/components/TypeLink.js +12 -16
- package/lib/common/components/TypeLink.js.map +1 -1
- package/lib/common/components/VersionMenu.js +21 -28
- package/lib/common/components/VersionMenu.js.map +1 -1
- package/lib/common/components/cards/CardToolbar.js +11 -17
- package/lib/common/components/cards/CardToolbar.js.map +1 -1
- package/lib/common/components/cards/EventCard.js +21 -46
- package/lib/common/components/cards/EventCard.js.map +1 -1
- package/lib/common/components/cards/FunctionCardHeader.js +13 -25
- package/lib/common/components/cards/FunctionCardHeader.js.map +1 -1
- package/lib/common/components/cards/MethodCard.js +13 -23
- package/lib/common/components/cards/MethodCard.js.map +1 -1
- package/lib/common/components/cards/PropertyCard.js +15 -31
- package/lib/common/components/cards/PropertyCard.js.map +1 -1
- package/lib/common/components/codeBuilders/ReferenceTypeView.js +12 -25
- package/lib/common/components/codeBuilders/ReferenceTypeView.js.map +1 -1
- package/lib/common/components/codeBuilders/Type.js +30 -75
- package/lib/common/components/codeBuilders/Type.js.map +1 -1
- package/lib/common/components/overviewTable/OverviewTable.js +6 -21
- package/lib/common/components/overviewTable/OverviewTable.js.map +1 -1
- package/lib/common/components/overviewTable/OverviewTableEntry.js +13 -22
- package/lib/common/components/overviewTable/OverviewTableEntry.js.map +1 -1
- package/lib/common/config/Config.js +1 -2
- package/lib/common/config/Util.js +4 -8
- package/lib/common/config/Util.js.map +1 -1
- package/lib/common/config/index.js +5 -9
- package/lib/common/config/index.js.map +1 -1
- package/lib/common/containers/App.js +10 -18
- package/lib/common/containers/App.js.map +1 -1
- package/lib/common/containers/AppLayout.js +5 -10
- package/lib/common/containers/AppLayout.js.map +1 -1
- package/lib/common/containers/Card.js +6 -9
- package/lib/common/containers/Card.js.map +1 -1
- package/lib/common/containers/PageContent.js +5 -8
- package/lib/common/containers/PageContent.js.map +1 -1
- package/lib/common/containers/PageHeader.js +5 -8
- package/lib/common/containers/PageHeader.js.map +1 -1
- package/lib/common/containers/PageSwitch.js +10 -19
- package/lib/common/containers/PageSwitch.js.map +1 -1
- package/lib/common/containers/ReferencePackageContainer.js +37 -54
- package/lib/common/containers/ReferencePackageContainer.js.map +1 -1
- package/lib/common/htmlRenderer/HtmlRenderer.js +23 -37
- package/lib/common/htmlRenderer/HtmlRenderer.js.map +1 -1
- package/lib/common/htmlRenderer/RouterMode.js +1 -2
- package/lib/common/htmlRenderer/StaticRouterWithSuffix.js +20 -24
- package/lib/common/htmlRenderer/StaticRouterWithSuffix.js.map +1 -1
- package/lib/common/pages/ClassPage.js +39 -67
- package/lib/common/pages/ClassPage.js.map +1 -1
- package/lib/common/pages/DocPage.js +27 -39
- package/lib/common/pages/DocPage.js.map +1 -1
- package/lib/common/pages/EnumPage.js +20 -40
- package/lib/common/pages/EnumPage.js.map +1 -1
- package/lib/common/pages/FunctionPage.js +20 -39
- package/lib/common/pages/FunctionPage.js.map +1 -1
- package/lib/common/pages/InterfacePage.js +20 -32
- package/lib/common/pages/InterfacePage.js.map +1 -1
- package/lib/common/pages/TypeAliasPage.js +19 -34
- package/lib/common/pages/TypeAliasPage.js.map +1 -1
- package/lib/common/reference/index.js +1 -3
- package/lib/common/reference/index.js.map +1 -1
- package/lib/common/theme.js +1 -3
- package/lib/common/theme.js.map +1 -1
- package/lib/common/tools/ArrayTools.js +7 -18
- package/lib/common/tools/ArrayTools.js.map +1 -1
- package/lib/common/tools/CodeTools.js +12 -23
- package/lib/common/tools/CodeTools.js.map +1 -1
- package/lib/common/tools/ConfigTools.js +15 -20
- package/lib/common/tools/ConfigTools.js.map +1 -1
- package/lib/common/tools/FileTools.js +9 -16
- package/lib/common/tools/FileTools.js.map +1 -1
- package/lib/common/tools/FunctionTools.js +3 -7
- package/lib/common/tools/FunctionTools.js.map +1 -1
- package/lib/common/tools/NodeTools.js +22 -33
- package/lib/common/tools/NodeTools.js.map +1 -1
- package/lib/common/tools/Point.js +1 -2
- package/lib/common/tools/ReferenceTools.js +30 -43
- package/lib/common/tools/ReferenceTools.js.map +1 -1
- package/lib/common/tools/StringTools.js +3 -9
- package/lib/common/tools/StringTools.js.map +1 -1
- package/lib/common/tools/TypeTools.js +1 -2
- package/lib/common/tools/markdown/MarkdownParser.js +21 -28
- package/lib/common/tools/markdown/MarkdownParser.js.map +1 -1
- package/lib/common/tools/markdown/plugins/customDirectives.js +15 -17
- package/lib/common/tools/markdown/plugins/customDirectives.js.map +1 -1
- package/lib/common/tools/markdown/plugins/gfmTables.js +7 -12
- package/lib/common/tools/markdown/plugins/gfmTables.js.map +1 -1
- package/lib/common/tools/markdown/plugins/symbolLinks.js +9 -13
- package/lib/common/tools/markdown/plugins/symbolLinks.js.map +1 -1
- package/lib/generator/analyzer/AnalyzeContext.js +5 -6
- package/lib/generator/analyzer/AnalyzeContext.js.map +1 -1
- package/lib/generator/analyzer/DocComment.js +17 -23
- package/lib/generator/analyzer/DocComment.js.map +1 -1
- package/lib/generator/analyzer/DocCommentTag.js +4 -5
- package/lib/generator/analyzer/DocCommentTag.js.map +1 -1
- package/lib/generator/analyzer/Project.js +71 -84
- package/lib/generator/analyzer/Project.js.map +1 -1
- package/lib/generator/analyzer/createReflection.js +87 -101
- package/lib/generator/analyzer/createReflection.js.map +1 -1
- package/lib/generator/analyzer/createType.js +51 -62
- package/lib/generator/analyzer/createType.js.map +1 -1
- package/lib/generator/analyzer/reflections/AccessorReflection.js +36 -39
- package/lib/generator/analyzer/reflections/AccessorReflection.js.map +1 -1
- package/lib/generator/analyzer/reflections/ClassReflection.js +58 -51
- package/lib/generator/analyzer/reflections/ClassReflection.js.map +1 -1
- package/lib/generator/analyzer/reflections/ConstructorReflection.js +28 -36
- package/lib/generator/analyzer/reflections/ConstructorReflection.js.map +1 -1
- package/lib/generator/analyzer/reflections/EnumMemberReflection.js +15 -18
- package/lib/generator/analyzer/reflections/EnumMemberReflection.js.map +1 -1
- package/lib/generator/analyzer/reflections/EnumReflection.js +21 -23
- package/lib/generator/analyzer/reflections/EnumReflection.js.map +1 -1
- package/lib/generator/analyzer/reflections/FunctionReflection.js +14 -16
- package/lib/generator/analyzer/reflections/FunctionReflection.js.map +1 -1
- package/lib/generator/analyzer/reflections/Heritage.js +6 -11
- package/lib/generator/analyzer/reflections/Heritage.js.map +1 -1
- package/lib/generator/analyzer/reflections/InterfaceReflection.js +41 -41
- package/lib/generator/analyzer/reflections/InterfaceReflection.js.map +1 -1
- package/lib/generator/analyzer/reflections/MethodReflection.js +40 -45
- package/lib/generator/analyzer/reflections/MethodReflection.js.map +1 -1
- package/lib/generator/analyzer/reflections/ParameterReflection.js +68 -69
- package/lib/generator/analyzer/reflections/ParameterReflection.js.map +1 -1
- package/lib/generator/analyzer/reflections/PropertyReflection.js +43 -40
- package/lib/generator/analyzer/reflections/PropertyReflection.js.map +1 -1
- package/lib/generator/analyzer/reflections/ReferenceReflection.js +8 -7
- package/lib/generator/analyzer/reflections/ReferenceReflection.js.map +1 -1
- package/lib/generator/analyzer/reflections/Reflection.js +35 -38
- package/lib/generator/analyzer/reflections/Reflection.js.map +1 -1
- package/lib/generator/analyzer/reflections/SignatureReflection.js +42 -46
- package/lib/generator/analyzer/reflections/SignatureReflection.js.map +1 -1
- package/lib/generator/analyzer/reflections/SymbolBasedReflection.js +6 -13
- package/lib/generator/analyzer/reflections/SymbolBasedReflection.js.map +1 -1
- package/lib/generator/analyzer/reflections/TypeAliasReflection.js +24 -26
- package/lib/generator/analyzer/reflections/TypeAliasReflection.js.map +1 -1
- package/lib/generator/analyzer/reflections/TypeLiteralReflection.js +22 -21
- package/lib/generator/analyzer/reflections/TypeLiteralReflection.js.map +1 -1
- package/lib/generator/analyzer/reflections/TypeParameterReflection.js +38 -39
- package/lib/generator/analyzer/reflections/TypeParameterReflection.js.map +1 -1
- package/lib/generator/analyzer/types/ArrayType.js +15 -23
- package/lib/generator/analyzer/types/ArrayType.js.map +1 -1
- package/lib/generator/analyzer/types/FunctionType.js +31 -38
- package/lib/generator/analyzer/types/FunctionType.js.map +1 -1
- package/lib/generator/analyzer/types/IntersectionType.js +12 -20
- package/lib/generator/analyzer/types/IntersectionType.js.map +1 -1
- package/lib/generator/analyzer/types/IntrinsicType.js +33 -41
- package/lib/generator/analyzer/types/IntrinsicType.js.map +1 -1
- package/lib/generator/analyzer/types/LiteralType.js +60 -68
- package/lib/generator/analyzer/types/LiteralType.js.map +1 -1
- package/lib/generator/analyzer/types/NamedTupleElementType.js +11 -15
- package/lib/generator/analyzer/types/NamedTupleElementType.js.map +1 -1
- package/lib/generator/analyzer/types/ObjectLiteralType.js +21 -30
- package/lib/generator/analyzer/types/ObjectLiteralType.js.map +1 -1
- package/lib/generator/analyzer/types/OptionalType.js +11 -17
- package/lib/generator/analyzer/types/OptionalType.js.map +1 -1
- package/lib/generator/analyzer/types/ReferenceType.js +118 -133
- package/lib/generator/analyzer/types/ReferenceType.js.map +1 -1
- package/lib/generator/analyzer/types/ReflectionType.js +4 -7
- package/lib/generator/analyzer/types/ReflectionType.js.map +1 -1
- package/lib/generator/analyzer/types/TupleType.js +27 -31
- package/lib/generator/analyzer/types/TupleType.js.map +1 -1
- package/lib/generator/analyzer/types/Type.js +1 -5
- package/lib/generator/analyzer/types/Type.js.map +1 -1
- package/lib/generator/analyzer/types/TypeOperatorType.js +38 -40
- package/lib/generator/analyzer/types/TypeOperatorType.js.map +1 -1
- package/lib/generator/analyzer/types/UnionType.js +22 -30
- package/lib/generator/analyzer/types/UnionType.js.map +1 -1
- package/lib/generator/analyzer/types/UnknownType.js +5 -6
- package/lib/generator/analyzer/types/UnknownType.js.map +1 -1
- package/lib/generator/analyzer/util/expressions.js +8 -13
- package/lib/generator/analyzer/util/expressions.js.map +1 -1
- package/lib/generator/analyzer/util/functions.js +15 -19
- package/lib/generator/analyzer/util/functions.js.map +1 -1
- package/lib/generator/analyzer/util/inheritance.js +26 -32
- package/lib/generator/analyzer/util/inheritance.js.map +1 -1
- package/lib/generator/analyzer/util/promises.js +2 -9
- package/lib/generator/analyzer/util/promises.js.map +1 -1
- package/lib/generator/analyzer/util/sourceMaps.js +12 -20
- package/lib/generator/analyzer/util/sourceMaps.js.map +1 -1
- package/lib/generator/analyzer/util/symbols.js +3 -9
- package/lib/generator/analyzer/util/symbols.js.map +1 -1
- package/lib/generator/analyzer/util/types.js +6 -10
- package/lib/generator/analyzer/util/types.js.map +1 -1
- package/lib/generator/cli.js +5 -8
- package/lib/generator/cli.js.map +1 -1
- package/lib/generator/commands/default.js +260 -259
- package/lib/generator/commands/default.js.map +1 -1
- package/lib/generator/index.js +1 -1
- package/lib/generator/modes/Generator.js +20 -31
- package/lib/generator/modes/Generator.js.map +1 -1
- package/lib/generator/modes/HtmlGenerator.js +214 -228
- package/lib/generator/modes/HtmlGenerator.js.map +1 -1
- package/lib/generator/modes/MonorepoGenerator.js +143 -159
- package/lib/generator/modes/MonorepoGenerator.js.map +1 -1
- package/lib/generator/modes/OutputGenerator.js +2 -7
- package/lib/generator/modes/OutputGenerator.js.map +1 -1
- package/lib/progressiveEnhancement/fsMap.js +2 -5
- package/lib/progressiveEnhancement/fsMap.js.map +1 -1
- package/package.json +16 -16
- package/src/common/components/CodeBlock.tsx +2 -2
- package/src/common/components/CodeLink.tsx +2 -2
- package/src/common/components/DeprecationNotice.tsx +2 -2
- package/src/common/components/FunctionParamDesc.tsx +3 -3
- package/src/common/components/FunctionParamDescEntry.tsx +6 -6
- package/src/common/components/FunctionReturnType.tsx +3 -3
- package/src/common/components/FunctionSignature.tsx +2 -2
- package/src/common/components/InterfaceDetail.tsx +15 -7
- package/src/common/components/InterfaceRepresentation.tsx +9 -9
- package/src/common/components/MainMenu.tsx +4 -4
- package/src/common/components/NavMenuItem.tsx +1 -1
- package/src/common/components/PageArticle.tsx +2 -2
- package/src/common/components/SymbolHeader.tsx +7 -9
- package/src/common/components/TypeAliasHint.tsx +3 -5
- package/src/common/components/TypeLink.tsx +6 -7
- package/src/common/components/VersionMenu.tsx +3 -3
- package/src/common/components/cards/CardToolbar.tsx +10 -6
- package/src/common/components/cards/EventCard.tsx +19 -23
- package/src/common/components/cards/FunctionCardHeader.tsx +8 -8
- package/src/common/components/cards/MethodCard.tsx +8 -8
- package/src/common/components/cards/PropertyCard.tsx +11 -11
- package/src/common/components/codeBuilders/ReferenceTypeView.tsx +4 -4
- package/src/common/components/codeBuilders/Type.tsx +4 -4
- package/src/common/components/overviewTable/OverviewTable.tsx +2 -2
- package/src/common/components/overviewTable/OverviewTableEntry.tsx +7 -7
- package/src/common/config/Config.ts +1 -1
- package/src/common/config/Util.ts +11 -3
- package/src/common/config/index.tsx +2 -2
- package/src/common/containers/App.tsx +12 -9
- package/src/common/containers/AppLayout.tsx +2 -2
- package/src/common/containers/PageHeader.tsx +2 -2
- package/src/common/containers/PageSwitch.tsx +7 -7
- package/src/common/containers/ReferencePackageContainer.tsx +13 -13
- package/src/common/htmlRenderer/HtmlRenderer.tsx +8 -9
- package/src/common/htmlRenderer/StaticRouterWithSuffix.tsx +18 -21
- package/src/common/pages/ClassPage.tsx +17 -17
- package/src/common/pages/DocPage.tsx +10 -10
- package/src/common/pages/EnumPage.tsx +14 -14
- package/src/common/pages/FunctionPage.tsx +15 -15
- package/src/common/pages/InterfacePage.tsx +13 -13
- package/src/common/pages/TypeAliasPage.tsx +12 -12
- package/src/common/reference/index.ts +0 -1
- package/src/common/tools/ArrayTools.ts +27 -11
- package/src/common/tools/CodeTools.tsx +1 -1
- package/src/common/tools/ConfigTools.ts +1 -1
- package/src/common/tools/FunctionTools.ts +2 -3
- package/src/common/tools/NodeTools.ts +3 -2
- package/src/common/tools/ReferenceTools.ts +10 -11
- package/src/common/tools/StringTools.ts +1 -1
- package/src/common/tools/markdown/MarkdownParser.tsx +13 -15
- package/src/common/tools/markdown/plugins/customDirectives.ts +1 -1
- package/src/common/tools/markdown/plugins/symbolLinks.ts +3 -3
- package/src/dev/index.tsx +9 -9
- package/src/dev/registerServiceWorker.ts +8 -16
- package/src/progressiveEnhancement/fsMap.ts +0 -1
- package/src/progressiveEnhancement/index.tsx +9 -11
- package/tsconfig-dev.json +1 -6
- package/tsconfig-enhance.json +1 -5
- package/tsconfig-html.json +1 -5
- package/tsconfig.json +7 -21
- package/types/globals.d.ts +0 -1
- package/types/react-router-hash-link.d.ts +0 -8
|
@@ -7,11 +7,11 @@ import type {
|
|
|
7
7
|
FunctionReferenceNode,
|
|
8
8
|
MethodReferenceNode,
|
|
9
9
|
PropertyReferenceNode
|
|
10
|
-
} from '../reference';
|
|
10
|
+
} from '../reference/index.js';
|
|
11
11
|
|
|
12
|
-
import { hasTag } from '../tools/CodeTools';
|
|
12
|
+
import { hasTag } from '../tools/CodeTools.js';
|
|
13
13
|
|
|
14
|
-
import FunctionParamDescEntry from './FunctionParamDescEntry';
|
|
14
|
+
import FunctionParamDescEntry from './FunctionParamDescEntry.js';
|
|
15
15
|
|
|
16
16
|
interface FunctionParamDescProps {
|
|
17
17
|
functionDefinition: FunctionReferenceNode | MethodReferenceNode | ConstructorReferenceNode | PropertyReferenceNode;
|
|
@@ -11,12 +11,12 @@ import type {
|
|
|
11
11
|
ParameterReferenceNode,
|
|
12
12
|
PropertyReferenceNode,
|
|
13
13
|
VariableReferenceNode
|
|
14
|
-
} from '../reference';
|
|
15
|
-
import { hasTag, isOptionalType } from '../tools/CodeTools';
|
|
16
|
-
import MarkdownParser from '../tools/markdown/MarkdownParser';
|
|
17
|
-
import { defaultNodeSort } from '../tools/NodeTools';
|
|
18
|
-
import { findSymbolByMember, getChildren } from '../tools/ReferenceTools';
|
|
19
|
-
import Type from './codeBuilders/Type';
|
|
14
|
+
} from '../reference/index.js';
|
|
15
|
+
import { hasTag, isOptionalType } from '../tools/CodeTools.js';
|
|
16
|
+
import MarkdownParser from '../tools/markdown/MarkdownParser.js';
|
|
17
|
+
import { defaultNodeSort } from '../tools/NodeTools.js';
|
|
18
|
+
import { findSymbolByMember, getChildren } from '../tools/ReferenceTools.js';
|
|
19
|
+
import Type from './codeBuilders/Type.js';
|
|
20
20
|
|
|
21
21
|
interface FunctionParamDescEntryProps {
|
|
22
22
|
param: ParameterReferenceNode | VariableReferenceNode | PropertyReferenceNode;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { makeStyles } from '@mui/styles';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import type { CallSignatureReferenceNode } from '../reference';
|
|
4
|
-
import { useAsyncType } from '../tools/NodeTools';
|
|
5
|
-
import Type from './codeBuilders/Type';
|
|
3
|
+
import type { CallSignatureReferenceNode } from '../reference/index.js';
|
|
4
|
+
import { useAsyncType } from '../tools/NodeTools.js';
|
|
5
|
+
import Type from './codeBuilders/Type.js';
|
|
6
6
|
|
|
7
7
|
interface FunctionReturnTypeProps {
|
|
8
8
|
signature: CallSignatureReferenceNode;
|
|
@@ -5,7 +5,7 @@ import type {
|
|
|
5
5
|
ClassReferenceNode,
|
|
6
6
|
ConstructSignatureReferenceNode,
|
|
7
7
|
InterfaceReferenceNode
|
|
8
|
-
} from '../reference';
|
|
8
|
+
} from '../reference/index.js';
|
|
9
9
|
|
|
10
10
|
interface FunctionSignatureProps {
|
|
11
11
|
signature: CallSignatureReferenceNode | ConstructSignatureReferenceNode;
|
|
@@ -26,7 +26,7 @@ const useStyles = makeStyles(
|
|
|
26
26
|
const FunctionSignature: React.FC<FunctionSignatureProps> = ({ signature, parent }) => {
|
|
27
27
|
const classes = useStyles();
|
|
28
28
|
|
|
29
|
-
let name = signature
|
|
29
|
+
let { name } = signature;
|
|
30
30
|
|
|
31
31
|
if (signature.kind === 'constructSignature' && parent) {
|
|
32
32
|
name = `new ${parent.name}`;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { InterfaceReferenceNode, MethodReferenceNode, PropertyReferenceNode } from '../reference';
|
|
3
|
-
import { defaultNodeSort } from '../tools/NodeTools';
|
|
4
|
-
import { filterChildrenByMember } from '../tools/ReferenceTools';
|
|
5
|
-
import MethodCard from './cards/MethodCard';
|
|
6
|
-
import PropertyCard from './cards/PropertyCard';
|
|
2
|
+
import type { InterfaceReferenceNode, MethodReferenceNode, PropertyReferenceNode } from '../reference/index.js';
|
|
3
|
+
import { defaultNodeSort } from '../tools/NodeTools.js';
|
|
4
|
+
import { filterChildrenByMember } from '../tools/ReferenceTools.js';
|
|
5
|
+
import MethodCard from './cards/MethodCard.js';
|
|
6
|
+
import PropertyCard from './cards/PropertyCard.js';
|
|
7
7
|
|
|
8
8
|
interface InterfaceDetailProps {
|
|
9
9
|
symbol: InterfaceReferenceNode;
|
|
@@ -19,13 +19,21 @@ const InterfaceDetail: React.FC<InterfaceDetailProps> = ({ symbol }) => {
|
|
|
19
19
|
{methods.length ? (
|
|
20
20
|
<>
|
|
21
21
|
<h2>Methods</h2>
|
|
22
|
-
{methods
|
|
22
|
+
{methods
|
|
23
|
+
.sort(defaultNodeSort)
|
|
24
|
+
.map(method =>
|
|
25
|
+
method.signatures?.map(sig => (
|
|
26
|
+
<MethodCard key={sig.id} parent={symbol} definition={method} sig={sig} />
|
|
27
|
+
))
|
|
28
|
+
)}
|
|
23
29
|
</>
|
|
24
30
|
) : null}
|
|
25
31
|
{properties.length ? (
|
|
26
32
|
<>
|
|
27
33
|
<h2>Properties</h2>
|
|
28
|
-
{properties.sort(defaultNodeSort).map(prop =>
|
|
34
|
+
{properties.sort(defaultNodeSort).map(prop => (
|
|
35
|
+
<PropertyCard key={prop.id} definition={prop} />
|
|
36
|
+
))}
|
|
29
37
|
</>
|
|
30
38
|
) : null}
|
|
31
39
|
</>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { makeStyles } from '@mui/styles';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import {
|
|
5
|
-
import type { InterfaceReferenceNode } from '../reference';
|
|
6
|
-
import { defaultNodeSort } from '../tools/NodeTools';
|
|
7
|
-
import { getChildren } from '../tools/ReferenceTools';
|
|
8
|
-
import Type from './codeBuilders/Type';
|
|
4
|
+
import { Link } from 'react-router';
|
|
5
|
+
import type { InterfaceReferenceNode } from '../reference/index.js';
|
|
6
|
+
import { defaultNodeSort } from '../tools/NodeTools.js';
|
|
7
|
+
import { getChildren } from '../tools/ReferenceTools.js';
|
|
8
|
+
import Type from './codeBuilders/Type.js';
|
|
9
9
|
|
|
10
10
|
interface InterfaceRepresentationProps {
|
|
11
11
|
symbol: InterfaceReferenceNode;
|
|
@@ -57,9 +57,9 @@ const InterfaceRepresentation: React.FC<InterfaceRepresentationProps> = ({ symbo
|
|
|
57
57
|
<div className={classes.comment}>{member.comment.shortText}</div>
|
|
58
58
|
) : null}
|
|
59
59
|
<div>
|
|
60
|
-
<
|
|
60
|
+
<Link to={`#${member.name}`} className={classes.name}>
|
|
61
61
|
{member.name}
|
|
62
|
-
</
|
|
62
|
+
</Link>
|
|
63
63
|
{member.flags?.isOptional ? '?' : ''}
|
|
64
64
|
: <Type def={member.type} ignoreUndefined />
|
|
65
65
|
</div>
|
|
@@ -74,9 +74,9 @@ const InterfaceRepresentation: React.FC<InterfaceRepresentationProps> = ({ symbo
|
|
|
74
74
|
<div className={classes.comment}>{sig.comment.shortText}</div>
|
|
75
75
|
) : null}
|
|
76
76
|
<div>
|
|
77
|
-
<
|
|
77
|
+
<Link to={`#${member.name}`} className={classes.name}>
|
|
78
78
|
{member.name}
|
|
79
|
-
</
|
|
79
|
+
</Link>
|
|
80
80
|
{member.flags?.isOptional ? '?' : ''}
|
|
81
81
|
(): <Type def={member.signatures![0].type} />
|
|
82
82
|
</div>
|
|
@@ -3,10 +3,10 @@ import { FontAwesomeIcon as Icon } from '@fortawesome/react-fontawesome';
|
|
|
3
3
|
import { makeStyles } from '@mui/styles';
|
|
4
4
|
import classNames from 'classnames';
|
|
5
5
|
import React, { useContext, useMemo } from 'react';
|
|
6
|
-
import { NavLink, useLocation, useResolvedPath } from 'react-router
|
|
7
|
-
import { ConfigContext } from '../config';
|
|
8
|
-
import { getPackageList } from '../tools/ReferenceTools';
|
|
9
|
-
import VersionMenu from './VersionMenu';
|
|
6
|
+
import { NavLink, useLocation, useResolvedPath } from 'react-router';
|
|
7
|
+
import { ConfigContext } from '../config/index.js';
|
|
8
|
+
import { getPackageList } from '../tools/ReferenceTools.js';
|
|
9
|
+
import VersionMenu from './VersionMenu.js';
|
|
10
10
|
|
|
11
11
|
const useStyles = makeStyles(
|
|
12
12
|
theme => ({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { createContext } from 'react';
|
|
2
|
-
import MarkdownParser from '../tools/markdown/MarkdownParser';
|
|
2
|
+
import MarkdownParser from '../tools/markdown/MarkdownParser.js';
|
|
3
3
|
|
|
4
4
|
export interface ArticleContent {
|
|
5
5
|
title: string;
|
|
@@ -14,7 +14,7 @@ interface PageArticleProps {
|
|
|
14
14
|
|
|
15
15
|
const PageArticle: React.FC<PageArticleProps> = ({ mockContent }) => (
|
|
16
16
|
<PageArticleContext.Consumer>
|
|
17
|
-
{article => <MarkdownParser source={mockContent ?? article?.content ?? ''}/>}
|
|
17
|
+
{article => <MarkdownParser source={mockContent ?? article?.content ?? ''} />}
|
|
18
18
|
</PageArticleContext.Consumer>
|
|
19
19
|
);
|
|
20
20
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import PageHeader from '../containers/PageHeader';
|
|
3
|
-
import type { ReferenceNode } from '../reference';
|
|
4
|
-
import MarkdownParser from '../tools/markdown/MarkdownParser';
|
|
5
|
-
import CodeLink from './CodeLink';
|
|
2
|
+
import PageHeader from '../containers/PageHeader.js';
|
|
3
|
+
import type { ReferenceNode } from '../reference/index.js';
|
|
4
|
+
import MarkdownParser from '../tools/markdown/MarkdownParser.js';
|
|
5
|
+
import CodeLink from './CodeLink.js';
|
|
6
6
|
|
|
7
7
|
interface SymbolHeaderProps {
|
|
8
8
|
symbol: ReferenceNode;
|
|
@@ -13,13 +13,11 @@ const SymbolHeader: React.FC<SymbolHeaderProps> = ({ symbol }) => (
|
|
|
13
13
|
<h1>
|
|
14
14
|
{symbol.name}
|
|
15
15
|
{'typeParameters' in symbol && symbol.typeParameters?.length && (
|
|
16
|
-
|
|
17
|
-
<{symbol.typeParameters.map(param => param.name).join(', ')}>
|
|
18
|
-
</>
|
|
16
|
+
<><{symbol.typeParameters.map(param => param.name).join(', ')}></>
|
|
19
17
|
)}
|
|
20
18
|
</h1>
|
|
21
|
-
<CodeLink symbol={symbol}/>
|
|
22
|
-
{symbol.comment?.shortText && <MarkdownParser source={symbol.comment.shortText}/>}
|
|
19
|
+
<CodeLink symbol={symbol} />
|
|
20
|
+
{symbol.comment?.shortText && <MarkdownParser source={symbol.comment.shortText} />}
|
|
23
21
|
</PageHeader>
|
|
24
22
|
);
|
|
25
23
|
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { makeStyles } from '@mui/styles';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import type { TypeAliasReferenceNode } from '../reference';
|
|
4
|
-
import MarkdownParser from '../tools/markdown/MarkdownParser';
|
|
5
|
-
import Type from './codeBuilders/Type';
|
|
3
|
+
import type { TypeAliasReferenceNode } from '../reference/index.js';
|
|
4
|
+
import MarkdownParser from '../tools/markdown/MarkdownParser.js';
|
|
5
|
+
import Type from './codeBuilders/Type.js';
|
|
6
6
|
|
|
7
7
|
interface TypeAliasHintProps {
|
|
8
8
|
symbol: TypeAliasReferenceNode;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
/* eslint-disable @typescript-eslint/naming-convention */
|
|
12
11
|
const useStyles = makeStyles(
|
|
13
12
|
theme => ({
|
|
14
13
|
root: {
|
|
@@ -82,7 +81,6 @@ const useStyles = makeStyles(
|
|
|
82
81
|
}),
|
|
83
82
|
{ name: 'TypeAliasHint' }
|
|
84
83
|
);
|
|
85
|
-
/* eslint-enable @typescript-eslint/naming-convention */
|
|
86
84
|
|
|
87
85
|
const TypeAliasHint: React.FC<TypeAliasHintProps> = ({ symbol: { comment, name, type } }) => {
|
|
88
86
|
const classes = useStyles();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { makeStyles } from '@mui/styles';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { Link } from 'react-router
|
|
4
|
-
import type { ReferenceNode } from '../reference';
|
|
5
|
-
import { getPageType } from '../tools/CodeTools';
|
|
6
|
-
import { findSymbolByMember } from '../tools/ReferenceTools';
|
|
7
|
-
import { getPackagePath } from '../tools/StringTools';
|
|
3
|
+
import { Link } from 'react-router';
|
|
4
|
+
import type { ReferenceNode } from '../reference/index.js';
|
|
5
|
+
import { getPageType } from '../tools/CodeTools.js';
|
|
6
|
+
import { findSymbolByMember } from '../tools/ReferenceTools.js';
|
|
7
|
+
import { getPackagePath } from '../tools/StringTools.js';
|
|
8
8
|
|
|
9
9
|
interface TypeLinkProps {
|
|
10
10
|
id?: number;
|
|
@@ -31,8 +31,7 @@ const TypeLink: React.FC<React.PropsWithChildren<TypeLinkProps>> = ({ id, name,
|
|
|
31
31
|
if (!symbol) {
|
|
32
32
|
const symbolDef = id ? findSymbolByMember('id', id) : findSymbolByMember('name', name);
|
|
33
33
|
if (symbolDef) {
|
|
34
|
-
symbol = symbolDef
|
|
35
|
-
packageName = symbolDef.packageName;
|
|
34
|
+
({ symbol, packageName } = symbolDef);
|
|
36
35
|
}
|
|
37
36
|
}
|
|
38
37
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { makeStyles } from '@mui/styles';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
import React, { useCallback, useContext, useMemo, useState } from 'react';
|
|
4
|
-
import { ConfigContext, rootUrl } from '../config';
|
|
5
|
-
import { type Manifest } from '../config/Config';
|
|
6
|
-
import { useAsyncEffect } from '../tools/FunctionTools';
|
|
4
|
+
import { ConfigContext, rootUrl } from '../config/index.js';
|
|
5
|
+
import { type Manifest } from '../config/Config.js';
|
|
6
|
+
import { useAsyncEffect } from '../tools/FunctionTools.js';
|
|
7
7
|
|
|
8
8
|
const useStyles = makeStyles(
|
|
9
9
|
theme => ({
|
|
@@ -3,10 +3,14 @@ import { FontAwesomeIcon as Icon } from '@fortawesome/react-fontawesome';
|
|
|
3
3
|
import { makeStyles } from '@mui/styles';
|
|
4
4
|
import classNames from 'classnames';
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import {
|
|
7
|
-
import type {
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
import { Link } from 'react-router';
|
|
7
|
+
import type {
|
|
8
|
+
CallSignatureReferenceNode,
|
|
9
|
+
ConstructSignatureReferenceNode,
|
|
10
|
+
ReferenceNode
|
|
11
|
+
} from '../../reference/index.js';
|
|
12
|
+
import { getAnchorName } from '../../tools/NodeTools.js';
|
|
13
|
+
import CodeLink from '../CodeLink.js';
|
|
10
14
|
|
|
11
15
|
interface CardToolbarProps {
|
|
12
16
|
name?: string;
|
|
@@ -41,13 +45,13 @@ const CardToolbar: React.FC<CardToolbarProps> = ({ name, definition, signature,
|
|
|
41
45
|
return (
|
|
42
46
|
<div className={classNames(classes.root, className)}>
|
|
43
47
|
<CodeLink className={classes.button} symbol={definition} signature={signature} />
|
|
44
|
-
<
|
|
48
|
+
<Link
|
|
45
49
|
className={classNames(classes.button, classes.anchor)}
|
|
46
50
|
to={`#${getAnchorName(definition, name ?? signature?.name)}`}
|
|
47
51
|
title="Direct link to this symbol"
|
|
48
52
|
>
|
|
49
53
|
<Icon icon={faLink} size="lg" />
|
|
50
|
-
</
|
|
54
|
+
</Link>
|
|
51
55
|
</div>
|
|
52
56
|
);
|
|
53
57
|
};
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
import { makeStyles } from '@mui/styles';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import Card from '../../containers/Card';
|
|
4
|
-
import type {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
import
|
|
10
|
-
import
|
|
3
|
+
import Card from '../../containers/Card.js';
|
|
4
|
+
import type {
|
|
5
|
+
CallSignatureReferenceNode,
|
|
6
|
+
ParameterReferenceNode,
|
|
7
|
+
PropertyReferenceNode
|
|
8
|
+
} from '../../reference/index.js';
|
|
9
|
+
import { getTag, hasTag } from '../../tools/CodeTools.js';
|
|
10
|
+
import MarkdownParser from '../../tools/markdown/MarkdownParser.js';
|
|
11
|
+
import { getAnchorName } from '../../tools/NodeTools.js';
|
|
12
|
+
import { findSymbolByMember } from '../../tools/ReferenceTools.js';
|
|
13
|
+
import BetaNotice from '../BetaNotice.js';
|
|
14
|
+
import DeprecationNotice from '../DeprecationNotice.js';
|
|
11
15
|
|
|
12
|
-
import FunctionParamDesc from '../FunctionParamDesc';
|
|
13
|
-
import CardToolbar from './CardToolbar';
|
|
16
|
+
import FunctionParamDesc from '../FunctionParamDesc.js';
|
|
17
|
+
import CardToolbar from './CardToolbar.js';
|
|
14
18
|
|
|
15
19
|
interface EventCardProps {
|
|
16
20
|
name?: string;
|
|
@@ -18,21 +22,17 @@ interface EventCardProps {
|
|
|
18
22
|
}
|
|
19
23
|
|
|
20
24
|
function getParamDefinition(param: ParameterReferenceNode) {
|
|
21
|
-
if (
|
|
22
|
-
param.type.type === 'reflection' &&
|
|
23
|
-
param.type.declaration.signatures &&
|
|
24
|
-
param.type.declaration.signatures.length
|
|
25
|
-
) {
|
|
25
|
+
if (param.type.type === 'reflection' && param.type.declaration.signatures?.length) {
|
|
26
26
|
return param.type.declaration.signatures[0];
|
|
27
|
-
}
|
|
27
|
+
}
|
|
28
|
+
if (param.type.type === 'reference' && param.type.id) {
|
|
28
29
|
const ref = findSymbolByMember('id', param.type.id);
|
|
29
30
|
if (ref) {
|
|
30
31
|
const { symbol } = ref;
|
|
31
32
|
if (
|
|
32
33
|
symbol.kind === 'typeAlias' &&
|
|
33
34
|
symbol.type.type === 'reflection' &&
|
|
34
|
-
symbol.type.declaration.signatures
|
|
35
|
-
symbol.type.declaration.signatures.length
|
|
35
|
+
symbol.type.declaration.signatures?.length
|
|
36
36
|
) {
|
|
37
37
|
return symbol.type.declaration.signatures[0];
|
|
38
38
|
}
|
|
@@ -64,11 +64,7 @@ const EventCard: React.FC<EventCardProps> = ({ name, definition }) => {
|
|
|
64
64
|
const classes = useStyles();
|
|
65
65
|
let handlerDefinition: CallSignatureReferenceNode | undefined = undefined;
|
|
66
66
|
let handlerParamDefinition: CallSignatureReferenceNode | undefined = undefined;
|
|
67
|
-
if (
|
|
68
|
-
definition.type.type === 'reflection' &&
|
|
69
|
-
definition.type.declaration.signatures &&
|
|
70
|
-
definition.type.declaration.signatures.length
|
|
71
|
-
) {
|
|
67
|
+
if (definition.type.type === 'reflection' && definition.type.declaration.signatures?.length) {
|
|
72
68
|
handlerDefinition = definition.type.declaration.signatures[0];
|
|
73
69
|
if (handlerDefinition.parameters.length) {
|
|
74
70
|
handlerParamDefinition = getParamDefinition(handlerDefinition.parameters[0]);
|
|
@@ -8,14 +8,14 @@ import type {
|
|
|
8
8
|
FunctionReferenceNode,
|
|
9
9
|
InterfaceReferenceNode,
|
|
10
10
|
MethodReferenceNode
|
|
11
|
-
} from '../../reference';
|
|
12
|
-
import { getTag, hasTag } from '../../tools/CodeTools';
|
|
13
|
-
import MarkdownParser from '../../tools/markdown/MarkdownParser';
|
|
14
|
-
import { useAsyncType } from '../../tools/NodeTools';
|
|
15
|
-
import Badge from '../Badge';
|
|
16
|
-
import BetaNotice from '../BetaNotice';
|
|
17
|
-
import DeprecationNotice from '../DeprecationNotice';
|
|
18
|
-
import FunctionSignature from '../FunctionSignature';
|
|
11
|
+
} from '../../reference/index.js';
|
|
12
|
+
import { getTag, hasTag } from '../../tools/CodeTools.js';
|
|
13
|
+
import MarkdownParser from '../../tools/markdown/MarkdownParser.js';
|
|
14
|
+
import { useAsyncType } from '../../tools/NodeTools.js';
|
|
15
|
+
import Badge from '../Badge.js';
|
|
16
|
+
import BetaNotice from '../BetaNotice.js';
|
|
17
|
+
import DeprecationNotice from '../DeprecationNotice.js';
|
|
18
|
+
import FunctionSignature from '../FunctionSignature.js';
|
|
19
19
|
|
|
20
20
|
interface FunctionCardHeaderProps {
|
|
21
21
|
parent?: ClassReferenceNode | InterfaceReferenceNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { makeStyles } from '@mui/styles';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import Card from '../../containers/Card';
|
|
3
|
+
import Card from '../../containers/Card.js';
|
|
4
4
|
import type {
|
|
5
5
|
CallSignatureReferenceNode,
|
|
6
6
|
ClassReferenceNode,
|
|
@@ -8,13 +8,13 @@ import type {
|
|
|
8
8
|
ConstructSignatureReferenceNode,
|
|
9
9
|
InterfaceReferenceNode,
|
|
10
10
|
MethodReferenceNode
|
|
11
|
-
} from '../../reference';
|
|
12
|
-
import MarkdownParser from '../../tools/markdown/MarkdownParser';
|
|
13
|
-
import { getAnchorName } from '../../tools/NodeTools';
|
|
14
|
-
import FunctionParamDesc from '../FunctionParamDesc';
|
|
15
|
-
import { FunctionReturnType } from '../FunctionReturnType';
|
|
16
|
-
import CardToolbar from './CardToolbar';
|
|
17
|
-
import { FunctionCardHeader } from './FunctionCardHeader';
|
|
11
|
+
} from '../../reference/index.js';
|
|
12
|
+
import MarkdownParser from '../../tools/markdown/MarkdownParser.js';
|
|
13
|
+
import { getAnchorName } from '../../tools/NodeTools.js';
|
|
14
|
+
import FunctionParamDesc from '../FunctionParamDesc.js';
|
|
15
|
+
import { FunctionReturnType } from '../FunctionReturnType.js';
|
|
16
|
+
import CardToolbar from './CardToolbar.js';
|
|
17
|
+
import { FunctionCardHeader } from './FunctionCardHeader.js';
|
|
18
18
|
|
|
19
19
|
interface MethodCardProps {
|
|
20
20
|
parent: ClassReferenceNode | InterfaceReferenceNode;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { makeStyles } from '@mui/styles';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import Card from '../../containers/Card';
|
|
4
|
-
import type { AccessorReferenceNode, PropertyReferenceNode } from '../../reference';
|
|
5
|
-
import { getTag, hasTag, isLiteral } from '../../tools/CodeTools';
|
|
6
|
-
import MarkdownParser from '../../tools/markdown/MarkdownParser';
|
|
7
|
-
import { getAnchorName } from '../../tools/NodeTools';
|
|
8
|
-
import Badge from '../Badge';
|
|
9
|
-
import BetaNotice from '../BetaNotice';
|
|
10
|
-
import Type from '../codeBuilders/Type';
|
|
11
|
-
import DeprecationNotice from '../DeprecationNotice';
|
|
12
|
-
import CardToolbar from './CardToolbar';
|
|
3
|
+
import Card from '../../containers/Card.js';
|
|
4
|
+
import type { AccessorReferenceNode, PropertyReferenceNode } from '../../reference/index.js';
|
|
5
|
+
import { getTag, hasTag, isLiteral } from '../../tools/CodeTools.js';
|
|
6
|
+
import MarkdownParser from '../../tools/markdown/MarkdownParser.js';
|
|
7
|
+
import { getAnchorName } from '../../tools/NodeTools.js';
|
|
8
|
+
import Badge from '../Badge.js';
|
|
9
|
+
import BetaNotice from '../BetaNotice.js';
|
|
10
|
+
import Type from '../codeBuilders/Type.js';
|
|
11
|
+
import DeprecationNotice from '../DeprecationNotice.js';
|
|
12
|
+
import CardToolbar from './CardToolbar.js';
|
|
13
13
|
|
|
14
14
|
interface PropertyCardProps {
|
|
15
15
|
name?: string;
|
|
@@ -42,7 +42,7 @@ const PropertyCard: React.FC<PropertyCardProps> = ({ name, definition }) => {
|
|
|
42
42
|
return null;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
const type = sig
|
|
45
|
+
const { type } = sig;
|
|
46
46
|
return (
|
|
47
47
|
<Card className={classes.root} id={getAnchorName(definition, name)} key={definition.id}>
|
|
48
48
|
<CardToolbar className={classes.toolbar} name={name} definition={definition} />
|
|
@@ -2,10 +2,10 @@ import { faExternalLink } from '@fortawesome/free-solid-svg-icons';
|
|
|
2
2
|
import { FontAwesomeIcon as Icon } from '@fortawesome/react-fontawesome';
|
|
3
3
|
import { makeStyles } from '@mui/styles';
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import type { ReferenceNode, ReferenceReferenceType, ReferenceType } from '../../reference';
|
|
6
|
-
import { createExternalLink } from '../../tools/CodeTools';
|
|
7
|
-
import TypeLink from '../TypeLink';
|
|
8
|
-
import Type from './Type';
|
|
5
|
+
import type { ReferenceNode, ReferenceReferenceType, ReferenceType } from '../../reference/index.js';
|
|
6
|
+
import { createExternalLink } from '../../tools/CodeTools.js';
|
|
7
|
+
import TypeLink from '../TypeLink.js';
|
|
8
|
+
import Type from './Type.js';
|
|
9
9
|
|
|
10
10
|
interface ReferenceTypeProps {
|
|
11
11
|
isOptional: boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { ReferenceType } from '../../reference';
|
|
3
|
-
import { findSymbolByMember } from '../../tools/ReferenceTools';
|
|
4
|
-
import TypeAliasHint from '../TypeAliasHint';
|
|
5
|
-
import ReferenceTypeView from './ReferenceTypeView';
|
|
2
|
+
import type { ReferenceType } from '../../reference/index.js';
|
|
3
|
+
import { findSymbolByMember } from '../../tools/ReferenceTools.js';
|
|
4
|
+
import TypeAliasHint from '../TypeAliasHint.js';
|
|
5
|
+
import ReferenceTypeView from './ReferenceTypeView.js';
|
|
6
6
|
|
|
7
7
|
interface TypeProps {
|
|
8
8
|
def?: ReferenceType;
|
|
@@ -5,8 +5,8 @@ import type {
|
|
|
5
5
|
EnumMemberReferenceNode,
|
|
6
6
|
MethodReferenceNode,
|
|
7
7
|
PropertyReferenceNode
|
|
8
|
-
} from '../../reference';
|
|
9
|
-
import OverviewTableEntry from './OverviewTableEntry';
|
|
8
|
+
} from '../../reference/index.js';
|
|
9
|
+
import OverviewTableEntry from './OverviewTableEntry.js';
|
|
10
10
|
|
|
11
11
|
const useStyles = makeStyles(
|
|
12
12
|
theme => ({
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { makeStyles } from '@mui/styles';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import {
|
|
4
|
-
import type { ReferenceNode } from '../../reference';
|
|
5
|
-
import { hasTag } from '../../tools/CodeTools';
|
|
6
|
-
import { getAnchorName, typeIsAsync } from '../../tools/NodeTools';
|
|
7
|
-
import Badge from '../Badge';
|
|
3
|
+
import { Link } from 'react-router';
|
|
4
|
+
import type { ReferenceNode } from '../../reference/index.js';
|
|
5
|
+
import { hasTag } from '../../tools/CodeTools.js';
|
|
6
|
+
import { getAnchorName, typeIsAsync } from '../../tools/NodeTools.js';
|
|
7
|
+
import Badge from '../Badge.js';
|
|
8
8
|
|
|
9
9
|
const useStyles = makeStyles(
|
|
10
10
|
theme => ({
|
|
@@ -39,9 +39,9 @@ const OverviewTableEntry: React.FC<OverviewTableEntryProps> = ({ node }) => {
|
|
|
39
39
|
|
|
40
40
|
return (
|
|
41
41
|
<li className={classes.root}>
|
|
42
|
-
<
|
|
42
|
+
<Link className={classes.link} to={`#${getAnchorName(node)}`}>
|
|
43
43
|
{node.name}
|
|
44
|
-
</
|
|
44
|
+
</Link>
|
|
45
45
|
{hasTag(node, 'deprecated') ||
|
|
46
46
|
(node.kind === 'method' && node.signatures?.some(sig => hasTag(sig, 'deprecated'))) ||
|
|
47
47
|
(node.kind === 'accessor' && node.getSignature && hasTag(node.getSignature, 'deprecated')) ? (
|
|
@@ -1,9 +1,17 @@
|
|
|
1
|
-
import { Config } from './Config';
|
|
1
|
+
import { Config } from './Config.js';
|
|
2
2
|
import { ExpectedError } from 'clime';
|
|
3
3
|
|
|
4
4
|
export function getConfigValue<K extends keyof Config>(config: Config | null, key: K): NonNullable<Config[K]> | null;
|
|
5
|
-
export function getConfigValue<K extends keyof Config>(
|
|
6
|
-
|
|
5
|
+
export function getConfigValue<K extends keyof Config>(
|
|
6
|
+
config: Config | null,
|
|
7
|
+
key: K,
|
|
8
|
+
throws: true
|
|
9
|
+
): NonNullable<Config[K]>;
|
|
10
|
+
export function getConfigValue<K extends keyof Config>(
|
|
11
|
+
config: Config | null,
|
|
12
|
+
key: K,
|
|
13
|
+
throws: boolean = false
|
|
14
|
+
): NonNullable<Config[K]> | null {
|
|
7
15
|
const value = config?.[key];
|
|
8
16
|
if (value == null) {
|
|
9
17
|
if (throws) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { useContext } from 'react';
|
|
2
|
-
import { Route, Routes } from 'react-router
|
|
3
|
-
import { ConfigContext } from '../config';
|
|
4
|
-
import DocPage from '../pages/DocPage';
|
|
5
|
-
import AppLayout from './AppLayout';
|
|
6
|
-
import ReferencePackageContainer from './ReferencePackageContainer';
|
|
2
|
+
import { Route, Routes } from 'react-router';
|
|
3
|
+
import { ConfigContext } from '../config/index.js';
|
|
4
|
+
import DocPage from '../pages/DocPage.js';
|
|
5
|
+
import AppLayout from './AppLayout.js';
|
|
6
|
+
import ReferencePackageContainer from './ReferencePackageContainer.js';
|
|
7
7
|
|
|
8
8
|
const App: React.FunctionComponent = () => {
|
|
9
9
|
const config = useContext(ConfigContext);
|
|
@@ -12,10 +12,13 @@ const App: React.FunctionComponent = () => {
|
|
|
12
12
|
<>
|
|
13
13
|
<Routes>
|
|
14
14
|
<Route element={<AppLayout />}>
|
|
15
|
-
<Route path="" element={<DocPage/>}/>
|
|
16
|
-
<Route
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
<Route path="" element={<DocPage />} />
|
|
16
|
+
<Route
|
|
17
|
+
path={isMono ? 'reference/:packageName/*' : '/reference/*'}
|
|
18
|
+
element={<ReferencePackageContainer />}
|
|
19
|
+
/>
|
|
20
|
+
<Route path="docs/:category" element={<DocPage />} />
|
|
21
|
+
<Route path="docs/:category/:group/:article" element={<DocPage />} />
|
|
19
22
|
</Route>
|
|
20
23
|
</Routes>
|
|
21
24
|
</>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Outlet } from 'react-router
|
|
3
|
-
import MainMenu from '../components/MainMenu';
|
|
2
|
+
import { Outlet } from 'react-router';
|
|
3
|
+
import MainMenu from '../components/MainMenu.js';
|
|
4
4
|
|
|
5
5
|
const AppLayout: React.FunctionComponent = () => (
|
|
6
6
|
<>
|