typedoc 0.24.2 → 0.24.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.
@@ -373,6 +373,9 @@ let Application = Application_1 = class Application extends component_1.Childabl
373
373
  _merge() {
374
374
  const start = Date.now();
375
375
  const rootDir = (0, fs_1.deriveRootDir)(this.entryPoints);
376
+ this.logger.verbose(`Derived root dir is ${rootDir}, will expand ${this.entryPoints
377
+ .map(index_2.normalizePath)
378
+ .join(", ")}`);
376
379
  const entryPoints = this.entryPoints.flatMap((entry) => (0, fs_1.glob)(entry, rootDir));
377
380
  this.logger.verbose(`Merging entry points:\n\t${entryPoints.map(paths_1.nicePath).join("\n\t")}`);
378
381
  if (entryPoints.length < 1) {
@@ -10,6 +10,7 @@ const typescript_1 = __importDefault(require("typescript"));
10
10
  const fs_2 = require("../../utils/fs");
11
11
  const tsutils_1 = require("../../utils/tsutils");
12
12
  const validation_1 = require("../../utils/validation");
13
+ const paths_1 = require("../../utils/paths");
13
14
  /**
14
15
  * This exists so that TypeDoc can store a unique identifier for a `ts.Symbol` without
15
16
  * keeping a reference to the `ts.Symbol` itself. This identifier should be stable across
@@ -19,7 +20,7 @@ class ReflectionSymbolId {
19
20
  constructor(symbol, declaration) {
20
21
  if ("name" in symbol) {
21
22
  declaration ?? (declaration = symbol?.declarations?.[0]);
22
- this.fileName = declaration?.getSourceFile().fileName ?? "\0";
23
+ this.fileName = (0, paths_1.normalizePath)(declaration?.getSourceFile().fileName ?? "\0");
23
24
  if (symbol.declarations?.some(typescript_1.default.isSourceFile)) {
24
25
  this.qualifiedName = "";
25
26
  }
@@ -45,7 +46,7 @@ class ReflectionSymbolId {
45
46
  toObject(serializer) {
46
47
  return {
47
48
  sourceFileName: (0, path_1.isAbsolute)(this.fileName)
48
- ? (0, path_1.relative)(serializer.projectRoot, resolveDeclarationMaps(this.fileName))
49
+ ? (0, paths_1.normalizePath)((0, path_1.relative)(serializer.projectRoot, resolveDeclarationMaps(this.fileName)))
49
50
  : this.fileName,
50
51
  qualifiedName: this.qualifiedName,
51
52
  };
@@ -124,7 +124,9 @@ var ReflectionKind;
124
124
  }
125
125
  ReflectionKind.pluralString = pluralString;
126
126
  function classString(kind) {
127
- return `tsd-kind-${ReflectionKind[kind].replace(/(.)([A-Z])/g, (_m, a, b) => `${a}-${b}`.toLowerCase())}`;
127
+ return `tsd-kind-${ReflectionKind[kind]
128
+ .replace(/(.)([A-Z])/g, (_m, a, b) => `${a}-${b}`)
129
+ .toLowerCase()}`;
128
130
  }
129
131
  ReflectionKind.classString = classString;
130
132
  })(ReflectionKind = exports.ReflectionKind || (exports.ReflectionKind = {}));
@@ -50,11 +50,17 @@ function isDir(path) {
50
50
  }
51
51
  exports.isDir = isDir;
52
52
  function deriveRootDir(globPaths) {
53
- const globs = (0, paths_1.createMinimatch)(globPaths);
54
- const rootPaths = globs.flatMap((glob) => (0, array_1.filterMap)(glob.set, (set) => {
53
+ const normalized = globPaths.map(paths_1.normalizePath);
54
+ const globs = (0, paths_1.createMinimatch)(normalized);
55
+ const rootPaths = globs.flatMap((glob, i) => (0, array_1.filterMap)(glob.set, (set) => {
55
56
  const stop = set.findIndex((part) => typeof part !== "string");
56
- const path = stop === -1 ? set : set.slice(0, stop);
57
- return `/${path.join("/").replace(/^\//, "")}`;
57
+ if (stop === -1) {
58
+ return normalized[i];
59
+ }
60
+ else {
61
+ const kept = set.slice(0, stop).join("/");
62
+ return normalized[i].substring(0, normalized[i].indexOf(kept) + kept.length);
63
+ }
58
64
  }));
59
65
  return getCommonDirectory(rootPaths);
60
66
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "typedoc",
3
3
  "description": "Create api documentation for TypeScript projects.",
4
- "version": "0.24.2",
4
+ "version": "0.24.4",
5
5
  "homepage": "https://typedoc.org",
6
6
  "exports": {
7
7
  ".": "./dist/index.js",
package/static/style.css CHANGED
@@ -6,8 +6,9 @@
6
6
  --light-color-background-warning: #e6e600;
7
7
  --light-color-icon-background: var(--light-color-background);
8
8
  --light-color-accent: #c5c7c9;
9
+ --light-color-active-menu-item: var(--light-color-accent);
9
10
  --light-color-text: #222;
10
- --light-color-text-aside: #707070;
11
+ --light-color-text-aside: #6e6e6e;
11
12
  --light-color-link: #1f70c2;
12
13
 
13
14
  --light-color-ts-project: #b111c9;
@@ -45,6 +46,7 @@
45
46
  --dark-color-warning-text: #222;
46
47
  --dark-color-icon-background: var(--dark-color-background-secondary);
47
48
  --dark-color-accent: #9096a2;
49
+ --dark-color-active-menu-item: #5d5d6a;
48
50
  --dark-color-text: #f5f5f5;
49
51
  --dark-color-text-aside: #dddddd;
50
52
  --dark-color-link: #00aff4;
@@ -54,9 +56,9 @@
54
56
  --dark-color-ts-namespace: var(--dark-color-ts-project);
55
57
  --dark-color-ts-enum: #f4d93e;
56
58
  --dark-color-ts-enum-member: var(--dark-color-ts-enum);
57
- --dark-color-ts-variable: #4d68ff;
59
+ --dark-color-ts-variable: #798dff;
58
60
  --dark-color-ts-function: #9772ff;
59
- --dark-color-ts-class: #61b0ff;
61
+ --dark-color-ts-class: #8ac4ff;
60
62
  --dark-color-ts-interface: #6cff87;
61
63
  --dark-color-ts-constructor: var(--dark-color-ts-class);
62
64
  --dark-color-ts-property: var(--dark-color-ts-variable);
@@ -86,6 +88,7 @@
86
88
  --color-warning-text: var(--light-color-warning-text);
87
89
  --color-icon-background: var(--light-color-icon-background);
88
90
  --color-accent: var(--light-color-accent);
91
+ --color-active-menu-item: var(--light-color-active-menu-item);
89
92
  --color-text: var(--light-color-text);
90
93
  --color-text-aside: var(--light-color-text-aside);
91
94
  --color-link: var(--light-color-link);
@@ -126,6 +129,7 @@
126
129
  --color-warning-text: var(--dark-color-warning-text);
127
130
  --color-icon-background: var(--dark-color-icon-background);
128
131
  --color-accent: var(--dark-color-accent);
132
+ --color-active-menu-item: var(--dark-color-active-menu-item);
129
133
  --color-text: var(--dark-color-text);
130
134
  --color-text-aside: var(--dark-color-text-aside);
131
135
  --color-link: var(--dark-color-link);
@@ -173,6 +177,7 @@ body {
173
177
  --color-warning-text: var(--light-color-warning-text);
174
178
  --color-icon-background: var(--light-color-icon-background);
175
179
  --color-accent: var(--light-color-accent);
180
+ --color-active-menu-item: var(--light-color-active-menu-item);
176
181
  --color-text: var(--light-color-text);
177
182
  --color-text-aside: var(--light-color-text-aside);
178
183
  --color-link: var(--light-color-link);
@@ -211,6 +216,7 @@ body {
211
216
  --color-warning-text: var(--dark-color-warning-text);
212
217
  --color-icon-background: var(--dark-color-icon-background);
213
218
  --color-accent: var(--dark-color-accent);
219
+ --color-active-menu-item: var(--dark-color-active-menu-item);
214
220
  --color-text: var(--dark-color-text);
215
221
  --color-text-aside: var(--dark-color-text-aside);
216
222
  --color-link: var(--dark-color-link);
@@ -689,7 +695,7 @@ input[type="checkbox"]:checked ~ svg .tsd-checkbox-checkmark {
689
695
  }
690
696
  .tsd-navigation a.current,
691
697
  .tsd-page-navigation a.current {
692
- background: var(--color-accent);
698
+ background: var(--color-active-menu-item);
693
699
  }
694
700
  .tsd-navigation a:hover,
695
701
  .tsd-page-navigation a:hover {
@@ -737,6 +743,7 @@ a.tsd-index-link {
737
743
  line-height: 1.25rem;
738
744
  display: inline-flex;
739
745
  align-items: center;
746
+ color: var(--color-text);
740
747
  }
741
748
  .tsd-accordion-summary,
742
749
  .tsd-accordion-summary a {