docusaurus-plugin-typedoc 1.1.1 → 1.2.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/dist/index.d.ts CHANGED
@@ -1,2 +1,5 @@
1
+ /**
2
+ * @module core
3
+ */
1
4
  export { PluginOptions } from './models.js';
2
5
  export { default } from './plugins/docusaurus.js';
@@ -11,9 +11,6 @@ export interface PluginOptions {
11
11
  */
12
12
  sidebar: Sidebar;
13
13
  }
14
- /**
15
- *
16
- */
17
14
  export interface Sidebar {
18
15
  autoConfiguration: boolean;
19
16
  pretty: boolean;
@@ -25,7 +25,7 @@ function getNavigationItem(navigationItem, basePath, numberPrefixParser) {
25
25
  if (navigationItem.children?.length) {
26
26
  return {
27
27
  type: 'category',
28
- label: `${navigationItem.title}`,
28
+ label: getNavigationLabel(navigationItem),
29
29
  items: getSidebar(navigationItem.children, basePath, numberPrefixParser),
30
30
  ...(id && {
31
31
  link: {
@@ -39,7 +39,18 @@ function getNavigationItem(navigationItem, basePath, numberPrefixParser) {
39
39
  ? {
40
40
  type: 'doc',
41
41
  id,
42
- label: `${navigationItem.title}`,
42
+ label: getNavigationLabel(navigationItem),
43
43
  }
44
44
  : null;
45
45
  }
46
+ function getNavigationLabel(navigationItem) {
47
+ return navigationItem.isDeprecated
48
+ ? strikethrough(navigationItem.title)
49
+ : navigationItem.title;
50
+ }
51
+ function strikethrough(label) {
52
+ return label
53
+ .split('')
54
+ .map((char) => char + '\u0336')
55
+ .join('');
56
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "docusaurus-plugin-typedoc",
3
- "version": "1.1.1",
3
+ "version": "1.2.0",
4
4
  "description": "A Docusaurus plugin to integrate TypeDoc ( + typedoc-plugin-markdown ) into a Docusaurus project.",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",
@@ -20,7 +20,7 @@
20
20
  },
21
21
  "homepage": "http://typedoc-plugin-markdown.org/plugins/docusaurus",
22
22
  "peerDependencies": {
23
- "typedoc-plugin-markdown": ">=4.3.0"
23
+ "typedoc-plugin-markdown": ">=4.4.0"
24
24
  },
25
25
  "scripts": {
26
26
  "lint": "eslint ./src",