typedoc 0.24.0 → 0.24.2

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 (66) hide show
  1. package/dist/index.d.ts +2 -3
  2. package/dist/index.js +2 -3
  3. package/dist/lib/application.js +2 -1
  4. package/dist/lib/converter/comments/parser.js +1 -1
  5. package/dist/lib/converter/plugins/ImplementsPlugin.js +16 -6
  6. package/dist/lib/converter/plugins/PackagePlugin.js +1 -1
  7. package/dist/lib/converter/plugins/SourcePlugin.js +2 -3
  8. package/dist/lib/converter/types.js +3 -1
  9. package/dist/lib/models/comments/comment.js +6 -1
  10. package/dist/lib/models/reflections/abstract.d.ts +5 -2
  11. package/dist/lib/models/reflections/abstract.js +0 -11
  12. package/dist/lib/models/reflections/container.d.ts +0 -8
  13. package/dist/lib/models/reflections/container.js +0 -8
  14. package/dist/lib/models/reflections/declaration.d.ts +0 -8
  15. package/dist/lib/models/reflections/declaration.js +0 -8
  16. package/dist/lib/models/reflections/kind.d.ts +2 -0
  17. package/dist/lib/models/reflections/kind.js +5 -0
  18. package/dist/lib/models/reflections/parameter.d.ts +0 -8
  19. package/dist/lib/models/reflections/parameter.js +0 -9
  20. package/dist/lib/models/reflections/project.d.ts +5 -0
  21. package/dist/lib/models/reflections/project.js +40 -9
  22. package/dist/lib/models/reflections/signature.d.ts +0 -8
  23. package/dist/lib/models/reflections/signature.js +0 -9
  24. package/dist/lib/models/reflections/type-parameter.d.ts +2 -1
  25. package/dist/lib/models/reflections/type-parameter.js +3 -0
  26. package/dist/lib/models/types.d.ts +15 -4
  27. package/dist/lib/models/types.js +20 -3
  28. package/dist/lib/output/themes/MarkedPlugin.js +4 -3
  29. package/dist/lib/output/themes/default/DefaultTheme.js +3 -9
  30. package/dist/lib/output/themes/default/layouts/default.js +1 -1
  31. package/dist/lib/output/themes/default/partials/icon.js +1 -1
  32. package/dist/lib/output/themes/default/partials/member.declaration.js +1 -1
  33. package/dist/lib/output/themes/default/partials/member.signature.body.js +1 -1
  34. package/dist/lib/output/themes/default/partials/member.signature.title.d.ts +4 -4
  35. package/dist/lib/output/themes/default/partials/member.signature.title.js +26 -13
  36. package/dist/lib/output/themes/default/partials/navigation.js +1 -1
  37. package/dist/lib/output/themes/default/partials/parameter.js +5 -5
  38. package/dist/lib/output/themes/default/partials/type.js +44 -31
  39. package/dist/lib/output/themes/default/partials/typeParameters.js +1 -1
  40. package/dist/lib/output/themes/lib.d.ts +2 -0
  41. package/dist/lib/output/themes/lib.js +13 -2
  42. package/dist/lib/serialization/schema.d.ts +1 -1
  43. package/dist/lib/serialization/schema.js +0 -1
  44. package/dist/lib/utils/entry-point.js +6 -16
  45. package/dist/lib/utils/fs.d.ts +1 -7
  46. package/dist/lib/utils/fs.js +19 -17
  47. package/dist/lib/utils/html-entities.json +2233 -0
  48. package/dist/lib/utils/html.d.ts +1 -0
  49. package/dist/lib/utils/html.js +28 -0
  50. package/dist/lib/utils/index.d.ts +3 -2
  51. package/dist/lib/utils/index.js +3 -2
  52. package/dist/lib/utils/jsx.js +8 -7
  53. package/dist/lib/utils/map.d.ts +1 -0
  54. package/dist/lib/utils/map.js +3 -0
  55. package/dist/lib/utils/options/declaration.d.ts +30 -29
  56. package/dist/lib/utils/options/index.d.ts +1 -1
  57. package/dist/lib/utils/options/readers/tsconfig.js +2 -2
  58. package/dist/lib/utils/options/readers/typedoc.js +1 -1
  59. package/dist/lib/utils/options/sources/typedoc.js +6 -0
  60. package/dist/lib/utils/paths.d.ts +7 -0
  61. package/dist/lib/utils/paths.js +15 -6
  62. package/dist/lib/utils/sort.d.ts +1 -1
  63. package/dist/lib/utils/sort.js +9 -1
  64. package/package.json +9 -9
  65. package/static/main.js +3 -3
  66. package/static/style.css +217 -91
