@d-fischer/documen.ts 0.16.3 → 0.16.4

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 (109) hide show
  1. package/lib/common/components/Badge.js +1 -1
  2. package/lib/common/components/Badge.js.map +1 -1
  3. package/lib/common/components/BetaNotice.js +1 -1
  4. package/lib/common/components/BetaNotice.js.map +1 -1
  5. package/lib/common/components/Button.js +2 -2
  6. package/lib/common/components/Button.js.map +1 -1
  7. package/lib/common/components/CodeBlock.js +1 -1
  8. package/lib/common/components/CodeBlock.js.map +1 -1
  9. package/lib/common/components/CodeLink.js +4 -4
  10. package/lib/common/components/CodeLink.js.map +1 -1
  11. package/lib/common/components/DeprecationNotice.js +1 -1
  12. package/lib/common/components/DeprecationNotice.js.map +1 -1
  13. package/lib/common/components/FunctionParamDesc.js +1 -1
  14. package/lib/common/components/FunctionParamDesc.js.map +1 -1
  15. package/lib/common/components/FunctionParamDescEntry.js +13 -9
  16. package/lib/common/components/FunctionParamDescEntry.js.map +1 -1
  17. package/lib/common/components/FunctionReturnType.js +1 -1
  18. package/lib/common/components/FunctionReturnType.js.map +1 -1
  19. package/lib/common/components/FunctionSignature.js +1 -1
  20. package/lib/common/components/FunctionSignature.js.map +1 -1
  21. package/lib/common/components/InterfaceRepresentation.js +5 -3
  22. package/lib/common/components/InterfaceRepresentation.js.map +1 -1
  23. package/lib/common/components/MainMenu.js +2 -2
  24. package/lib/common/components/MainMenu.js.map +1 -1
  25. package/lib/common/components/NavMenu.js +3 -3
  26. package/lib/common/components/NavMenu.js.map +1 -1
  27. package/lib/common/components/NavMenuGroup.js +2 -2
  28. package/lib/common/components/NavMenuGroup.js.map +1 -1
  29. package/lib/common/components/NavMenuItem.js +1 -1
  30. package/lib/common/components/NavMenuItem.js.map +1 -1
  31. package/lib/common/components/TypeAliasHint.js +2 -2
  32. package/lib/common/components/TypeAliasHint.js.map +1 -1
  33. package/lib/common/components/TypeLink.js +2 -2
  34. package/lib/common/components/TypeLink.js.map +1 -1
  35. package/lib/common/components/VersionMenu.js +1 -1
  36. package/lib/common/components/VersionMenu.js.map +1 -1
  37. package/lib/common/components/cards/CardToolbar.js +5 -5
  38. package/lib/common/components/cards/CardToolbar.js.map +1 -1
  39. package/lib/common/components/cards/EventCard.js +1 -1
  40. package/lib/common/components/cards/EventCard.js.map +1 -1
  41. package/lib/common/components/cards/FunctionCardHeader.js +1 -1
  42. package/lib/common/components/cards/FunctionCardHeader.js.map +1 -1
  43. package/lib/common/components/cards/MethodCard.js +1 -1
  44. package/lib/common/components/cards/MethodCard.js.map +1 -1
  45. package/lib/common/components/cards/PropertyCard.js +1 -1
  46. package/lib/common/components/cards/PropertyCard.js.map +1 -1
  47. package/lib/common/components/codeBuilders/ReferenceTypeView.js +3 -3
  48. package/lib/common/components/codeBuilders/ReferenceTypeView.js.map +1 -1
  49. package/lib/common/components/overviewTable/OverviewTable.js +6 -6
  50. package/lib/common/components/overviewTable/OverviewTable.js.map +1 -1
  51. package/lib/common/components/overviewTable/OverviewTableEntry.js +1 -1
  52. package/lib/common/components/overviewTable/OverviewTableEntry.js.map +1 -1
  53. package/lib/common/containers/Card.js +2 -2
  54. package/lib/common/containers/Card.js.map +1 -1
  55. package/lib/common/containers/PageContent.js +2 -2
  56. package/lib/common/containers/PageContent.js.map +1 -1
  57. package/lib/common/containers/PageHeader.js +2 -2
  58. package/lib/common/containers/PageHeader.js.map +1 -1
  59. package/lib/common/containers/ReferencePackageContainer.js +1 -1
  60. package/lib/common/containers/ReferencePackageContainer.js.map +1 -1
  61. package/lib/common/htmlRenderer/HtmlRenderer.js +5 -5
  62. package/lib/common/htmlRenderer/HtmlRenderer.js.map +1 -1
  63. package/lib/common/pages/DocPage.js +1 -1
  64. package/lib/common/pages/DocPage.js.map +1 -1
  65. package/lib/common/pages/InterfacePage.js +1 -1
  66. package/lib/common/pages/InterfacePage.js.map +1 -1
  67. package/lib/common/pages/TypeAliasPage.js +1 -1
  68. package/lib/common/pages/TypeAliasPage.js.map +1 -1
  69. package/lib/common/tools/markdown/MarkdownParser.js +6 -6
  70. package/lib/common/tools/markdown/MarkdownParser.js.map +1 -1
  71. package/package.json +7 -4
  72. package/src/common/components/Badge.tsx +2 -2
  73. package/src/common/components/BetaNotice.tsx +1 -1
  74. package/src/common/components/Button.tsx +27 -24
  75. package/src/common/components/CodeBlock.tsx +1 -1
  76. package/src/common/components/CodeLink.tsx +5 -5
  77. package/src/common/components/DeprecationNotice.tsx +2 -2
  78. package/src/common/components/FunctionParamDesc.tsx +1 -1
  79. package/src/common/components/FunctionParamDescEntry.tsx +75 -50
  80. package/src/common/components/FunctionReturnType.tsx +1 -1
  81. package/src/common/components/FunctionSignature.tsx +25 -15
  82. package/src/common/components/InterfaceRepresentation.tsx +61 -56
  83. package/src/common/components/MainMenu.tsx +2 -2
  84. package/src/common/components/NavMenu.tsx +12 -13
  85. package/src/common/components/NavMenuGroup.tsx +25 -24
  86. package/src/common/components/NavMenuItem.tsx +1 -1
  87. package/src/common/components/TypeAliasHint.tsx +2 -2
  88. package/src/common/components/TypeLink.tsx +17 -10
  89. package/src/common/components/VersionMenu.tsx +1 -1
  90. package/src/common/components/cards/CardToolbar.tsx +31 -24
  91. package/src/common/components/cards/EventCard.tsx +2 -2
  92. package/src/common/components/cards/FunctionCardHeader.tsx +1 -1
  93. package/src/common/components/cards/MethodCard.tsx +1 -1
  94. package/src/common/components/cards/PropertyCard.tsx +1 -1
  95. package/src/common/components/codeBuilders/ReferenceTypeView.tsx +4 -4
  96. package/src/common/components/overviewTable/OverviewTable.tsx +41 -25
  97. package/src/common/components/overviewTable/OverviewTableEntry.tsx +1 -1
  98. package/src/common/containers/Card.tsx +20 -17
  99. package/src/common/containers/PageContent.tsx +14 -15
  100. package/src/common/containers/PageHeader.tsx +22 -23
  101. package/src/common/containers/ReferencePackageContainer.tsx +1 -1
  102. package/src/common/htmlRenderer/HtmlRenderer.tsx +7 -7
  103. package/src/common/pages/DocPage.tsx +28 -14
  104. package/src/common/pages/InterfacePage.tsx +1 -1
  105. package/src/common/pages/TypeAliasPage.tsx +1 -1
  106. package/src/common/theme.ts +1 -1
  107. package/src/common/tools/markdown/MarkdownParser.tsx +100 -73
  108. package/src/dev/index.tsx +1 -1
  109. package/src/progressiveEnhancement/index.tsx +7 -9
