@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.
Files changed (300) hide show
  1. package/index.html +36 -35
  2. package/lib/common/CustomError.js +1 -4
  3. package/lib/common/CustomError.js.map +1 -1
  4. package/lib/common/Paths.js +1 -2
  5. package/lib/common/components/Badge.js +7 -10
  6. package/lib/common/components/Badge.js.map +1 -1
  7. package/lib/common/components/BetaNotice.js +5 -10
  8. package/lib/common/components/BetaNotice.js.map +1 -1
  9. package/lib/common/components/Button.js +8 -12
  10. package/lib/common/components/Button.js.map +1 -1
  11. package/lib/common/components/CodeBlock.js +45 -61
  12. package/lib/common/components/CodeBlock.js.map +1 -1
  13. package/lib/common/components/CodeLink.js +12 -15
  14. package/lib/common/components/CodeLink.js.map +1 -1
  15. package/lib/common/components/DeprecationNotice.js +5 -10
  16. package/lib/common/components/DeprecationNotice.js.map +1 -1
  17. package/lib/common/components/FunctionParamDesc.js +7 -19
  18. package/lib/common/components/FunctionParamDesc.js.map +1 -1
  19. package/lib/common/components/FunctionParamDescEntry.js +26 -38
  20. package/lib/common/components/FunctionParamDescEntry.js.map +1 -1
  21. package/lib/common/components/FunctionReturnType.js +8 -17
  22. package/lib/common/components/FunctionReturnType.js.map +1 -1
  23. package/lib/common/components/FunctionSignature.js +7 -22
  24. package/lib/common/components/FunctionSignature.js.map +1 -1
  25. package/lib/common/components/InterfaceDetail.js +11 -18
  26. package/lib/common/components/InterfaceDetail.js.map +1 -1
  27. package/lib/common/components/InterfaceRepresentation.js +21 -40
  28. package/lib/common/components/InterfaceRepresentation.js.map +1 -1
  29. package/lib/common/components/MainMenu.js +20 -36
  30. package/lib/common/components/MainMenu.js.map +1 -1
  31. package/lib/common/components/NavMenu.js +6 -9
  32. package/lib/common/components/NavMenu.js.map +1 -1
  33. package/lib/common/components/NavMenuGroup.js +5 -10
  34. package/lib/common/components/NavMenuGroup.js.map +1 -1
  35. package/lib/common/components/NavMenuItem.js +8 -11
  36. package/lib/common/components/NavMenuItem.js.map +1 -1
  37. package/lib/common/components/PageArticle.js +7 -10
  38. package/lib/common/components/PageArticle.js.map +1 -1
  39. package/lib/common/components/SymbolHeader.js +6 -20
  40. package/lib/common/components/SymbolHeader.js.map +1 -1
  41. package/lib/common/components/TypeAliasHint.js +7 -22
  42. package/lib/common/components/TypeAliasHint.js.map +1 -1
  43. package/lib/common/components/TypeLink.js +12 -16
  44. package/lib/common/components/TypeLink.js.map +1 -1
  45. package/lib/common/components/VersionMenu.js +21 -28
  46. package/lib/common/components/VersionMenu.js.map +1 -1
  47. package/lib/common/components/cards/CardToolbar.js +11 -17
  48. package/lib/common/components/cards/CardToolbar.js.map +1 -1
  49. package/lib/common/components/cards/EventCard.js +21 -46
  50. package/lib/common/components/cards/EventCard.js.map +1 -1
  51. package/lib/common/components/cards/FunctionCardHeader.js +13 -25
  52. package/lib/common/components/cards/FunctionCardHeader.js.map +1 -1
  53. package/lib/common/components/cards/MethodCard.js +13 -23
  54. package/lib/common/components/cards/MethodCard.js.map +1 -1
  55. package/lib/common/components/cards/PropertyCard.js +15 -31
  56. package/lib/common/components/cards/PropertyCard.js.map +1 -1
  57. package/lib/common/components/codeBuilders/ReferenceTypeView.js +12 -25
  58. package/lib/common/components/codeBuilders/ReferenceTypeView.js.map +1 -1
  59. package/lib/common/components/codeBuilders/Type.js +30 -75
  60. package/lib/common/components/codeBuilders/Type.js.map +1 -1
  61. package/lib/common/components/overviewTable/OverviewTable.js +6 -21
  62. package/lib/common/components/overviewTable/OverviewTable.js.map +1 -1
  63. package/lib/common/components/overviewTable/OverviewTableEntry.js +13 -22
  64. package/lib/common/components/overviewTable/OverviewTableEntry.js.map +1 -1
  65. package/lib/common/config/Config.js +1 -2
  66. package/lib/common/config/Util.js +4 -8
  67. package/lib/common/config/Util.js.map +1 -1
  68. package/lib/common/config/index.js +5 -9
  69. package/lib/common/config/index.js.map +1 -1
  70. package/lib/common/containers/App.js +10 -18
  71. package/lib/common/containers/App.js.map +1 -1
  72. package/lib/common/containers/AppLayout.js +5 -10
  73. package/lib/common/containers/AppLayout.js.map +1 -1
  74. package/lib/common/containers/Card.js +6 -9
  75. package/lib/common/containers/Card.js.map +1 -1
  76. package/lib/common/containers/PageContent.js +5 -8
  77. package/lib/common/containers/PageContent.js.map +1 -1
  78. package/lib/common/containers/PageHeader.js +5 -8
  79. package/lib/common/containers/PageHeader.js.map +1 -1
  80. package/lib/common/containers/PageSwitch.js +10 -19
  81. package/lib/common/containers/PageSwitch.js.map +1 -1
  82. package/lib/common/containers/ReferencePackageContainer.js +37 -54
  83. package/lib/common/containers/ReferencePackageContainer.js.map +1 -1
  84. package/lib/common/htmlRenderer/HtmlRenderer.js +23 -37
  85. package/lib/common/htmlRenderer/HtmlRenderer.js.map +1 -1
  86. package/lib/common/htmlRenderer/RouterMode.js +1 -2
  87. package/lib/common/htmlRenderer/StaticRouterWithSuffix.js +20 -24
  88. package/lib/common/htmlRenderer/StaticRouterWithSuffix.js.map +1 -1
  89. package/lib/common/pages/ClassPage.js +39 -67
  90. package/lib/common/pages/ClassPage.js.map +1 -1
  91. package/lib/common/pages/DocPage.js +27 -39
  92. package/lib/common/pages/DocPage.js.map +1 -1
  93. package/lib/common/pages/EnumPage.js +20 -40
  94. package/lib/common/pages/EnumPage.js.map +1 -1
  95. package/lib/common/pages/FunctionPage.js +20 -39
  96. package/lib/common/pages/FunctionPage.js.map +1 -1
  97. package/lib/common/pages/InterfacePage.js +20 -32
  98. package/lib/common/pages/InterfacePage.js.map +1 -1
  99. package/lib/common/pages/TypeAliasPage.js +19 -34
  100. package/lib/common/pages/TypeAliasPage.js.map +1 -1
  101. package/lib/common/reference/index.js +1 -3
  102. package/lib/common/reference/index.js.map +1 -1
  103. package/lib/common/theme.js +1 -3
  104. package/lib/common/theme.js.map +1 -1
  105. package/lib/common/tools/ArrayTools.js +7 -18
  106. package/lib/common/tools/ArrayTools.js.map +1 -1
  107. package/lib/common/tools/CodeTools.js +12 -23
  108. package/lib/common/tools/CodeTools.js.map +1 -1
  109. package/lib/common/tools/ConfigTools.js +15 -20
  110. package/lib/common/tools/ConfigTools.js.map +1 -1
  111. package/lib/common/tools/FileTools.js +9 -16
  112. package/lib/common/tools/FileTools.js.map +1 -1
  113. package/lib/common/tools/FunctionTools.js +3 -7
  114. package/lib/common/tools/FunctionTools.js.map +1 -1
  115. package/lib/common/tools/NodeTools.js +22 -33
  116. package/lib/common/tools/NodeTools.js.map +1 -1
  117. package/lib/common/tools/Point.js +1 -2
  118. package/lib/common/tools/ReferenceTools.js +30 -43
  119. package/lib/common/tools/ReferenceTools.js.map +1 -1
  120. package/lib/common/tools/StringTools.js +3 -9
  121. package/lib/common/tools/StringTools.js.map +1 -1
  122. package/lib/common/tools/TypeTools.js +1 -2
  123. package/lib/common/tools/markdown/MarkdownParser.js +21 -28
  124. package/lib/common/tools/markdown/MarkdownParser.js.map +1 -1
  125. package/lib/common/tools/markdown/plugins/customDirectives.js +15 -17
  126. package/lib/common/tools/markdown/plugins/customDirectives.js.map +1 -1
  127. package/lib/common/tools/markdown/plugins/gfmTables.js +7 -12
  128. package/lib/common/tools/markdown/plugins/gfmTables.js.map +1 -1
  129. package/lib/common/tools/markdown/plugins/symbolLinks.js +9 -13
  130. package/lib/common/tools/markdown/plugins/symbolLinks.js.map +1 -1
  131. package/lib/generator/analyzer/AnalyzeContext.js +5 -6
  132. package/lib/generator/analyzer/AnalyzeContext.js.map +1 -1
  133. package/lib/generator/analyzer/DocComment.js +17 -23
  134. package/lib/generator/analyzer/DocComment.js.map +1 -1
  135. package/lib/generator/analyzer/DocCommentTag.js +4 -5
  136. package/lib/generator/analyzer/DocCommentTag.js.map +1 -1
  137. package/lib/generator/analyzer/Project.js +71 -84
  138. package/lib/generator/analyzer/Project.js.map +1 -1
  139. package/lib/generator/analyzer/createReflection.js +87 -101
  140. package/lib/generator/analyzer/createReflection.js.map +1 -1
  141. package/lib/generator/analyzer/createType.js +51 -62
  142. package/lib/generator/analyzer/createType.js.map +1 -1
  143. package/lib/generator/analyzer/reflections/AccessorReflection.js +36 -39
  144. package/lib/generator/analyzer/reflections/AccessorReflection.js.map +1 -1
  145. package/lib/generator/analyzer/reflections/ClassReflection.js +58 -51
  146. package/lib/generator/analyzer/reflections/ClassReflection.js.map +1 -1
  147. package/lib/generator/analyzer/reflections/ConstructorReflection.js +28 -36
  148. package/lib/generator/analyzer/reflections/ConstructorReflection.js.map +1 -1
  149. package/lib/generator/analyzer/reflections/EnumMemberReflection.js +15 -18
  150. package/lib/generator/analyzer/reflections/EnumMemberReflection.js.map +1 -1
  151. package/lib/generator/analyzer/reflections/EnumReflection.js +21 -23
  152. package/lib/generator/analyzer/reflections/EnumReflection.js.map +1 -1
  153. package/lib/generator/analyzer/reflections/FunctionReflection.js +14 -16
  154. package/lib/generator/analyzer/reflections/FunctionReflection.js.map +1 -1
  155. package/lib/generator/analyzer/reflections/Heritage.js +6 -11
  156. package/lib/generator/analyzer/reflections/Heritage.js.map +1 -1
  157. package/lib/generator/analyzer/reflections/InterfaceReflection.js +41 -41
  158. package/lib/generator/analyzer/reflections/InterfaceReflection.js.map +1 -1
  159. package/lib/generator/analyzer/reflections/MethodReflection.js +40 -45
  160. package/lib/generator/analyzer/reflections/MethodReflection.js.map +1 -1
  161. package/lib/generator/analyzer/reflections/ParameterReflection.js +68 -69
  162. package/lib/generator/analyzer/reflections/ParameterReflection.js.map +1 -1
  163. package/lib/generator/analyzer/reflections/PropertyReflection.js +43 -40
  164. package/lib/generator/analyzer/reflections/PropertyReflection.js.map +1 -1
  165. package/lib/generator/analyzer/reflections/ReferenceReflection.js +8 -7
  166. package/lib/generator/analyzer/reflections/ReferenceReflection.js.map +1 -1
  167. package/lib/generator/analyzer/reflections/Reflection.js +35 -38
  168. package/lib/generator/analyzer/reflections/Reflection.js.map +1 -1
  169. package/lib/generator/analyzer/reflections/SignatureReflection.js +42 -46
  170. package/lib/generator/analyzer/reflections/SignatureReflection.js.map +1 -1
  171. package/lib/generator/analyzer/reflections/SymbolBasedReflection.js +6 -13
  172. package/lib/generator/analyzer/reflections/SymbolBasedReflection.js.map +1 -1
  173. package/lib/generator/analyzer/reflections/TypeAliasReflection.js +24 -26
  174. package/lib/generator/analyzer/reflections/TypeAliasReflection.js.map +1 -1
  175. package/lib/generator/analyzer/reflections/TypeLiteralReflection.js +22 -21
  176. package/lib/generator/analyzer/reflections/TypeLiteralReflection.js.map +1 -1
  177. package/lib/generator/analyzer/reflections/TypeParameterReflection.js +38 -39
  178. package/lib/generator/analyzer/reflections/TypeParameterReflection.js.map +1 -1
  179. package/lib/generator/analyzer/types/ArrayType.js +15 -23
  180. package/lib/generator/analyzer/types/ArrayType.js.map +1 -1
  181. package/lib/generator/analyzer/types/FunctionType.js +31 -38
  182. package/lib/generator/analyzer/types/FunctionType.js.map +1 -1
  183. package/lib/generator/analyzer/types/IntersectionType.js +12 -20
  184. package/lib/generator/analyzer/types/IntersectionType.js.map +1 -1
  185. package/lib/generator/analyzer/types/IntrinsicType.js +33 -41
  186. package/lib/generator/analyzer/types/IntrinsicType.js.map +1 -1
  187. package/lib/generator/analyzer/types/LiteralType.js +60 -68
  188. package/lib/generator/analyzer/types/LiteralType.js.map +1 -1
  189. package/lib/generator/analyzer/types/NamedTupleElementType.js +11 -15
  190. package/lib/generator/analyzer/types/NamedTupleElementType.js.map +1 -1
  191. package/lib/generator/analyzer/types/ObjectLiteralType.js +21 -30
  192. package/lib/generator/analyzer/types/ObjectLiteralType.js.map +1 -1
  193. package/lib/generator/analyzer/types/OptionalType.js +11 -17
  194. package/lib/generator/analyzer/types/OptionalType.js.map +1 -1
  195. package/lib/generator/analyzer/types/ReferenceType.js +118 -133
  196. package/lib/generator/analyzer/types/ReferenceType.js.map +1 -1
  197. package/lib/generator/analyzer/types/ReflectionType.js +4 -7
  198. package/lib/generator/analyzer/types/ReflectionType.js.map +1 -1
  199. package/lib/generator/analyzer/types/TupleType.js +27 -31
  200. package/lib/generator/analyzer/types/TupleType.js.map +1 -1
  201. package/lib/generator/analyzer/types/Type.js +1 -5
  202. package/lib/generator/analyzer/types/Type.js.map +1 -1
  203. package/lib/generator/analyzer/types/TypeOperatorType.js +38 -40
  204. package/lib/generator/analyzer/types/TypeOperatorType.js.map +1 -1
  205. package/lib/generator/analyzer/types/UnionType.js +22 -30
  206. package/lib/generator/analyzer/types/UnionType.js.map +1 -1
  207. package/lib/generator/analyzer/types/UnknownType.js +5 -6
  208. package/lib/generator/analyzer/types/UnknownType.js.map +1 -1
  209. package/lib/generator/analyzer/util/expressions.js +8 -13
  210. package/lib/generator/analyzer/util/expressions.js.map +1 -1
  211. package/lib/generator/analyzer/util/functions.js +15 -19
  212. package/lib/generator/analyzer/util/functions.js.map +1 -1
  213. package/lib/generator/analyzer/util/inheritance.js +26 -32
  214. package/lib/generator/analyzer/util/inheritance.js.map +1 -1
  215. package/lib/generator/analyzer/util/promises.js +2 -9
  216. package/lib/generator/analyzer/util/promises.js.map +1 -1
  217. package/lib/generator/analyzer/util/sourceMaps.js +12 -20
  218. package/lib/generator/analyzer/util/sourceMaps.js.map +1 -1
  219. package/lib/generator/analyzer/util/symbols.js +3 -9
  220. package/lib/generator/analyzer/util/symbols.js.map +1 -1
  221. package/lib/generator/analyzer/util/types.js +6 -10
  222. package/lib/generator/analyzer/util/types.js.map +1 -1
  223. package/lib/generator/cli.js +5 -8
  224. package/lib/generator/cli.js.map +1 -1
  225. package/lib/generator/commands/default.js +260 -259
  226. package/lib/generator/commands/default.js.map +1 -1
  227. package/lib/generator/index.js +1 -1
  228. package/lib/generator/modes/Generator.js +20 -31
  229. package/lib/generator/modes/Generator.js.map +1 -1
  230. package/lib/generator/modes/HtmlGenerator.js +214 -228
  231. package/lib/generator/modes/HtmlGenerator.js.map +1 -1
  232. package/lib/generator/modes/MonorepoGenerator.js +143 -159
  233. package/lib/generator/modes/MonorepoGenerator.js.map +1 -1
  234. package/lib/generator/modes/OutputGenerator.js +2 -7
  235. package/lib/generator/modes/OutputGenerator.js.map +1 -1
  236. package/lib/progressiveEnhancement/fsMap.js +2 -5
  237. package/lib/progressiveEnhancement/fsMap.js.map +1 -1
  238. package/package.json +16 -16
  239. package/src/common/components/CodeBlock.tsx +2 -2
  240. package/src/common/components/CodeLink.tsx +2 -2
  241. package/src/common/components/DeprecationNotice.tsx +2 -2
  242. package/src/common/components/FunctionParamDesc.tsx +3 -3
  243. package/src/common/components/FunctionParamDescEntry.tsx +6 -6
  244. package/src/common/components/FunctionReturnType.tsx +3 -3
  245. package/src/common/components/FunctionSignature.tsx +2 -2
  246. package/src/common/components/InterfaceDetail.tsx +15 -7
  247. package/src/common/components/InterfaceRepresentation.tsx +9 -9
  248. package/src/common/components/MainMenu.tsx +4 -4
  249. package/src/common/components/NavMenuItem.tsx +1 -1
  250. package/src/common/components/PageArticle.tsx +2 -2
  251. package/src/common/components/SymbolHeader.tsx +7 -9
  252. package/src/common/components/TypeAliasHint.tsx +3 -5
  253. package/src/common/components/TypeLink.tsx +6 -7
  254. package/src/common/components/VersionMenu.tsx +3 -3
  255. package/src/common/components/cards/CardToolbar.tsx +10 -6
  256. package/src/common/components/cards/EventCard.tsx +19 -23
  257. package/src/common/components/cards/FunctionCardHeader.tsx +8 -8
  258. package/src/common/components/cards/MethodCard.tsx +8 -8
  259. package/src/common/components/cards/PropertyCard.tsx +11 -11
  260. package/src/common/components/codeBuilders/ReferenceTypeView.tsx +4 -4
  261. package/src/common/components/codeBuilders/Type.tsx +4 -4
  262. package/src/common/components/overviewTable/OverviewTable.tsx +2 -2
  263. package/src/common/components/overviewTable/OverviewTableEntry.tsx +7 -7
  264. package/src/common/config/Config.ts +1 -1
  265. package/src/common/config/Util.ts +11 -3
  266. package/src/common/config/index.tsx +2 -2
  267. package/src/common/containers/App.tsx +12 -9
  268. package/src/common/containers/AppLayout.tsx +2 -2
  269. package/src/common/containers/PageHeader.tsx +2 -2
  270. package/src/common/containers/PageSwitch.tsx +7 -7
  271. package/src/common/containers/ReferencePackageContainer.tsx +13 -13
  272. package/src/common/htmlRenderer/HtmlRenderer.tsx +8 -9
  273. package/src/common/htmlRenderer/StaticRouterWithSuffix.tsx +18 -21
  274. package/src/common/pages/ClassPage.tsx +17 -17
  275. package/src/common/pages/DocPage.tsx +10 -10
  276. package/src/common/pages/EnumPage.tsx +14 -14
  277. package/src/common/pages/FunctionPage.tsx +15 -15
  278. package/src/common/pages/InterfacePage.tsx +13 -13
  279. package/src/common/pages/TypeAliasPage.tsx +12 -12
  280. package/src/common/reference/index.ts +0 -1
  281. package/src/common/tools/ArrayTools.ts +27 -11
  282. package/src/common/tools/CodeTools.tsx +1 -1
  283. package/src/common/tools/ConfigTools.ts +1 -1
  284. package/src/common/tools/FunctionTools.ts +2 -3
  285. package/src/common/tools/NodeTools.ts +3 -2
  286. package/src/common/tools/ReferenceTools.ts +10 -11
  287. package/src/common/tools/StringTools.ts +1 -1
  288. package/src/common/tools/markdown/MarkdownParser.tsx +13 -15
  289. package/src/common/tools/markdown/plugins/customDirectives.ts +1 -1
  290. package/src/common/tools/markdown/plugins/symbolLinks.ts +3 -3
  291. package/src/dev/index.tsx +9 -9
  292. package/src/dev/registerServiceWorker.ts +8 -16
  293. package/src/progressiveEnhancement/fsMap.ts +0 -1
  294. package/src/progressiveEnhancement/index.tsx +9 -11
  295. package/tsconfig-dev.json +1 -6
  296. package/tsconfig-enhance.json +1 -5
  297. package/tsconfig-html.json +1 -5
  298. package/tsconfig.json +7 -21
  299. package/types/globals.d.ts +0 -1
  300. 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.name;
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.sort(defaultNodeSort).map(method => method.signatures?.map(sig => <MethodCard key={sig.id} parent={symbol} definition={method} sig={sig}/>))}
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 => <PropertyCard key={prop.id} definition={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 { HashLink } from 'react-router-hash-link';
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
- <HashLink to={`#${member.name}`} className={classes.name}>
60
+ <Link to={`#${member.name}`} className={classes.name}>
61
61
  {member.name}
62
- </HashLink>
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
- <HashLink to={`#${member.name}`} className={classes.name}>
77
+ <Link to={`#${member.name}`} className={classes.name}>
78
78
  {member.name}
79
- </HashLink>
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-dom';
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,7 +1,7 @@
1
1
  import { makeStyles } from '@mui/styles';
2
2
  import classNames from 'classnames';
3
3
  import React from 'react';
4
- import { NavLink } from 'react-router-dom';
4
+ import { NavLink } from 'react-router';
5
5
 
6
6
  interface NavMenuItemProps {
7
7
  path: string;
@@ -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
- &lt;{symbol.typeParameters.map(param => param.name).join(', ')}&gt;
18
- </>
16
+ <>&lt;{symbol.typeParameters.map(param => param.name).join(', ')}&gt;</>
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-dom';
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.symbol;
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 { HashLink } from 'react-router-hash-link';
7
- import type { CallSignatureReferenceNode, ConstructSignatureReferenceNode, ReferenceNode } from '../../reference';
8
- import { getAnchorName } from '../../tools/NodeTools';
9
- import CodeLink from '../CodeLink';
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
- <HashLink
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
- </HashLink>
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 { CallSignatureReferenceNode, ParameterReferenceNode, PropertyReferenceNode } from '../../reference';
5
- import { getTag, hasTag } from '../../tools/CodeTools';
6
- import MarkdownParser from '../../tools/markdown/MarkdownParser';
7
- import { getAnchorName } from '../../tools/NodeTools';
8
- import { findSymbolByMember } from '../../tools/ReferenceTools';
9
- import BetaNotice from '../BetaNotice';
10
- import DeprecationNotice from '../DeprecationNotice';
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
- } else if (param.type.type === 'reference' && param.type.id) {
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.type;
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 { HashLink } from 'react-router-hash-link';
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
- <HashLink className={classes.link} to={`#${getAnchorName(node)}`}>
42
+ <Link className={classes.link} to={`#${getAnchorName(node)}`}>
43
43
  {node.name}
44
- </HashLink>
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,4 +1,4 @@
1
- import RouterMode from '../htmlRenderer/RouterMode';
1
+ import RouterMode from '../htmlRenderer/RouterMode.js';
2
2
 
3
3
  export interface ConfigInternalArticle {
4
4
  name: string;
@@ -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>(config: Config | null, key: K, throws: true): NonNullable<Config[K]>;
6
- export function getConfigValue<K extends keyof Config>(config: Config | null, key: K, throws: boolean = false): NonNullable<Config[K]> | null {
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,6 +1,6 @@
1
1
  import { createContext } from 'react';
2
- import { Config } from './Config';
3
- import Paths from '../../common/Paths';
2
+ import Paths from '../../common/Paths.js';
3
+ import { Config } from './Config.js';
4
4
 
5
5
  declare global {
6
6
  const __DOCTS_CONFIG: Config;
@@ -1,9 +1,9 @@
1
1
  import React, { useContext } from 'react';
2
- import { Route, Routes } from 'react-router-dom';
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 path={isMono ? 'reference/:packageName/*' : '/reference/*'} element={<ReferencePackageContainer/>}/>
17
- <Route path="docs/:category" element={<DocPage/>}/>
18
- <Route path="docs/:category/:group/:article" element={<DocPage/>}/>
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-dom';
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
  <>