@@ -0,0 +1 @@
1
+ export declare function getTextContent(text: string): string;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.getTextContent = void 0;
7
+ // There is a fixed list of named character references which will not be expanded in the future.
8
+ // This json file is based on https://html.spec.whatwg.org/multipage/named-characters.html#named-character-references
9
+ // with some modifications to reduce the file size of the original JSON since we just need.
10
+ const html_entities_json_1 = __importDefault(require("./html-entities.json"));
11
+ // Three cases:
12
+ // { - numeric escape
13
+ //  - hex escape
14
+ // & - named escape
15
+ function unescapeEntities(html) {
16
+ return html.replace(/&(#(?:\d+);?|(?:#[xX][0-9A-Fa-f]+);?|(?:\w+);?)/g, (_, n) => {
17
+ if (n[0] === "#") {
18
+ return String.fromCharCode(n[1] === "x" || n[1] === "X"
19
+ ? parseInt(n.substring(2), 16)
20
+ : parseInt(n.substring(1), 10));
21
+ }
22
+ return html_entities_json_1.default[n] || "";
23
+ });
24
+ }
25
+ function getTextContent(text) {
26
+ return unescapeEntities(text.replace(/<.*?(?:>|$)/g, ""));
27
+ }
28
+ exports.getTextContent = getTextContent;
@@ -2,13 +2,14 @@ export { filterMap, insertPrioritySorted, partition, removeIf, removeIfPresent,
2
2
  export { AbstractComponent, ChildableComponent, Component } from "./component";
3
3
  export * from "./enum";
4
4
  export { Event, EventDispatcher } from "./events";
5
- export { isFile, copy, copySync, getCommonDirectory, normalizePath, readFile, writeFile, writeFileSync, discoverInParentDir, discoverPackageJson, } from "./fs";
5
+ export { isFile, copy, copySync, getCommonDirectory, readFile, writeFile, writeFileSync, discoverInParentDir, discoverPackageJson, } from "./fs";
6
+ export { normalizePath } from "./paths";
6
7
  export type { IfInternal, NeverIfInternal, Chars } from "./general";
7
8
  export { assertNever } from "./general";
8
9
  export { ConsoleLogger, Logger, LogLevel } from "./loggers";
9
10
  export { DefaultMap } from "./map";
10
11
  export { ArgumentsReader, BindOption, CommentStyle, Options, PackageJsonReader, ParameterHint, ParameterType, TSConfigReader, TypeDocReader, } from "./options";
11
- export type { ArrayDeclarationOption, BooleanDeclarationOption, DeclarationOption, DeclarationOptionBase, DeclarationOptionToOptionType, KeyToDeclaration, MapDeclarationOption, MixedDeclarationOption, NumberDeclarationOption, FlagsDeclarationOption, ObjectDeclarationOption, OptionsReader, StringDeclarationOption, TypeDocOptionMap, TypeDocOptions, ValidationOptions, TypeDocOptionValues, ParameterTypeToOptionTypeMap, ManuallyValidatedOption, } from "./options";
12
+ export type { ArrayDeclarationOption, BooleanDeclarationOption, DeclarationOption, DeclarationOptionBase, DeclarationOptionToOptionType, KeyToDeclaration, MapDeclarationOption, MixedDeclarationOption, NumberDeclarationOption, FlagsDeclarationOption, ObjectDeclarationOption, OptionsReader, StringDeclarationOption, TypeDocOptionMap, TypeDocOptions, ValidationOptions, TypeDocOptionValues, ParameterTypeToOptionTypeMap, ManuallyValidatedOption, JsDocCompatibility, } from "./options";
12
13
  export { loadPlugins } from "./plugins";
13
14
  export { getSortFunction } from "./sort";
14
15
  export type { SortStrategy } from "./sort";
@@ -26,7 +26,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
26
26
  return result;
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.MinimalSourceFile = exports.Validation = exports.renderElement = exports.Raw = exports.Fragment = exports.JSX = exports.EventHooks = exports.getSortFunction = exports.loadPlugins = exports.TypeDocReader = exports.TSConfigReader = exports.ParameterType = exports.ParameterHint = exports.PackageJsonReader = exports.Options = exports.CommentStyle = exports.BindOption = exports.ArgumentsReader = exports.DefaultMap = exports.LogLevel = exports.Logger = exports.ConsoleLogger = exports.assertNever = exports.discoverPackageJson = exports.discoverInParentDir = exports.writeFileSync = exports.writeFile = exports.readFile = exports.normalizePath = exports.getCommonDirectory = exports.copySync = exports.copy = exports.isFile = exports.EventDispatcher = exports.Event = exports.Component = exports.ChildableComponent = exports.AbstractComponent = exports.unique = exports.removeIfPresent = exports.removeIf = exports.partition = exports.insertPrioritySorted = exports.filterMap = void 0;
29
+ exports.MinimalSourceFile = exports.Validation = exports.renderElement = exports.Raw = exports.Fragment = exports.JSX = exports.EventHooks = exports.getSortFunction = exports.loadPlugins = exports.TypeDocReader = exports.TSConfigReader = exports.ParameterType = exports.ParameterHint = exports.PackageJsonReader = exports.Options = exports.CommentStyle = exports.BindOption = exports.ArgumentsReader = exports.DefaultMap = exports.LogLevel = exports.Logger = exports.ConsoleLogger = exports.assertNever = exports.normalizePath = exports.discoverPackageJson = exports.discoverInParentDir = exports.writeFileSync = exports.writeFile = exports.readFile = exports.getCommonDirectory = exports.copySync = exports.copy = exports.isFile = exports.EventDispatcher = exports.Event = exports.Component = exports.ChildableComponent = exports.AbstractComponent = exports.unique = exports.removeIfPresent = exports.removeIf = exports.partition = exports.insertPrioritySorted = exports.filterMap = void 0;
30
30
  var array_1 = require("./array");
31
31
  Object.defineProperty(exports, "filterMap", { enumerable: true, get: function () { return array_1.filterMap; } });
32
32
  Object.defineProperty(exports, "insertPrioritySorted", { enumerable: true, get: function () { return array_1.insertPrioritySorted; } });
@@ -47,12 +47,13 @@ Object.defineProperty(exports, "isFile", { enumerable: true, get: function () {
47
47
  Object.defineProperty(exports, "copy", { enumerable: true, get: function () { return fs_1.copy; } });
48
48
  Object.defineProperty(exports, "copySync", { enumerable: true, get: function () { return fs_1.copySync; } });
49
49
  Object.defineProperty(exports, "getCommonDirectory", { enumerable: true, get: function () { return fs_1.getCommonDirectory; } });
50
- Object.defineProperty(exports, "normalizePath", { enumerable: true, get: function () { return fs_1.normalizePath; } });
51
50
  Object.defineProperty(exports, "readFile", { enumerable: true, get: function () { return fs_1.readFile; } });
52
51
  Object.defineProperty(exports, "writeFile", { enumerable: true, get: function () { return fs_1.writeFile; } });
53
52
  Object.defineProperty(exports, "writeFileSync", { enumerable: true, get: function () { return fs_1.writeFileSync; } });
54
53
  Object.defineProperty(exports, "discoverInParentDir", { enumerable: true, get: function () { return fs_1.discoverInParentDir; } });
55
54
  Object.defineProperty(exports, "discoverPackageJson", { enumerable: true, get: function () { return fs_1.discoverPackageJson; } });
55
+ var paths_1 = require("./paths");
56
+ Object.defineProperty(exports, "normalizePath", { enumerable: true, get: function () { return paths_1.normalizePath; } });
56
57
  var general_1 = require("./general");
57
58
  Object.defineProperty(exports, "assertNever", { enumerable: true, get: function () { return general_1.assertNever; } });
58
59
  var loggers_1 = require("./loggers");
@@ -28,14 +28,15 @@ function Raw(_props) {
28
28
  return null;
29
29
  }
30
30
  exports.Raw = Raw;
31
+ const htmlEscapes = {
32
+ "&": "&amp;",
33
+ "<": "&lt;",
34
+ ">": "&gt;",
35
+ '"': "&quot;",
36
+ "'": "&#39;",
37
+ };
31
38
  function escapeHtml(html) {
32
- return html.replace(/[&<>'"]/g, (c) => ({
33
- "&": "&amp;",
34
- "<": "&lt;",
35
- ">": "&gt;",
36
- '"': "&quot;",
37
- "'": "&#39;",
38
- }[c]));
39
+ return html.replace(/[&<>'"]/g, (c) => htmlEscapes[c]);
39
40
  }
40
41
  const voidElements = new Set([
41
42
  "area",
@@ -2,6 +2,7 @@ export declare class DefaultMap<K, V> extends Map<K, V> {
2
2
  private creator;
3
3
  constructor(creator: () => V);
4
4
  get(key: K): V;
5
+ getNoInsert(key: K): V | undefined;
5
6
  }
6
7
  export declare class StableKeyMap<K extends {
7
8
  getStableKey(): string;
@@ -16,6 +16,9 @@ class DefaultMap extends Map {
16
16
  this.set(key, created);
17
17
  return created;
18
18
  }
19
+ getNoInsert(key) {
20
+ return super.get(key);
21
+ }
19
22
  }
20
23
  exports.DefaultMap = DefaultMap;
21
24
  class StableKeyMap {
@@ -59,6 +59,7 @@ export interface TypeDocOptionMap {
59
59
  options: string;
60
60
  tsconfig: string;
61
61
  compilerOptions: unknown;
62
+ plugin: string[];
62
63
  entryPoints: string[];
63
64
  entryPointStrategy: typeof EntryPointStrategy;
64
65
  exclude: string[];
@@ -70,9 +71,13 @@ export interface TypeDocOptionMap {
70
71
  excludePrivate: boolean;
71
72
  excludeProtected: boolean;
72
73
  excludeReferences: boolean;
73
- externalSymbolLinkMappings: ManuallyValidatedOption<Record<string, Record<string, string>>>;
74
- media: string;
75
- includes: string;
74
+ name: string;
75
+ includeVersion: boolean;
76
+ disableSources: boolean;
77
+ sourceLinkTemplate: string;
78
+ gitRevision: string;
79
+ gitRemote: string;
80
+ readme: string;
76
81
  out: string;
77
82
  json: string;
78
83
  pretty: boolean;
@@ -82,59 +87,55 @@ export interface TypeDocOptionMap {
82
87
  darkHighlightTheme: ShikiTheme;
83
88
  customCss: string;
84
89
  markedOptions: unknown;
85
- name: string;
86
- includeVersion: boolean;
87
- disableSources: boolean;
88
90
  basePath: string;
89
- excludeTags: `@${string}`[];
90
- readme: string;
91
91
  cname: string;
92
- sourceLinkTemplate: string;
93
- gitRevision: string;
94
- gitRemote: string;
95
92
  htmlLang: string;
96
93
  githubPages: boolean;
94
+ cacheBust: boolean;
97
95
  gaID: string;
98
96
  hideGenerator: boolean;
99
- cacheBust: boolean;
97
+ hideParameterTypesInTitle: boolean;
100
98
  searchInComments: boolean;
101
99
  cleanOutputDir: boolean;
102
100
  titleLink: string;
103
101
  navigationLinks: ManuallyValidatedOption<Record<string, string>>;
104
102
  sidebarLinks: ManuallyValidatedOption<Record<string, string>>;
105
- jsDocCompatibility: JsDocCompatibility;
103
+ visibilityFilters: ManuallyValidatedOption<{
104
+ protected?: boolean;
105
+ private?: boolean;
106
+ inherited?: boolean;
107
+ external?: boolean;
108
+ [tag: `@${string}`]: boolean;
109
+ }>;
110
+ searchCategoryBoosts: ManuallyValidatedOption<Record<string, number>>;
111
+ searchGroupBoosts: ManuallyValidatedOption<Record<string, number>>;
106
112
  commentStyle: typeof CommentStyle;
107
113
  useTsLinkResolution: boolean;
114
+ jsDocCompatibility: JsDocCompatibility;
108
115
  blockTags: `@${string}`[];
109
116
  inlineTags: `@${string}`[];
110
117
  modifierTags: `@${string}`[];
118
+ excludeTags: `@${string}`[];
119
+ externalSymbolLinkMappings: ManuallyValidatedOption<Record<string, Record<string, string>>>;
120
+ media: string;
121
+ includes: string;
111
122
  categorizeByGroup: boolean;
112
123
  defaultCategory: string;
113
124
  categoryOrder: string[];
114
125
  sort: SortStrategy[];
115
126
  kindSortOrder: ReflectionKind.KindString[];
116
- visibilityFilters: ManuallyValidatedOption<{
117
- protected?: boolean;
118
- private?: boolean;
119
- inherited?: boolean;
120
- external?: boolean;
121
- [tag: `@${string}`]: boolean;
122
- }>;
123
- searchCategoryBoosts: ManuallyValidatedOption<Record<string, number>>;
124
- searchGroupBoosts: ManuallyValidatedOption<Record<string, number>>;
127
+ treatWarningsAsErrors: boolean;
128
+ treatValidationWarningsAsErrors: boolean;
129
+ intentionallyNotExported: string[];
130
+ validation: ValidationOptions;
131
+ requiredToBeDocumented: ReflectionKind.KindString[];
125
132
  watch: boolean;
126
133
  preserveWatchOutput: boolean;
127
- skipErrorChecking: boolean;
128
134
  help: boolean;
129
135
  version: boolean;
130
136
  showConfig: boolean;
131
- plugin: string[];
132
137
  logLevel: typeof LogLevel;
133
- treatWarningsAsErrors: boolean;
134
- treatValidationWarningsAsErrors: boolean;
135
- intentionallyNotExported: string[];
136
- validation: ValidationOptions;
137
- requiredToBeDocumented: ReflectionKind.KindString[];
138
+ skipErrorChecking: boolean;
138
139
  }
139
140
  /**
140
141
  * Wrapper type for values in TypeDocOptionMap which are represented with an unknown option type, but
@@ -2,4 +2,4 @@ export { Options, BindOption } from "./options";
2
2
  export type { OptionsReader } from "./options";
3
3
  export { ArgumentsReader, PackageJsonReader, TypeDocReader, TSConfigReader, } from "./readers";
4
4
  export { CommentStyle, EmitStrategy, ParameterType, ParameterHint, } from "./declaration";
5
- export type { TypeDocOptions, TypeDocOptionMap, ValidationOptions, KeyToDeclaration, DeclarationOption, DeclarationOptionBase, StringDeclarationOption, NumberDeclarationOption, BooleanDeclarationOption, ArrayDeclarationOption, MixedDeclarationOption, ObjectDeclarationOption, MapDeclarationOption, FlagsDeclarationOption, DeclarationOptionToOptionType, TypeDocOptionValues, ParameterTypeToOptionTypeMap, ManuallyValidatedOption, } from "./declaration";
5
+ export type { TypeDocOptions, TypeDocOptionMap, ValidationOptions, KeyToDeclaration, DeclarationOption, DeclarationOptionBase, StringDeclarationOption, NumberDeclarationOption, BooleanDeclarationOption, ArrayDeclarationOption, MixedDeclarationOption, ObjectDeclarationOption, MapDeclarationOption, FlagsDeclarationOption, DeclarationOptionToOptionType, TypeDocOptionValues, ParameterTypeToOptionTypeMap, ManuallyValidatedOption, JsDocCompatibility, } from "./declaration";
@@ -65,7 +65,7 @@ class TSConfigReader {
65
65
  }
66
66
  return;
67
67
  }
68
- fileToRead = (0, fs_1.normalizePath)((0, path_1.resolve)(fileToRead));
68
+ fileToRead = (0, paths_1.normalizePath)((0, path_1.resolve)(fileToRead));
69
69
  logger.verbose(`Reading tsconfig at ${(0, paths_1.nicePath)(fileToRead)}`);
70
70
  this.addTagsFromTsdocJson(container, logger, (0, path_1.resolve)(fileToRead));
71
71
  const parsed = (0, tsconfig_1.readTsConfig)(fileToRead, logger);
@@ -142,7 +142,7 @@ class TSConfigReader {
142
142
  return;
143
143
  }
144
144
  this.seenTsdocPaths.add(path);
145
- const { config, error } = typescript_1.default.readConfigFile((0, fs_1.normalizePath)(path), typescript_1.default.sys.readFile);
145
+ const { config, error } = typescript_1.default.readConfigFile((0, paths_1.normalizePath)(path), typescript_1.default.sys.readFile);
146
146
  if (error) {
147
147
  logger.error(`Failed to read tsdoc.json file at ${(0, paths_1.nicePath)(path)}.`);
148
148
  return;
@@ -76,7 +76,7 @@ class TypeDocReader {
76
76
  seen.add(file);
77
77
  let fileContent;
78
78
  if (file.endsWith(".json")) {
79
- const readResult = typescript_1.default.readConfigFile((0, fs_1.normalizePath)(file), (path) => FS.readFileSync(path, "utf-8"));
79
+ const readResult = typescript_1.default.readConfigFile((0, paths_1.normalizePath)(file), (path) => FS.readFileSync(path, "utf-8"));
80
80
  if (readResult.error) {
81
81
  logger.error(`Failed to parse ${(0, paths_1.nicePath)(file)}, ensure it exists and contains an object.`);
82
82
  return;
@@ -352,6 +352,12 @@ function addTypeDocOptions(options) {
352
352
  help: "Do not print the TypeDoc link at the end of the page.",
353
353
  type: declaration_1.ParameterType.Boolean,
354
354
  });
355
+ options.addDeclaration({
356
+ name: "hideParameterTypesInTitle",
357
+ help: "Hides parameter types in signature titles for easier scanning.",
358
+ type: declaration_1.ParameterType.Boolean,
359
+ defaultValue: true,
360
+ });
355
361
  options.addDeclaration({
356
362
  name: "cacheBust",
357
363
  help: "Include the generation time in links to static assets.",
@@ -7,3 +7,10 @@ import { Minimatch } from "minimatch";
7
7
  export declare function createMinimatch(patterns: string[]): Minimatch[];
8
8
  export declare function matchesAny(patterns: readonly Minimatch[], path: string): boolean;
9
9
  export declare function nicePath(absPath: string): string;
10
+ /**
11
+ * Normalize the given path.
12
+ *
13
+ * @param path The path that should be normalized.
14
+ * @returns The normalized path.
15
+ */
16
+ export declare function normalizePath(path: string): string;
@@ -1,22 +1,21 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.nicePath = exports.matchesAny = exports.createMinimatch = void 0;
3
+ exports.normalizePath = exports.nicePath = exports.matchesAny = exports.createMinimatch = void 0;
4
4
  const minimatch_1 = require("minimatch");
5
5
  const path_1 = require("path");
6
- const fs_1 = require("./fs");
7
6
  /**
8
7
  * Convert array of glob patterns to array of minimatch instances.
9
8
  *
10
9
  * Handle a few Windows-Unix path gotchas.
11
10
  */
12
11
  function createMinimatch(patterns) {
13
- return patterns.map((pattern) => new minimatch_1.Minimatch((0, fs_1.normalizePath)(pattern).replace(/^\w:\//, ""), {
12
+ return patterns.map((pattern) => new minimatch_1.Minimatch(normalizePath(pattern).replace(/^\w:\//, ""), {
14
13
  dot: true,
15
14
  }));
16
15
  }
17
16
  exports.createMinimatch = createMinimatch;
18
17
  function matchesAny(patterns, path) {
19
- const normPath = (0, fs_1.normalizePath)(path).replace(/^\w:\//, "");
18
+ const normPath = normalizePath(path).replace(/^\w:\//, "");
20
19
  return patterns.some((pat) => pat.match(normPath));
21
20
  }
22
21
  exports.matchesAny = matchesAny;
@@ -25,8 +24,18 @@ function nicePath(absPath) {
25
24
  return absPath;
26
25
  const relativePath = (0, path_1.relative)(process.cwd(), absPath);
27
26
  if (relativePath.startsWith("..")) {
28
- return (0, fs_1.normalizePath)(absPath);
27
+ return normalizePath(absPath);
29
28
  }
30
- return `./${(0, fs_1.normalizePath)(relativePath)}`;
29
+ return `./${normalizePath(relativePath)}`;
31
30
  }
32
31
  exports.nicePath = nicePath;
32
+ /**
33
+ * Normalize the given path.
34
+ *
35
+ * @param path The path that should be normalized.
36
+ * @returns The normalized path.
37
+ */
38
+ function normalizePath(path) {
39
+ return path.replace(/\\/g, "/");
40
+ }
41
+ exports.normalizePath = normalizePath;
@@ -4,6 +4,6 @@
4
4
  */
5
5
  import type { DeclarationReflection } from "../models/reflections/declaration";
6
6
  import type { Options } from "./options";
7
- export declare const SORT_STRATEGIES: readonly ["source-order", "alphabetical", "enum-value-ascending", "enum-value-descending", "static-first", "instance-first", "visibility", "required-first", "kind"];
7
+ export declare const SORT_STRATEGIES: readonly ["source-order", "alphabetical", "enum-value-ascending", "enum-value-descending", "enum-member-source-order", "static-first", "instance-first", "visibility", "required-first", "kind"];
8
8
  export type SortStrategy = (typeof SORT_STRATEGIES)[number];
9
9
  export declare function getSortFunction(opts: Options): (reflections: DeclarationReflection[]) => void;
@@ -12,6 +12,7 @@ exports.SORT_STRATEGIES = [
12
12
  "alphabetical",
13
13
  "enum-value-ascending",
14
14
  "enum-value-descending",
15
+ "enum-member-source-order",
15
16
  "static-first",
16
17
  "instance-first",
17
18
  "visibility",
@@ -56,7 +57,7 @@ const sorts = {
56
57
  return true;
57
58
  }
58
59
  if (aSymbol.fileName === bSymbol.fileName &&
59
- aSymbol.pos < aSymbol.pos) {
60
+ aSymbol.pos < bSymbol.pos) {
60
61
  return true;
61
62
  }
62
63
  return false;
@@ -86,6 +87,13 @@ const sorts = {
86
87
  }
87
88
  return false;
88
89
  },
90
+ "enum-member-source-order"(a, b, data) {
91
+ if (a.kind === kind_1.ReflectionKind.EnumMember &&
92
+ b.kind === kind_1.ReflectionKind.EnumMember) {
93
+ return sorts["source-order"](a, b, data);
94
+ }
95
+ return false;
96
+ },
89
97
  "static-first"(a, b) {
90
98
  return a.flags.isStatic && !b.flags.isStatic;
91
99
  },
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.0",
4
+ "version": "0.24.2",
5
5
  "homepage": "https://typedoc.org",
6
6
  "exports": {
7
7
  ".": "./dist/index.js",
@@ -25,8 +25,8 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "lunr": "^2.3.9",
28
- "marked": "^4.2.12",
29
- "minimatch": "^7.1.3",
28
+ "marked": "^4.3.0",
29
+ "minimatch": "^9.0.0",
30
30
  "shiki": "^0.14.1"
31
31
  },
32
32
  "peerDependencies": {
@@ -37,17 +37,17 @@
37
37
  "@types/marked": "^4.0.8",
38
38
  "@types/mocha": "^10.0.1",
39
39
  "@types/node": "14",
40
- "@typescript-eslint/eslint-plugin": "^5.55.0",
41
- "@typescript-eslint/parser": "^5.55.0",
40
+ "@typescript-eslint/eslint-plugin": "^5.58.0",
41
+ "@typescript-eslint/parser": "^5.58.0",
42
42
  "@typestrong/fs-fixture-builder": "github:TypeStrong/fs-fixture-builder#8abd1494280116ff5318dde2c50ad01e1663790c",
43
43
  "c8": "^7.13.0",
44
- "esbuild": "^0.17.12",
45
- "eslint": "^8.36.0",
44
+ "esbuild": "^0.17.16",
45
+ "eslint": "^8.38.0",
46
46
  "mocha": "^10.2.0",
47
- "prettier": "2.8.4",
47
+ "prettier": "2.8.7",
48
48
  "puppeteer": "^13.5.2",
49
49
  "ts-node": "^10.9.1",
50
- "typescript": "5.0.2"
50
+ "typescript": "5.0.4"
51
51
  },
52
52
  "files": [
53
53
  "/bin",