@@ -1,10 +1,10 @@
1
+ import { makeStyles } from '@mui/styles';
1
2
  import React from 'react';
2
- import type { ReferenceNode } from '../reference';
3
3
  import { Link } from 'react-router-dom';
4
+ import type { ReferenceNode } from '../reference';
4
5
  import { getPageType } from '../tools/CodeTools';
5
6
  import { findSymbolByMember } from '../tools/ReferenceTools';
6
7
  import { getPackagePath } from '../tools/StringTools';
7
- import { makeStyles } from '@material-ui/styles';
8
8
 
9
9
  interface TypeLinkProps {
10
10
  id?: number;
@@ -12,13 +12,16 @@ interface TypeLinkProps {
12
12
  symbol?: ReferenceNode;
13
13
  }
14
14
 
15
- const useStyles = makeStyles(theme => ({
16
- root: {
17
- color: theme.colors.link,
18
- fontWeight: 'bold',
19
- textDecoration: 'none'
20
- }
21
- }), { name: 'TypeLink' });
15
+ const useStyles = makeStyles(
16
+ theme => ({
17
+ root: {
18
+ color: theme.colors.link,
19
+ fontWeight: 'bold',
20
+ textDecoration: 'none'
21
+ }
22
+ }),
23
+ { name: 'TypeLink' }
24
+ );
22
25
 
23
26
  const TypeLink: React.FC<React.PropsWithChildren<TypeLinkProps>> = ({ id, name, children, symbol }) => {
24
27
  const classes = useStyles();
@@ -37,7 +40,11 @@ const TypeLink: React.FC<React.PropsWithChildren<TypeLinkProps>> = ({ id, name,
37
40
  return <>{children}</>;
38
41
  }
39
42
 
40
- return <Link className={classes.root} to={`/reference${getPackagePath(packageName)}/${getPageType(symbol)}/${name}`}>{children}</Link>;
43
+ return (
44
+ <Link className={classes.root} to={`/reference${getPackagePath(packageName)}/${getPageType(symbol)}/${name}`}>
45
+ {children}
46
+ </Link>
47
+ );
41
48
  };
42
49
 
43
50
  export default TypeLink;
@@ -1,4 +1,4 @@
1
- import { makeStyles } from '@material-ui/styles';
1
+ import { makeStyles } from '@mui/styles';
2
2
  import classNames from 'classnames';
3
3
  import React, { useCallback, useContext, useMemo, useState } from 'react';
4
4
  import { ConfigContext, rootUrl } from '../config';
@@ -1,12 +1,12 @@
1
+ import { faLink } from '@fortawesome/free-solid-svg-icons';
2
+ import { FontAwesomeIcon as Icon } from '@fortawesome/react-fontawesome';
3
+ import { makeStyles } from '@mui/styles';
4
+ import classNames from 'classnames';
1
5
  import React from 'react';
2
- import type { ReferenceNode, CallSignatureReferenceNode, ConstructSignatureReferenceNode } from '../../reference';
6
+ import { HashLink } from 'react-router-hash-link';
7
+ import type { CallSignatureReferenceNode, ConstructSignatureReferenceNode, ReferenceNode } from '../../reference';
3
8
  import { getAnchorName } from '../../tools/NodeTools';
4
9
  import CodeLink from '../CodeLink';
5
- import { HashLink } from 'react-router-hash-link';
6
- import { FontAwesomeIcon as Icon } from '@fortawesome/react-fontawesome';
7
- import { faLink } from '@fortawesome/free-solid-svg-icons';
8
- import classNames from 'classnames';
9
- import { makeStyles } from '@material-ui/styles';
10
10
 
11
11
  interface CardToolbarProps {
12
12
  name?: string;
@@ -15,31 +15,38 @@ interface CardToolbarProps {
15
15
  className?: string;
16
16
  }
17
17
 
18
- const useStyles = makeStyles(theme => ({
19
- root: {
20
- float: 'right'
21
- },
22
- button: {
23
- marginLeft: '.5em'
24
- },
25
- anchor: {
26
- color: theme.colors.accent.default,
27
- transition: 'color .3s ease-in-out',
28
- marginLeft: '1em',
18
+ const useStyles = makeStyles(
19
+ theme => ({
20
+ root: {
21
+ float: 'right'
22
+ },
23
+ button: {
24
+ marginLeft: '.5em'
25
+ },
26
+ anchor: {
27
+ color: theme.colors.accent.default,
28
+ transition: 'color .3s ease-in-out',
29
+ marginLeft: '1em',
29
30
 
30
- '&:hover': {
31
- color: theme.colors.accent.focus
31
+ '&:hover': {
32
+ color: theme.colors.accent.focus
33
+ }
32
34
  }
33
- }
34
- }), { name: 'CardToolbar' });
35
+ }),
36
+ { name: 'CardToolbar' }
37
+ );
35
38
 
36
39
  const CardToolbar: React.FC<CardToolbarProps> = ({ name, definition, signature, className }) => {
37
40
  const classes = useStyles();
38
41
  return (
39
42
  <div className={classNames(classes.root, className)}>
40
- <CodeLink className={classes.button} symbol={definition} signature={signature}/>
41
- <HashLink className={classNames(classes.button, classes.anchor)} to={`#${getAnchorName(definition, name ?? signature?.name)}`} title="Direct link to this symbol">
42
- <Icon icon={faLink} size="lg"/>
43
+ <CodeLink className={classes.button} symbol={definition} signature={signature} />
44
+ <HashLink
45
+ className={classNames(classes.button, classes.anchor)}
46
+ to={`#${getAnchorName(definition, name ?? signature?.name)}`}
47
+ title="Direct link to this symbol"
48
+ >
49
+ <Icon icon={faLink} size="lg" />
43
50
  </HashLink>
44
51
  </div>
45
52
  );
@@ -1,7 +1,7 @@
1
- import { makeStyles } from '@material-ui/styles';
1
+ import { makeStyles } from '@mui/styles';
2
2
  import React from 'react';
3
3
  import Card from '../../containers/Card';
4
- import type { ParameterReferenceNode, PropertyReferenceNode, CallSignatureReferenceNode } from '../../reference';
4
+ import type { CallSignatureReferenceNode, ParameterReferenceNode, PropertyReferenceNode } from '../../reference';
5
5
  import { getTag, hasTag } from '../../tools/CodeTools';
6
6
  import MarkdownParser from '../../tools/markdown/MarkdownParser';
7
7
  import { getAnchorName } from '../../tools/NodeTools';
@@ -1,4 +1,4 @@
1
- import { makeStyles } from '@material-ui/styles';
1
+ import { makeStyles } from '@mui/styles';
2
2
  import React from 'react';
3
3
  import type {
4
4
  CallSignatureReferenceNode,
@@ -1,4 +1,4 @@
1
- import { makeStyles } from '@material-ui/styles';
1
+ import { makeStyles } from '@mui/styles';
2
2
  import React from 'react';
3
3
  import Card from '../../containers/Card';
4
4
  import type {
@@ -1,4 +1,4 @@
1
- import { makeStyles } from '@material-ui/styles';
1
+ import { makeStyles } from '@mui/styles';
2
2
  import React from 'react';
3
3
  import Card from '../../containers/Card';
4
4
  import type { AccessorReferenceNode, PropertyReferenceNode } from '../../reference';
@@ -1,11 +1,11 @@
1
- import { FontAwesomeIcon as Icon } from '@fortawesome/react-fontawesome';
2
1
  import { faExternalLink } from '@fortawesome/free-solid-svg-icons';
3
- import { makeStyles } from '@material-ui/styles';
2
+ import { FontAwesomeIcon as Icon } from '@fortawesome/react-fontawesome';
3
+ import { makeStyles } from '@mui/styles';
4
+ import React from 'react';
5
+ import type { ReferenceNode, ReferenceReferenceType, ReferenceType } from '../../reference';
4
6
  import { createExternalLink } from '../../tools/CodeTools';
5
7
  import TypeLink from '../TypeLink';
6
- import React from 'react';
7
8
  import Type from './Type';
8
- import type { ReferenceNode, ReferenceReferenceType, ReferenceType } from '../../reference';
9
9
 
10
10
  interface ReferenceTypeProps {
11
11
  isOptional: boolean;
@@ -1,27 +1,35 @@
1
- import { makeStyles } from '@material-ui/styles';
1
+ import { makeStyles } from '@mui/styles';
2
2
  import React from 'react';
3
- import type { AccessorReferenceNode, EnumMemberReferenceNode, MethodReferenceNode, PropertyReferenceNode } from '../../reference';
3
+ import type {
4
+ AccessorReferenceNode,
5
+ EnumMemberReferenceNode,
6
+ MethodReferenceNode,
7
+ PropertyReferenceNode
8
+ } from '../../reference';
4
9
  import OverviewTableEntry from './OverviewTableEntry';
5
10
 
6
- const useStyles = makeStyles(theme => ({
7
- root: {
8
- display: 'flex',
9
- marginBottom: theme.spacing.unit * 2,
10
- padding: theme.spacing.unit * 2,
11
- },
12
- column: {
13
- minWidth: 300
14
- },
15
- heading: {
16
- margin: 0,
17
- marginBottom: theme.spacing.unit
18
- },
19
- list: {
20
- margin: 0,
21
- paddingLeft: theme.spacing.unit,
22
- borderLeft: `${theme.spacing.unit / 2}px solid ${theme.colors.border}`
23
- }
24
- }), { name: 'OverviewTable' });
11
+ const useStyles = makeStyles(
12
+ theme => ({
13
+ root: {
14
+ display: 'flex',
15
+ marginBottom: theme.spacing.unit * 2,
16
+ padding: theme.spacing.unit * 2
17
+ },
18
+ column: {
19
+ minWidth: 300
20
+ },
21
+ heading: {
22
+ margin: 0,
23
+ marginBottom: theme.spacing.unit
24
+ },
25
+ list: {
26
+ margin: 0,
27
+ paddingLeft: theme.spacing.unit,
28
+ borderLeft: `${theme.spacing.unit / 2}px solid ${theme.colors.border}`
29
+ }
30
+ }),
31
+ { name: 'OverviewTable' }
32
+ );
25
33
 
26
34
  type OverviewTablePropertyEntry = PropertyReferenceNode | AccessorReferenceNode;
27
35
 
@@ -41,7 +49,9 @@ const OverviewTable: React.FC<OverviewTableProps> = ({ members, events, properti
41
49
  <div className={classes.column}>
42
50
  <h3 className={classes.heading}>Members</h3>
43
51
  <ul className={classes.list}>
44
- {members.map(member => <OverviewTableEntry key={member.id} node={member}/>)}
52
+ {members.map(member => (
53
+ <OverviewTableEntry key={member.id} node={member} />
54
+ ))}
45
55
  </ul>
46
56
  </div>
47
57
  ) : null}
@@ -49,7 +59,9 @@ const OverviewTable: React.FC<OverviewTableProps> = ({ members, events, properti
49
59
  <div className={classes.column}>
50
60
  <h3 className={classes.heading}>Events</h3>
51
61
  <ul className={classes.list}>
52
- {events.map(event => <OverviewTableEntry key={event.id} node={event}/>)}
62
+ {events.map(event => (
63
+ <OverviewTableEntry key={event.id} node={event} />
64
+ ))}
53
65
  </ul>
54
66
  </div>
55
67
  ) : null}
@@ -57,7 +69,9 @@ const OverviewTable: React.FC<OverviewTableProps> = ({ members, events, properti
57
69
  <div className={classes.column}>
58
70
  <h3 className={classes.heading}>Properties</h3>
59
71
  <ul className={classes.list}>
60
- {properties.map(prop => <OverviewTableEntry key={prop.id} node={prop}/>)}
72
+ {properties.map(prop => (
73
+ <OverviewTableEntry key={prop.id} node={prop} />
74
+ ))}
61
75
  </ul>
62
76
  </div>
63
77
  ) : null}
@@ -65,7 +79,9 @@ const OverviewTable: React.FC<OverviewTableProps> = ({ members, events, properti
65
79
  <div className={classes.column}>
66
80
  <h3 className={classes.heading}>Methods</h3>
67
81
  <ul className={classes.list}>
68
- {methods.map(method => <OverviewTableEntry key={method.id} node={method}/>)}
82
+ {methods.map(method => (
83
+ <OverviewTableEntry key={method.id} node={method} />
84
+ ))}
69
85
  </ul>
70
86
  </div>
71
87
  ) : null}
@@ -1,4 +1,4 @@
1
- import { makeStyles } from '@material-ui/styles';
1
+ import { makeStyles } from '@mui/styles';
2
2
  import React from 'react';
3
3
  import { HashLink } from 'react-router-hash-link';
4
4
  import type { ReferenceNode } from '../../reference';
@@ -1,32 +1,35 @@
1
- import React from 'react';
1
+ import { makeStyles } from '@mui/styles';
2
2
 
3
3
  import classNames from 'classnames';
4
- import { makeStyles } from '@material-ui/styles';
4
+ import React from 'react';
5
5
 
6
6
  interface CardProps {
7
7
  className?: string;
8
8
  id?: string;
9
9
  }
10
10
 
11
- const useStyles = makeStyles(theme => ({
12
- root: {
13
- margin: `${theme.spacing.unit * 2}px 0`,
14
- padding: theme.spacing.unit * 2,
15
- borderLeft: `${theme.spacing.unit / 2}px solid ${theme.colors.border}`,
11
+ const useStyles = makeStyles(
12
+ theme => ({
13
+ root: {
14
+ margin: `${theme.spacing.unit * 2}px 0`,
15
+ padding: theme.spacing.unit * 2,
16
+ borderLeft: `${theme.spacing.unit / 2}px solid ${theme.colors.border}`,
16
17
 
17
- '& h3, & h4': {
18
- margin: 0
19
- },
18
+ '& h3, & h4': {
19
+ margin: 0
20
+ },
20
21
 
21
- '& > :last-child': {
22
- marginBottom: 0
23
- },
22
+ '& > :last-child': {
23
+ marginBottom: 0
24
+ },
24
25
 
25
- '&:target': {
26
- backgroundColor: theme.colors.background.active
26
+ '&:target': {
27
+ backgroundColor: theme.colors.background.active
28
+ }
27
29
  }
28
- }
29
- }), { name: 'Card' });
30
+ }),
31
+ { name: 'Card' }
32
+ );
30
33
 
31
34
  const Card: React.FC<React.PropsWithChildren<CardProps>> = ({ className, id, children }) => {
32
35
  const classes = useStyles();
@@ -1,27 +1,26 @@
1
+ import { makeStyles } from '@mui/styles';
1
2
  import React from 'react';
2
- import { makeStyles } from '@material-ui/styles';
3
3
 
4
- const useStyles = makeStyles(theme => ({
5
- root: {
6
- padding: theme.spacing.unit * 2,
4
+ const useStyles = makeStyles(
5
+ theme => ({
6
+ root: {
7
+ padding: theme.spacing.unit * 2,
7
8
 
8
- '& h2': {
9
- margin: `${theme.spacing.unit * 3}px 0 ${theme.spacing.unit * 2}px`,
9
+ '& h2': {
10
+ margin: `${theme.spacing.unit * 3}px 0 ${theme.spacing.unit * 2}px`,
10
11
 
11
- '&:first-child': {
12
- marginTop: 0
12
+ '&:first-child': {
13
+ marginTop: 0
14
+ }
13
15
  }
14
16
  }
15
- }
16
- }), { name: 'PageContent' });
17
+ }),
18
+ { name: 'PageContent' }
19
+ );
17
20
 
18
21
  const PageContent: React.FC<React.PropsWithChildren<{}>> = ({ children }) => {
19
22
  const classes = useStyles();
20
- return (
21
- <div className={classes.root}>
22
- {children}
23
- </div>
24
- );
23
+ return <div className={classes.root}>{children}</div>;
25
24
  };
26
25
 
27
26
  export default PageContent;
@@ -1,33 +1,32 @@
1
+ import { makeStyles } from '@mui/styles';
1
2
  import React from 'react';
2
- import { makeStyles } from '@material-ui/styles';
3
3
 
4
- const useStyles = makeStyles(theme => ({
5
- root: {
6
- padding: theme.spacing.unit * 2,
7
- position: 'relative',
8
- backgroundColor: theme.colors.background.active,
9
- color: theme.colors.text,
4
+ const useStyles = makeStyles(
5
+ theme => ({
6
+ root: {
7
+ padding: theme.spacing.unit * 2,
8
+ position: 'relative',
9
+ backgroundColor: theme.colors.background.active,
10
+ color: theme.colors.text,
10
11
 
11
- '& h1': {
12
- fontWeight: 'normal',
13
- margin: 0,
14
- fontSize: '1.5em',
15
- display: 'inline'
16
- },
12
+ '& h1': {
13
+ fontWeight: 'normal',
14
+ margin: 0,
15
+ fontSize: '1.5em',
16
+ display: 'inline'
17
+ },
17
18
 
18
- '& p': {
19
- margin: 0
19
+ '& p': {
20
+ margin: 0
21
+ }
20
22
  }
21
- }
22
- }), { name: 'PageHeader' });
23
+ }),
24
+ { name: 'PageHeader' }
25
+ );
23
26
 
24
- const PageHeader: React.FC<React.PropsWithChildren<{}>> = ({ children }) => {
27
+ const PageHeader: React.FC = ({ children }) => {
25
28
  const classes = useStyles();
26
- return (
27
- <div className={classes.root}>
28
- {children}
29
- </div>
30
- );
29
+ return <div className={classes.root}>{children}</div>;
31
30
  };
32
31
 
33
32
  export default PageHeader;
@@ -1,5 +1,5 @@
1
1
  import { groupBy } from '@d-fischer/shared-utils';
2
- import { makeStyles } from '@material-ui/styles';
2
+ import { makeStyles } from '@mui/styles';
3
3
  import React, { useContext, useMemo } from 'react';
4
4
  import { useParams } from 'react-router-dom';
5
5
 
@@ -1,17 +1,17 @@
1
+ import { dom } from '@fortawesome/fontawesome-svg-core';
2
+ import { ServerStyleSheets, ThemeProvider } from '@mui/styles';
1
3
  import path from 'path';
2
4
  import React from 'react';
3
5
  import { renderToString } from 'react-dom/server';
4
- import { ConfigContext } from '../config';
5
- import type { Config } from '../config/Config';
6
- import StaticRouterWithSuffix from './StaticRouterWithSuffix';
7
- import App from '../containers/App';
8
- import type RouterMode from './RouterMode';
9
6
  import { StaticRouter } from 'react-router-dom/server';
10
7
  import type { ArticleContent } from '../components/PageArticle';
11
8
  import { PageArticleContext } from '../components/PageArticle';
12
- import { ServerStyleSheets, ThemeProvider } from '@material-ui/styles';
9
+ import { ConfigContext } from '../config';
10
+ import type { Config } from '../config/Config';
11
+ import App from '../containers/App';
13
12
  import theme from '../theme';
14
- import { dom } from '@fortawesome/fontawesome-svg-core';
13
+ import type RouterMode from './RouterMode';
14
+ import StaticRouterWithSuffix from './StaticRouterWithSuffix';
15
15
 
16
16
  const insertIntoSkeleton = (html: string, css: string, baseUrl: string, config: Config) =>
17
17
  `<!doctype html>
@@ -1,4 +1,4 @@
1
- import { makeStyles } from '@material-ui/styles';
1
+ import { makeStyles } from '@mui/styles';
2
2
  import React, { useContext } from 'react';
3
3
  import { useParams } from 'react-router-dom';
4
4
  import NavMenu from '../components/NavMenu';
@@ -33,7 +33,11 @@ const useStyles = makeStyles({
33
33
 
34
34
  const DocPage: React.FC = () => {
35
35
  const classes = useStyles();
36
- const { group: groupName, category: categoryName, article: articleName } = useParams() as unknown as DocPageRouteParams;
36
+ const {
37
+ group: groupName,
38
+ category: categoryName,
39
+ article: articleName
40
+ } = useParams() as unknown as DocPageRouteParams;
37
41
  const article = useContext(PageArticleContext);
38
42
  const config = useContext(ConfigContext);
39
43
 
@@ -49,7 +53,9 @@ const DocPage: React.FC = () => {
49
53
 
50
54
  if (!title) {
51
55
  if (groupName) {
52
- const confArticle = confCategory.groups?.find(grp => grp.name === groupName)?.articles?.find(art => art.name === articleName);
56
+ const confArticle = confCategory.groups
57
+ ?.find(grp => grp.name === groupName)
58
+ ?.articles?.find(art => art.name === articleName);
53
59
 
54
60
  if (!confArticle) {
55
61
  return null;
@@ -78,18 +84,26 @@ const DocPage: React.FC = () => {
78
84
  <div className={classes.root}>
79
85
  {confCategory?.groups?.length && confCategory.groups.some(grp => grp.articles?.length) ? (
80
86
  <NavMenu className={classes.nav}>
81
- <NavMenuItem path={`/docs/${confCategory.name}/`}>{confCategory.indexTitle ?? confCategory.name}</NavMenuItem>
87
+ <NavMenuItem path={`/docs/${confCategory.name}/`}>
88
+ {confCategory.indexTitle ?? confCategory.name}
89
+ </NavMenuItem>
82
90
  {confCategory.groups.map(grp => (
83
91
  <NavMenuGroup key={grp.name} title={grp.title}>
84
- {grp.articles?.map(art => 'externalLink' in art ? (
85
- <NavMenuItem key={art.name} external path={art.externalLink} title={art.title}>
86
- {art.title}
87
- </NavMenuItem>
88
- ) : (
89
- <NavMenuItem key={art.name} path={`/docs/${confCategory!.name}/${grp.name}/${art.name}`} title={art.title}>
90
- {art.title}
91
- </NavMenuItem>
92
- ))}
92
+ {grp.articles?.map(art =>
93
+ 'externalLink' in art ? (
94
+ <NavMenuItem key={art.name} external path={art.externalLink} title={art.title}>
95
+ {art.title}
96
+ </NavMenuItem>
97
+ ) : (
98
+ <NavMenuItem
99
+ key={art.name}
100
+ path={`/docs/${confCategory!.name}/${grp.name}/${art.name}`}
101
+ title={art.title}
102
+ >
103
+ {art.title}
104
+ </NavMenuItem>
105
+ )
106
+ )}
93
107
  </NavMenuGroup>
94
108
  ))}
95
109
  </NavMenu>
@@ -101,7 +115,7 @@ const DocPage: React.FC = () => {
101
115
  </PageHeader>
102
116
  ) : null}
103
117
  <PageContent>
104
- <PageArticle mockContent={mockContent}/>
118
+ <PageArticle mockContent={mockContent} />
105
119
  </PageContent>
106
120
  </div>
107
121
  </div>
@@ -1,4 +1,4 @@
1
- import { makeStyles } from '@material-ui/styles';
1
+ import { makeStyles } from '@mui/styles';
2
2
  import React from 'react';
3
3
  import { Navigate, useParams } from 'react-router-dom';
4
4
  import BetaNotice from '../components/BetaNotice';
@@ -1,4 +1,4 @@
1
- import { makeStyles } from '@material-ui/styles';
1
+ import { makeStyles } from '@mui/styles';
2
2
  import React from 'react';
3
3
  import { Navigate, useParams } from 'react-router-dom';
4
4
  import BetaNotice from '../components/BetaNotice';
@@ -31,7 +31,7 @@ const theme = {
31
31
  export default theme;
32
32
  export type Theme = typeof theme;
33
33
 
34
- declare module '@material-ui/styles' {
34
+ declare module '@mui/styles' {
35
35
  // eslint-disable-next-line @typescript-eslint/no-empty-interface
36
36
  interface DefaultTheme extends Theme {}
37
37
  }